diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py b/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py index 7524d73c9121..bb80d1faf5d3 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py @@ -13,19 +13,15 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.usage_details_operations import UsageDetailsOperations -from .operations.marketplaces_operations import MarketplacesOperations -from .operations.budgets_operations import BudgetsOperations -from .operations.tags_operations import TagsOperations -from .operations.charges_operations import ChargesOperations -from .operations.balances_operations import BalancesOperations -from .operations.reservations_summaries_operations import ReservationsSummariesOperations -from .operations.reservations_details_operations import ReservationsDetailsOperations -from .operations.reservation_recommendations_operations import ReservationRecommendationsOperations -from .operations.price_sheet_operations import PriceSheetOperations -from .operations.forecasts_operations import ForecastsOperations from .operations.operations import Operations -from .operations.aggregated_cost_operations import AggregatedCostOperations +from .operations.credit_summary_by_billing_profile_operations import CreditSummaryByBillingProfileOperations +from .operations.events_by_billing_profile_operations import EventsByBillingProfileOperations +from .operations.lots_by_billing_profile_operations import LotsByBillingProfileOperations +from .operations.invoice_pricesheet_operations import InvoicePricesheetOperations +from .operations.billing_profile_pricesheet_operations import BillingProfilePricesheetOperations +from .operations.charges_by_billing_account_operations import ChargesByBillingAccountOperations +from .operations.charges_by_billing_profile_operations import ChargesByBillingProfileOperations +from .operations.charges_by_invoice_section_operations import ChargesByInvoiceSectionOperations from . import models @@ -37,18 +33,14 @@ class ConsumptionManagementClientConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Azure Subscription ID. - :type subscription_id: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") if not base_url: base_url = 'https://management.azure.com' @@ -58,7 +50,6 @@ def __init__( self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials - self.subscription_id = subscription_id class ConsumptionManagementClient(SDKClient): @@ -67,75 +58,57 @@ class ConsumptionManagementClient(SDKClient): :ivar config: Configuration for client. :vartype config: ConsumptionManagementClientConfiguration - :ivar usage_details: UsageDetails operations - :vartype usage_details: azure.mgmt.consumption.operations.UsageDetailsOperations - :ivar marketplaces: Marketplaces operations - :vartype marketplaces: azure.mgmt.consumption.operations.MarketplacesOperations - :ivar budgets: Budgets operations - :vartype budgets: azure.mgmt.consumption.operations.BudgetsOperations - :ivar tags: Tags operations - :vartype tags: azure.mgmt.consumption.operations.TagsOperations - :ivar charges: Charges operations - :vartype charges: azure.mgmt.consumption.operations.ChargesOperations - :ivar balances: Balances operations - :vartype balances: azure.mgmt.consumption.operations.BalancesOperations - :ivar reservations_summaries: ReservationsSummaries operations - :vartype reservations_summaries: azure.mgmt.consumption.operations.ReservationsSummariesOperations - :ivar reservations_details: ReservationsDetails operations - :vartype reservations_details: azure.mgmt.consumption.operations.ReservationsDetailsOperations - :ivar reservation_recommendations: ReservationRecommendations operations - :vartype reservation_recommendations: azure.mgmt.consumption.operations.ReservationRecommendationsOperations - :ivar price_sheet: PriceSheet operations - :vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations - :ivar forecasts: Forecasts operations - :vartype forecasts: azure.mgmt.consumption.operations.ForecastsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.consumption.operations.Operations - :ivar aggregated_cost: AggregatedCost operations - :vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations + :ivar credit_summary_by_billing_profile: CreditSummaryByBillingProfile operations + :vartype credit_summary_by_billing_profile: azure.mgmt.consumption.operations.CreditSummaryByBillingProfileOperations + :ivar events_by_billing_profile: EventsByBillingProfile operations + :vartype events_by_billing_profile: azure.mgmt.consumption.operations.EventsByBillingProfileOperations + :ivar lots_by_billing_profile: LotsByBillingProfile operations + :vartype lots_by_billing_profile: azure.mgmt.consumption.operations.LotsByBillingProfileOperations + :ivar invoice_pricesheet: InvoicePricesheet operations + :vartype invoice_pricesheet: azure.mgmt.consumption.operations.InvoicePricesheetOperations + :ivar billing_profile_pricesheet: BillingProfilePricesheet operations + :vartype billing_profile_pricesheet: azure.mgmt.consumption.operations.BillingProfilePricesheetOperations + :ivar charges_by_billing_account: ChargesByBillingAccount operations + :vartype charges_by_billing_account: azure.mgmt.consumption.operations.ChargesByBillingAccountOperations + :ivar charges_by_billing_profile: ChargesByBillingProfile operations + :vartype charges_by_billing_profile: azure.mgmt.consumption.operations.ChargesByBillingProfileOperations + :ivar charges_by_invoice_section: ChargesByInvoiceSection operations + :vartype charges_by_invoice_section: azure.mgmt.consumption.operations.ChargesByInvoiceSectionOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Azure Subscription ID. - :type subscription_id: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, base_url=None): - self.config = ConsumptionManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = ConsumptionManagementClientConfiguration(credentials, base_url) super(ConsumptionManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-01-01' + self.api_version = '2018-11-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.usage_details = UsageDetailsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.marketplaces = MarketplacesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.budgets = BudgetsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.tags = TagsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.charges = ChargesOperations( + self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.balances = BalancesOperations( + self.credit_summary_by_billing_profile = CreditSummaryByBillingProfileOperations( self._client, self.config, self._serialize, self._deserialize) - self.reservations_summaries = ReservationsSummariesOperations( + self.events_by_billing_profile = EventsByBillingProfileOperations( self._client, self.config, self._serialize, self._deserialize) - self.reservations_details = ReservationsDetailsOperations( + self.lots_by_billing_profile = LotsByBillingProfileOperations( self._client, self.config, self._serialize, self._deserialize) - self.reservation_recommendations = ReservationRecommendationsOperations( + self.invoice_pricesheet = InvoicePricesheetOperations( self._client, self.config, self._serialize, self._deserialize) - self.price_sheet = PriceSheetOperations( + self.billing_profile_pricesheet = BillingProfilePricesheetOperations( self._client, self.config, self._serialize, self._deserialize) - self.forecasts = ForecastsOperations( + self.charges_by_billing_account = ChargesByBillingAccountOperations( self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( + self.charges_by_billing_profile = ChargesByBillingProfileOperations( self._client, self.config, self._serialize, self._deserialize) - self.aggregated_cost = AggregatedCostOperations( + self.charges_by_invoice_section = ChargesByInvoiceSectionOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py index 486cbc9695fb..0025303edc45 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py @@ -10,134 +10,99 @@ # -------------------------------------------------------------------------- try: - from .meter_details_py3 import MeterDetails - from .usage_detail_py3 import UsageDetail - from .marketplace_py3 import Marketplace - from .balance_properties_new_purchases_details_item_py3 import BalancePropertiesNewPurchasesDetailsItem - from .balance_properties_adjustment_details_item_py3 import BalancePropertiesAdjustmentDetailsItem - from .balance_py3 import Balance - from .reservation_summary_py3 import ReservationSummary - from .reservation_detail_py3 import ReservationDetail - from .reservation_recommendation_py3 import ReservationRecommendation - from .tag_py3 import Tag - from .tags_result_py3 import TagsResult - from .budget_time_period_py3 import BudgetTimePeriod - from .filters_py3 import Filters - from .current_spend_py3 import CurrentSpend - from .notification_py3 import Notification - from .budget_py3 import Budget - from .price_sheet_properties_py3 import PriceSheetProperties - from .price_sheet_result_py3 import PriceSheetResult - from .forecast_properties_confidence_levels_item_py3 import ForecastPropertiesConfidenceLevelsItem - from .forecast_py3 import Forecast - from .management_group_aggregated_cost_result_py3 import ManagementGroupAggregatedCostResult - from .charge_summary_py3 import ChargeSummary - from .charges_list_result_py3 import ChargesListResult - from .error_details_py3 import ErrorDetails - from .error_response_py3 import ErrorResponse, ErrorResponseException + from .enrollment_policies_py3 import EnrollmentPolicies + from .enrollment_py3 import Enrollment + from .department_py3 import Department + from .enrollment_account_py3 import EnrollmentAccount + from .address_py3 import Address + from .billing_profile_py3 import BillingProfile + from .invoice_section_py3 import InvoiceSection + from .billing_account_py3 import BillingAccount + from .amount_py3 import Amount + from .pricesheet_download_response_py3 import PricesheetDownloadResponse + from .credit_balance_summary_py3 import CreditBalanceSummary + from .credit_summary_py3 import CreditSummary + from .event_summary_py3 import EventSummary + from .events_py3 import Events + from .lot_summary_py3 import LotSummary + from .lots_py3 import Lots + from .charge_summary_by_billing_account_py3 import ChargeSummaryByBillingAccount + from .charges_list_by_billing_account_py3 import ChargesListByBillingAccount + from .charge_summary_by_billing_profile_py3 import ChargeSummaryByBillingProfile + from .charges_list_by_billing_profile_py3 import ChargesListByBillingProfile + from .charge_summary_by_invoice_section_py3 import ChargeSummaryByInvoiceSection + from .charges_list_by_invoice_section_py3 import ChargesListByInvoiceSection from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation - from .resource_py3 import Resource - from .resource_attributes_py3 import ResourceAttributes + from .error_details_py3 import ErrorDetails + from .error_response_py3 import ErrorResponse, ErrorResponseException from .proxy_resource_py3 import ProxyResource - from .query_options_py3 import QueryOptions + from .resource_py3 import Resource except (SyntaxError, ImportError): - 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 .price_sheet_properties import PriceSheetProperties - from .price_sheet_result import PriceSheetResult - from .forecast_properties_confidence_levels_item import ForecastPropertiesConfidenceLevelsItem - from .forecast import Forecast - from .management_group_aggregated_cost_result import ManagementGroupAggregatedCostResult - from .charge_summary import ChargeSummary - from .charges_list_result import ChargesListResult - from .error_details import ErrorDetails - from .error_response import ErrorResponse, ErrorResponseException + from .enrollment_policies import EnrollmentPolicies + from .enrollment import Enrollment + from .department import Department + from .enrollment_account import EnrollmentAccount + from .address import Address + from .billing_profile import BillingProfile + from .invoice_section import InvoiceSection + from .billing_account import BillingAccount + from .amount import Amount + from .pricesheet_download_response import PricesheetDownloadResponse + from .credit_balance_summary import CreditBalanceSummary + from .credit_summary import CreditSummary + from .event_summary import EventSummary + from .events import Events + from .lot_summary import LotSummary + from .lots import Lots + from .charge_summary_by_billing_account import ChargeSummaryByBillingAccount + from .charges_list_by_billing_account import ChargesListByBillingAccount + from .charge_summary_by_billing_profile import ChargeSummaryByBillingProfile + from .charges_list_by_billing_profile import ChargesListByBillingProfile + from .charge_summary_by_invoice_section import ChargeSummaryByInvoiceSection + from .charges_list_by_invoice_section import ChargesListByInvoiceSection from .operation_display import OperationDisplay from .operation import Operation - from .resource import Resource - from .resource_attributes import ResourceAttributes + from .error_details import ErrorDetails + from .error_response import ErrorResponse, ErrorResponseException from .proxy_resource import ProxyResource - from .query_options import QueryOptions -from .usage_detail_paged import UsageDetailPaged -from .marketplace_paged import MarketplacePaged -from .budget_paged import BudgetPaged -from .reservation_summary_paged import ReservationSummaryPaged -from .reservation_detail_paged import ReservationDetailPaged -from .reservation_recommendation_paged import ReservationRecommendationPaged -from .forecast_paged import ForecastPaged + from .resource import Resource from .operation_paged import OperationPaged from .consumption_management_client_enums import ( - BillingFrequency, - CategoryType, - TimeGrainType, - OperatorType, - Grain, - ChargeType, - Bound, - Datagrain, + EventType, + LotSource, ) __all__ = [ - 'MeterDetails', - 'UsageDetail', - 'Marketplace', - 'BalancePropertiesNewPurchasesDetailsItem', - 'BalancePropertiesAdjustmentDetailsItem', - 'Balance', - 'ReservationSummary', - 'ReservationDetail', - 'ReservationRecommendation', - 'Tag', - 'TagsResult', - 'BudgetTimePeriod', - 'Filters', - 'CurrentSpend', - 'Notification', - 'Budget', - 'PriceSheetProperties', - 'PriceSheetResult', - 'ForecastPropertiesConfidenceLevelsItem', - 'Forecast', - 'ManagementGroupAggregatedCostResult', - 'ChargeSummary', - 'ChargesListResult', - 'ErrorDetails', - 'ErrorResponse', 'ErrorResponseException', + 'EnrollmentPolicies', + 'Enrollment', + 'Department', + 'EnrollmentAccount', + 'Address', + 'BillingProfile', + 'InvoiceSection', + 'BillingAccount', + 'Amount', + 'PricesheetDownloadResponse', + 'CreditBalanceSummary', + 'CreditSummary', + 'EventSummary', + 'Events', + 'LotSummary', + 'Lots', + 'ChargeSummaryByBillingAccount', + 'ChargesListByBillingAccount', + 'ChargeSummaryByBillingProfile', + 'ChargesListByBillingProfile', + 'ChargeSummaryByInvoiceSection', + 'ChargesListByInvoiceSection', 'OperationDisplay', 'Operation', - 'Resource', - 'ResourceAttributes', + 'ErrorDetails', + 'ErrorResponse', 'ErrorResponseException', 'ProxyResource', - 'QueryOptions', - 'UsageDetailPaged', - 'MarketplacePaged', - 'BudgetPaged', - 'ReservationSummaryPaged', - 'ReservationDetailPaged', - 'ReservationRecommendationPaged', - 'ForecastPaged', + 'Resource', 'OperationPaged', - 'BillingFrequency', - 'CategoryType', - 'TimeGrainType', - 'OperatorType', - 'Grain', - 'ChargeType', - 'Bound', - 'Datagrain', + 'EventType', + 'LotSource', ] diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/address.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/address.py new file mode 100644 index 000000000000..8370d6217d55 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/address.py @@ -0,0 +1,56 @@ +# 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 msrest.serialization import Model + + +class Address(Model): + """Address details. + + :param address_line1: Address Line1. + :type address_line1: str + :param address_line2: Address Line2. + :type address_line2: str + :param address_line3: Address Line3. + :type address_line3: str + :param city: Address City. + :type city: str + :param region: Address Region. + :type region: str + :param country: Country code uses ISO2, 2-digit format.. + :type country: str + :param postal_code: Postal Code. + :type postal_code: str + :param phone_number: Phone Number. + :type phone_number: str + """ + + _attribute_map = { + 'address_line1': {'key': 'addressLine1', 'type': 'str'}, + 'address_line2': {'key': 'addressLine2', 'type': 'str'}, + 'address_line3': {'key': 'addressLine3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Address, self).__init__(**kwargs) + self.address_line1 = kwargs.get('address_line1', None) + self.address_line2 = kwargs.get('address_line2', None) + self.address_line3 = kwargs.get('address_line3', None) + self.city = kwargs.get('city', None) + self.region = kwargs.get('region', None) + self.country = kwargs.get('country', None) + self.postal_code = kwargs.get('postal_code', None) + self.phone_number = kwargs.get('phone_number', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/address_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/address_py3.py new file mode 100644 index 000000000000..2ccbcc2843f8 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/address_py3.py @@ -0,0 +1,56 @@ +# 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 msrest.serialization import Model + + +class Address(Model): + """Address details. + + :param address_line1: Address Line1. + :type address_line1: str + :param address_line2: Address Line2. + :type address_line2: str + :param address_line3: Address Line3. + :type address_line3: str + :param city: Address City. + :type city: str + :param region: Address Region. + :type region: str + :param country: Country code uses ISO2, 2-digit format.. + :type country: str + :param postal_code: Postal Code. + :type postal_code: str + :param phone_number: Phone Number. + :type phone_number: str + """ + + _attribute_map = { + 'address_line1': {'key': 'addressLine1', 'type': 'str'}, + 'address_line2': {'key': 'addressLine2', 'type': 'str'}, + 'address_line3': {'key': 'addressLine3', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'postal_code': {'key': 'postalCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + } + + def __init__(self, *, address_line1: str=None, address_line2: str=None, address_line3: str=None, city: str=None, region: str=None, country: str=None, postal_code: str=None, phone_number: str=None, **kwargs) -> None: + super(Address, self).__init__(**kwargs) + self.address_line1 = address_line1 + self.address_line2 = address_line2 + self.address_line3 = address_line3 + self.city = city + self.region = region + self.country = country + self.postal_code = postal_code + self.phone_number = phone_number diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/amount.py similarity index 61% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/amount.py index a0b9af41285c..2e8b3c962262 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/amount.py @@ -12,29 +12,29 @@ from msrest.serialization import Model -class BalancePropertiesAdjustmentDetailsItem(Model): - """BalancePropertiesAdjustmentDetailsItem. +class Amount(Model): + """Object to represent monetary quantities. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: the name of new adjustment. - :vartype name: str - :ivar value: the value of new adjustment. - :vartype value: decimal.Decimal + :ivar currency: The currency for the amount value. + :vartype currency: str + :ivar value: Amount value. + :vartype value: float """ _validation = { - 'name': {'readonly': True}, + 'currency': {'readonly': True}, 'value': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, + 'currency': {'key': 'currency', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, } def __init__(self, **kwargs): - super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) - self.name = None + super(Amount, self).__init__(**kwargs) + self.currency = None self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/amount_py3.py similarity index 61% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/amount_py3.py index 0fc6b3b377fc..77bd0fee23ed 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_adjustment_details_item_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/amount_py3.py @@ -12,29 +12,29 @@ from msrest.serialization import Model -class BalancePropertiesAdjustmentDetailsItem(Model): - """BalancePropertiesAdjustmentDetailsItem. +class Amount(Model): + """Object to represent monetary quantities. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: the name of new adjustment. - :vartype name: str - :ivar value: the value of new adjustment. - :vartype value: decimal.Decimal + :ivar currency: The currency for the amount value. + :vartype currency: str + :ivar value: Amount value. + :vartype value: float """ _validation = { - 'name': {'readonly': True}, + 'currency': {'readonly': True}, 'value': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, + 'currency': {'key': 'currency', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'float'}, } def __init__(self, **kwargs) -> None: - super(BalancePropertiesAdjustmentDetailsItem, self).__init__(**kwargs) - self.name = None + super(Amount, self).__init__(**kwargs) + self.currency = None self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py deleted file mode 100644 index 88be1e0fa0a5..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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, **kwargs): - super(Balance, self).__init__(**kwargs) - 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 = kwargs.get('billing_frequency', None) - self.price_hidden = None - self.new_purchases_details = None - self.adjustment_details = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py deleted file mode 100644 index 8208ab5e2150..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_py3.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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_py3 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, **kwargs) -> None: - super(Balance, self).__init__(**kwargs) - 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 diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_account.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_account.py new file mode 100644 index 000000000000..23bffc8bb830 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_account.py @@ -0,0 +1,108 @@ +# 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 BillingAccount(Resource): + """A billing account 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 company: The Company this billing account belongs to. + :vartype company: str + :ivar account_type: The billing account Type. Possible values include: + 'CommerceRoot', 'Enrollment' + :vartype account_type: str or ~azure.mgmt.consumption.models.enum + :param address: The address associated with billing account. + :type address: ~azure.mgmt.consumption.models.Address + :ivar default_currency: The ISO currency, for example, USD. + :vartype default_currency: str + :ivar country: The country associated with billing account. + :vartype country: str + :ivar agreements: Agreements associated with billing account + :vartype agreements: str + :ivar invoice_sections: The invoiceSections associated to the billing + account. + :vartype invoice_sections: + list[~azure.mgmt.consumption.models.InvoiceSection] + :ivar billing_profiles: The billing profiles associated to the billing + account. + :vartype billing_profiles: + list[~azure.mgmt.consumption.models.BillingProfile] + :ivar enrollment_details: The details about the associated legacy + enrollment. By default this is not populated, unless it's specified in + $expand. + :vartype enrollment_details: ~azure.mgmt.consumption.models.Enrollment + :ivar departments: The departments associated to the enrollment. + :vartype departments: list[~azure.mgmt.consumption.models.Department] + :ivar enrollment_accounts: The accounts associated to the enrollment. + :vartype enrollment_accounts: + list[~azure.mgmt.consumption.models.EnrollmentAccount] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'company': {'readonly': True}, + 'account_type': {'readonly': True}, + 'default_currency': {'readonly': True}, + 'country': {'readonly': True}, + 'agreements': {'readonly': True}, + 'invoice_sections': {'readonly': True}, + 'billing_profiles': {'readonly': True}, + 'enrollment_details': {'readonly': True}, + 'departments': {'readonly': True}, + 'enrollment_accounts': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'company': {'key': 'properties.company', 'type': 'str'}, + 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + 'address': {'key': 'properties.address', 'type': 'Address'}, + 'default_currency': {'key': 'properties.defaultCurrency', 'type': 'str'}, + 'country': {'key': 'properties.country', 'type': 'str'}, + 'agreements': {'key': 'properties.agreements', 'type': 'str'}, + 'invoice_sections': {'key': 'properties.invoiceSections', 'type': '[InvoiceSection]'}, + 'billing_profiles': {'key': 'properties.billingProfiles', 'type': '[BillingProfile]'}, + 'enrollment_details': {'key': 'properties.enrollmentDetails', 'type': 'Enrollment'}, + 'departments': {'key': 'properties.departments', 'type': '[Department]'}, + 'enrollment_accounts': {'key': 'properties.enrollmentAccounts', 'type': '[EnrollmentAccount]'}, + } + + def __init__(self, **kwargs): + super(BillingAccount, self).__init__(**kwargs) + self.company = None + self.account_type = None + self.address = kwargs.get('address', None) + self.default_currency = None + self.country = None + self.agreements = None + self.invoice_sections = None + self.billing_profiles = None + self.enrollment_details = None + self.departments = None + self.enrollment_accounts = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_account_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_account_py3.py new file mode 100644 index 000000000000..ae05a2211dad --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_account_py3.py @@ -0,0 +1,108 @@ +# 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_py3 import Resource + + +class BillingAccount(Resource): + """A billing account 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 company: The Company this billing account belongs to. + :vartype company: str + :ivar account_type: The billing account Type. Possible values include: + 'CommerceRoot', 'Enrollment' + :vartype account_type: str or ~azure.mgmt.consumption.models.enum + :param address: The address associated with billing account. + :type address: ~azure.mgmt.consumption.models.Address + :ivar default_currency: The ISO currency, for example, USD. + :vartype default_currency: str + :ivar country: The country associated with billing account. + :vartype country: str + :ivar agreements: Agreements associated with billing account + :vartype agreements: str + :ivar invoice_sections: The invoiceSections associated to the billing + account. + :vartype invoice_sections: + list[~azure.mgmt.consumption.models.InvoiceSection] + :ivar billing_profiles: The billing profiles associated to the billing + account. + :vartype billing_profiles: + list[~azure.mgmt.consumption.models.BillingProfile] + :ivar enrollment_details: The details about the associated legacy + enrollment. By default this is not populated, unless it's specified in + $expand. + :vartype enrollment_details: ~azure.mgmt.consumption.models.Enrollment + :ivar departments: The departments associated to the enrollment. + :vartype departments: list[~azure.mgmt.consumption.models.Department] + :ivar enrollment_accounts: The accounts associated to the enrollment. + :vartype enrollment_accounts: + list[~azure.mgmt.consumption.models.EnrollmentAccount] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'company': {'readonly': True}, + 'account_type': {'readonly': True}, + 'default_currency': {'readonly': True}, + 'country': {'readonly': True}, + 'agreements': {'readonly': True}, + 'invoice_sections': {'readonly': True}, + 'billing_profiles': {'readonly': True}, + 'enrollment_details': {'readonly': True}, + 'departments': {'readonly': True}, + 'enrollment_accounts': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'company': {'key': 'properties.company', 'type': 'str'}, + 'account_type': {'key': 'properties.accountType', 'type': 'str'}, + 'address': {'key': 'properties.address', 'type': 'Address'}, + 'default_currency': {'key': 'properties.defaultCurrency', 'type': 'str'}, + 'country': {'key': 'properties.country', 'type': 'str'}, + 'agreements': {'key': 'properties.agreements', 'type': 'str'}, + 'invoice_sections': {'key': 'properties.invoiceSections', 'type': '[InvoiceSection]'}, + 'billing_profiles': {'key': 'properties.billingProfiles', 'type': '[BillingProfile]'}, + 'enrollment_details': {'key': 'properties.enrollmentDetails', 'type': 'Enrollment'}, + 'departments': {'key': 'properties.departments', 'type': '[Department]'}, + 'enrollment_accounts': {'key': 'properties.enrollmentAccounts', 'type': '[EnrollmentAccount]'}, + } + + def __init__(self, *, address=None, **kwargs) -> None: + super(BillingAccount, self).__init__(**kwargs) + self.company = None + self.account_type = None + self.address = address + self.default_currency = None + self.country = None + self.agreements = None + self.invoice_sections = None + self.billing_profiles = None + self.enrollment_details = None + self.departments = None + self.enrollment_accounts = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_profile.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_profile.py new file mode 100644 index 000000000000..407ea5aa7ee3 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_profile.py @@ -0,0 +1,78 @@ +# 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 BillingProfile(Resource): + """A billing profile 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] + :param display_name: The billing profile name. + :type display_name: str + :param po_number: Purchase order number. + :type po_number: str + :param billing_address: Billing address. + :type billing_address: ~azure.mgmt.consumption.models.Address + :ivar billing_contact: Billing contact. + :vartype billing_contact: str + :ivar email_invoice: Email invoice. + :vartype email_invoice: bool + :ivar invoice_day: Invoice day. + :vartype invoice_day: int + :ivar currency: Currency on the billing profile. + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_contact': {'readonly': True}, + 'email_invoice': {'readonly': True}, + 'invoice_day': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'po_number': {'key': 'properties.poNumber', 'type': 'str'}, + 'billing_address': {'key': 'properties.billingAddress', 'type': 'Address'}, + 'billing_contact': {'key': 'properties.billingContact', 'type': 'str'}, + 'email_invoice': {'key': 'properties.emailInvoice', 'type': 'bool'}, + 'invoice_day': {'key': 'properties.invoiceDay', 'type': 'int'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BillingProfile, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.po_number = kwargs.get('po_number', None) + self.billing_address = kwargs.get('billing_address', None) + self.billing_contact = None + self.email_invoice = None + self.invoice_day = None + self.currency = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_profile_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_profile_py3.py new file mode 100644 index 000000000000..480a73f20973 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/billing_profile_py3.py @@ -0,0 +1,78 @@ +# 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_py3 import Resource + + +class BillingProfile(Resource): + """A billing profile 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] + :param display_name: The billing profile name. + :type display_name: str + :param po_number: Purchase order number. + :type po_number: str + :param billing_address: Billing address. + :type billing_address: ~azure.mgmt.consumption.models.Address + :ivar billing_contact: Billing contact. + :vartype billing_contact: str + :ivar email_invoice: Email invoice. + :vartype email_invoice: bool + :ivar invoice_day: Invoice day. + :vartype invoice_day: int + :ivar currency: Currency on the billing profile. + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_contact': {'readonly': True}, + 'email_invoice': {'readonly': True}, + 'invoice_day': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'po_number': {'key': 'properties.poNumber', 'type': 'str'}, + 'billing_address': {'key': 'properties.billingAddress', 'type': 'Address'}, + 'billing_contact': {'key': 'properties.billingContact', 'type': 'str'}, + 'email_invoice': {'key': 'properties.emailInvoice', 'type': 'bool'}, + 'invoice_day': {'key': 'properties.invoiceDay', 'type': 'int'}, + 'currency': {'key': 'properties.currency', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, po_number: str=None, billing_address=None, **kwargs) -> None: + super(BillingProfile, self).__init__(**kwargs) + self.display_name = display_name + self.po_number = po_number + self.billing_address = billing_address + self.billing_contact = None + self.email_invoice = None + self.invoice_day = None + self.currency = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py deleted file mode 100644 index 320d185716fc..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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 .proxy_resource import ProxyResource - - -class Budget(ProxyResource): - """A budget resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param category: Required. The category of the budget, whether the budget - tracks cost or usage. Possible values include: 'Cost', 'Usage' - :type category: str or ~azure.mgmt.consumption.models.CategoryType - :param amount: Required. The total amount of cost to track with the budget - :type amount: decimal.Decimal - :param time_grain: Required. The time covered by a budget. Tracking of the - amount will be reset based on the time grain. Possible values include: - 'Monthly', 'Quarterly', 'Annually' - :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType - :param time_period: Required. Has start and end date of the budget. The - start date must be first of the month and should be less than the end - date. Budget start date must be on or after June 1, 2017. Future start - date should not be more than three months. Past start date should be - selected within the timegrain period. There are no restrictions on the end - date. - :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod - :param filters: May be used to filter budgets by resource group, resource, - or meter. - :type filters: ~azure.mgmt.consumption.models.Filters - :ivar current_spend: The current amount of cost which is being tracked for - a budget. - :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend - :param notifications: Dictionary of notifications associated with the - budget. Budget can have up to five notifications. - :type notifications: dict[str, - ~azure.mgmt.consumption.models.Notification] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'amount': {'required': True}, - 'time_grain': {'required': True}, - 'time_period': {'required': True}, - 'current_spend': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'amount': {'key': 'properties.amount', 'type': 'decimal'}, - 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, - 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, - 'filters': {'key': 'properties.filters', 'type': 'Filters'}, - 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, - 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, - } - - def __init__(self, **kwargs): - super(Budget, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.amount = kwargs.get('amount', None) - self.time_grain = kwargs.get('time_grain', None) - self.time_period = kwargs.get('time_period', None) - self.filters = kwargs.get('filters', None) - self.current_spend = None - self.notifications = kwargs.get('notifications', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py deleted file mode 100644 index 2668382253e2..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class BudgetPaged(Paged): - """ - A paging container for iterating over a list of :class:`Budget ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Budget]'} - } - - def __init__(self, *args, **kwargs): - - super(BudgetPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py deleted file mode 100644 index 522ea98b4572..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_py3.py +++ /dev/null @@ -1,94 +0,0 @@ -# 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 .proxy_resource_py3 import ProxyResource - - -class Budget(ProxyResource): - """A budget resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource Id. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param category: Required. The category of the budget, whether the budget - tracks cost or usage. Possible values include: 'Cost', 'Usage' - :type category: str or ~azure.mgmt.consumption.models.CategoryType - :param amount: Required. The total amount of cost to track with the budget - :type amount: decimal.Decimal - :param time_grain: Required. The time covered by a budget. Tracking of the - amount will be reset based on the time grain. Possible values include: - 'Monthly', 'Quarterly', 'Annually' - :type time_grain: str or ~azure.mgmt.consumption.models.TimeGrainType - :param time_period: Required. Has start and end date of the budget. The - start date must be first of the month and should be less than the end - date. Budget start date must be on or after June 1, 2017. Future start - date should not be more than three months. Past start date should be - selected within the timegrain period. There are no restrictions on the end - date. - :type time_period: ~azure.mgmt.consumption.models.BudgetTimePeriod - :param filters: May be used to filter budgets by resource group, resource, - or meter. - :type filters: ~azure.mgmt.consumption.models.Filters - :ivar current_spend: The current amount of cost which is being tracked for - a budget. - :vartype current_spend: ~azure.mgmt.consumption.models.CurrentSpend - :param notifications: Dictionary of notifications associated with the - budget. Budget can have up to five notifications. - :type notifications: dict[str, - ~azure.mgmt.consumption.models.Notification] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'category': {'required': True}, - 'amount': {'required': True}, - 'time_grain': {'required': True}, - 'time_period': {'required': True}, - 'current_spend': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'amount': {'key': 'properties.amount', 'type': 'decimal'}, - 'time_grain': {'key': 'properties.timeGrain', 'type': 'str'}, - 'time_period': {'key': 'properties.timePeriod', 'type': 'BudgetTimePeriod'}, - 'filters': {'key': 'properties.filters', 'type': 'Filters'}, - 'current_spend': {'key': 'properties.currentSpend', 'type': 'CurrentSpend'}, - 'notifications': {'key': 'properties.notifications', 'type': '{Notification}'}, - } - - def __init__(self, *, category, amount, time_grain, time_period, e_tag: str=None, filters=None, notifications=None, **kwargs) -> None: - super(Budget, self).__init__(e_tag=e_tag, **kwargs) - self.category = category - self.amount = amount - self.time_grain = time_grain - self.time_period = time_period - self.filters = filters - self.current_spend = None - self.notifications = notifications diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py deleted file mode 100644 index a0fe9658a07f..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 msrest.serialization import Model - - -class BudgetTimePeriod(Model): - """The start and end date for a budget. - - All required parameters must be populated in order to send to Azure. - - :param start_date: Required. The start date for the budget. - :type start_date: datetime - :param end_date: The end date for the budget. If not provided, we default - this to 10 years from the start date. - :type end_date: datetime - """ - - _validation = { - 'start_date': {'required': True}, - } - - _attribute_map = { - 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, - 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(BudgetTimePeriod, self).__init__(**kwargs) - self.start_date = kwargs.get('start_date', None) - self.end_date = kwargs.get('end_date', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py deleted file mode 100644 index de0258c1d63f..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/budget_time_period_py3.py +++ /dev/null @@ -1,39 +0,0 @@ -# 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 msrest.serialization import Model - - -class BudgetTimePeriod(Model): - """The start and end date for a budget. - - All required parameters must be populated in order to send to Azure. - - :param start_date: Required. The start date for the budget. - :type start_date: datetime - :param end_date: The end date for the budget. If not provided, we default - this to 10 years from the start date. - :type end_date: datetime - """ - - _validation = { - 'start_date': {'required': True}, - } - - _attribute_map = { - 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, - 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, - } - - def __init__(self, *, start_date, end_date=None, **kwargs) -> None: - super(BudgetTimePeriod, self).__init__(**kwargs) - self.start_date = start_date - self.end_date = end_date diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_account.py similarity index 52% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_account.py index d44e542a0468..351051ddd354 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_account.py @@ -12,8 +12,8 @@ from .resource import Resource -class ManagementGroupAggregatedCostResult(Resource): - """A management group aggregated cost resource. +class ChargeSummaryByBillingAccount(Resource): + """A charge summary resource by billing account. Variables are only populated by the server, and will be ignored when sending a request. @@ -27,32 +27,27 @@ class ManagementGroupAggregatedCostResult(Resource): :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar billing_period_id: The id of the billing period resource that the - aggregated cost belongs to. + usage belongs to. :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by aggregated - cost. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the aggregated - cost. - :vartype usage_end: datetime + :ivar usage_start: Billing period start date. + :vartype usage_start: str + :ivar usage_end: Billing period end date. + :vartype usage_end: str :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal + :vartype azure_charges: ~azure.mgmt.consumption.models.Amount + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: ~azure.mgmt.consumption.models.Amount :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed Separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param children: Children of a management group - :type children: - list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] - :param included_subscriptions: List of subscription Guids included in the - calculation of aggregated cost - :type included_subscriptions: list[str] - :param excluded_subscriptions: List of subscription Guids excluded from - the calculation of aggregated cost - :type excluded_subscriptions: list[str] + :vartype marketplace_charges: ~azure.mgmt.consumption.models.Amount + :ivar billing_account_id: The id of the billing account resource that the + charge belongs to. + :vartype billing_account_id: str + :ivar billing_profile_id: The id of the billing profile resource that the + charge belongs to. + :vartype billing_profile_id: str + :ivar invoice_section_id: The id of the invoice section resource that the + charge belongs to. + :vartype invoice_section_id: str """ _validation = { @@ -64,9 +59,11 @@ class ManagementGroupAggregatedCostResult(Resource): 'usage_start': {'readonly': True}, 'usage_end': {'readonly': True}, 'azure_charges': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, - 'currency': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, } _attribute_map = { @@ -75,26 +72,24 @@ class ManagementGroupAggregatedCostResult(Resource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, - 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, - 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'Amount'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'Amount'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'Amount'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, } def __init__(self, **kwargs): - super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) + super(ChargeSummaryByBillingAccount, self).__init__(**kwargs) self.billing_period_id = None self.usage_start = None self.usage_end = None self.azure_charges = None - self.marketplace_charges = None self.charges_billed_separately = None - self.currency = None - self.children = kwargs.get('children', None) - self.included_subscriptions = kwargs.get('included_subscriptions', None) - self.excluded_subscriptions = kwargs.get('excluded_subscriptions', None) + self.marketplace_charges = None + self.billing_account_id = None + self.billing_profile_id = None + self.invoice_section_id = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_account_py3.py similarity index 51% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_account_py3.py index efd01f65232e..172981d856c4 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_account_py3.py @@ -12,8 +12,8 @@ from .resource_py3 import Resource -class ManagementGroupAggregatedCostResult(Resource): - """A management group aggregated cost resource. +class ChargeSummaryByBillingAccount(Resource): + """A charge summary resource by billing account. Variables are only populated by the server, and will be ignored when sending a request. @@ -27,32 +27,27 @@ class ManagementGroupAggregatedCostResult(Resource): :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar billing_period_id: The id of the billing period resource that the - aggregated cost belongs to. + usage belongs to. :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by aggregated - cost. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the aggregated - cost. - :vartype usage_end: datetime + :ivar usage_start: Billing period start date. + :vartype usage_start: str + :ivar usage_end: Billing period end date. + :vartype usage_end: str :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal + :vartype azure_charges: ~azure.mgmt.consumption.models.Amount + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: ~azure.mgmt.consumption.models.Amount :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar charges_billed_separately: Charges Billed Separately. - :vartype charges_billed_separately: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param children: Children of a management group - :type children: - list[~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult] - :param included_subscriptions: List of subscription Guids included in the - calculation of aggregated cost - :type included_subscriptions: list[str] - :param excluded_subscriptions: List of subscription Guids excluded from - the calculation of aggregated cost - :type excluded_subscriptions: list[str] + :vartype marketplace_charges: ~azure.mgmt.consumption.models.Amount + :ivar billing_account_id: The id of the billing account resource that the + charge belongs to. + :vartype billing_account_id: str + :ivar billing_profile_id: The id of the billing profile resource that the + charge belongs to. + :vartype billing_profile_id: str + :ivar invoice_section_id: The id of the invoice section resource that the + charge belongs to. + :vartype invoice_section_id: str """ _validation = { @@ -64,9 +59,11 @@ class ManagementGroupAggregatedCostResult(Resource): 'usage_start': {'readonly': True}, 'usage_end': {'readonly': True}, 'azure_charges': {'readonly': True}, - 'marketplace_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, - 'currency': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, } _attribute_map = { @@ -75,26 +72,24 @@ class ManagementGroupAggregatedCostResult(Resource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'children': {'key': 'properties.children', 'type': '[ManagementGroupAggregatedCostResult]'}, - 'included_subscriptions': {'key': 'properties.includedSubscriptions', 'type': '[str]'}, - 'excluded_subscriptions': {'key': 'properties.excludedSubscriptions', 'type': '[str]'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'Amount'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'Amount'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'Amount'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, } - def __init__(self, *, children=None, included_subscriptions=None, excluded_subscriptions=None, **kwargs) -> None: - super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) + def __init__(self, **kwargs) -> None: + super(ChargeSummaryByBillingAccount, self).__init__(**kwargs) self.billing_period_id = None self.usage_start = None self.usage_end = None self.azure_charges = None - self.marketplace_charges = None self.charges_billed_separately = None - self.currency = None - self.children = children - self.included_subscriptions = included_subscriptions - self.excluded_subscriptions = excluded_subscriptions + self.marketplace_charges = None + self.billing_account_id = None + self.billing_profile_id = None + self.invoice_section_id = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_profile.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_profile.py new file mode 100644 index 000000000000..04c8446b40e8 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_profile.py @@ -0,0 +1,95 @@ +# 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 ChargeSummaryByBillingProfile(Resource): + """A charge summary resource by billing profile. + + 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 billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar usage_start: Billing period start date. + :vartype usage_start: str + :ivar usage_end: Billing period end date. + :vartype usage_end: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: ~azure.mgmt.consumption.models.Amount + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: ~azure.mgmt.consumption.models.Amount + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: ~azure.mgmt.consumption.models.Amount + :ivar billing_account_id: The id of the billing account resource that the + charge belongs to. + :vartype billing_account_id: str + :ivar billing_profile_id: The id of the billing profile resource that the + charge belongs to. + :vartype billing_profile_id: str + :ivar invoice_section_id: The id of the invoice section resource that the + charge belongs to. + :vartype invoice_section_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'Amount'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'Amount'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'Amount'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChargeSummaryByBillingProfile, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.billing_account_id = None + self.billing_profile_id = None + self.invoice_section_id = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_profile_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_profile_py3.py new file mode 100644 index 000000000000..02df853eda98 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_billing_profile_py3.py @@ -0,0 +1,95 @@ +# 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_py3 import Resource + + +class ChargeSummaryByBillingProfile(Resource): + """A charge summary resource by billing profile. + + 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 billing_period_id: The id of the billing period resource that the + usage belongs to. + :vartype billing_period_id: str + :ivar usage_start: Billing period start date. + :vartype usage_start: str + :ivar usage_end: Billing period end date. + :vartype usage_end: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: ~azure.mgmt.consumption.models.Amount + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: ~azure.mgmt.consumption.models.Amount + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: ~azure.mgmt.consumption.models.Amount + :ivar billing_account_id: The id of the billing account resource that the + charge belongs to. + :vartype billing_account_id: str + :ivar billing_profile_id: The id of the billing profile resource that the + charge belongs to. + :vartype billing_profile_id: str + :ivar invoice_section_id: The id of the invoice section resource that the + charge belongs to. + :vartype invoice_section_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, + 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'Amount'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'Amount'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'Amount'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargeSummaryByBillingProfile, self).__init__(**kwargs) + self.billing_period_id = None + self.usage_start = None + self.usage_end = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.billing_account_id = None + self.billing_profile_id = None + self.invoice_section_id = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_invoice_section.py similarity index 62% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_invoice_section.py index d3a3bbaaa8b0..b1e360cddb7e 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_invoice_section.py @@ -12,8 +12,8 @@ from .resource import Resource -class ChargeSummary(Resource): - """A charge summary resource. +class ChargeSummaryByInvoiceSection(Resource): + """A charge summary resource by invoiceSection. Variables are only populated by the server, and will be ignored when sending a request. @@ -27,20 +27,27 @@ class ChargeSummary(Resource): :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar billing_period_id: The id of the billing period resource that the - charge belongs to. + usage belongs to. :vartype billing_period_id: str - :ivar usage_start: Usage start date. + :ivar usage_start: Billing period start date. :vartype usage_start: str - :ivar usage_end: Usage end date. + :ivar usage_end: Billing period end date. :vartype usage_end: str :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal + :vartype azure_charges: ~azure.mgmt.consumption.models.Amount :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal + :vartype charges_billed_separately: ~azure.mgmt.consumption.models.Amount :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar currency: Currency Code - :vartype currency: str + :vartype marketplace_charges: ~azure.mgmt.consumption.models.Amount + :ivar billing_account_id: The id of the billing account resource that the + charge belongs to. + :vartype billing_account_id: str + :ivar billing_profile_id: The id of the billing profile resource that the + charge belongs to. + :vartype billing_profile_id: str + :ivar invoice_section_id: The id of the invoice section resource that the + charge belongs to. + :vartype invoice_section_id: str """ _validation = { @@ -54,7 +61,9 @@ class ChargeSummary(Resource): 'azure_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, 'marketplace_charges': {'readonly': True}, - 'currency': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, } _attribute_map = { @@ -65,18 +74,22 @@ class ChargeSummary(Resource): 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'Amount'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'Amount'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'Amount'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, } def __init__(self, **kwargs): - super(ChargeSummary, self).__init__(**kwargs) + super(ChargeSummaryByInvoiceSection, self).__init__(**kwargs) self.billing_period_id = None self.usage_start = None self.usage_end = None self.azure_charges = None self.charges_billed_separately = None self.marketplace_charges = None - self.currency = None + self.billing_account_id = None + self.billing_profile_id = None + self.invoice_section_id = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_invoice_section_py3.py similarity index 62% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_invoice_section_py3.py index 1f6031eed7c4..2c5da1c81402 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_invoice_section_py3.py @@ -12,8 +12,8 @@ from .resource_py3 import Resource -class ChargeSummary(Resource): - """A charge summary resource. +class ChargeSummaryByInvoiceSection(Resource): + """A charge summary resource by invoiceSection. Variables are only populated by the server, and will be ignored when sending a request. @@ -27,20 +27,27 @@ class ChargeSummary(Resource): :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar billing_period_id: The id of the billing period resource that the - charge belongs to. + usage belongs to. :vartype billing_period_id: str - :ivar usage_start: Usage start date. + :ivar usage_start: Billing period start date. :vartype usage_start: str - :ivar usage_end: Usage end date. + :ivar usage_end: Billing period end date. :vartype usage_end: str :ivar azure_charges: Azure Charges. - :vartype azure_charges: decimal.Decimal + :vartype azure_charges: ~azure.mgmt.consumption.models.Amount :ivar charges_billed_separately: Charges Billed separately. - :vartype charges_billed_separately: decimal.Decimal + :vartype charges_billed_separately: ~azure.mgmt.consumption.models.Amount :ivar marketplace_charges: Marketplace Charges. - :vartype marketplace_charges: decimal.Decimal - :ivar currency: Currency Code - :vartype currency: str + :vartype marketplace_charges: ~azure.mgmt.consumption.models.Amount + :ivar billing_account_id: The id of the billing account resource that the + charge belongs to. + :vartype billing_account_id: str + :ivar billing_profile_id: The id of the billing profile resource that the + charge belongs to. + :vartype billing_profile_id: str + :ivar invoice_section_id: The id of the invoice section resource that the + charge belongs to. + :vartype invoice_section_id: str """ _validation = { @@ -54,7 +61,9 @@ class ChargeSummary(Resource): 'azure_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, 'marketplace_charges': {'readonly': True}, - 'currency': {'readonly': True}, + 'billing_account_id': {'readonly': True}, + 'billing_profile_id': {'readonly': True}, + 'invoice_section_id': {'readonly': True}, } _attribute_map = { @@ -65,18 +74,22 @@ class ChargeSummary(Resource): 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, 'usage_start': {'key': 'properties.usageStart', 'type': 'str'}, 'usage_end': {'key': 'properties.usageEnd', 'type': 'str'}, - 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, - 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, + 'azure_charges': {'key': 'properties.azureCharges', 'type': 'Amount'}, + 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'Amount'}, + 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'Amount'}, + 'billing_account_id': {'key': 'properties.billingAccountId', 'type': 'str'}, + 'billing_profile_id': {'key': 'properties.billingProfileId', 'type': 'str'}, + 'invoice_section_id': {'key': 'properties.invoiceSectionId', 'type': 'str'}, } def __init__(self, **kwargs) -> None: - super(ChargeSummary, self).__init__(**kwargs) + super(ChargeSummaryByInvoiceSection, self).__init__(**kwargs) self.billing_period_id = None self.usage_start = None self.usage_end = None self.azure_charges = None self.charges_billed_separately = None self.marketplace_charges = None - self.currency = None + self.billing_account_id = None + self.billing_profile_id = None + self.invoice_section_id = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_account.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_account.py new file mode 100644 index 000000000000..ea4aeb79826c --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_account.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ChargesListByBillingAccount(Model): + """Result of listing charge summary by billing account. It contains a list of + available change summaries in reverse chronological order by billing + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by billing account. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByBillingAccount] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByBillingAccount]'}, + } + + def __init__(self, **kwargs): + super(ChargesListByBillingAccount, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_account_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_account_py3.py new file mode 100644 index 000000000000..5a48b3b735a4 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_account_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ChargesListByBillingAccount(Model): + """Result of listing charge summary by billing account. It contains a list of + available change summaries in reverse chronological order by billing + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by billing account. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByBillingAccount] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByBillingAccount]'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargesListByBillingAccount, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_profile.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_profile.py new file mode 100644 index 000000000000..b276f14beb0a --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_profile.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ChargesListByBillingProfile(Model): + """Result of listing charge summary by billing profile. It contains a list of + available change summaries in reverse chronological order by billing + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by billing profile. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByBillingProfile] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByBillingProfile]'}, + } + + def __init__(self, **kwargs): + super(ChargesListByBillingProfile, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_profile_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_profile_py3.py new file mode 100644 index 000000000000..9e9a56616f09 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_billing_profile_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ChargesListByBillingProfile(Model): + """Result of listing charge summary by billing profile. It contains a list of + available change summaries in reverse chronological order by billing + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by billing profile. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByBillingProfile] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByBillingProfile]'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargesListByBillingProfile, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_invoice_section.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_invoice_section.py new file mode 100644 index 000000000000..3734e59c40ed --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_invoice_section.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ChargesListByInvoiceSection(Model): + """Result of listing charge summary by invoiceSection. It contains a list of + available change summaries in reverse chronological order by billing + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by invoiceSection. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByInvoiceSection] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByInvoiceSection]'}, + } + + def __init__(self, **kwargs): + super(ChargesListByInvoiceSection, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_invoice_section_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_invoice_section_py3.py new file mode 100644 index 000000000000..dd98e09bd396 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_by_invoice_section_py3.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class ChargesListByInvoiceSection(Model): + """Result of listing charge summary by invoiceSection. It contains a list of + available change summaries in reverse chronological order by billing + period. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by invoiceSection. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByInvoiceSection] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByInvoiceSection]'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargesListByInvoiceSection, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py index 1ae84551cfc3..e856c50d170e 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/consumption_management_client_enums.py @@ -12,53 +12,14 @@ from enum import Enum -class BillingFrequency(str, Enum): +class EventType(str, Enum): - month = "Month" - quarter = "Quarter" - year = "Year" + new_credit = "NewCredit" + expired_credit = "ExpiredCredit" + settled_charges = "SettledCharges" -class CategoryType(str, Enum): +class LotSource(str, Enum): - cost = "Cost" - usage = "Usage" - - -class TimeGrainType(str, Enum): - - monthly = "Monthly" - quarterly = "Quarterly" - annually = "Annually" - - -class OperatorType(str, Enum): - - equal_to = "EqualTo" - greater_than = "GreaterThan" - greater_than_or_equal_to = "GreaterThanOrEqualTo" - - -class Grain(str, Enum): - - daily = "Daily" - monthly = "Monthly" - yearly = "Yearly" - - -class ChargeType(str, Enum): - - actual = "Actual" - forecast = "Forecast" - - -class Bound(str, Enum): - - upper = "Upper" - lower = "Lower" - - -class Datagrain(str, Enum): - - daily_grain = "daily" #: Daily grain of data - monthly_grain = "monthly" #: Monthly grain of data + purchased_credit = "PurchasedCredit" + promotional_credit = "PromotionalCredit" diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_balance_summary.py similarity index 51% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/credit_balance_summary.py index 42724a3aa6c6..e426170d9521 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_balance_summary.py @@ -12,30 +12,29 @@ from msrest.serialization import Model -class CurrentSpend(Model): - """The current amount of cost which is being tracked for a budget. +class CreditBalanceSummary(Model): + """Summary of credit balances. Variables are only populated by the server, and will be ignored when sending a request. - :ivar amount: The total amount of cost which is being tracked by the - budget. - :vartype amount: decimal.Decimal - :ivar unit: The unit of measure for the budget amount. - :vartype unit: str + :ivar estimated_balance: Estimated balance. + :vartype estimated_balance: ~azure.mgmt.consumption.models.Amount + :ivar current_balance: Current balance. + :vartype current_balance: ~azure.mgmt.consumption.models.Amount """ _validation = { - 'amount': {'readonly': True}, - 'unit': {'readonly': True}, + 'estimated_balance': {'readonly': True}, + 'current_balance': {'readonly': True}, } _attribute_map = { - 'amount': {'key': 'amount', 'type': 'decimal'}, - 'unit': {'key': 'unit', 'type': 'str'}, + 'estimated_balance': {'key': 'estimatedBalance', 'type': 'Amount'}, + 'current_balance': {'key': 'currentBalance', 'type': 'Amount'}, } def __init__(self, **kwargs): - super(CurrentSpend, self).__init__(**kwargs) - self.amount = None - self.unit = None + super(CreditBalanceSummary, self).__init__(**kwargs) + self.estimated_balance = None + self.current_balance = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_balance_summary_py3.py similarity index 51% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/credit_balance_summary_py3.py index 87a5fc0bcc1d..99d666c0013c 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/current_spend_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_balance_summary_py3.py @@ -12,30 +12,29 @@ from msrest.serialization import Model -class CurrentSpend(Model): - """The current amount of cost which is being tracked for a budget. +class CreditBalanceSummary(Model): + """Summary of credit balances. Variables are only populated by the server, and will be ignored when sending a request. - :ivar amount: The total amount of cost which is being tracked by the - budget. - :vartype amount: decimal.Decimal - :ivar unit: The unit of measure for the budget amount. - :vartype unit: str + :ivar estimated_balance: Estimated balance. + :vartype estimated_balance: ~azure.mgmt.consumption.models.Amount + :ivar current_balance: Current balance. + :vartype current_balance: ~azure.mgmt.consumption.models.Amount """ _validation = { - 'amount': {'readonly': True}, - 'unit': {'readonly': True}, + 'estimated_balance': {'readonly': True}, + 'current_balance': {'readonly': True}, } _attribute_map = { - 'amount': {'key': 'amount', 'type': 'decimal'}, - 'unit': {'key': 'unit', 'type': 'str'}, + 'estimated_balance': {'key': 'estimatedBalance', 'type': 'Amount'}, + 'current_balance': {'key': 'currentBalance', 'type': 'Amount'}, } def __init__(self, **kwargs) -> None: - super(CurrentSpend, self).__init__(**kwargs) - self.amount = None - self.unit = None + super(CreditBalanceSummary, self).__init__(**kwargs) + self.estimated_balance = None + self.current_balance = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_summary.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_summary.py new file mode 100644 index 000000000000..44915a23a3f3 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_summary.py @@ -0,0 +1,66 @@ +# 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 CreditSummary(Resource): + """A credit summary 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] + :param balance_summary: Summary of balances associated with this credit + summary. + :type balance_summary: ~azure.mgmt.consumption.models.CreditBalanceSummary + :ivar pending_credit_adjustments: Pending Credit Adjustments. + :vartype pending_credit_adjustments: ~azure.mgmt.consumption.models.Amount + :ivar expired_credit: Expired Credit. + :vartype expired_credit: ~azure.mgmt.consumption.models.Amount + :ivar pending_eligible_charges: Pending Eligible Charges. + :vartype pending_eligible_charges: ~azure.mgmt.consumption.models.Amount + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'pending_credit_adjustments': {'readonly': True}, + 'expired_credit': {'readonly': True}, + 'pending_eligible_charges': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'balance_summary': {'key': 'properties.balanceSummary', 'type': 'CreditBalanceSummary'}, + 'pending_credit_adjustments': {'key': 'properties.pendingCreditAdjustments', 'type': 'Amount'}, + 'expired_credit': {'key': 'properties.expiredCredit', 'type': 'Amount'}, + 'pending_eligible_charges': {'key': 'properties.pendingEligibleCharges', 'type': 'Amount'}, + } + + def __init__(self, **kwargs): + super(CreditSummary, self).__init__(**kwargs) + self.balance_summary = kwargs.get('balance_summary', None) + self.pending_credit_adjustments = None + self.expired_credit = None + self.pending_eligible_charges = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_summary_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_summary_py3.py new file mode 100644 index 000000000000..ea23735563e9 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/credit_summary_py3.py @@ -0,0 +1,66 @@ +# 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_py3 import Resource + + +class CreditSummary(Resource): + """A credit summary 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] + :param balance_summary: Summary of balances associated with this credit + summary. + :type balance_summary: ~azure.mgmt.consumption.models.CreditBalanceSummary + :ivar pending_credit_adjustments: Pending Credit Adjustments. + :vartype pending_credit_adjustments: ~azure.mgmt.consumption.models.Amount + :ivar expired_credit: Expired Credit. + :vartype expired_credit: ~azure.mgmt.consumption.models.Amount + :ivar pending_eligible_charges: Pending Eligible Charges. + :vartype pending_eligible_charges: ~azure.mgmt.consumption.models.Amount + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'pending_credit_adjustments': {'readonly': True}, + 'expired_credit': {'readonly': True}, + 'pending_eligible_charges': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'balance_summary': {'key': 'properties.balanceSummary', 'type': 'CreditBalanceSummary'}, + 'pending_credit_adjustments': {'key': 'properties.pendingCreditAdjustments', 'type': 'Amount'}, + 'expired_credit': {'key': 'properties.expiredCredit', 'type': 'Amount'}, + 'pending_eligible_charges': {'key': 'properties.pendingEligibleCharges', 'type': 'Amount'}, + } + + def __init__(self, *, balance_summary=None, **kwargs) -> None: + super(CreditSummary, self).__init__(**kwargs) + self.balance_summary = balance_summary + self.pending_credit_adjustments = None + self.expired_credit = None + self.pending_eligible_charges = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/department.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/department.py new file mode 100644 index 000000000000..555d915137c6 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/department.py @@ -0,0 +1,64 @@ +# 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 Department(Resource): + """A department 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] + :param department_name: The name for department. + :type department_name: str + :param cost_center: The cost center name. + :type cost_center: str + :param status: The status for department. + :type status: str + :param enrollment_accounts: Associated enrollment accounts. By default + this is not populated, unless it's specified in $expand. + :type enrollment_accounts: + list[~azure.mgmt.consumption.models.EnrollmentAccount] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'enrollment_accounts': {'key': 'properties.enrollmentAccounts', 'type': '[EnrollmentAccount]'}, + } + + def __init__(self, **kwargs): + super(Department, self).__init__(**kwargs) + self.department_name = kwargs.get('department_name', None) + self.cost_center = kwargs.get('cost_center', None) + self.status = kwargs.get('status', None) + self.enrollment_accounts = kwargs.get('enrollment_accounts', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/department_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/department_py3.py new file mode 100644 index 000000000000..662c16c26abf --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/department_py3.py @@ -0,0 +1,64 @@ +# 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_py3 import Resource + + +class Department(Resource): + """A department 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] + :param department_name: The name for department. + :type department_name: str + :param cost_center: The cost center name. + :type cost_center: str + :param status: The status for department. + :type status: str + :param enrollment_accounts: Associated enrollment accounts. By default + this is not populated, unless it's specified in $expand. + :type enrollment_accounts: + list[~azure.mgmt.consumption.models.EnrollmentAccount] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'enrollment_accounts': {'key': 'properties.enrollmentAccounts', 'type': '[EnrollmentAccount]'}, + } + + def __init__(self, *, department_name: str=None, cost_center: str=None, status: str=None, enrollment_accounts=None, **kwargs) -> None: + super(Department, self).__init__(**kwargs) + self.department_name = department_name + self.cost_center = cost_center + self.status = status + self.enrollment_accounts = enrollment_accounts diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment.py new file mode 100644 index 000000000000..21b0e2a7fbf9 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment.py @@ -0,0 +1,75 @@ +# 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 msrest.serialization import Model + + +class Enrollment(Model): + """Current entity level details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_date: Enrollment Start Date + :vartype start_date: datetime + :ivar end_date: Enrollment End Date + :vartype end_date: datetime + :ivar currency: The currency associated with enrollment + :vartype currency: str + :ivar channel: The channel for Enrollment + :vartype channel: str + :ivar policies: The attributes associated with legacy enrollment. + :vartype policies: ~azure.mgmt.consumption.models.EnrollmentPolicies + :ivar language: The language for Enrollment + :vartype language: str + :ivar country_code: The countryCode for Enrollment + :vartype country_code: str + :ivar status: Enrollment status + :vartype status: str + :ivar billing_cylce: Enrollment billing cycle + :vartype billing_cylce: str + """ + + _validation = { + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + 'currency': {'readonly': True}, + 'channel': {'readonly': True}, + 'policies': {'readonly': True}, + 'language': {'readonly': True}, + 'country_code': {'readonly': True}, + 'status': {'readonly': True}, + 'billing_cylce': {'readonly': True}, + } + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'currency': {'key': 'currency', 'type': 'str'}, + 'channel': {'key': 'channel', 'type': 'str'}, + 'policies': {'key': 'policies', 'type': 'EnrollmentPolicies'}, + 'language': {'key': 'language', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'billing_cylce': {'key': 'billingCylce', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Enrollment, self).__init__(**kwargs) + self.start_date = None + self.end_date = None + self.currency = None + self.channel = None + self.policies = None + self.language = None + self.country_code = None + self.status = None + self.billing_cylce = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_account.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_account.py new file mode 100644 index 000000000000..ade0bc450e0f --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_account.py @@ -0,0 +1,75 @@ +# 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 EnrollmentAccount(Resource): + """An account 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] + :param account_name: The account name. + :type account_name: str + :param cost_center: The cost center name. + :type cost_center: str + :param account_owner: The account owner + :type account_owner: str + :param status: The status for account. + :type status: str + :param start_date: Account Start Date + :type start_date: datetime + :param end_date: Account End Date + :type end_date: datetime + :param department: Associated department. By default this is not + populated, unless it's specified in $expand. + :type department: ~azure.mgmt.consumption.models.Department + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'account_owner': {'key': 'properties.accountOwner', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'properties.endDate', 'type': 'iso-8601'}, + 'department': {'key': 'properties.department', 'type': 'Department'}, + } + + def __init__(self, **kwargs): + super(EnrollmentAccount, self).__init__(**kwargs) + self.account_name = kwargs.get('account_name', None) + self.cost_center = kwargs.get('cost_center', None) + self.account_owner = kwargs.get('account_owner', None) + self.status = kwargs.get('status', None) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.department = kwargs.get('department', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_account_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_account_py3.py new file mode 100644 index 000000000000..8c798a0de0c6 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_account_py3.py @@ -0,0 +1,75 @@ +# 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_py3 import Resource + + +class EnrollmentAccount(Resource): + """An account 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] + :param account_name: The account name. + :type account_name: str + :param cost_center: The cost center name. + :type cost_center: str + :param account_owner: The account owner + :type account_owner: str + :param status: The status for account. + :type status: str + :param start_date: Account Start Date + :type start_date: datetime + :param end_date: Account End Date + :type end_date: datetime + :param department: Associated department. By default this is not + populated, unless it's specified in $expand. + :type department: ~azure.mgmt.consumption.models.Department + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, + 'account_owner': {'key': 'properties.accountOwner', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'properties.endDate', 'type': 'iso-8601'}, + 'department': {'key': 'properties.department', 'type': 'Department'}, + } + + def __init__(self, *, account_name: str=None, cost_center: str=None, account_owner: str=None, status: str=None, start_date=None, end_date=None, department=None, **kwargs) -> None: + super(EnrollmentAccount, self).__init__(**kwargs) + self.account_name = account_name + self.cost_center = cost_center + self.account_owner = account_owner + self.status = status + self.start_date = start_date + self.end_date = end_date + self.department = department diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_policies.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_policies.py new file mode 100644 index 000000000000..1d85db932e8f --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_policies.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class EnrollmentPolicies(Model): + """The attributes associated with legacy enrollment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_owner_view_charges: The accountOwnerViewCharges flag for + Enrollment + :vartype account_owner_view_charges: bool + :ivar department_admin_view_charges: The departmentAdminViewCharges flag + for Enrollment + :vartype department_admin_view_charges: bool + :ivar marketplaces_enabled: The marketplaces flag for Enrollment + :vartype marketplaces_enabled: bool + :ivar reserved_instances_enabled: The reserved instances flag for + Enrollment + :vartype reserved_instances_enabled: bool + """ + + _validation = { + 'account_owner_view_charges': {'readonly': True}, + 'department_admin_view_charges': {'readonly': True}, + 'marketplaces_enabled': {'readonly': True}, + 'reserved_instances_enabled': {'readonly': True}, + } + + _attribute_map = { + 'account_owner_view_charges': {'key': 'accountOwnerViewCharges', 'type': 'bool'}, + 'department_admin_view_charges': {'key': 'departmentAdminViewCharges', 'type': 'bool'}, + 'marketplaces_enabled': {'key': 'marketplacesEnabled', 'type': 'bool'}, + 'reserved_instances_enabled': {'key': 'reservedInstancesEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(EnrollmentPolicies, self).__init__(**kwargs) + self.account_owner_view_charges = None + self.department_admin_view_charges = None + self.marketplaces_enabled = None + self.reserved_instances_enabled = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_policies_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_policies_py3.py new file mode 100644 index 000000000000..171c895e3374 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_policies_py3.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class EnrollmentPolicies(Model): + """The attributes associated with legacy enrollment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar account_owner_view_charges: The accountOwnerViewCharges flag for + Enrollment + :vartype account_owner_view_charges: bool + :ivar department_admin_view_charges: The departmentAdminViewCharges flag + for Enrollment + :vartype department_admin_view_charges: bool + :ivar marketplaces_enabled: The marketplaces flag for Enrollment + :vartype marketplaces_enabled: bool + :ivar reserved_instances_enabled: The reserved instances flag for + Enrollment + :vartype reserved_instances_enabled: bool + """ + + _validation = { + 'account_owner_view_charges': {'readonly': True}, + 'department_admin_view_charges': {'readonly': True}, + 'marketplaces_enabled': {'readonly': True}, + 'reserved_instances_enabled': {'readonly': True}, + } + + _attribute_map = { + 'account_owner_view_charges': {'key': 'accountOwnerViewCharges', 'type': 'bool'}, + 'department_admin_view_charges': {'key': 'departmentAdminViewCharges', 'type': 'bool'}, + 'marketplaces_enabled': {'key': 'marketplacesEnabled', 'type': 'bool'}, + 'reserved_instances_enabled': {'key': 'reservedInstancesEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(EnrollmentPolicies, self).__init__(**kwargs) + self.account_owner_view_charges = None + self.department_admin_view_charges = None + self.marketplaces_enabled = None + self.reserved_instances_enabled = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_py3.py new file mode 100644 index 000000000000..838b870034e7 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/enrollment_py3.py @@ -0,0 +1,75 @@ +# 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 msrest.serialization import Model + + +class Enrollment(Model): + """Current entity level details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar start_date: Enrollment Start Date + :vartype start_date: datetime + :ivar end_date: Enrollment End Date + :vartype end_date: datetime + :ivar currency: The currency associated with enrollment + :vartype currency: str + :ivar channel: The channel for Enrollment + :vartype channel: str + :ivar policies: The attributes associated with legacy enrollment. + :vartype policies: ~azure.mgmt.consumption.models.EnrollmentPolicies + :ivar language: The language for Enrollment + :vartype language: str + :ivar country_code: The countryCode for Enrollment + :vartype country_code: str + :ivar status: Enrollment status + :vartype status: str + :ivar billing_cylce: Enrollment billing cycle + :vartype billing_cylce: str + """ + + _validation = { + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + 'currency': {'readonly': True}, + 'channel': {'readonly': True}, + 'policies': {'readonly': True}, + 'language': {'readonly': True}, + 'country_code': {'readonly': True}, + 'status': {'readonly': True}, + 'billing_cylce': {'readonly': True}, + } + + _attribute_map = { + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'currency': {'key': 'currency', 'type': 'str'}, + 'channel': {'key': 'channel', 'type': 'str'}, + 'policies': {'key': 'policies', 'type': 'EnrollmentPolicies'}, + 'language': {'key': 'language', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'billing_cylce': {'key': 'billingCylce', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Enrollment, self).__init__(**kwargs) + self.start_date = None + self.end_date = None + self.currency = None + self.channel = None + self.policies = None + self.language = None + self.country_code = None + self.status = None + self.billing_cylce = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/event_summary.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/event_summary.py new file mode 100644 index 000000000000..90613d9132ad --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/event_summary.py @@ -0,0 +1,91 @@ +# 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 EventSummary(Resource): + """An event summary 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 transaction_date: Transaction Date. + :vartype transaction_date: datetime + :ivar description: Transaction description. + :vartype description: str + :ivar new_credit: New Credit. + :vartype new_credit: ~azure.mgmt.consumption.models.Amount + :ivar adjustments: Credit Adjustments. + :vartype adjustments: ~azure.mgmt.consumption.models.Amount + :ivar credit_expired: Credit Expired. + :vartype credit_expired: ~azure.mgmt.consumption.models.Amount + :ivar charges: Credit Eligible Charges. + :vartype charges: ~azure.mgmt.consumption.models.Amount + :ivar closed_balance: Closed Balance. + :vartype closed_balance: ~azure.mgmt.consumption.models.Amount + :param event_type: The type of event. Possible values include: + 'NewCredit', 'ExpiredCredit', 'SettledCharges' + :type event_type: str or ~azure.mgmt.consumption.models.EventType + :ivar invoice_number: Invoice Number. + :vartype invoice_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'transaction_date': {'readonly': True}, + 'description': {'readonly': True}, + 'new_credit': {'readonly': True}, + 'adjustments': {'readonly': True}, + 'credit_expired': {'readonly': True}, + 'charges': {'readonly': True}, + 'closed_balance': {'readonly': True}, + 'invoice_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'transaction_date': {'key': 'properties.transactionDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'new_credit': {'key': 'properties.newCredit', 'type': 'Amount'}, + 'adjustments': {'key': 'properties.adjustments', 'type': 'Amount'}, + 'credit_expired': {'key': 'properties.creditExpired', 'type': 'Amount'}, + 'charges': {'key': 'properties.charges', 'type': 'Amount'}, + 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, + 'event_type': {'key': 'properties.eventType', 'type': 'str'}, + 'invoice_number': {'key': 'properties.invoiceNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EventSummary, self).__init__(**kwargs) + self.transaction_date = None + self.description = None + self.new_credit = None + self.adjustments = None + self.credit_expired = None + self.charges = None + self.closed_balance = None + self.event_type = kwargs.get('event_type', None) + self.invoice_number = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/event_summary_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/event_summary_py3.py new file mode 100644 index 000000000000..ac773e0e0607 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/event_summary_py3.py @@ -0,0 +1,91 @@ +# 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_py3 import Resource + + +class EventSummary(Resource): + """An event summary 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 transaction_date: Transaction Date. + :vartype transaction_date: datetime + :ivar description: Transaction description. + :vartype description: str + :ivar new_credit: New Credit. + :vartype new_credit: ~azure.mgmt.consumption.models.Amount + :ivar adjustments: Credit Adjustments. + :vartype adjustments: ~azure.mgmt.consumption.models.Amount + :ivar credit_expired: Credit Expired. + :vartype credit_expired: ~azure.mgmt.consumption.models.Amount + :ivar charges: Credit Eligible Charges. + :vartype charges: ~azure.mgmt.consumption.models.Amount + :ivar closed_balance: Closed Balance. + :vartype closed_balance: ~azure.mgmt.consumption.models.Amount + :param event_type: The type of event. Possible values include: + 'NewCredit', 'ExpiredCredit', 'SettledCharges' + :type event_type: str or ~azure.mgmt.consumption.models.EventType + :ivar invoice_number: Invoice Number. + :vartype invoice_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'transaction_date': {'readonly': True}, + 'description': {'readonly': True}, + 'new_credit': {'readonly': True}, + 'adjustments': {'readonly': True}, + 'credit_expired': {'readonly': True}, + 'charges': {'readonly': True}, + 'closed_balance': {'readonly': True}, + 'invoice_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'transaction_date': {'key': 'properties.transactionDate', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'new_credit': {'key': 'properties.newCredit', 'type': 'Amount'}, + 'adjustments': {'key': 'properties.adjustments', 'type': 'Amount'}, + 'credit_expired': {'key': 'properties.creditExpired', 'type': 'Amount'}, + 'charges': {'key': 'properties.charges', 'type': 'Amount'}, + 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, + 'event_type': {'key': 'properties.eventType', 'type': 'str'}, + 'invoice_number': {'key': 'properties.invoiceNumber', 'type': 'str'}, + } + + def __init__(self, *, event_type=None, **kwargs) -> None: + super(EventSummary, self).__init__(**kwargs) + self.transaction_date = None + self.description = None + self.new_credit = None + self.adjustments = None + self.credit_expired = None + self.charges = None + self.closed_balance = None + self.event_type = event_type + self.invoice_number = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/events.py similarity index 71% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/events.py index 7d968d08a465..9a9263a37c0a 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/events.py @@ -12,14 +12,14 @@ from msrest.serialization import Model -class ChargesListResult(Model): - """Result of listing charge summary. +class Events(Model): + """Result of listing event summary. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list of charge summary - :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] + :ivar value: The list of event summary. + :vartype value: list[~azure.mgmt.consumption.models.EventSummary] """ _validation = { @@ -27,9 +27,9 @@ class ChargesListResult(Model): } _attribute_map = { - 'value': {'key': 'value', 'type': '[ChargeSummary]'}, + 'value': {'key': 'value', 'type': '[EventSummary]'}, } def __init__(self, **kwargs): - super(ChargesListResult, self).__init__(**kwargs) + super(Events, self).__init__(**kwargs) self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/events_py3.py similarity index 71% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/events_py3.py index 3c6e3404673b..1335483fa142 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/events_py3.py @@ -12,14 +12,14 @@ from msrest.serialization import Model -class ChargesListResult(Model): - """Result of listing charge summary. +class Events(Model): + """Result of listing event summary. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list of charge summary - :vartype value: list[~azure.mgmt.consumption.models.ChargeSummary] + :ivar value: The list of event summary. + :vartype value: list[~azure.mgmt.consumption.models.EventSummary] """ _validation = { @@ -27,9 +27,9 @@ class ChargesListResult(Model): } _attribute_map = { - 'value': {'key': 'value', 'type': '[ChargeSummary]'}, + 'value': {'key': 'value', 'type': '[EventSummary]'}, } def __init__(self, **kwargs) -> None: - super(ChargesListResult, self).__init__(**kwargs) + super(Events, self).__init__(**kwargs) self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py deleted file mode 100644 index 42c5f41c6412..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/filters.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 msrest.serialization import Model - - -class Filters(Model): - """May be used to filter budgets by resource group, resource, or meter. - - :param resource_groups: The list of filters on resource groups, allowed at - subscription level only. - :type resource_groups: list[str] - :param resources: The list of filters on resources. - :type resources: list[str] - :param meters: The list of filters on meters (GUID), mandatory for budgets - of usage category. - :type meters: list[str] - :param tags: The dictionary of filters on tags. - :type tags: dict[str, list[str]] - """ - - _validation = { - 'resource_groups': {'max_items': 10, 'min_items': 0}, - 'resources': {'max_items': 10, 'min_items': 0}, - 'meters': {'max_items': 10, 'min_items': 0}, - } - - _attribute_map = { - 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, - 'resources': {'key': 'resources', 'type': '[str]'}, - 'meters': {'key': 'meters', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{[str]}'}, - } - - def __init__(self, **kwargs): - super(Filters, self).__init__(**kwargs) - self.resource_groups = kwargs.get('resource_groups', None) - self.resources = kwargs.get('resources', None) - self.meters = kwargs.get('meters', None) - self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py deleted file mode 100644 index c478858ccf1b..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/filters_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 msrest.serialization import Model - - -class Filters(Model): - """May be used to filter budgets by resource group, resource, or meter. - - :param resource_groups: The list of filters on resource groups, allowed at - subscription level only. - :type resource_groups: list[str] - :param resources: The list of filters on resources. - :type resources: list[str] - :param meters: The list of filters on meters (GUID), mandatory for budgets - of usage category. - :type meters: list[str] - :param tags: The dictionary of filters on tags. - :type tags: dict[str, list[str]] - """ - - _validation = { - 'resource_groups': {'max_items': 10, 'min_items': 0}, - 'resources': {'max_items': 10, 'min_items': 0}, - 'meters': {'max_items': 10, 'min_items': 0}, - } - - _attribute_map = { - 'resource_groups': {'key': 'resourceGroups', 'type': '[str]'}, - 'resources': {'key': 'resources', 'type': '[str]'}, - 'meters': {'key': 'meters', 'type': '[str]'}, - 'tags': {'key': 'tags', 'type': '{[str]}'}, - } - - def __init__(self, *, resource_groups=None, resources=None, meters=None, tags=None, **kwargs) -> None: - super(Filters, self).__init__(**kwargs) - self.resource_groups = resource_groups - self.resources = resources - self.meters = meters - self.tags = tags diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py deleted file mode 100644 index 4cfb731f0b17..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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 Forecast(Resource): - """A forecast 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 usage_date: The usage date of the forecast. - :vartype usage_date: str - :param grain: The granularity of forecast. Possible values include: - 'Daily', 'Monthly', 'Yearly' - :type grain: str or ~azure.mgmt.consumption.models.Grain - :ivar charge: The amount of charge - :vartype charge: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param charge_type: The type of the charge. Could be actual or forecast. - Possible values include: 'Actual', 'Forecast' - :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType - :ivar confidence_levels: The details about the forecast confidence levels. - This is populated only when chargeType is Forecast. - :vartype confidence_levels: - list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'charge': {'readonly': True}, - 'currency': {'readonly': True}, - 'confidence_levels': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, - 'grain': {'key': 'properties.grain', 'type': 'str'}, - 'charge': {'key': 'properties.charge', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, - } - - def __init__(self, **kwargs): - super(Forecast, self).__init__(**kwargs) - self.usage_date = None - self.grain = kwargs.get('grain', None) - self.charge = None - self.currency = None - self.charge_type = kwargs.get('charge_type', None) - self.confidence_levels = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py deleted file mode 100644 index 68cef39c6140..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class ForecastPaged(Paged): - """ - A paging container for iterating over a list of :class:`Forecast ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Forecast]'} - } - - def __init__(self, *args, **kwargs): - - super(ForecastPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py deleted file mode 100644 index 803026660dd3..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 msrest.serialization import Model - - -class ForecastPropertiesConfidenceLevelsItem(Model): - """ForecastPropertiesConfidenceLevelsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar percentage: The percentage level of the confidence - :vartype percentage: decimal.Decimal - :param bound: The boundary of the percentage, values could be 'Upper' or - 'Lower'. Possible values include: 'Upper', 'Lower' - :type bound: str or ~azure.mgmt.consumption.models.Bound - :ivar value: The amount of forecast within the percentage level - :vartype value: decimal.Decimal - """ - - _validation = { - 'percentage': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'percentage': {'key': 'percentage', 'type': 'decimal'}, - 'bound': {'key': 'bound', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) - self.percentage = None - self.bound = kwargs.get('bound', None) - self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py deleted file mode 100644 index ddbe8d8bb5df..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_properties_confidence_levels_item_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 msrest.serialization import Model - - -class ForecastPropertiesConfidenceLevelsItem(Model): - """ForecastPropertiesConfidenceLevelsItem. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar percentage: The percentage level of the confidence - :vartype percentage: decimal.Decimal - :param bound: The boundary of the percentage, values could be 'Upper' or - 'Lower'. Possible values include: 'Upper', 'Lower' - :type bound: str or ~azure.mgmt.consumption.models.Bound - :ivar value: The amount of forecast within the percentage level - :vartype value: decimal.Decimal - """ - - _validation = { - 'percentage': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'percentage': {'key': 'percentage', 'type': 'decimal'}, - 'bound': {'key': 'bound', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, - } - - def __init__(self, *, bound=None, **kwargs) -> None: - super(ForecastPropertiesConfidenceLevelsItem, self).__init__(**kwargs) - self.percentage = None - self.bound = bound - self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py deleted file mode 100644 index ea3f5550f507..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/forecast_py3.py +++ /dev/null @@ -1,79 +0,0 @@ -# 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_py3 import Resource - - -class Forecast(Resource): - """A forecast 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 usage_date: The usage date of the forecast. - :vartype usage_date: str - :param grain: The granularity of forecast. Possible values include: - 'Daily', 'Monthly', 'Yearly' - :type grain: str or ~azure.mgmt.consumption.models.Grain - :ivar charge: The amount of charge - :vartype charge: decimal.Decimal - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :param charge_type: The type of the charge. Could be actual or forecast. - Possible values include: 'Actual', 'Forecast' - :type charge_type: str or ~azure.mgmt.consumption.models.ChargeType - :ivar confidence_levels: The details about the forecast confidence levels. - This is populated only when chargeType is Forecast. - :vartype confidence_levels: - list[~azure.mgmt.consumption.models.ForecastPropertiesConfidenceLevelsItem] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'charge': {'readonly': True}, - 'currency': {'readonly': True}, - 'confidence_levels': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'str'}, - 'grain': {'key': 'properties.grain', 'type': 'str'}, - 'charge': {'key': 'properties.charge', 'type': 'decimal'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'charge_type': {'key': 'properties.chargeType', 'type': 'str'}, - 'confidence_levels': {'key': 'properties.confidenceLevels', 'type': '[ForecastPropertiesConfidenceLevelsItem]'}, - } - - def __init__(self, *, grain=None, charge_type=None, **kwargs) -> None: - super(Forecast, self).__init__(**kwargs) - self.usage_date = None - self.grain = grain - self.charge = None - self.currency = None - self.charge_type = charge_type - self.confidence_levels = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/invoice_section.py similarity index 55% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/invoice_section.py index b202a33c77de..86878bdbd498 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/invoice_section.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource import ProxyResource +from .resource import Resource -class TagsResult(ProxyResource): - """A resource listing all tags. +class InvoiceSection(Resource): + """An InvoiceSection resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -24,28 +24,33 @@ class TagsResult(ProxyResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param tags: A list of Tag. - :type tags: list[~azure.mgmt.consumption.models.Tag] + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param display_name: The name of the InvoiceSection. + :type display_name: str + :param billing_profiles: The billing profiles associated to the billing + account. + :type billing_profiles: + list[~azure.mgmt.consumption.models.BillingProfile] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'tags': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'billing_profiles': {'key': 'properties.billingProfiles', 'type': '[BillingProfile]'}, } def __init__(self, **kwargs): - super(TagsResult, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) + super(InvoiceSection, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.billing_profiles = kwargs.get('billing_profiles', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/invoice_section_py3.py similarity index 53% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/invoice_section_py3.py index e817c5180ccc..1201501e3e5e 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/tags_result_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/invoice_section_py3.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .proxy_resource_py3 import ProxyResource +from .resource_py3 import Resource -class TagsResult(ProxyResource): - """A resource listing all tags. +class InvoiceSection(Resource): + """An InvoiceSection resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -24,28 +24,33 @@ class TagsResult(ProxyResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param e_tag: eTag of the resource. To handle concurrent update scenario, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param tags: A list of Tag. - :type tags: list[~azure.mgmt.consumption.models.Tag] + :ivar tags: Resource tags. + :vartype tags: dict[str, str] + :param display_name: The name of the InvoiceSection. + :type display_name: str + :param billing_profiles: The billing profiles associated to the billing + account. + :type billing_profiles: + list[~azure.mgmt.consumption.models.BillingProfile] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'tags': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'e_tag': {'key': 'eTag', 'type': 'str'}, - 'tags': {'key': 'properties.tags', 'type': '[Tag]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'billing_profiles': {'key': 'properties.billingProfiles', 'type': '[BillingProfile]'}, } - def __init__(self, *, e_tag: str=None, tags=None, **kwargs) -> None: - super(TagsResult, self).__init__(e_tag=e_tag, **kwargs) - self.tags = tags + def __init__(self, *, display_name: str=None, billing_profiles=None, **kwargs) -> None: + super(InvoiceSection, self).__init__(**kwargs) + self.display_name = display_name + self.billing_profiles = billing_profiles diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/lot_summary.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/lot_summary.py new file mode 100644 index 000000000000..26801144fb36 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/lot_summary.py @@ -0,0 +1,77 @@ +# 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 LotSummary(Resource): + """A lot summary 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 original_amount: Original Amount. + :vartype original_amount: ~azure.mgmt.consumption.models.Amount + :ivar closed_balance: Closed Balance. + :vartype closed_balance: ~azure.mgmt.consumption.models.Amount + :ivar source: Lot source. Possible values include: 'PurchasedCredit', + 'PromotionalCredit' + :vartype source: str or ~azure.mgmt.consumption.models.LotSource + :ivar start_date: Start Date. + :vartype start_date: datetime + :ivar expiration_date: Expiration Date. + :vartype expiration_date: datetime + :ivar po_number: PO Number. + :vartype po_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'original_amount': {'readonly': True}, + 'closed_balance': {'readonly': True}, + 'source': {'readonly': True}, + 'start_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'po_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'original_amount': {'key': 'properties.originalAmount', 'type': 'Amount'}, + 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'po_number': {'key': 'properties.poNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LotSummary, self).__init__(**kwargs) + self.original_amount = None + self.closed_balance = None + self.source = None + self.start_date = None + self.expiration_date = None + self.po_number = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/lot_summary_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/lot_summary_py3.py new file mode 100644 index 000000000000..1a267abe480e --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/lot_summary_py3.py @@ -0,0 +1,77 @@ +# 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_py3 import Resource + + +class LotSummary(Resource): + """A lot summary 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 original_amount: Original Amount. + :vartype original_amount: ~azure.mgmt.consumption.models.Amount + :ivar closed_balance: Closed Balance. + :vartype closed_balance: ~azure.mgmt.consumption.models.Amount + :ivar source: Lot source. Possible values include: 'PurchasedCredit', + 'PromotionalCredit' + :vartype source: str or ~azure.mgmt.consumption.models.LotSource + :ivar start_date: Start Date. + :vartype start_date: datetime + :ivar expiration_date: Expiration Date. + :vartype expiration_date: datetime + :ivar po_number: PO Number. + :vartype po_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'original_amount': {'readonly': True}, + 'closed_balance': {'readonly': True}, + 'source': {'readonly': True}, + 'start_date': {'readonly': True}, + 'expiration_date': {'readonly': True}, + 'po_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'original_amount': {'key': 'properties.originalAmount', 'type': 'Amount'}, + 'closed_balance': {'key': 'properties.closedBalance', 'type': 'Amount'}, + 'source': {'key': 'properties.source', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, + 'po_number': {'key': 'properties.poNumber', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(LotSummary, self).__init__(**kwargs) + self.original_amount = None + self.closed_balance = None + self.source = None + self.start_date = None + self.expiration_date = None + self.po_number = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/lots.py similarity index 61% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/lots.py index c50e5ad24216..2b1ff11444d3 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/lots.py @@ -12,29 +12,24 @@ from msrest.serialization import Model -class BalancePropertiesNewPurchasesDetailsItem(Model): - """BalancePropertiesNewPurchasesDetailsItem. +class Lots(Model): + """Result of listing lot summary. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: the name of new purchase. - :vartype name: str - :ivar value: the value of new purchase. - :vartype value: decimal.Decimal + :ivar value: The list of lot summary. + :vartype value: list[~azure.mgmt.consumption.models.LotSummary] """ _validation = { - 'name': {'readonly': True}, 'value': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, + 'value': {'key': 'value', 'type': '[LotSummary]'}, } def __init__(self, **kwargs): - super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) - self.name = None + super(Lots, self).__init__(**kwargs) self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/lots_py3.py similarity index 61% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/lots_py3.py index 278a07609ebf..279460b5eb5f 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/balance_properties_new_purchases_details_item_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/lots_py3.py @@ -12,29 +12,24 @@ from msrest.serialization import Model -class BalancePropertiesNewPurchasesDetailsItem(Model): - """BalancePropertiesNewPurchasesDetailsItem. +class Lots(Model): + """Result of listing lot summary. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: the name of new purchase. - :vartype name: str - :ivar value: the value of new purchase. - :vartype value: decimal.Decimal + :ivar value: The list of lot summary. + :vartype value: list[~azure.mgmt.consumption.models.LotSummary] """ _validation = { - 'name': {'readonly': True}, 'value': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'decimal'}, + 'value': {'key': 'value', 'type': '[LotSummary]'}, } def __init__(self, **kwargs) -> None: - super(BalancePropertiesNewPurchasesDetailsItem, self).__init__(**kwargs) - self.name = None + super(Lots, self).__init__(**kwargs) self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py deleted file mode 100644 index 638fba19f244..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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 Marketplace(Resource): - """An marketplace 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 billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by the usage - detail. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the usage - detail. - :vartype usage_end: datetime - :ivar resource_rate: The marketplace resource rate. - :vartype resource_rate: decimal.Decimal - :ivar offer_name: The type of offer. - :vartype offer_name: str - :ivar resource_group: The name of resource group. - :vartype resource_group: str - :ivar order_number: The order number. - :vartype order_number: str - :ivar instance_name: The name of the resource instance that the usage is - about. - :vartype instance_name: str - :ivar instance_id: The uri of the resource instance that the usage is - about. - :vartype instance_id: str - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar consumed_quantity: The quantity of usage. - :vartype consumed_quantity: decimal.Decimal - :ivar unit_of_measure: The unit of measure. - :vartype unit_of_measure: str - :ivar pretax_cost: The amount of cost before tax. - :vartype pretax_cost: decimal.Decimal - :ivar is_estimated: The estimated usage is subject to change. - :vartype is_estimated: bool - :ivar meter_id: The meter id (GUID). - :vartype meter_id: str - :ivar subscription_guid: Subscription guid. - :vartype subscription_guid: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar account_name: Account name. - :vartype account_name: str - :ivar department_name: Department name. - :vartype department_name: str - :ivar consumed_service: Consumed service name. - :vartype consumed_service: str - :ivar cost_center: The cost center of this department if it is a - department and a costcenter exists - :vartype cost_center: str - :ivar additional_properties: Additional details of this usage item. By - default this is not populated, unless it's specified in $expand. - :vartype additional_properties: str - :ivar publisher_name: The name of publisher. - :vartype publisher_name: str - :ivar plan_name: The name of plan. - :vartype plan_name: str - :ivar is_recurring_charge: Flag indicating whether this is a recurring - charge or not. - :vartype is_recurring_charge: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'resource_rate': {'readonly': True}, - 'offer_name': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'order_number': {'readonly': True}, - 'instance_name': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'currency': {'readonly': True}, - 'consumed_quantity': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'pretax_cost': {'readonly': True}, - 'is_estimated': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'subscription_guid': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'account_name': {'readonly': True}, - 'department_name': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'additional_properties': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'is_recurring_charge': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, - 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, - 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, - 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, - 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, - 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(Marketplace, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.resource_rate = None - self.offer_name = None - self.resource_group = None - self.order_number = None - self.instance_name = None - self.instance_id = None - self.currency = None - self.consumed_quantity = None - self.unit_of_measure = None - self.pretax_cost = None - self.is_estimated = None - self.meter_id = None - self.subscription_guid = None - self.subscription_name = None - self.account_name = None - self.department_name = None - self.consumed_service = None - self.cost_center = None - self.additional_properties = None - self.publisher_name = None - self.plan_name = None - self.is_recurring_charge = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py deleted file mode 100644 index d360761aca55..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class MarketplacePaged(Paged): - """ - A paging container for iterating over a list of :class:`Marketplace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Marketplace]'} - } - - def __init__(self, *args, **kwargs): - - super(MarketplacePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py deleted file mode 100644 index 776cec56d753..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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_py3 import Resource - - -class Marketplace(Resource): - """An marketplace 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 billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar usage_start: The start of the date time range covered by the usage - detail. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the usage - detail. - :vartype usage_end: datetime - :ivar resource_rate: The marketplace resource rate. - :vartype resource_rate: decimal.Decimal - :ivar offer_name: The type of offer. - :vartype offer_name: str - :ivar resource_group: The name of resource group. - :vartype resource_group: str - :ivar order_number: The order number. - :vartype order_number: str - :ivar instance_name: The name of the resource instance that the usage is - about. - :vartype instance_name: str - :ivar instance_id: The uri of the resource instance that the usage is - about. - :vartype instance_id: str - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar consumed_quantity: The quantity of usage. - :vartype consumed_quantity: decimal.Decimal - :ivar unit_of_measure: The unit of measure. - :vartype unit_of_measure: str - :ivar pretax_cost: The amount of cost before tax. - :vartype pretax_cost: decimal.Decimal - :ivar is_estimated: The estimated usage is subject to change. - :vartype is_estimated: bool - :ivar meter_id: The meter id (GUID). - :vartype meter_id: str - :ivar subscription_guid: Subscription guid. - :vartype subscription_guid: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar account_name: Account name. - :vartype account_name: str - :ivar department_name: Department name. - :vartype department_name: str - :ivar consumed_service: Consumed service name. - :vartype consumed_service: str - :ivar cost_center: The cost center of this department if it is a - department and a costcenter exists - :vartype cost_center: str - :ivar additional_properties: Additional details of this usage item. By - default this is not populated, unless it's specified in $expand. - :vartype additional_properties: str - :ivar publisher_name: The name of publisher. - :vartype publisher_name: str - :ivar plan_name: The name of plan. - :vartype plan_name: str - :ivar is_recurring_charge: Flag indicating whether this is a recurring - charge or not. - :vartype is_recurring_charge: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'resource_rate': {'readonly': True}, - 'offer_name': {'readonly': True}, - 'resource_group': {'readonly': True}, - 'order_number': {'readonly': True}, - 'instance_name': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'currency': {'readonly': True}, - 'consumed_quantity': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'pretax_cost': {'readonly': True}, - 'is_estimated': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'subscription_guid': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'account_name': {'readonly': True}, - 'department_name': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'additional_properties': {'readonly': True}, - 'publisher_name': {'readonly': True}, - 'plan_name': {'readonly': True}, - 'is_recurring_charge': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'resource_rate': {'key': 'properties.resourceRate', 'type': 'decimal'}, - 'offer_name': {'key': 'properties.offerName', 'type': 'str'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'order_number': {'key': 'properties.orderNumber', 'type': 'str'}, - 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'consumed_quantity': {'key': 'properties.consumedQuantity', 'type': 'decimal'}, - 'unit_of_measure': {'key': 'properties.unitOfMeasure', 'type': 'str'}, - 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, - 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, - 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, - 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, - } - - def __init__(self, **kwargs) -> None: - super(Marketplace, self).__init__(**kwargs) - self.billing_period_id = None - self.usage_start = None - self.usage_end = None - self.resource_rate = None - self.offer_name = None - self.resource_group = None - self.order_number = None - self.instance_name = None - self.instance_id = None - self.currency = None - self.consumed_quantity = None - self.unit_of_measure = None - self.pretax_cost = None - self.is_estimated = None - self.meter_id = None - self.subscription_guid = None - self.subscription_name = None - self.account_name = None - self.department_name = None - self.consumed_service = None - self.cost_center = None - self.additional_properties = None - self.publisher_name = None - self.plan_name = None - self.is_recurring_charge = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py deleted file mode 100644 index c0cdb32756b0..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 msrest.serialization import Model - - -class MeterDetails(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit: The unit in which the meter consumption is charged, for - example, 'Hours', 'GB', etc. - :vartype unit: str - :ivar meter_location: The location in which the Azure service is - available. - :vartype meter_location: str - :ivar total_included_quantity: The total included quantity associated with - the offer. - :vartype total_included_quantity: decimal.Decimal - :ivar pretax_standard_rate: The pretax listing price. - :vartype pretax_standard_rate: decimal.Decimal - :ivar service_name: The name of the service. - :vartype service_name: str - :ivar service_tier: The service tier. - :vartype service_tier: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit': {'readonly': True}, - 'meter_location': {'readonly': True}, - 'total_included_quantity': {'readonly': True}, - 'pretax_standard_rate': {'readonly': True}, - 'service_name': {'readonly': True}, - 'service_tier': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'meter_location': {'key': 'meterLocation', 'type': 'str'}, - 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, - 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'service_tier': {'key': 'serviceTier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MeterDetails, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit = None - self.meter_location = None - self.total_included_quantity = None - self.pretax_standard_rate = None - self.service_name = None - self.service_tier = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py deleted file mode 100644 index c7b6c8a43a47..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/meter_details_py3.py +++ /dev/null @@ -1,80 +0,0 @@ -# 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 msrest.serialization import Model - - -class MeterDetails(Model): - """The properties of the meter detail. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar meter_name: The name of the meter, within the given meter category - :vartype meter_name: str - :ivar meter_category: The category of the meter, for example, 'Cloud - services', 'Networking', etc.. - :vartype meter_category: str - :ivar meter_sub_category: The subcategory of the meter, for example, 'A6 - Cloud services', 'ExpressRoute (IXP)', etc.. - :vartype meter_sub_category: str - :ivar unit: The unit in which the meter consumption is charged, for - example, 'Hours', 'GB', etc. - :vartype unit: str - :ivar meter_location: The location in which the Azure service is - available. - :vartype meter_location: str - :ivar total_included_quantity: The total included quantity associated with - the offer. - :vartype total_included_quantity: decimal.Decimal - :ivar pretax_standard_rate: The pretax listing price. - :vartype pretax_standard_rate: decimal.Decimal - :ivar service_name: The name of the service. - :vartype service_name: str - :ivar service_tier: The service tier. - :vartype service_tier: str - """ - - _validation = { - 'meter_name': {'readonly': True}, - 'meter_category': {'readonly': True}, - 'meter_sub_category': {'readonly': True}, - 'unit': {'readonly': True}, - 'meter_location': {'readonly': True}, - 'total_included_quantity': {'readonly': True}, - 'pretax_standard_rate': {'readonly': True}, - 'service_name': {'readonly': True}, - 'service_tier': {'readonly': True}, - } - - _attribute_map = { - 'meter_name': {'key': 'meterName', 'type': 'str'}, - 'meter_category': {'key': 'meterCategory', 'type': 'str'}, - 'meter_sub_category': {'key': 'meterSubCategory', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'meter_location': {'key': 'meterLocation', 'type': 'str'}, - 'total_included_quantity': {'key': 'totalIncludedQuantity', 'type': 'decimal'}, - 'pretax_standard_rate': {'key': 'pretaxStandardRate', 'type': 'decimal'}, - 'service_name': {'key': 'serviceName', 'type': 'str'}, - 'service_tier': {'key': 'serviceTier', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(MeterDetails, self).__init__(**kwargs) - self.meter_name = None - self.meter_category = None - self.meter_sub_category = None - self.unit = None - self.meter_location = None - self.total_included_quantity = None - self.pretax_standard_rate = None - self.service_name = None - self.service_tier = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py deleted file mode 100644 index c50dc6aa4dc2..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/notification.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 msrest.serialization import Model - - -class Notification(Model): - """The notification associated with a budget. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. The notification is enabled or not. - :type enabled: bool - :param operator: Required. The comparison operator. Possible values - include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - :type operator: str or ~azure.mgmt.consumption.models.OperatorType - :param threshold: Required. Threshold value associated with a - notification. Notification is sent when the cost exceeded the threshold. - It is always percent and has to be between 0 and 1000. - :type threshold: decimal.Decimal - :param contact_emails: Required. Email addresses to send the budget - notification to when the threshold is exceeded. - :type contact_emails: list[str] - :param contact_roles: Contact roles to send the budget notification to - when the threshold is exceeded. - :type contact_roles: list[str] - :param contact_groups: Action groups to send the budget notification to - when the threshold is exceeded. - :type contact_groups: list[str] - """ - - _validation = { - 'enabled': {'required': True}, - 'operator': {'required': True}, - 'threshold': {'required': True}, - 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, - 'contact_groups': {'max_items': 50, 'min_items': 0}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'decimal'}, - 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, - 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, - 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(Notification, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.operator = kwargs.get('operator', None) - self.threshold = kwargs.get('threshold', None) - self.contact_emails = kwargs.get('contact_emails', None) - self.contact_roles = kwargs.get('contact_roles', None) - self.contact_groups = kwargs.get('contact_groups', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py deleted file mode 100644 index 6dfc794e2477..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/notification_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 msrest.serialization import Model - - -class Notification(Model): - """The notification associated with a budget. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. The notification is enabled or not. - :type enabled: bool - :param operator: Required. The comparison operator. Possible values - include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - :type operator: str or ~azure.mgmt.consumption.models.OperatorType - :param threshold: Required. Threshold value associated with a - notification. Notification is sent when the cost exceeded the threshold. - It is always percent and has to be between 0 and 1000. - :type threshold: decimal.Decimal - :param contact_emails: Required. Email addresses to send the budget - notification to when the threshold is exceeded. - :type contact_emails: list[str] - :param contact_roles: Contact roles to send the budget notification to - when the threshold is exceeded. - :type contact_roles: list[str] - :param contact_groups: Action groups to send the budget notification to - when the threshold is exceeded. - :type contact_groups: list[str] - """ - - _validation = { - 'enabled': {'required': True}, - 'operator': {'required': True}, - 'threshold': {'required': True}, - 'contact_emails': {'required': True, 'max_items': 50, 'min_items': 1}, - 'contact_groups': {'max_items': 50, 'min_items': 0}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'operator': {'key': 'operator', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'decimal'}, - 'contact_emails': {'key': 'contactEmails', 'type': '[str]'}, - 'contact_roles': {'key': 'contactRoles', 'type': '[str]'}, - 'contact_groups': {'key': 'contactGroups', 'type': '[str]'}, - } - - def __init__(self, *, enabled: bool, operator, threshold, contact_emails, contact_roles=None, contact_groups=None, **kwargs) -> None: - super(Notification, self).__init__(**kwargs) - self.enabled = enabled - self.operator = operator - self.threshold = threshold - self.contact_emails = contact_emails - self.contact_roles = contact_roles - self.contact_groups = contact_groups diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py deleted file mode 100644 index 7bf1bc6b770d..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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 msrest.serialization import Model - - -class PriceSheetProperties(Model): - """The properties of the price sheet. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails - :ivar unit_of_measure: Unit of measure - :vartype unit_of_measure: str - :ivar included_quantity: Included quality for an offer - :vartype included_quantity: decimal.Decimal - :ivar part_number: Part Number - :vartype part_number: str - :ivar unit_price: Unit Price - :vartype unit_price: decimal.Decimal - :ivar currency_code: Currency Code - :vartype currency_code: str - :ivar offer_id: Offer Id - :vartype offer_id: str - """ - - _validation = { - 'billing_period_id': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'included_quantity': {'readonly': True}, - 'part_number': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'currency_code': {'readonly': True}, - 'offer_id': {'readonly': True}, - } - - _attribute_map = { - 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, - 'meter_id': {'key': 'meterId', 'type': 'str'}, - 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, - 'part_number': {'key': 'partNumber', 'type': 'str'}, - 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'offer_id': {'key': 'offerId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PriceSheetProperties, self).__init__(**kwargs) - self.billing_period_id = None - self.meter_id = None - self.meter_details = None - self.unit_of_measure = None - self.included_quantity = None - self.part_number = None - self.unit_price = None - self.currency_code = None - self.offer_id = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py deleted file mode 100644 index eef5a80d3d23..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_properties_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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 msrest.serialization import Model - - -class PriceSheetProperties(Model): - """The properties of the price sheet. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails - :ivar unit_of_measure: Unit of measure - :vartype unit_of_measure: str - :ivar included_quantity: Included quality for an offer - :vartype included_quantity: decimal.Decimal - :ivar part_number: Part Number - :vartype part_number: str - :ivar unit_price: Unit Price - :vartype unit_price: decimal.Decimal - :ivar currency_code: Currency Code - :vartype currency_code: str - :ivar offer_id: Offer Id - :vartype offer_id: str - """ - - _validation = { - 'billing_period_id': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'unit_of_measure': {'readonly': True}, - 'included_quantity': {'readonly': True}, - 'part_number': {'readonly': True}, - 'unit_price': {'readonly': True}, - 'currency_code': {'readonly': True}, - 'offer_id': {'readonly': True}, - } - - _attribute_map = { - 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, - 'meter_id': {'key': 'meterId', 'type': 'str'}, - 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'included_quantity': {'key': 'includedQuantity', 'type': 'decimal'}, - 'part_number': {'key': 'partNumber', 'type': 'str'}, - 'unit_price': {'key': 'unitPrice', 'type': 'decimal'}, - 'currency_code': {'key': 'currencyCode', 'type': 'str'}, - 'offer_id': {'key': 'offerId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(PriceSheetProperties, self).__init__(**kwargs) - self.billing_period_id = None - self.meter_id = None - self.meter_details = None - self.unit_of_measure = None - self.included_quantity = None - self.part_number = None - self.unit_price = None - self.currency_code = None - self.offer_id = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/pricesheet_download_response.py similarity index 66% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/pricesheet_download_response.py index e4b536b687b7..1f74b5321bc4 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/pricesheet_download_response.py @@ -12,8 +12,8 @@ from .resource import Resource -class PriceSheetResult(Resource): - """An pricesheet resource. +class PricesheetDownloadResponse(Resource): + """Download response of Pricesheets. Variables are only populated by the server, and will be ignored when sending a request. @@ -26,11 +26,10 @@ class PriceSheetResult(Resource): :vartype type: str :ivar tags: Resource tags. :vartype tags: dict[str, str] - :ivar pricesheets: Price sheet - :vartype pricesheets: - list[~azure.mgmt.consumption.models.PriceSheetProperties] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str + :ivar download_url: The URL to the PDF file. + :vartype download_url: str + :ivar expiry_time: The time in UTC at which this download URL will expire. + :vartype expiry_time: str """ _validation = { @@ -38,8 +37,8 @@ class PriceSheetResult(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'tags': {'readonly': True}, - 'pricesheets': {'readonly': True}, - 'next_link': {'readonly': True}, + 'download_url': {'readonly': True}, + 'expiry_time': {'readonly': True}, } _attribute_map = { @@ -47,11 +46,11 @@ class PriceSheetResult(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'download_url': {'key': 'properties.downloadUrl', 'type': 'str'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'str'}, } def __init__(self, **kwargs): - super(PriceSheetResult, self).__init__(**kwargs) - self.pricesheets = None - self.next_link = None + super(PricesheetDownloadResponse, self).__init__(**kwargs) + self.download_url = None + self.expiry_time = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/pricesheet_download_response_py3.py similarity index 66% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/pricesheet_download_response_py3.py index aef94bda9c36..387869887c90 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/price_sheet_result_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/pricesheet_download_response_py3.py @@ -12,8 +12,8 @@ from .resource_py3 import Resource -class PriceSheetResult(Resource): - """An pricesheet resource. +class PricesheetDownloadResponse(Resource): + """Download response of Pricesheets. Variables are only populated by the server, and will be ignored when sending a request. @@ -26,11 +26,10 @@ class PriceSheetResult(Resource): :vartype type: str :ivar tags: Resource tags. :vartype tags: dict[str, str] - :ivar pricesheets: Price sheet - :vartype pricesheets: - list[~azure.mgmt.consumption.models.PriceSheetProperties] - :ivar next_link: The link (url) to the next page of results. - :vartype next_link: str + :ivar download_url: The URL to the PDF file. + :vartype download_url: str + :ivar expiry_time: The time in UTC at which this download URL will expire. + :vartype expiry_time: str """ _validation = { @@ -38,8 +37,8 @@ class PriceSheetResult(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'tags': {'readonly': True}, - 'pricesheets': {'readonly': True}, - 'next_link': {'readonly': True}, + 'download_url': {'readonly': True}, + 'expiry_time': {'readonly': True}, } _attribute_map = { @@ -47,11 +46,11 @@ class PriceSheetResult(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'pricesheets': {'key': 'properties.pricesheets', 'type': '[PriceSheetProperties]'}, - 'next_link': {'key': 'properties.nextLink', 'type': 'str'}, + 'download_url': {'key': 'properties.downloadUrl', 'type': 'str'}, + 'expiry_time': {'key': 'properties.expiryTime', 'type': 'str'}, } def __init__(self, **kwargs) -> None: - super(PriceSheetResult, self).__init__(**kwargs) - self.pricesheets = None - self.next_link = None + super(PricesheetDownloadResponse, self).__init__(**kwargs) + self.download_url = None + self.expiry_time = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options.py deleted file mode 100644 index 138f41fe17ad..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 msrest.serialization import Model - - -class QueryOptions(Model): - """Additional parameters for list operation. - - :param apply: OData apply expression to aggregate usageDetails by tags or - (tags and properties/usageStart) - :type apply: str - """ - - _attribute_map = { - 'apply': {'key': '', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryOptions, self).__init__(**kwargs) - self.apply = kwargs.get('apply', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options_py3.py deleted file mode 100644 index c397d22ed6ec..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/query_options_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 msrest.serialization import Model - - -class QueryOptions(Model): - """Additional parameters for list operation. - - :param apply: OData apply expression to aggregate usageDetails by tags or - (tags and properties/usageStart) - :type apply: str - """ - - _attribute_map = { - 'apply': {'key': '', 'type': 'str'}, - } - - def __init__(self, *, apply: str=None, **kwargs) -> None: - super(QueryOptions, self).__init__(**kwargs) - self.apply = apply diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py deleted file mode 100644 index 434326f37c82..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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 ReservationDetail(Resource): - """reservation detail 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 reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved for the day. E.g. - if reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days. - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: The date on which consumption occurred. - :vartype usage_date: datetime - :ivar used_hours: This is the total hours used by the instance. - :vartype used_hours: decimal.Decimal - :ivar instance_id: This identifier is the name of the resource or the - fully qualified Resource ID. - :vartype instance_id: str - :ivar total_reserved_quantity: This is the total count of instances that - are reserved for the reservationId. - :vartype total_reserved_quantity: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'total_reserved_quantity': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ReservationDetail, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.instance_id = None - self.total_reserved_quantity = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py deleted file mode 100644 index 5b596c3df721..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class ReservationDetailPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationDetail ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationDetail]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationDetailPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py deleted file mode 100644 index b88fccac1663..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_detail_py3.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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_py3 import Resource - - -class ReservationDetail(Resource): - """reservation detail 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 reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved for the day. E.g. - if reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days. - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: The date on which consumption occurred. - :vartype usage_date: datetime - :ivar used_hours: This is the total hours used by the instance. - :vartype used_hours: decimal.Decimal - :ivar instance_id: This identifier is the name of the resource or the - fully qualified Resource ID. - :vartype instance_id: str - :ivar total_reserved_quantity: This is the total count of instances that - are reserved for the reservationId. - :vartype total_reserved_quantity: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'total_reserved_quantity': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'total_reserved_quantity': {'key': 'properties.totalReservedQuantity', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationDetail, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.instance_id = None - self.total_reserved_quantity = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py deleted file mode 100644 index 45a36151f6f8..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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 msrest.serialization import Model - - -class ReservationRecommendation(Model): - """Reservation recommendation 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 location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - :ivar look_back_period: The number of days of usage to look back for - recommendation. - :vartype look_back_period: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar term: RI recommendations in one or three year terms. - :vartype term: str - :ivar cost_with_no_reserved_instances: The total amount of cost without - reserved instances. - :vartype cost_with_no_reserved_instances: decimal.Decimal - :ivar recommended_quantity: Recommended quality for reserved instances. - :vartype recommended_quantity: decimal.Decimal - :ivar total_cost_with_reserved_instances: The total amount of cost with - reserved instances. - :vartype total_cost_with_reserved_instances: decimal.Decimal - :ivar net_savings: Total estimated savings with reserved instances. - :vartype net_savings: decimal.Decimal - :ivar first_usage_date: The usage date for looking back. - :vartype first_usage_date: datetime - :ivar scope: Shared or single recommendation. - :vartype scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - 'look_back_period': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'term': {'readonly': True}, - 'cost_with_no_reserved_instances': {'readonly': True}, - 'recommended_quantity': {'readonly': True}, - 'total_cost_with_reserved_instances': {'readonly': True}, - 'net_savings': {'readonly': True}, - 'first_usage_date': {'readonly': True}, - 'scope': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, - 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, - 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, - 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, - 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ReservationRecommendation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None - self.location = None - self.sku = None - self.look_back_period = None - self.meter_id = None - self.term = None - self.cost_with_no_reserved_instances = None - self.recommended_quantity = None - self.total_cost_with_reserved_instances = None - self.net_savings = None - self.first_usage_date = None - self.scope = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py deleted file mode 100644 index db7d155ade36..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class ReservationRecommendationPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationRecommendation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationRecommendation]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationRecommendationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py deleted file mode 100644 index 267d8195d4a1..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_recommendation_py3.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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 msrest.serialization import Model - - -class ReservationRecommendation(Model): - """Reservation recommendation 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 location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - :ivar look_back_period: The number of days of usage to look back for - recommendation. - :vartype look_back_period: str - :ivar meter_id: The meter id (GUID) - :vartype meter_id: str - :ivar term: RI recommendations in one or three year terms. - :vartype term: str - :ivar cost_with_no_reserved_instances: The total amount of cost without - reserved instances. - :vartype cost_with_no_reserved_instances: decimal.Decimal - :ivar recommended_quantity: Recommended quality for reserved instances. - :vartype recommended_quantity: decimal.Decimal - :ivar total_cost_with_reserved_instances: The total amount of cost with - reserved instances. - :vartype total_cost_with_reserved_instances: decimal.Decimal - :ivar net_savings: Total estimated savings with reserved instances. - :vartype net_savings: decimal.Decimal - :ivar first_usage_date: The usage date for looking back. - :vartype first_usage_date: datetime - :ivar scope: Shared or single recommendation. - :vartype scope: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - 'look_back_period': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'term': {'readonly': True}, - 'cost_with_no_reserved_instances': {'readonly': True}, - 'recommended_quantity': {'readonly': True}, - 'total_cost_with_reserved_instances': {'readonly': True}, - 'net_savings': {'readonly': True}, - 'first_usage_date': {'readonly': True}, - 'scope': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - 'look_back_period': {'key': 'properties.lookBackPeriod', 'type': 'str'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'term': {'key': 'properties.term', 'type': 'str'}, - 'cost_with_no_reserved_instances': {'key': 'properties.costWithNoReservedInstances', 'type': 'decimal'}, - 'recommended_quantity': {'key': 'properties.recommendedQuantity', 'type': 'decimal'}, - 'total_cost_with_reserved_instances': {'key': 'properties.totalCostWithReservedInstances', 'type': 'decimal'}, - 'net_savings': {'key': 'properties.netSavings', 'type': 'decimal'}, - 'first_usage_date': {'key': 'properties.firstUsageDate', 'type': 'iso-8601'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationRecommendation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = None - self.location = None - self.sku = None - self.look_back_period = None - self.meter_id = None - self.term = None - self.cost_with_no_reserved_instances = None - self.recommended_quantity = None - self.total_cost_with_reserved_instances = None - self.net_savings = None - self.first_usage_date = None - self.scope = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py deleted file mode 100644 index 3d60ffb73ba0..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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 ReservationSummary(Resource): - """reservation summary 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 reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved. E.g. if - reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: Data corresponding to the utilization record. If the - grain of data is monthly, it will be first day of month. - :vartype usage_date: datetime - :ivar used_hours: Total used hours by the reservation - :vartype used_hours: decimal.Decimal - :ivar min_utilization_percentage: This is the minimum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field - will return 10% for that day - :vartype min_utilization_percentage: decimal.Decimal - :ivar avg_utilization_percentage: This is average utilization for the - entire time range. (day or month depending on the grain) - :vartype avg_utilization_percentage: decimal.Decimal - :ivar max_utilization_percentage: This is the maximum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field - will return 100% for that day. - :vartype max_utilization_percentage: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'min_utilization_percentage': {'readonly': True}, - 'avg_utilization_percentage': {'readonly': True}, - 'max_utilization_percentage': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, - 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, - 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, - } - - def __init__(self, **kwargs): - super(ReservationSummary, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.min_utilization_percentage = None - self.avg_utilization_percentage = None - self.max_utilization_percentage = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py deleted file mode 100644 index 5b2e1ee931ae..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class ReservationSummaryPaged(Paged): - """ - A paging container for iterating over a list of :class:`ReservationSummary ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ReservationSummary]'} - } - - def __init__(self, *args, **kwargs): - - super(ReservationSummaryPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py deleted file mode 100644 index 45d46e82b876..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/reservation_summary_py3.py +++ /dev/null @@ -1,108 +0,0 @@ -# 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_py3 import Resource - - -class ReservationSummary(Resource): - """reservation summary 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 reservation_order_id: The reservation order ID is the identifier for - a reservation purchase. Each reservation order ID represents a single - purchase transaction. A reservation order contains reservations. The - reservation order specifies the VM size and region for the reservations. - :vartype reservation_order_id: str - :ivar reservation_id: The reservation ID is the identifier of a - reservation within a reservation order. Each reservation is the grouping - for applying the benefit scope and also specifies the number of instances - to which the reservation benefit can be applied to. - :vartype reservation_id: str - :ivar sku_name: This is the ARM Sku name. It can be used to join with the - serviceType field in additional info in usage records. - :vartype sku_name: str - :ivar reserved_hours: This is the total hours reserved. E.g. if - reservation for 1 instance was made on 1 PM, this will be 11 hours for - that day and 24 hours from subsequent days - :vartype reserved_hours: decimal.Decimal - :ivar usage_date: Data corresponding to the utilization record. If the - grain of data is monthly, it will be first day of month. - :vartype usage_date: datetime - :ivar used_hours: Total used hours by the reservation - :vartype used_hours: decimal.Decimal - :ivar min_utilization_percentage: This is the minimum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field - will return 10% for that day - :vartype min_utilization_percentage: decimal.Decimal - :ivar avg_utilization_percentage: This is average utilization for the - entire time range. (day or month depending on the grain) - :vartype avg_utilization_percentage: decimal.Decimal - :ivar max_utilization_percentage: This is the maximum hourly utilization - in the usage time (day or month). E.g. if usage record corresponds to - 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field - will return 100% for that day. - :vartype max_utilization_percentage: decimal.Decimal - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'reservation_order_id': {'readonly': True}, - 'reservation_id': {'readonly': True}, - 'sku_name': {'readonly': True}, - 'reserved_hours': {'readonly': True}, - 'usage_date': {'readonly': True}, - 'used_hours': {'readonly': True}, - 'min_utilization_percentage': {'readonly': True}, - 'avg_utilization_percentage': {'readonly': True}, - 'max_utilization_percentage': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'reservation_order_id': {'key': 'properties.reservationOrderId', 'type': 'str'}, - 'reservation_id': {'key': 'properties.reservationId', 'type': 'str'}, - 'sku_name': {'key': 'properties.skuName', 'type': 'str'}, - 'reserved_hours': {'key': 'properties.reservedHours', 'type': 'decimal'}, - 'usage_date': {'key': 'properties.usageDate', 'type': 'iso-8601'}, - 'used_hours': {'key': 'properties.usedHours', 'type': 'decimal'}, - 'min_utilization_percentage': {'key': 'properties.minUtilizationPercentage', 'type': 'decimal'}, - 'avg_utilization_percentage': {'key': 'properties.avgUtilizationPercentage', 'type': 'decimal'}, - 'max_utilization_percentage': {'key': 'properties.maxUtilizationPercentage', 'type': 'decimal'}, - } - - def __init__(self, **kwargs) -> None: - super(ReservationSummary, self).__init__(**kwargs) - self.reservation_order_id = None - self.reservation_id = None - self.sku_name = None - self.reserved_hours = None - self.usage_date = None - self.used_hours = None - self.min_utilization_percentage = None - self.avg_utilization_percentage = None - self.max_utilization_percentage = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py deleted file mode 100644 index fa0c45ddf7a8..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 msrest.serialization import Model - - -class ResourceAttributes(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - """ - - _validation = { - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ResourceAttributes, self).__init__(**kwargs) - self.location = None - self.sku = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py deleted file mode 100644 index 273cab9005d4..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/resource_attributes_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 msrest.serialization import Model - - -class ResourceAttributes(Model): - """The Resource model definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location: Resource location - :vartype location: str - :ivar sku: Resource sku - :vartype sku: str - """ - - _validation = { - 'location': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ResourceAttributes, self).__init__(**kwargs) - self.location = None - self.sku = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py deleted file mode 100644 index f52e1c5671ad..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/tag.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 msrest.serialization import Model - - -class Tag(Model): - """The tag resource. - - :param key: Tag key. - :type key: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Tag, self).__init__(**kwargs) - self.key = kwargs.get('key', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py deleted file mode 100644 index fca156d8312c..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/tag_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 msrest.serialization import Model - - -class Tag(Model): - """The tag resource. - - :param key: Tag key. - :type key: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, **kwargs) -> None: - super(Tag, self).__init__(**kwargs) - self.key = key diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py deleted file mode 100644 index 66f2a11e9e41..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail.py +++ /dev/null @@ -1,192 +0,0 @@ -# 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 UsageDetail(Resource): - """An usage detail 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 billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar invoice_id: The id of the invoice resource that the usage belongs - to. - :vartype invoice_id: str - :ivar usage_start: The start of the date time range covered by the usage - detail. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the usage - detail. - :vartype usage_end: datetime - :ivar instance_name: The name of the resource instance that the usage is - about. - :vartype instance_name: str - :ivar instance_id: The uri of the resource instance that the usage is - about. - :vartype instance_id: str - :ivar instance_location: The location of the resource instance that the - usage is about. - :vartype instance_location: str - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar usage_quantity: The quantity of usage. - :vartype usage_quantity: decimal.Decimal - :ivar billable_quantity: The billable usage quantity. - :vartype billable_quantity: decimal.Decimal - :ivar pretax_cost: The amount of cost before tax. - :vartype pretax_cost: decimal.Decimal - :ivar is_estimated: The estimated usage is subject to change. - :vartype is_estimated: bool - :ivar meter_id: The meter id (GUID). - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails - :ivar subscription_guid: Subscription guid. - :vartype subscription_guid: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar account_name: Account name. - :vartype account_name: str - :ivar department_name: Department name. - :vartype department_name: str - :ivar product: Product name. - :vartype product: str - :ivar consumed_service: Consumed service name. - :vartype consumed_service: str - :ivar cost_center: The cost center of this department if it is a - department and a costcenter exists - :vartype cost_center: str - :ivar part_number: Part Number - :vartype part_number: str - :ivar resource_guid: Resource Guid - :vartype resource_guid: str - :ivar offer_id: Offer Id - :vartype offer_id: str - :ivar charges_billed_separately: Charges billed separately - :vartype charges_billed_separately: bool - :ivar location: Resource Location - :vartype location: str - :ivar additional_properties: Additional details of this usage item. By - default this is not populated, unless it's specified in $expand. - :vartype additional_properties: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'invoice_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'instance_name': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'instance_location': {'readonly': True}, - 'currency': {'readonly': True}, - 'usage_quantity': {'readonly': True}, - 'billable_quantity': {'readonly': True}, - 'pretax_cost': {'readonly': True}, - 'is_estimated': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'subscription_guid': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'account_name': {'readonly': True}, - 'department_name': {'readonly': True}, - 'product': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'part_number': {'readonly': True}, - 'resource_guid': {'readonly': True}, - 'offer_id': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'location': {'readonly': True}, - 'additional_properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'invoice_id': {'key': 'properties.invoiceId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'instance_location': {'key': 'properties.instanceLocation', 'type': 'str'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'usage_quantity': {'key': 'properties.usageQuantity', 'type': 'decimal'}, - 'billable_quantity': {'key': 'properties.billableQuantity', 'type': 'decimal'}, - 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, - 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetails'}, - 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, - 'product': {'key': 'properties.product', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'bool'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(UsageDetail, self).__init__(**kwargs) - self.billing_period_id = None - self.invoice_id = None - self.usage_start = None - self.usage_end = None - self.instance_name = None - self.instance_id = None - self.instance_location = None - self.currency = None - self.usage_quantity = None - self.billable_quantity = None - self.pretax_cost = None - self.is_estimated = None - self.meter_id = None - self.meter_details = None - self.subscription_guid = None - self.subscription_name = None - self.account_name = None - self.department_name = None - self.product = None - self.consumed_service = None - self.cost_center = None - self.part_number = None - self.resource_guid = None - self.offer_id = None - self.charges_billed_separately = None - self.location = None - self.additional_properties = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py deleted file mode 100644 index ae15d28a276e..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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 msrest.paging import Paged - - -class UsageDetailPaged(Paged): - """ - A paging container for iterating over a list of :class:`UsageDetail ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UsageDetail]'} - } - - def __init__(self, *args, **kwargs): - - super(UsageDetailPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py deleted file mode 100644 index 410acf2f81c3..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/usage_detail_py3.py +++ /dev/null @@ -1,192 +0,0 @@ -# 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_py3 import Resource - - -class UsageDetail(Resource): - """An usage detail 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 billing_period_id: The id of the billing period resource that the - usage belongs to. - :vartype billing_period_id: str - :ivar invoice_id: The id of the invoice resource that the usage belongs - to. - :vartype invoice_id: str - :ivar usage_start: The start of the date time range covered by the usage - detail. - :vartype usage_start: datetime - :ivar usage_end: The end of the date time range covered by the usage - detail. - :vartype usage_end: datetime - :ivar instance_name: The name of the resource instance that the usage is - about. - :vartype instance_name: str - :ivar instance_id: The uri of the resource instance that the usage is - about. - :vartype instance_id: str - :ivar instance_location: The location of the resource instance that the - usage is about. - :vartype instance_location: str - :ivar currency: The ISO currency in which the meter is charged, for - example, USD. - :vartype currency: str - :ivar usage_quantity: The quantity of usage. - :vartype usage_quantity: decimal.Decimal - :ivar billable_quantity: The billable usage quantity. - :vartype billable_quantity: decimal.Decimal - :ivar pretax_cost: The amount of cost before tax. - :vartype pretax_cost: decimal.Decimal - :ivar is_estimated: The estimated usage is subject to change. - :vartype is_estimated: bool - :ivar meter_id: The meter id (GUID). - :vartype meter_id: str - :ivar meter_details: The details about the meter. By default this is not - populated, unless it's specified in $expand. - :vartype meter_details: ~azure.mgmt.consumption.models.MeterDetails - :ivar subscription_guid: Subscription guid. - :vartype subscription_guid: str - :ivar subscription_name: Subscription name. - :vartype subscription_name: str - :ivar account_name: Account name. - :vartype account_name: str - :ivar department_name: Department name. - :vartype department_name: str - :ivar product: Product name. - :vartype product: str - :ivar consumed_service: Consumed service name. - :vartype consumed_service: str - :ivar cost_center: The cost center of this department if it is a - department and a costcenter exists - :vartype cost_center: str - :ivar part_number: Part Number - :vartype part_number: str - :ivar resource_guid: Resource Guid - :vartype resource_guid: str - :ivar offer_id: Offer Id - :vartype offer_id: str - :ivar charges_billed_separately: Charges billed separately - :vartype charges_billed_separately: bool - :ivar location: Resource Location - :vartype location: str - :ivar additional_properties: Additional details of this usage item. By - default this is not populated, unless it's specified in $expand. - :vartype additional_properties: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tags': {'readonly': True}, - 'billing_period_id': {'readonly': True}, - 'invoice_id': {'readonly': True}, - 'usage_start': {'readonly': True}, - 'usage_end': {'readonly': True}, - 'instance_name': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'instance_location': {'readonly': True}, - 'currency': {'readonly': True}, - 'usage_quantity': {'readonly': True}, - 'billable_quantity': {'readonly': True}, - 'pretax_cost': {'readonly': True}, - 'is_estimated': {'readonly': True}, - 'meter_id': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'subscription_guid': {'readonly': True}, - 'subscription_name': {'readonly': True}, - 'account_name': {'readonly': True}, - 'department_name': {'readonly': True}, - 'product': {'readonly': True}, - 'consumed_service': {'readonly': True}, - 'cost_center': {'readonly': True}, - 'part_number': {'readonly': True}, - 'resource_guid': {'readonly': True}, - 'offer_id': {'readonly': True}, - 'charges_billed_separately': {'readonly': True}, - 'location': {'readonly': True}, - 'additional_properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'invoice_id': {'key': 'properties.invoiceId', 'type': 'str'}, - 'usage_start': {'key': 'properties.usageStart', 'type': 'iso-8601'}, - 'usage_end': {'key': 'properties.usageEnd', 'type': 'iso-8601'}, - 'instance_name': {'key': 'properties.instanceName', 'type': 'str'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'instance_location': {'key': 'properties.instanceLocation', 'type': 'str'}, - 'currency': {'key': 'properties.currency', 'type': 'str'}, - 'usage_quantity': {'key': 'properties.usageQuantity', 'type': 'decimal'}, - 'billable_quantity': {'key': 'properties.billableQuantity', 'type': 'decimal'}, - 'pretax_cost': {'key': 'properties.pretaxCost', 'type': 'decimal'}, - 'is_estimated': {'key': 'properties.isEstimated', 'type': 'bool'}, - 'meter_id': {'key': 'properties.meterId', 'type': 'str'}, - 'meter_details': {'key': 'properties.meterDetails', 'type': 'MeterDetails'}, - 'subscription_guid': {'key': 'properties.subscriptionGuid', 'type': 'str'}, - 'subscription_name': {'key': 'properties.subscriptionName', 'type': 'str'}, - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'department_name': {'key': 'properties.departmentName', 'type': 'str'}, - 'product': {'key': 'properties.product', 'type': 'str'}, - 'consumed_service': {'key': 'properties.consumedService', 'type': 'str'}, - 'cost_center': {'key': 'properties.costCenter', 'type': 'str'}, - 'part_number': {'key': 'properties.partNumber', 'type': 'str'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'offer_id': {'key': 'properties.offerId', 'type': 'str'}, - 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'bool'}, - 'location': {'key': 'properties.location', 'type': 'str'}, - 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(UsageDetail, self).__init__(**kwargs) - self.billing_period_id = None - self.invoice_id = None - self.usage_start = None - self.usage_end = None - self.instance_name = None - self.instance_id = None - self.instance_location = None - self.currency = None - self.usage_quantity = None - self.billable_quantity = None - self.pretax_cost = None - self.is_estimated = None - self.meter_id = None - self.meter_details = None - self.subscription_guid = None - self.subscription_name = None - self.account_name = None - self.department_name = None - self.product = None - self.consumed_service = None - self.cost_center = None - self.part_number = None - self.resource_guid = None - self.offer_id = None - self.charges_billed_separately = None - self.location = None - self.additional_properties = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py index f778b44f0171..0ad120abe5d0 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py @@ -9,32 +9,24 @@ # regenerated. # -------------------------------------------------------------------------- -from .usage_details_operations import UsageDetailsOperations -from .marketplaces_operations import MarketplacesOperations -from .budgets_operations import BudgetsOperations -from .tags_operations import TagsOperations -from .charges_operations import ChargesOperations -from .balances_operations import BalancesOperations -from .reservations_summaries_operations import ReservationsSummariesOperations -from .reservations_details_operations import ReservationsDetailsOperations -from .reservation_recommendations_operations import ReservationRecommendationsOperations -from .price_sheet_operations import PriceSheetOperations -from .forecasts_operations import ForecastsOperations from .operations import Operations -from .aggregated_cost_operations import AggregatedCostOperations +from .credit_summary_by_billing_profile_operations import CreditSummaryByBillingProfileOperations +from .events_by_billing_profile_operations import EventsByBillingProfileOperations +from .lots_by_billing_profile_operations import LotsByBillingProfileOperations +from .invoice_pricesheet_operations import InvoicePricesheetOperations +from .billing_profile_pricesheet_operations import BillingProfilePricesheetOperations +from .charges_by_billing_account_operations import ChargesByBillingAccountOperations +from .charges_by_billing_profile_operations import ChargesByBillingProfileOperations +from .charges_by_invoice_section_operations import ChargesByInvoiceSectionOperations __all__ = [ - 'UsageDetailsOperations', - 'MarketplacesOperations', - 'BudgetsOperations', - 'TagsOperations', - 'ChargesOperations', - 'BalancesOperations', - 'ReservationsSummariesOperations', - 'ReservationsDetailsOperations', - 'ReservationRecommendationsOperations', - 'PriceSheetOperations', - 'ForecastsOperations', 'Operations', - 'AggregatedCostOperations', + 'CreditSummaryByBillingProfileOperations', + 'EventsByBillingProfileOperations', + 'LotsByBillingProfileOperations', + 'InvoicePricesheetOperations', + 'BillingProfilePricesheetOperations', + 'ChargesByBillingAccountOperations', + 'ChargesByBillingProfileOperations', + 'ChargesByInvoiceSectionOperations', ] diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py deleted file mode 100644 index 31202cfa3085..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py +++ /dev/null @@ -1,168 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class AggregatedCostOperations(object): - """AggregatedCostOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def get_by_management_group( - self, management_group_id, filter=None, custom_headers=None, raw=False, **operation_config): - """Provides the aggregate cost of a management group and all child - management groups by current billing period. - - :param management_group_id: Azure Management Group ID. - :type management_group_id: str - :param filter: May be used to filter aggregated cost by - properties/usageStart (Utc time), properties/usageEnd (Utc time). The - filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - currently support 'ne', 'or', or 'not'. Tag filter is a key value pair - string where key and value is separated by a colon (:). - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementGroupAggregatedCostResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_management_group.metadata['url'] - path_format_arguments = { - 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagementGroupAggregatedCostResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost'} - - def get_for_billing_period_by_management_group( - self, management_group_id, billing_period_name, custom_headers=None, raw=False, **operation_config): - """Provides the aggregate cost of a management group and all child - management groups by specified billing period. - - :param management_group_id: Azure Management Group ID. - :type management_group_id: str - :param billing_period_name: Billing Period Name. - :type billing_period_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementGroupAggregatedCostResult or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.consumption.models.ManagementGroupAggregatedCostResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_for_billing_period_by_management_group.metadata['url'] - path_format_arguments = { - 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str'), - 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagementGroupAggregatedCostResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_for_billing_period_by_management_group.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedcost'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py deleted file mode 100644 index 2903dae27261..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py +++ /dev/null @@ -1,156 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class BalancesOperations(object): - """BalancesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def get_by_billing_account( - self, billing_account_id, custom_headers=None, raw=False, **operation_config): - """Gets the balances for a scope by billingAccountId. Balances are - available via this API only for May 1, 2014 or later. - - :param billing_account_id: BillingAccount ID - :type billing_account_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Balance or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.Balance or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_billing_account.metadata['url'] - path_format_arguments = { - 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Balance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances'} - - def get_for_billing_period_by_billing_account( - self, billing_account_id, billing_period_name, custom_headers=None, raw=False, **operation_config): - """Gets the balances for a scope by billing period and billingAccountId. - Balances are available via this API only for May 1, 2014 or later. - - :param billing_account_id: BillingAccount ID - :type billing_account_id: str - :param billing_period_name: Billing Period Name. - :type billing_period_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Balance or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.Balance or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_for_billing_period_by_billing_account.metadata['url'] - path_format_arguments = { - 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), - 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Balance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_for_billing_period_by_billing_account.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/billing_profile_pricesheet_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/billing_profile_pricesheet_operations.py new file mode 100644 index 000000000000..e0e2eed996b2 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/billing_profile_pricesheet_operations.py @@ -0,0 +1,146 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class BillingProfilePricesheetOperations(object): + """BillingProfilePricesheetOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01-preview" + + self.config = config + + + def _download_initial( + self, billing_account_id, billing_profile_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.download.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingProfileId': self._serialize.url("billing_profile_id", billing_profile_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('PricesheetDownloadResponse', response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'str', + 'Azure-AsyncOperation': 'str', + 'OData-EntityId': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def download( + self, billing_account_id, billing_profile_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Get pricesheet data for invoice id (invoiceName). + + :param billing_account_id: Azure Billing Account Id. + :type billing_account_id: str + :param billing_profile_id: Azure Billing Profile Id. + :type billing_profile_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PricesheetDownloadResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.consumption.models.PricesheetDownloadResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.consumption.models.PricesheetDownloadResponse]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._download_initial( + billing_account_id=billing_account_id, + billing_profile_id=billing_profile_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Location': 'str', + 'Retry-After': 'str', + 'Azure-AsyncOperation': 'str', + 'OData-EntityId': 'str', + } + deserialized = self._deserialize('PricesheetDownloadResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + download.metadata = {'url': '/providers/Microsoft.Consumption/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/pricesheet/default/download'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py deleted file mode 100644 index e0d9a1c6c940..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py +++ /dev/null @@ -1,344 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class BudgetsOperations(object): - """BudgetsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, scope, custom_headers=None, raw=False, **operation_config): - """Lists all budgets for the defined scope. - - :param scope: The scope associated with budget operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope. - :type scope: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Budget - :rtype: - ~azure.mgmt.consumption.models.BudgetPaged[~azure.mgmt.consumption.models.Budget] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.BudgetPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BudgetPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets'} - - def get( - self, scope, budget_name, custom_headers=None, raw=False, **operation_config): - """Gets the budget for the scope by budget name. - - :param scope: The scope associated with budget operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope. - :type scope: str - :param budget_name: Budget Name. - :type budget_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Budget or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.Budget or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'budgetName': self._serialize.url("budget_name", budget_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Budget', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} - - def create_or_update( - self, scope, budget_name, parameters, custom_headers=None, raw=False, **operation_config): - """The operation to create or update a budget. Update operation requires - latest eTag to be set in the request mandatorily. You may obtain the - latest eTag by performing a get operation. Create operation does not - require eTag. - - :param scope: The scope associated with budget operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope. - :type scope: str - :param budget_name: Budget Name. - :type budget_name: str - :param parameters: Parameters supplied to the Create Budget operation. - :type parameters: ~azure.mgmt.consumption.models.Budget - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Budget or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.Budget or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'budgetName': self._serialize.url("budget_name", budget_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Budget') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Budget', response) - if response.status_code == 201: - deserialized = self._deserialize('Budget', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} - - def delete( - self, scope, budget_name, custom_headers=None, raw=False, **operation_config): - """The operation to delete a budget. - - :param scope: The scope associated with budget operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope, - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - for billingProfile scope, - 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' - for invoiceSection scope. - :type scope: str - :param budget_name: Budget Name. - :type budget_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True), - 'budgetName': self._serialize.url("budget_name", budget_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_billing_account_operations.py similarity index 57% rename from azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py rename to azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_billing_account_operations.py index 4363d3de914e..aec49e1ddf75 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_billing_account_operations.py @@ -15,14 +15,14 @@ from .. import models -class ChargesOperations(object): - """ChargesOperations operations. +class ChargesByBillingAccountOperations(object): + """ChargesByBillingAccountOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". """ models = models @@ -32,54 +32,51 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-01-01" + self.api_version = "2018-11-01-preview" self.config = config - def list_by_scope( - self, scope, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists the charges based for the defined scope. - - :param scope: The scope associated with usage details operations. This - includes - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope and - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope. For department and enrollment accounts, - you can also add billing period to the scope using - '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For - e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' - :type scope: str - :param filter: May be used to filter charges by properties/usageEnd - (Utc time), properties/usageStart (Utc time). The filter supports - 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support - 'ne', 'or', or 'not'. Tag filter is a key value pair string where key - and value is separated by a colon (:). - :type filter: str + def list( + self, billing_account_id, start_date, end_date, apply=None, custom_headers=None, raw=False, **operation_config): + """Lists the charges by billingAccountId for given start and end date. + Start and end date are used to determine the billing period. For + current month, the data will be provided from month to date. If there + are no chages for a month then that month will show all zeroes. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str + :param apply: May be used to group charges by + properties/billingProfileId, or properties/invoiceSectionId. + :type apply: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ChargeSummary or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.ChargeSummary or + :return: ChargesListByBillingAccount or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.ChargesListByBillingAccount or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` """ # Construct URL - url = self.list_by_scope.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') + if apply is not None: + query_parameters['$apply'] = self._serialize.query("apply", apply, 'str') # Construct headers header_parameters = {} @@ -101,11 +98,11 @@ def list_by_scope( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ChargeSummary', response) + deserialized = self._deserialize('ChargesListByBillingAccount', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_by_scope.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/charges'} + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/charges'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_billing_profile_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_billing_profile_operations.py new file mode 100644 index 000000000000..d69b70832bc7 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_billing_profile_operations.py @@ -0,0 +1,106 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ChargesByBillingProfileOperations(object): + """ChargesByBillingProfileOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01-preview" + + self.config = config + + def list( + self, billing_account_id, billing_profile_id, start_date, end_date, custom_headers=None, raw=False, **operation_config): + """Lists the charges by billing profile id for given start and end date. + Start and end date are used to determine the billing period. For + current month, the data will be provided from month to date. If there + are no chages for a month then that month will show all zeroes. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param billing_profile_id: Billing Profile Id. + :type billing_profile_id: str + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ChargesListByBillingProfile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.ChargesListByBillingProfile or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingProfileId': self._serialize.url("billing_profile_id", billing_profile_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ChargesListByBillingProfile', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/charges'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_invoice_section_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_invoice_section_operations.py new file mode 100644 index 000000000000..981b328ac772 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_invoice_section_operations.py @@ -0,0 +1,110 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ChargesByInvoiceSectionOperations(object): + """ChargesByInvoiceSectionOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01-preview" + + self.config = config + + def list( + self, billing_account_id, invoice_section_id, start_date, end_date, apply=None, custom_headers=None, raw=False, **operation_config): + """Lists the charges by invoice section id for given start and end date. + Start and end date are used to determine the billing period. For + current month, the data will be provided from month to date. If there + are no chages for a month then that month will show all zeroes. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param invoice_section_id: Invoice Section Id. + :type invoice_section_id: str + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str + :param apply: May be used to group charges by properties/productName. + :type apply: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ChargesListByInvoiceSection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.ChargesListByInvoiceSection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'invoiceSectionId': self._serialize.url("invoice_section_id", invoice_section_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') + if apply is not None: + query_parameters['$apply'] = self._serialize.query("apply", apply, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ChargesListByInvoiceSection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}/providers/Microsoft.Consumption/charges'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/credit_summary_by_billing_profile_operations.py similarity index 66% rename from azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py rename to azure-mgmt-consumption/azure/mgmt/consumption/operations/credit_summary_by_billing_profile_operations.py index f0c5aeefd067..eb1948de4bd5 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/credit_summary_by_billing_profile_operations.py @@ -15,14 +15,14 @@ from .. import models -class TagsOperations(object): - """TagsOperations operations. +class CreditSummaryByBillingProfileOperations(object): + """CreditSummaryByBillingProfileOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". """ models = models @@ -32,34 +32,26 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-01-01" + self.api_version = "2018-11-01-preview" self.config = config def get( - self, scope, custom_headers=None, raw=False, **operation_config): - """Get all available tag keys for the defined scope. - - :param scope: The scope associated with tags operations. This includes - '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' - for Department scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope.. - :type scope: str + self, billing_account_id, billing_profile_id, custom_headers=None, raw=False, **operation_config): + """The credit summary by billingAccountId and billingProfileId for given + start and end date. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param billing_profile_id: Billing Profile Id. + :type billing_profile_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: TagsResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.TagsResult or + :return: CreditSummary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.CreditSummary or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` @@ -67,7 +59,8 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingProfileId': self._serialize.url("billing_profile_id", billing_profile_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -95,11 +88,11 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('TagsResult', response) + deserialized = self._deserialize('CreditSummary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/tags'} + get.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/events_by_billing_profile_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/events_by_billing_profile_operations.py new file mode 100644 index 000000000000..0be83ac8c9fc --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/events_by_billing_profile_operations.py @@ -0,0 +1,104 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class EventsByBillingProfileOperations(object): + """EventsByBillingProfileOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01-preview" + + self.config = config + + def list( + self, billing_account_id, billing_profile_id, start_date, end_date, custom_headers=None, raw=False, **operation_config): + """Lists the events by billingAccountId and billingProfileId for given + start and end date. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param billing_profile_id: Billing Profile Id. + :type billing_profile_id: str + :param start_date: Start date + :type start_date: str + :param end_date: End date + :type end_date: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Events or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.Events or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingProfileId': self._serialize.url("billing_profile_id", billing_profile_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['startDate'] = self._serialize.query("start_date", start_date, 'str') + query_parameters['endDate'] = self._serialize.query("end_date", end_date, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Events', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py deleted file mode 100644 index 87648ab49a23..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py +++ /dev/null @@ -1,107 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ForecastsOperations(object): - """ForecastsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists the forecast charges by subscriptionId. - - :param filter: May be used to filter forecasts by properties/usageDate - (Utc time), properties/chargeType or properties/grain. The filter - supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - currently support 'ne', 'or', or 'not'. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Forecast - :rtype: - ~azure.mgmt.consumption.models.ForecastPaged[~azure.mgmt.consumption.models.Forecast] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ForecastPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ForecastPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/invoice_pricesheet_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/invoice_pricesheet_operations.py new file mode 100644 index 000000000000..5d3a57abb2f6 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/invoice_pricesheet_operations.py @@ -0,0 +1,146 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class InvoicePricesheetOperations(object): + """InvoicePricesheetOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01-preview" + + self.config = config + + + def _download_initial( + self, billing_account_id, invoice_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.download.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'invoiceName': self._serialize.url("invoice_name", invoice_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('PricesheetDownloadResponse', response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'str', + 'Azure-AsyncOperation': 'str', + 'OData-EntityId': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def download( + self, billing_account_id, invoice_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Get pricesheet data for invoice id (invoiceName). + + :param billing_account_id: Azure Billing Account Id. + :type billing_account_id: str + :param invoice_name: The name of an invoice resource. + :type invoice_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PricesheetDownloadResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.consumption.models.PricesheetDownloadResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.consumption.models.PricesheetDownloadResponse]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._download_initial( + billing_account_id=billing_account_id, + invoice_name=invoice_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Location': 'str', + 'Retry-After': 'str', + 'Azure-AsyncOperation': 'str', + 'OData-EntityId': 'str', + } + deserialized = self._deserialize('PricesheetDownloadResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + download.metadata = {'url': '/providers/Microsoft.Consumption/billingAccounts/{billingAccountId}/invoices/{invoiceName}/pricesheet/default/download'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/lots_by_billing_profile_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/lots_by_billing_profile_operations.py new file mode 100644 index 000000000000..1735d3700c1d --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/lots_by_billing_profile_operations.py @@ -0,0 +1,98 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class LotsByBillingProfileOperations(object): + """LotsByBillingProfileOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-11-01-preview" + + self.config = config + + def list( + self, billing_account_id, billing_profile_id, custom_headers=None, raw=False, **operation_config): + """Lists the lots by billingAccountId and billingProfileId for given start + and end date. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param billing_profile_id: Billing Profile Id. + :type billing_profile_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Lots or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.Lots or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'billingProfileId': self._serialize.url("billing_profile_id", billing_profile_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Lots', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py deleted file mode 100644 index 426a89998825..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MarketplacesOperations(object): - """MarketplacesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, scope, filter=None, top=None, skiptoken=None, custom_headers=None, raw=False, **operation_config): - """Lists the marketplaces for a scope at the defined scope. Marketplaces - are available via this API only for May 1, 2014 or later. - - :param scope: The scope associated with marketplace operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/departments/{departmentId}' for - Department scope, - '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope. For subscription, billing account, - department, enrollment account and ManagementGroup, you can also add - billing period to the scope using - '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For - e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' - :type scope: str - :param filter: May be used to filter marketplaces by - properties/usageEnd (Utc time), properties/usageStart (Utc time), - properties/resourceGroup, properties/instanceName or - properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', - 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. - :type filter: str - :param top: May be used to limit the number of results to the most - recent N marketplaces. - :type top: int - :param skiptoken: Skiptoken is only used if a previous operation - returned a partial result. If a previous response contains a nextLink - element, the value of the nextLink element will include a skiptoken - parameter that specifies a starting point to use for subsequent calls. - :type skiptoken: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Marketplace - :rtype: - ~azure.mgmt.consumption.models.MarketplacePaged[~azure.mgmt.consumption.models.Marketplace] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.MarketplacePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.MarketplacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/marketplaces'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py index 0374608d07ba..f18587a4e383 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-11-01-preview. Constant value: "2018-11-01-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-01-01" + self.api_version = "2018-11-01-preview" self.config = config diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py deleted file mode 100644 index ff9bc16dfbb1..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class PriceSheetOperations(object): - """PriceSheetOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def get( - self, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): - """Gets the price sheet for a scope by subscriptionId. Price sheet is - available via this API only for May 1, 2014 or later. - - :param expand: May be used to expand the properties/meterDetails - within a price sheet. By default, these fields are not included when - returning price sheet. - :type expand: str - :param skiptoken: Skiptoken is only used if a previous operation - returned a partial result. If a previous response contains a nextLink - element, the value of the nextLink element will include a skiptoken - parameter that specifies a starting point to use for subsequent calls. - :type skiptoken: str - :param top: May be used to limit the number of results to the top N - results. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PriceSheetResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.PriceSheetResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PriceSheetResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default'} - - def get_by_billing_period( - self, billing_period_name, expand=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config): - """Get the price sheet for a scope by subscriptionId and billing period. - Price sheet is available via this API only for May 1, 2014 or later. - - :param billing_period_name: Billing Period Name. - :type billing_period_name: str - :param expand: May be used to expand the properties/meterDetails - within a price sheet. By default, these fields are not included when - returning price sheet. - :type expand: str - :param skiptoken: Skiptoken is only used if a previous operation - returned a partial result. If a previous response contains a nextLink - element, the value of the nextLink element will include a skiptoken - parameter that specifies a starting point to use for subsequent calls. - :type skiptoken: str - :param top: May be used to limit the number of results to the top N - results. - :type top: int - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: PriceSheetResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.PriceSheetResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_billing_period.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'billingPeriodName': self._serialize.url("billing_period_name", billing_period_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('PriceSheetResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_billing_period.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py deleted file mode 100644 index abeaf315c91b..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ReservationRecommendationsOperations(object): - """ReservationRecommendationsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, filter=None, custom_headers=None, raw=False, **operation_config): - """List of recommendations for purchasing reserved instances. - - :param filter: May be used to filter reservationRecommendations by - properties/scope and properties/lookBackPeriod. - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationRecommendation - :rtype: - ~azure.mgmt.consumption.models.ReservationRecommendationPaged[~azure.mgmt.consumption.models.ReservationRecommendation] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationRecommendationPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationRecommendationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/reservationRecommendations'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py deleted file mode 100644 index 4185816146e3..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py +++ /dev/null @@ -1,180 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ReservationsDetailsOperations(object): - """ReservationsDetailsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_reservation_order( - self, reservation_order_id, filter, custom_headers=None, raw=False, **operation_config): - """Lists the reservations details for provided date range. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param filter: Filter reservation details by date range. The - properties/UsageDate for start date and end date. The filter supports - 'le' and 'ge' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationDetail - :rtype: - ~azure.mgmt.consumption.models.ReservationDetailPaged[~azure.mgmt.consumption.models.ReservationDetail] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_reservation_order.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_reservation_order.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails'} - - def list_by_reservation_order_and_reservation( - self, reservation_order_id, reservation_id, filter, custom_headers=None, raw=False, **operation_config): - """Lists the reservations details for provided date range. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param reservation_id: Id of the reservation - :type reservation_id: str - :param filter: Filter reservation details by date range. The - properties/UsageDate for start date and end date. The filter supports - 'le' and 'ge' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationDetail - :rtype: - ~azure.mgmt.consumption.models.ReservationDetailPaged[~azure.mgmt.consumption.models.ReservationDetail] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_reservation_order_and_reservation.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str'), - 'reservationId': self._serialize.url("reservation_id", reservation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_reservation_order_and_reservation.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py deleted file mode 100644 index 8cf4057c120d..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py +++ /dev/null @@ -1,188 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ReservationsSummariesOperations(object): - """ReservationsSummariesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list_by_reservation_order( - self, reservation_order_id, grain, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists the reservations summaries for daily or monthly grain. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param grain: Can be daily or monthly. Possible values include: - 'DailyGrain', 'MonthlyGrain' - :type grain: str or ~azure.mgmt.consumption.models.Datagrain - :param filter: Required only for daily grain. The properties/UsageDate - for start date and end date. The filter supports 'le' and 'ge' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationSummary - :rtype: - ~azure.mgmt.consumption.models.ReservationSummaryPaged[~azure.mgmt.consumption.models.ReservationSummary] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_reservation_order.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['grain'] = self._serialize.query("grain", grain, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_reservation_order.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries'} - - def list_by_reservation_order_and_reservation( - self, reservation_order_id, reservation_id, grain, filter=None, custom_headers=None, raw=False, **operation_config): - """Lists the reservations summaries for daily or monthly grain. - - :param reservation_order_id: Order Id of the reservation - :type reservation_order_id: str - :param reservation_id: Id of the reservation - :type reservation_id: str - :param grain: Can be daily or monthly. Possible values include: - 'DailyGrain', 'MonthlyGrain' - :type grain: str or ~azure.mgmt.consumption.models.Datagrain - :param filter: Required only for daily grain. The properties/UsageDate - for start date and end date. The filter supports 'le' and 'ge' - :type filter: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ReservationSummary - :rtype: - ~azure.mgmt.consumption.models.ReservationSummaryPaged[~azure.mgmt.consumption.models.ReservationSummary] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_reservation_order_and_reservation.metadata['url'] - path_format_arguments = { - 'reservationOrderId': self._serialize.url("reservation_order_id", reservation_order_id, 'str'), - 'reservationId': self._serialize.url("reservation_id", reservation_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['grain'] = self._serialize.query("grain", grain, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ReservationSummaryPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_reservation_order_and_reservation.metadata = {'url': '/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py deleted file mode 100644 index 2c7e4ffdf9b0..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py +++ /dev/null @@ -1,156 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class UsageDetailsOperations(object): - """UsageDetailsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-01-01. Constant value: "2019-01-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-01-01" - - self.config = config - - def list( - self, scope, expand=None, filter=None, skiptoken=None, top=None, query_options=None, custom_headers=None, raw=False, **operation_config): - """Lists the usage details for the defined scope. Usage details are - available via this API only for May 1, 2014 or later. - - :param scope: The scope associated with usage details operations. This - includes '/subscriptions/{subscriptionId}/' for subscription scope, - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' - for resourceGroup scope, - '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - Billing Account scope, - '/providers/Microsoft.Billing/departments/{departmentId}' for - Department scope, - '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' - for EnrollmentAccount scope and - '/providers/Microsoft.Management/managementGroups/{managementGroupId}' - for Management Group scope. For subscription, billing account, - department, enrollment account and management group, you can also add - billing period to the scope using - '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For - e.g. to specify billing period at department scope use - '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' - :type scope: str - :param expand: May be used to expand the - properties/additionalProperties or properties/meterDetails within a - list of usage details. By default, these fields are not included when - listing usage details. - :type expand: str - :param filter: May be used to filter usageDetails by - properties/usageEnd (Utc time), properties/usageStart (Utc time), - properties/resourceGroup, properties/instanceName, - properties/instanceId or tags. The filter supports 'eq', 'lt', 'gt', - 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or - 'not'. Tag filter is a key value pair string where key and value is - separated by a colon (:). - :type filter: str - :param skiptoken: Skiptoken is only used if a previous operation - returned a partial result. If a previous response contains a nextLink - element, the value of the nextLink element will include a skiptoken - parameter that specifies a starting point to use for subsequent calls. - :type skiptoken: str - :param top: May be used to limit the number of results to the most - recent N usageDetails. - :type top: int - :param query_options: Additional parameters for the operation - :type query_options: ~azure.mgmt.consumption.models.QueryOptions - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of UsageDetail - :rtype: - ~azure.mgmt.consumption.models.UsageDetailPaged[~azure.mgmt.consumption.models.UsageDetail] - :raises: - :class:`ErrorResponseException` - """ - apply = None - if query_options is not None: - apply = query_options.apply - - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'scope': self._serialize.url("scope", scope, 'str', skip_quote=True) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if apply is not None: - query_parameters['$apply'] = self._serialize.query("apply", apply, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.UsageDetailPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.UsageDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/{scope}/providers/Microsoft.Consumption/usageDetails'}