Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR consumption/resource-manager] Adding new properties to Consumption Usage Details #2877

Merged

Large diffs are not rendered by default.

130 changes: 68 additions & 62 deletions azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,94 +9,100 @@
# regenerated.
# --------------------------------------------------------------------------

from .error_details import ErrorDetails
from .error_response import ErrorResponse, ErrorResponseException
from .operation_display import OperationDisplay
from .operation import Operation
from .resource import Resource
from .meter_details import MeterDetails
from .usage_detail import UsageDetail
from .marketplace import Marketplace
from .balance_properties_new_purchases_details_item import BalancePropertiesNewPurchasesDetailsItem
from .balance_properties_adjustment_details_item import BalancePropertiesAdjustmentDetailsItem
from .balance import Balance
from .reservation_summary import ReservationSummary
from .reservation_detail import ReservationDetail
from .reservation_recommendation import ReservationRecommendation
from .tag import Tag
from .tags_result import TagsResult
from .budget_time_period import BudgetTimePeriod
from .filters import Filters
from .current_spend import CurrentSpend
from .notification import Notification
from .budget import Budget
from .cost_tag_properties import CostTagProperties
from .cost_tag import CostTag
from .price_sheet_properties import PriceSheetProperties
from .price_sheet_result import PriceSheetResult
from .forecast_properties_confidence_levels_item import ForecastPropertiesConfidenceLevelsItem
from .forecast import Forecast
from .usage_detail import UsageDetail
from .report_config_recurrence_period import ReportConfigRecurrencePeriod
from .report_config_schedule import ReportConfigSchedule
from .report_config_delivery_destination import ReportConfigDeliveryDestination
from .report_config_delivery_info import ReportConfigDeliveryInfo
from .report_config_time_period import ReportConfigTimePeriod
from .report_config_dataset_configuration import ReportConfigDatasetConfiguration
from .report_config_aggregation import ReportConfigAggregation
from .report_config_grouping import ReportConfigGrouping
from .report_config_comparison_expression import ReportConfigComparisonExpression
from .report_config_filter import ReportConfigFilter
from .report_config_dataset import ReportConfigDataset
from .report_config_definition import ReportConfigDefinition
from .report_config import ReportConfig
from .report_config_list_result import ReportConfigListResult
from .dimension import Dimension
from .usage_analysis_column import UsageAnalysisColumn
from .usage_analysis import UsageAnalysis
from .error_details import ErrorDetails
from .error_response import ErrorResponse, ErrorResponseException
from .operation_display import OperationDisplay
from .operation import Operation
from .resource import Resource
from .resource_attributes import ResourceAttributes
from .proxy_resource import ProxyResource
from .query_options import QueryOptions
from .usage_detail_paged import UsageDetailPaged
from .marketplace_paged import MarketplacePaged
from .reservation_summary_paged import ReservationSummaryPaged
from .reservation_detail_paged import ReservationDetailPaged
from .reservation_recommendation_paged import ReservationRecommendationPaged
from .budget_paged import BudgetPaged
from .forecast_paged import ForecastPaged
from .operation_paged import OperationPaged
from .dimension_paged import DimensionPaged
from .usage_analysis_paged import UsageAnalysisPaged
from .consumption_management_client_enums import (
BillingFrequency,
CategoryType,
TimeGrainType,
OperatorType,
Grain,
ChargeType,
Bound,
StatusType,
RecurrenceType,
FormatType,
TimeframeType,
GranularityType,
ReportConfigColumnType,
Datagrain,
)

