Skip to content

Commit

Permalink
[AutoPR consumption/resource-manager] Adding new properties to Consum…
Browse files Browse the repository at this point in the history
…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
AutorestCI committed Jul 12, 2018
1 parent 112756d commit 91f516d
Show file tree
Hide file tree
Showing 55 changed files with 3,074 additions and 1,442 deletions.

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

0 comments on commit 91f516d

Please sign in to comment.