__all__ = [
'ErrorDetails',
'ErrorResponse', 'ErrorResponseException',
'OperationDisplay',
'Operation',
'Resource',
'MeterDetails',
'UsageDetail',
'Marketplace',
'BalancePropertiesNewPurchasesDetailsItem',
'BalancePropertiesAdjustmentDetailsItem',
'Balance',
'ReservationSummary',
'ReservationDetail',
'ReservationRecommendation',
'Tag',
'TagsResult',
'BudgetTimePeriod',
'Filters',
'CurrentSpend',
'Notification',
'Budget',
'CostTagProperties',
'CostTag',
'PriceSheetProperties',
'PriceSheetResult',
'ForecastPropertiesConfidenceLevelsItem',
'Forecast',
'UsageDetail',
'ReportConfigRecurrencePeriod',
'ReportConfigSchedule',
'ReportConfigDeliveryDestination',
'ReportConfigDeliveryInfo',
'ReportConfigTimePeriod',
'ReportConfigDatasetConfiguration',
'ReportConfigAggregation',
'ReportConfigGrouping',
'ReportConfigComparisonExpression',
'ReportConfigFilter',
'ReportConfigDataset',
'ReportConfigDefinition',
'ReportConfig',
'ReportConfigListResult',
'Dimension',
'UsageAnalysisColumn',
'UsageAnalysis',
'ErrorDetails',
'ErrorResponse', 'ErrorResponseException',
'OperationDisplay',
'Operation',
'Resource',
'ResourceAttributes',
'ProxyResource',
'QueryOptions',
'UsageDetailPaged',
'MarketplacePaged',
'ReservationSummaryPaged',
'ReservationDetailPaged',
'ReservationRecommendationPaged',
'BudgetPaged',
'ForecastPaged',
'OperationPaged',
'DimensionPaged',
'UsageAnalysisPaged',
'BillingFrequency',
'CategoryType',
'TimeGrainType',
'OperatorType',
'Grain',
'ChargeType',
'Bound',
'StatusType',
'RecurrenceType',
'FormatType',
'TimeframeType',
'GranularityType',
'ReportConfigColumnType',
'Datagrain',
]
128 changes: 128 additions & 0 deletions azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,29 @@
from msrest.serialization import Model


class ReportConfigListResult(Model):
"""Result of listing report configs. It contains a list of available report
configurations in the scope provided.
class BalancePropertiesAdjustmentDetailsItem(Model):
"""BalancePropertiesAdjustmentDetailsItem.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar value: The list of report configs.
:vartype value: list[~azure.mgmt.consumption.models.ReportConfig]
:ivar name: the name of new adjustment.
:vartype name: str
:ivar value: the value of new adjustment.
:vartype value: decimal.Decimal
"""

_validation = {
'name': {'readonly': True},
'value': {'readonly': True},
}

_attribute_map = {
'value': {'key': 'value', 'type': '[ReportConfig]'},
'name': {'key': 'name', 'type': 'str'},
'value': {'key': 'value', 'type': 'decimal'},
}

def __init__(self):
super(ReportConfigListResult, self).__init__()
super(BalancePropertiesAdjustmentDetailsItem, self).__init__()
self.name = None
self.value = None
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,29 @@
from msrest.serialization import Model


class ReportConfigAggregation(Model):
"""The aggregation expression to be used in the report.
class BalancePropertiesNewPurchasesDetailsItem(Model):
"""BalancePropertiesNewPurchasesDetailsItem.

Variables are only populated by the server, and will be ignored when
sending a request.

:param name: The name of the column to aggregate.
:type name: str
:ivar function: The name of the aggregation function to use. Default
value: "Sum" .
:vartype function: str
:ivar name: the name of new purchase.
:vartype name: str
:ivar value: the value of new purchase.
:vartype value: decimal.Decimal
"""

_validation = {
'name': {'required': True},
'function': {'required': True, 'constant': True},
'name': {'readonly': True},
'value': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'function': {'key': 'function', 'type': 'str'},
'value': {'key': 'value', 'type': 'decimal'},
}

function = "Sum"

def __init__(self, name):
super(ReportConfigAggregation, self).__init__()
self.name = name
def __init__(self):
super(BalancePropertiesNewPurchasesDetailsItem, self).__init__()
self.name = None
self.value = None
Loading