From 8f2114272ad6e383620817470a747e8bb6d6f7a4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sat, 25 Aug 2018 19:22:10 +0000 Subject: [PATCH 1/4] Generated from 1bc6638990a06b5bb896a65339c0b255be554903 Adding swagger for new Api version --- .../consumption_management_client.py | 27 ++- .../azure/mgmt/consumption/models/__init__.py | 21 ++- .../models/charge_summary_by_department.py | 82 +++++++++ .../charge_summary_by_department_py3.py | 82 +++++++++ .../charge_summary_by_enrollment_account.py | 82 +++++++++ ...harge_summary_by_enrollment_account_py3.py | 82 +++++++++ .../models/charge_summary_properties.py | 66 +++++++ .../models/charge_summary_properties_py3.py | 66 +++++++ ...y => charges_list_result_by_department.py} | 22 ++- .../charges_list_result_by_department_py3.py | 36 ++++ ...arges_list_result_by_enrollment_account.py | 36 ++++ ...s_list_result_by_enrollment_account_py3.py | 36 ++++ .../azure/mgmt/consumption/models/cost_tag.py | 51 ------ .../models/cost_tag_properties_py3.py | 28 --- .../mgmt/consumption/models/cost_tag_py3.py | 51 ------ ...management_group_aggregated_cost_result.py | 18 +- ...gement_group_aggregated_cost_result_py3.py | 18 +- .../mgmt/consumption/models/marketplace.py | 10 ++ .../consumption/models/marketplace_py3.py | 10 ++ .../mgmt/consumption/operations/__init__.py | 10 +- .../operations/aggregated_cost_operations.py | 14 +- .../operations/balances_operations.py | 4 +- .../operations/budgets_operations.py | 4 +- .../charges_by_department_operations.py | 106 +++++++++++ ...harges_by_enrollment_account_operations.py | 107 +++++++++++ .../charges_for_department_operations.py | 108 +++++++++++ ...arges_for_enrollment_account_operations.py | 110 ++++++++++++ .../operations/cost_tags_operations.py | 169 ------------------ .../operations/forecasts_operations.py | 4 +- .../operations/marketplaces_operations.py | 4 +- .../mgmt/consumption/operations/operations.py | 4 +- .../operations/price_sheet_operations.py | 4 +- .../reservation_recommendations_operations.py | 4 +- .../reservations_details_operations.py | 4 +- .../reservations_summaries_operations.py | 4 +- .../consumption/operations/tags_operations.py | 4 +- .../operations/usage_details_operations.py | 4 +- 37 files changed, 1135 insertions(+), 357 deletions(-) create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department_py3.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account_py3.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties_py3.py rename azure-mgmt-consumption/azure/mgmt/consumption/models/{cost_tag_properties.py => charges_list_result_by_department.py} (50%) create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_department_py3.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_enrollment_account.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_enrollment_account_py3.py delete mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag.py delete mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_properties_py3.py delete mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_py3.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_department_operations.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_enrollment_account_operations.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_for_department_operations.py create mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_for_enrollment_account_operations.py delete mode 100644 azure-mgmt-consumption/azure/mgmt/consumption/operations/cost_tags_operations.py 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 8e0dd102d269..345daa7d756f 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py @@ -21,11 +21,14 @@ from .operations.reservation_recommendations_operations import ReservationRecommendationsOperations from .operations.budgets_operations import BudgetsOperations from .operations.price_sheet_operations import PriceSheetOperations -from .operations.cost_tags_operations import CostTagsOperations from .operations.tags_operations import TagsOperations from .operations.forecasts_operations import ForecastsOperations from .operations.operations import Operations from .operations.aggregated_cost_operations import AggregatedCostOperations +from .operations.charges_by_enrollment_account_operations import ChargesByEnrollmentAccountOperations +from .operations.charges_for_enrollment_account_operations import ChargesForEnrollmentAccountOperations +from .operations.charges_by_department_operations import ChargesByDepartmentOperations +from .operations.charges_for_department_operations import ChargesForDepartmentOperations from . import models @@ -83,8 +86,6 @@ class ConsumptionManagementClient(SDKClient): :vartype budgets: azure.mgmt.consumption.operations.BudgetsOperations :ivar price_sheet: PriceSheet operations :vartype price_sheet: azure.mgmt.consumption.operations.PriceSheetOperations - :ivar cost_tags: CostTags operations - :vartype cost_tags: azure.mgmt.consumption.operations.CostTagsOperations :ivar tags: Tags operations :vartype tags: azure.mgmt.consumption.operations.TagsOperations :ivar forecasts: Forecasts operations @@ -93,6 +94,14 @@ class ConsumptionManagementClient(SDKClient): :vartype operations: azure.mgmt.consumption.operations.Operations :ivar aggregated_cost: AggregatedCost operations :vartype aggregated_cost: azure.mgmt.consumption.operations.AggregatedCostOperations + :ivar charges_by_enrollment_account: ChargesByEnrollmentAccount operations + :vartype charges_by_enrollment_account: azure.mgmt.consumption.operations.ChargesByEnrollmentAccountOperations + :ivar charges_for_enrollment_account: ChargesForEnrollmentAccount operations + :vartype charges_for_enrollment_account: azure.mgmt.consumption.operations.ChargesForEnrollmentAccountOperations + :ivar charges_by_department: ChargesByDepartment operations + :vartype charges_by_department: azure.mgmt.consumption.operations.ChargesByDepartmentOperations + :ivar charges_for_department: ChargesForDepartment operations + :vartype charges_for_department: azure.mgmt.consumption.operations.ChargesForDepartmentOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -109,7 +118,7 @@ def __init__( 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 = '2018-06-30' + self.api_version = '2018-08-31' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -129,8 +138,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.price_sheet = PriceSheetOperations( self._client, self.config, self._serialize, self._deserialize) - self.cost_tags = CostTagsOperations( - self._client, self.config, self._serialize, self._deserialize) self.tags = TagsOperations( self._client, self.config, self._serialize, self._deserialize) self.forecasts = ForecastsOperations( @@ -139,3 +146,11 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.aggregated_cost = AggregatedCostOperations( self._client, self.config, self._serialize, self._deserialize) + self.charges_by_enrollment_account = ChargesByEnrollmentAccountOperations( + self._client, self.config, self._serialize, self._deserialize) + self.charges_for_enrollment_account = ChargesForEnrollmentAccountOperations( + self._client, self.config, self._serialize, self._deserialize) + self.charges_by_department = ChargesByDepartmentOperations( + self._client, self.config, self._serialize, self._deserialize) + self.charges_for_department = ChargesForDepartmentOperations( + 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 52274a8b9123..9545ff916871 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py @@ -26,13 +26,16 @@ from .current_spend_py3 import CurrentSpend from .notification_py3 import Notification from .budget_py3 import Budget - from .cost_tag_properties_py3 import CostTagProperties - from .cost_tag_py3 import CostTag 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_by_enrollment_account_py3 import ChargeSummaryByEnrollmentAccount + from .charges_list_result_by_enrollment_account_py3 import ChargesListResultByEnrollmentAccount + from .charge_summary_by_department_py3 import ChargeSummaryByDepartment + from .charges_list_result_by_department_py3 import ChargesListResultByDepartment + from .charge_summary_properties_py3 import ChargeSummaryProperties from .error_details_py3 import ErrorDetails from .error_response_py3 import ErrorResponse, ErrorResponseException from .operation_display_py3 import OperationDisplay @@ -58,13 +61,16 @@ from .current_spend import CurrentSpend from .notification import Notification from .budget import Budget - from .cost_tag_properties import CostTagProperties - from .cost_tag import CostTag from .price_sheet_properties import PriceSheetProperties from .price_sheet_result import PriceSheetResult from .forecast_properties_confidence_levels_item import ForecastPropertiesConfidenceLevelsItem from .forecast import Forecast from .management_group_aggregated_cost_result import ManagementGroupAggregatedCostResult + from .charge_summary_by_enrollment_account import ChargeSummaryByEnrollmentAccount + from .charges_list_result_by_enrollment_account import ChargesListResultByEnrollmentAccount + from .charge_summary_by_department import ChargeSummaryByDepartment + from .charges_list_result_by_department import ChargesListResultByDepartment + from .charge_summary_properties import ChargeSummaryProperties from .error_details import ErrorDetails from .error_response import ErrorResponse, ErrorResponseException from .operation_display import OperationDisplay @@ -109,13 +115,16 @@ 'CurrentSpend', 'Notification', 'Budget', - 'CostTagProperties', - 'CostTag', 'PriceSheetProperties', 'PriceSheetResult', 'ForecastPropertiesConfidenceLevelsItem', 'Forecast', 'ManagementGroupAggregatedCostResult', + 'ChargeSummaryByEnrollmentAccount', + 'ChargesListResultByEnrollmentAccount', + 'ChargeSummaryByDepartment', + 'ChargesListResultByDepartment', + 'ChargeSummaryProperties', 'ErrorDetails', 'ErrorResponse', 'ErrorResponseException', 'OperationDisplay', diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department.py new file mode 100644 index 000000000000..2ec58e5d5626 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department.py @@ -0,0 +1,82 @@ +# 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 ChargeSummaryByDepartment(Resource): + """A charge summary resource by department. + + 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 + charge belongs to. + :vartype billing_period_id: str + :ivar start_date: Start date. + :vartype start_date: str + :ivar end_date: End date. + :vartype end_date: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'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}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'str'}, + 'end_date': {'key': 'properties.endDate', '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'}, + } + + def __init__(self, **kwargs): + super(ChargeSummaryByDepartment, self).__init__(**kwargs) + self.billing_period_id = None + self.start_date = None + self.end_date = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department_py3.py new file mode 100644 index 000000000000..5b4c318023c9 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department_py3.py @@ -0,0 +1,82 @@ +# 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 ChargeSummaryByDepartment(Resource): + """A charge summary resource by department. + + 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 + charge belongs to. + :vartype billing_period_id: str + :ivar start_date: Start date. + :vartype start_date: str + :ivar end_date: End date. + :vartype end_date: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'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}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'str'}, + 'end_date': {'key': 'properties.endDate', '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'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargeSummaryByDepartment, self).__init__(**kwargs) + self.billing_period_id = None + self.start_date = None + self.end_date = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account.py new file mode 100644 index 000000000000..a13ae0e4a179 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account.py @@ -0,0 +1,82 @@ +# 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 ChargeSummaryByEnrollmentAccount(Resource): + """A charge summary resource by enrollment account. + + 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 + charge belongs to. + :vartype billing_period_id: str + :ivar start_date: Start date. + :vartype start_date: str + :ivar end_date: End date. + :vartype end_date: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'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}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'str'}, + 'end_date': {'key': 'properties.endDate', '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'}, + } + + def __init__(self, **kwargs): + super(ChargeSummaryByEnrollmentAccount, self).__init__(**kwargs) + self.billing_period_id = None + self.start_date = None + self.end_date = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account_py3.py new file mode 100644 index 000000000000..33269262218f --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account_py3.py @@ -0,0 +1,82 @@ +# 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 ChargeSummaryByEnrollmentAccount(Resource): + """A charge summary resource by enrollment account. + + 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 + charge belongs to. + :vartype billing_period_id: str + :ivar start_date: Start date. + :vartype start_date: str + :ivar end_date: End date. + :vartype end_date: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'tags': {'readonly': True}, + 'billing_period_id': {'readonly': True}, + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'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}'}, + 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, + 'start_date': {'key': 'properties.startDate', 'type': 'str'}, + 'end_date': {'key': 'properties.endDate', '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'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargeSummaryByEnrollmentAccount, self).__init__(**kwargs) + self.billing_period_id = None + self.start_date = None + self.end_date = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties.py new file mode 100644 index 000000000000..c0dc3e12b83e --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties.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 msrest.serialization import Model + + +class ChargeSummaryProperties(Model): + """The properties of the charge summary. + + 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 + charge belongs to. + :vartype billing_period_id: str + :ivar start_date: Start date. + :vartype start_date: str + :ivar end_date: End date. + :vartype end_date: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'billing_period_id': {'readonly': True}, + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'azure_charges': {'key': 'azureCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'chargesBilledSeparately', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'marketplaceCharges', 'type': 'decimal'}, + 'currency': {'key': 'currency', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ChargeSummaryProperties, self).__init__(**kwargs) + self.billing_period_id = None + self.start_date = None + self.end_date = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties_py3.py new file mode 100644 index 000000000000..e6124223a7be --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties_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 msrest.serialization import Model + + +class ChargeSummaryProperties(Model): + """The properties of the charge summary. + + 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 + charge belongs to. + :vartype billing_period_id: str + :ivar start_date: Start date. + :vartype start_date: str + :ivar end_date: End date. + :vartype end_date: str + :ivar azure_charges: Azure Charges. + :vartype azure_charges: decimal.Decimal + :ivar charges_billed_separately: Charges Billed separately. + :vartype charges_billed_separately: decimal.Decimal + :ivar marketplace_charges: Marketplace Charges. + :vartype marketplace_charges: decimal.Decimal + :ivar currency: Currency Code + :vartype currency: str + """ + + _validation = { + 'billing_period_id': {'readonly': True}, + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + 'azure_charges': {'readonly': True}, + 'charges_billed_separately': {'readonly': True}, + 'marketplace_charges': {'readonly': True}, + 'currency': {'readonly': True}, + } + + _attribute_map = { + 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'azure_charges': {'key': 'azureCharges', 'type': 'decimal'}, + 'charges_billed_separately': {'key': 'chargesBilledSeparately', 'type': 'decimal'}, + 'marketplace_charges': {'key': 'marketplaceCharges', 'type': 'decimal'}, + 'currency': {'key': 'currency', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargeSummaryProperties, self).__init__(**kwargs) + self.billing_period_id = None + self.start_date = None + self.end_date = None + self.azure_charges = None + self.charges_billed_separately = None + self.marketplace_charges = None + self.currency = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_properties.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_department.py similarity index 50% rename from azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_properties.py rename to azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_department.py index 9acc49a21133..e51d42e7abef 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_properties.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_department.py @@ -12,17 +12,25 @@ from msrest.serialization import Model -class CostTagProperties(Model): - """The properties of the cost tag. +class ChargesListResultByDepartment(Model): + """Result of listing charge summary by deparment. - :param key: Cost tag key. - :type key: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by department. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByDepartment] """ + _validation = { + 'value': {'readonly': True}, + } + _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ChargeSummaryByDepartment]'}, } def __init__(self, **kwargs): - super(CostTagProperties, self).__init__(**kwargs) - self.key = kwargs.get('key', None) + super(ChargesListResultByDepartment, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_department_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_department_py3.py new file mode 100644 index 000000000000..39df08494506 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_department_py3.py @@ -0,0 +1,36 @@ +# 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 ChargesListResultByDepartment(Model): + """Result of listing charge summary by deparment. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by department. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByDepartment] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByDepartment]'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargesListResultByDepartment, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_enrollment_account.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_enrollment_account.py new file mode 100644 index 000000000000..07a35a9a01f9 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_enrollment_account.py @@ -0,0 +1,36 @@ +# 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 ChargesListResultByEnrollmentAccount(Model): + """Result of listing charge summary by enrollment account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by enrollment account. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByEnrollmentAccount] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByEnrollmentAccount]'}, + } + + def __init__(self, **kwargs): + super(ChargesListResultByEnrollmentAccount, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_enrollment_account_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_enrollment_account_py3.py new file mode 100644 index 000000000000..f77db2b2faca --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charges_list_result_by_enrollment_account_py3.py @@ -0,0 +1,36 @@ +# 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 ChargesListResultByEnrollmentAccount(Model): + """Result of listing charge summary by enrollment account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of charge summary by enrollment account. + :vartype value: + list[~azure.mgmt.consumption.models.ChargeSummaryByEnrollmentAccount] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ChargeSummaryByEnrollmentAccount]'}, + } + + def __init__(self, **kwargs) -> None: + super(ChargesListResultByEnrollmentAccount, self).__init__(**kwargs) + self.value = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag.py deleted file mode 100644 index 9307f976fc14..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag.py +++ /dev/null @@ -1,51 +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 CostTag(ProxyResource): - """A cost tag 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 - :param e_tag: eTag of the resource. To handle concurrent update scenarion, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param cost_tags: Cost tags. - :type cost_tags: list[~azure.mgmt.consumption.models.CostTagProperties] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'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'}, - 'cost_tags': {'key': 'properties.costTags', 'type': '[CostTagProperties]'}, - } - - def __init__(self, **kwargs): - super(CostTag, self).__init__(**kwargs) - self.cost_tags = kwargs.get('cost_tags', None) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_properties_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_properties_py3.py deleted file mode 100644 index bbf5d25a930f..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_properties_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 CostTagProperties(Model): - """The properties of the cost tag. - - :param key: Cost tag key. - :type key: str - """ - - _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, *, key: str=None, **kwargs) -> None: - super(CostTagProperties, self).__init__(**kwargs) - self.key = key diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_py3.py deleted file mode 100644 index a2672ecbcc09..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/cost_tag_py3.py +++ /dev/null @@ -1,51 +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 CostTag(ProxyResource): - """A cost tag 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 - :param e_tag: eTag of the resource. To handle concurrent update scenarion, - this field will be used to determine whether the user is updating the - latest version or not. - :type e_tag: str - :param cost_tags: Cost tags. - :type cost_tags: list[~azure.mgmt.consumption.models.CostTagProperties] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'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'}, - 'cost_tags': {'key': 'properties.costTags', 'type': '[CostTagProperties]'}, - } - - def __init__(self, *, e_tag: str=None, cost_tags=None, **kwargs) -> None: - super(CostTag, self).__init__(e_tag=e_tag, **kwargs) - self.cost_tags = cost_tags diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py index 239ad831be3d..9c794e4de9f4 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py @@ -26,9 +26,12 @@ class ManagementGroupAggregatedCostResult(Resource): :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 - aggregated cost 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 azure_charges: Azure Charges. :vartype azure_charges: decimal.Decimal :ivar marketplace_charges: Marketplace Charges. @@ -48,7 +51,8 @@ class ManagementGroupAggregatedCostResult(Resource): '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}, 'marketplace_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, @@ -60,7 +64,8 @@ class ManagementGroupAggregatedCostResult(Resource): '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'}, 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, @@ -70,7 +75,8 @@ class ManagementGroupAggregatedCostResult(Resource): def __init__(self, **kwargs): super(ManagementGroupAggregatedCostResult, 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 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/management_group_aggregated_cost_result_py3.py index f81a8b782297..bd0e565d8d18 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py @@ -26,9 +26,12 @@ class ManagementGroupAggregatedCostResult(Resource): :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 - aggregated cost 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 azure_charges: Azure Charges. :vartype azure_charges: decimal.Decimal :ivar marketplace_charges: Marketplace Charges. @@ -48,7 +51,8 @@ class ManagementGroupAggregatedCostResult(Resource): '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}, 'marketplace_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, @@ -60,7 +64,8 @@ class ManagementGroupAggregatedCostResult(Resource): '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'}, 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, 'marketplace_charges': {'key': 'properties.marketplaceCharges', 'type': 'decimal'}, 'charges_billed_separately': {'key': 'properties.chargesBilledSeparately', 'type': 'decimal'}, @@ -70,7 +75,8 @@ class ManagementGroupAggregatedCostResult(Resource): def __init__(self, *, children=None, **kwargs) -> None: super(ManagementGroupAggregatedCostResult, 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 diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py index ab995a105325..53ba01552e29 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py @@ -82,6 +82,10 @@ class Marketplace(Resource): :vartype publisher_name: str :ivar plan_name: The name of plan. :vartype plan_name: str + :ivar additional_info: Additional info of this usage item. + :vartype additional_info: str + :ivar is_recurring_charge: + :vartype is_recurring_charge: bool """ _validation = { @@ -113,6 +117,8 @@ class Marketplace(Resource): 'additional_properties': {'readonly': True}, 'publisher_name': {'readonly': True}, 'plan_name': {'readonly': True}, + 'additional_info': {'readonly': True}, + 'is_recurring_charge': {'readonly': True}, } _attribute_map = { @@ -144,6 +150,8 @@ class Marketplace(Resource): 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, + 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -172,3 +180,5 @@ def __init__(self, **kwargs): self.additional_properties = None self.publisher_name = None self.plan_name = None + self.additional_info = None + self.is_recurring_charge = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py index 26054b799d3a..baf6bc93bb7e 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py @@ -82,6 +82,10 @@ class Marketplace(Resource): :vartype publisher_name: str :ivar plan_name: The name of plan. :vartype plan_name: str + :ivar additional_info: Additional info of this usage item. + :vartype additional_info: str + :ivar is_recurring_charge: + :vartype is_recurring_charge: bool """ _validation = { @@ -113,6 +117,8 @@ class Marketplace(Resource): 'additional_properties': {'readonly': True}, 'publisher_name': {'readonly': True}, 'plan_name': {'readonly': True}, + 'additional_info': {'readonly': True}, + 'is_recurring_charge': {'readonly': True}, } _attribute_map = { @@ -144,6 +150,8 @@ class Marketplace(Resource): 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, 'plan_name': {'key': 'properties.planName', 'type': 'str'}, + 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, + 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, } def __init__(self, **kwargs) -> None: @@ -172,3 +180,5 @@ def __init__(self, **kwargs) -> None: self.additional_properties = None self.publisher_name = None self.plan_name = None + self.additional_info = None + self.is_recurring_charge = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py index ff94fa4ee04b..084539487bba 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/__init__.py @@ -17,11 +17,14 @@ from .reservation_recommendations_operations import ReservationRecommendationsOperations from .budgets_operations import BudgetsOperations from .price_sheet_operations import PriceSheetOperations -from .cost_tags_operations import CostTagsOperations from .tags_operations import TagsOperations from .forecasts_operations import ForecastsOperations from .operations import Operations from .aggregated_cost_operations import AggregatedCostOperations +from .charges_by_enrollment_account_operations import ChargesByEnrollmentAccountOperations +from .charges_for_enrollment_account_operations import ChargesForEnrollmentAccountOperations +from .charges_by_department_operations import ChargesByDepartmentOperations +from .charges_for_department_operations import ChargesForDepartmentOperations __all__ = [ 'UsageDetailsOperations', @@ -32,9 +35,12 @@ 'ReservationRecommendationsOperations', 'BudgetsOperations', 'PriceSheetOperations', - 'CostTagsOperations', 'TagsOperations', 'ForecastsOperations', 'Operations', 'AggregatedCostOperations', + 'ChargesByEnrollmentAccountOperations', + 'ChargesForEnrollmentAccountOperations', + 'ChargesByDepartmentOperations', + 'ChargesForDepartmentOperations', ] 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 index a31d16964559..6bf11a0b5242 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/aggregated_cost_operations.py @@ -22,7 +22,7 @@ class AggregatedCostOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ models = models @@ -32,17 +32,23 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-30" + self.api_version = "2018-08-31" self.config = config def get_by_management_group( - self, management_group_id, custom_headers=None, raw=False, **operation_config): + 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 @@ -66,6 +72,8 @@ def get_by_management_group( # 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 = {} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py index 9ad014567836..1618d04cee05 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/balances_operations.py @@ -22,7 +22,7 @@ class BalancesOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py index 01d17177c52e..2adb9a6b600f 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/budgets_operations.py @@ -22,7 +22,7 @@ class BudgetsOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_department_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_department_operations.py new file mode 100644 index 000000000000..f9440621fe6c --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_department_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 ChargesByDepartmentOperations(object): + """ChargesByDepartmentOperations 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-08-31. Constant value: "2018-08-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-31" + + self.config = config + + def list( + self, billing_account_id, department_id, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the charges by departmentId. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param department_id: Department ID + :type department_id: 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 + :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: ChargesListResultByDepartment or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.consumption.models.ChargesListResultByDepartment + 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'), + 'departmentId': self._serialize.url("department_id", department_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('ChargesListResultByDepartment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Consumption/charges'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_enrollment_account_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_enrollment_account_operations.py new file mode 100644 index 000000000000..a27edd7c4b9b --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_by_enrollment_account_operations.py @@ -0,0 +1,107 @@ +# 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 ChargesByEnrollmentAccountOperations(object): + """ChargesByEnrollmentAccountOperations 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-08-31. Constant value: "2018-08-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-31" + + self.config = config + + def list( + self, billing_account_id, enrollment_account_id, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the charges by enrollmentAccountId. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param enrollment_account_id: EnrollmentAccount ID + :type enrollment_account_id: 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 + :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: ChargesListResultByEnrollmentAccount or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.consumption.models.ChargesListResultByEnrollmentAccount 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'), + 'enrollmentAccountId': self._serialize.url("enrollment_account_id", enrollment_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') + + # 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('ChargesListResultByEnrollmentAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/charges'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_for_department_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_for_department_operations.py new file mode 100644 index 000000000000..a5831259d83e --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_for_department_operations.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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ChargesForDepartmentOperations(object): + """ChargesForDepartmentOperations 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-08-31. Constant value: "2018-08-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-31" + + self.config = config + + def list_by_billing_period( + self, billing_account_id, department_id, billing_period_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the charges based on departmentId by billing period. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param department_id: Department ID + :type department_id: str + :param billing_period_name: Billing Period Name. + :type billing_period_name: 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 + :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: ChargeSummaryByDepartment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.consumption.models.ChargeSummaryByDepartment or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_billing_period.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'departmentId': self._serialize.url("department_id", department_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') + 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('ChargeSummaryByDepartment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_billing_period.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/charges'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_for_enrollment_account_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_for_enrollment_account_operations.py new file mode 100644 index 000000000000..4d5a1c4ca310 --- /dev/null +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/charges_for_enrollment_account_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 ChargesForEnrollmentAccountOperations(object): + """ChargesForEnrollmentAccountOperations 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-08-31. Constant value: "2018-08-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-08-31" + + self.config = config + + def list_by_billing_period( + self, billing_account_id, enrollment_account_id, billing_period_name, filter=None, custom_headers=None, raw=False, **operation_config): + """Lists the charges based on enrollmentAccountId by billing period. + + :param billing_account_id: BillingAccount ID + :type billing_account_id: str + :param enrollment_account_id: EnrollmentAccount ID + :type enrollment_account_id: str + :param billing_period_name: Billing Period Name. + :type billing_period_name: 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 + :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: ChargeSummaryByEnrollmentAccount or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.consumption.models.ChargeSummaryByEnrollmentAccount or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_by_billing_period.metadata['url'] + path_format_arguments = { + 'billingAccountId': self._serialize.url("billing_account_id", billing_account_id, 'str'), + 'enrollmentAccountId': self._serialize.url("enrollment_account_id", enrollment_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') + 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('ChargeSummaryByEnrollmentAccount', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_billing_period.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/charges'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/cost_tags_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/cost_tags_operations.py deleted file mode 100644 index 5956284fbe69..000000000000 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/cost_tags_operations.py +++ /dev/null @@ -1,169 +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 CostTagsOperations(object): - """CostTagsOperations 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-06-30. Constant value: "2018-06-30". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2018-06-30" - - self.config = config - - def get( - self, billing_account_id, custom_headers=None, raw=False, **operation_config): - """Get cost tags for a billing account. - - :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: CostTag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.CostTag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.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('CostTag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/costTags'} - - def create_or_update( - self, billing_account_id, e_tag=None, cost_tags=None, custom_headers=None, raw=False, **operation_config): - """The operation to create or update cost tags assiciated with a billing - account. 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 billing_account_id: BillingAccount ID - :type billing_account_id: str - :param e_tag: eTag of the resource. To handle concurrent update - scenarion, this field will be used to determine whether the user is - updating the latest version or not. - :type e_tag: str - :param cost_tags: Cost tags. - :type cost_tags: - list[~azure.mgmt.consumption.models.CostTagProperties] - :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: CostTag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.consumption.models.CostTag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - parameters = models.CostTag(e_tag=e_tag, cost_tags=cost_tags) - - # Construct URL - url = self.create_or_update.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' - 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, 'CostTag') - - # 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('CostTag', response) - if response.status_code == 201: - deserialized = self._deserialize('CostTag', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/costTags'} diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py index 5d02d5776418..b99d8e66e28f 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/forecasts_operations.py @@ -22,7 +22,7 @@ class ForecastsOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py index e8fe0a791744..fa3482589362 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/marketplaces_operations.py @@ -22,7 +22,7 @@ class MarketplacesOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/operations.py index cedd7bebfbd9..df76f8817bdd 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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" 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 index 8701e1bbd42a..ae0b282dfbe2 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/price_sheet_operations.py @@ -22,7 +22,7 @@ class PriceSheetOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config 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 index ec69af8f88fa..b7a73674df59 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservation_recommendations_operations.py @@ -22,7 +22,7 @@ class ReservationRecommendationsOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config 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 index 0055f92c2c4e..e477754be710 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_details_operations.py @@ -22,7 +22,7 @@ class ReservationsDetailsOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config 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 index 35542cdc39ad..1c7c6dc0517e 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/reservations_summaries_operations.py @@ -22,7 +22,7 @@ class ReservationsSummariesOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py b/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py index 682217fec9ff..339703ac14b6 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/tags_operations.py @@ -22,7 +22,7 @@ class TagsOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config 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 index d97644caa133..1a96f78b1c66 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/operations/usage_details_operations.py @@ -22,7 +22,7 @@ class UsageDetailsOperations(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 2018-06-30. Constant value: "2018-06-30". + :ivar api_version: Version of the API to be used with the client request. The current version is 2018-08-31. Constant value: "2018-08-31". """ 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 = "2018-06-30" + self.api_version = "2018-08-31" self.config = config From 1630c08956c9946b5cf527c9c0657bdffd3ef39a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 27 Aug 2018 20:27:17 +0000 Subject: [PATCH 2/4] Generated from d8e65e463e7f4229d154d6710c87e886db7c58a3 Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs --- .../models/charge_summary_by_department.py | 20 +++++++++---------- .../charge_summary_by_department_py3.py | 20 +++++++++---------- .../charge_summary_by_enrollment_account.py | 20 +++++++++---------- ...harge_summary_by_enrollment_account_py3.py | 20 +++++++++---------- .../models/charge_summary_properties.py | 20 +++++++++---------- .../models/charge_summary_properties_py3.py | 20 +++++++++---------- 6 files changed, 60 insertions(+), 60 deletions(-) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department.py index 2ec58e5d5626..60187b871643 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department.py @@ -29,10 +29,10 @@ class ChargeSummaryByDepartment(Resource): :ivar billing_period_id: The id of the billing period resource that the charge belongs to. :vartype billing_period_id: str - :ivar start_date: Start date. - :vartype start_date: str - :ivar end_date: End date. - :vartype end_date: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str :ivar azure_charges: Azure Charges. :vartype azure_charges: decimal.Decimal :ivar charges_billed_separately: Charges Billed separately. @@ -49,8 +49,8 @@ class ChargeSummaryByDepartment(Resource): 'type': {'readonly': True}, 'tags': {'readonly': True}, 'billing_period_id': {'readonly': True}, - 'start_date': {'readonly': True}, - 'end_date': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, 'azure_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, 'marketplace_charges': {'readonly': True}, @@ -63,8 +63,8 @@ class ChargeSummaryByDepartment(Resource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'start_date': {'key': 'properties.startDate', 'type': 'str'}, - 'end_date': {'key': 'properties.endDate', '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'}, @@ -74,8 +74,8 @@ class ChargeSummaryByDepartment(Resource): def __init__(self, **kwargs): super(ChargeSummaryByDepartment, self).__init__(**kwargs) self.billing_period_id = None - self.start_date = None - self.end_date = None + self.usage_start = None + self.usage_end = None self.azure_charges = None self.charges_billed_separately = None self.marketplace_charges = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department_py3.py index 5b4c318023c9..c3eeff0fc5a9 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_department_py3.py @@ -29,10 +29,10 @@ class ChargeSummaryByDepartment(Resource): :ivar billing_period_id: The id of the billing period resource that the charge belongs to. :vartype billing_period_id: str - :ivar start_date: Start date. - :vartype start_date: str - :ivar end_date: End date. - :vartype end_date: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str :ivar azure_charges: Azure Charges. :vartype azure_charges: decimal.Decimal :ivar charges_billed_separately: Charges Billed separately. @@ -49,8 +49,8 @@ class ChargeSummaryByDepartment(Resource): 'type': {'readonly': True}, 'tags': {'readonly': True}, 'billing_period_id': {'readonly': True}, - 'start_date': {'readonly': True}, - 'end_date': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, 'azure_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, 'marketplace_charges': {'readonly': True}, @@ -63,8 +63,8 @@ class ChargeSummaryByDepartment(Resource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'start_date': {'key': 'properties.startDate', 'type': 'str'}, - 'end_date': {'key': 'properties.endDate', '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'}, @@ -74,8 +74,8 @@ class ChargeSummaryByDepartment(Resource): def __init__(self, **kwargs) -> None: super(ChargeSummaryByDepartment, self).__init__(**kwargs) self.billing_period_id = None - self.start_date = None - self.end_date = None + self.usage_start = None + self.usage_end = None self.azure_charges = None self.charges_billed_separately = None self.marketplace_charges = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account.py index a13ae0e4a179..e5aff8a667c0 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account.py @@ -29,10 +29,10 @@ class ChargeSummaryByEnrollmentAccount(Resource): :ivar billing_period_id: The id of the billing period resource that the charge belongs to. :vartype billing_period_id: str - :ivar start_date: Start date. - :vartype start_date: str - :ivar end_date: End date. - :vartype end_date: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str :ivar azure_charges: Azure Charges. :vartype azure_charges: decimal.Decimal :ivar charges_billed_separately: Charges Billed separately. @@ -49,8 +49,8 @@ class ChargeSummaryByEnrollmentAccount(Resource): 'type': {'readonly': True}, 'tags': {'readonly': True}, 'billing_period_id': {'readonly': True}, - 'start_date': {'readonly': True}, - 'end_date': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, 'azure_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, 'marketplace_charges': {'readonly': True}, @@ -63,8 +63,8 @@ class ChargeSummaryByEnrollmentAccount(Resource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'start_date': {'key': 'properties.startDate', 'type': 'str'}, - 'end_date': {'key': 'properties.endDate', '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'}, @@ -74,8 +74,8 @@ class ChargeSummaryByEnrollmentAccount(Resource): def __init__(self, **kwargs): super(ChargeSummaryByEnrollmentAccount, self).__init__(**kwargs) self.billing_period_id = None - self.start_date = None - self.end_date = None + self.usage_start = None + self.usage_end = None self.azure_charges = None self.charges_billed_separately = None self.marketplace_charges = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account_py3.py index 33269262218f..f50081218c26 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_by_enrollment_account_py3.py @@ -29,10 +29,10 @@ class ChargeSummaryByEnrollmentAccount(Resource): :ivar billing_period_id: The id of the billing period resource that the charge belongs to. :vartype billing_period_id: str - :ivar start_date: Start date. - :vartype start_date: str - :ivar end_date: End date. - :vartype end_date: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str :ivar azure_charges: Azure Charges. :vartype azure_charges: decimal.Decimal :ivar charges_billed_separately: Charges Billed separately. @@ -49,8 +49,8 @@ class ChargeSummaryByEnrollmentAccount(Resource): 'type': {'readonly': True}, 'tags': {'readonly': True}, 'billing_period_id': {'readonly': True}, - 'start_date': {'readonly': True}, - 'end_date': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, 'azure_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, 'marketplace_charges': {'readonly': True}, @@ -63,8 +63,8 @@ class ChargeSummaryByEnrollmentAccount(Resource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'billing_period_id': {'key': 'properties.billingPeriodId', 'type': 'str'}, - 'start_date': {'key': 'properties.startDate', 'type': 'str'}, - 'end_date': {'key': 'properties.endDate', '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'}, @@ -74,8 +74,8 @@ class ChargeSummaryByEnrollmentAccount(Resource): def __init__(self, **kwargs) -> None: super(ChargeSummaryByEnrollmentAccount, self).__init__(**kwargs) self.billing_period_id = None - self.start_date = None - self.end_date = None + self.usage_start = None + self.usage_end = None self.azure_charges = None self.charges_billed_separately = None self.marketplace_charges = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties.py index c0dc3e12b83e..480f55351cb9 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties.py @@ -21,10 +21,10 @@ class ChargeSummaryProperties(Model): :ivar billing_period_id: The id of the billing period resource that the charge belongs to. :vartype billing_period_id: str - :ivar start_date: Start date. - :vartype start_date: str - :ivar end_date: End date. - :vartype end_date: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str :ivar azure_charges: Azure Charges. :vartype azure_charges: decimal.Decimal :ivar charges_billed_separately: Charges Billed separately. @@ -37,8 +37,8 @@ class ChargeSummaryProperties(Model): _validation = { 'billing_period_id': {'readonly': True}, - 'start_date': {'readonly': True}, - 'end_date': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, 'azure_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, 'marketplace_charges': {'readonly': True}, @@ -47,8 +47,8 @@ class ChargeSummaryProperties(Model): _attribute_map = { 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, - 'start_date': {'key': 'startDate', 'type': 'str'}, - 'end_date': {'key': 'endDate', 'type': 'str'}, + 'usage_start': {'key': 'usageStart', 'type': 'str'}, + 'usage_end': {'key': 'usageEnd', 'type': 'str'}, 'azure_charges': {'key': 'azureCharges', 'type': 'decimal'}, 'charges_billed_separately': {'key': 'chargesBilledSeparately', 'type': 'decimal'}, 'marketplace_charges': {'key': 'marketplaceCharges', 'type': 'decimal'}, @@ -58,8 +58,8 @@ class ChargeSummaryProperties(Model): def __init__(self, **kwargs): super(ChargeSummaryProperties, self).__init__(**kwargs) self.billing_period_id = None - self.start_date = None - self.end_date = None + self.usage_start = None + self.usage_end = None self.azure_charges = None self.charges_billed_separately = None self.marketplace_charges = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties_py3.py index e6124223a7be..566b63578ab1 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/charge_summary_properties_py3.py @@ -21,10 +21,10 @@ class ChargeSummaryProperties(Model): :ivar billing_period_id: The id of the billing period resource that the charge belongs to. :vartype billing_period_id: str - :ivar start_date: Start date. - :vartype start_date: str - :ivar end_date: End date. - :vartype end_date: str + :ivar usage_start: Usage start date. + :vartype usage_start: str + :ivar usage_end: Usage end date. + :vartype usage_end: str :ivar azure_charges: Azure Charges. :vartype azure_charges: decimal.Decimal :ivar charges_billed_separately: Charges Billed separately. @@ -37,8 +37,8 @@ class ChargeSummaryProperties(Model): _validation = { 'billing_period_id': {'readonly': True}, - 'start_date': {'readonly': True}, - 'end_date': {'readonly': True}, + 'usage_start': {'readonly': True}, + 'usage_end': {'readonly': True}, 'azure_charges': {'readonly': True}, 'charges_billed_separately': {'readonly': True}, 'marketplace_charges': {'readonly': True}, @@ -47,8 +47,8 @@ class ChargeSummaryProperties(Model): _attribute_map = { 'billing_period_id': {'key': 'billingPeriodId', 'type': 'str'}, - 'start_date': {'key': 'startDate', 'type': 'str'}, - 'end_date': {'key': 'endDate', 'type': 'str'}, + 'usage_start': {'key': 'usageStart', 'type': 'str'}, + 'usage_end': {'key': 'usageEnd', 'type': 'str'}, 'azure_charges': {'key': 'azureCharges', 'type': 'decimal'}, 'charges_billed_separately': {'key': 'chargesBilledSeparately', 'type': 'decimal'}, 'marketplace_charges': {'key': 'marketplaceCharges', 'type': 'decimal'}, @@ -58,8 +58,8 @@ class ChargeSummaryProperties(Model): def __init__(self, **kwargs) -> None: super(ChargeSummaryProperties, self).__init__(**kwargs) self.billing_period_id = None - self.start_date = None - self.end_date = None + self.usage_start = None + self.usage_end = None self.azure_charges = None self.charges_billed_separately = None self.marketplace_charges = None From 367ff0486245cfad14cc85e003f0bcfd6fffd7c5 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 27 Aug 2018 21:24:05 +0000 Subject: [PATCH 3/4] Generated from ca6b7be3139d7d7cf8d6f7cffaa8a89df45a4ff1 providing description for new introduced property isRecurringCharge --- .../azure/mgmt/consumption/models/marketplace.py | 8 ++------ .../azure/mgmt/consumption/models/marketplace_py3.py | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py index 53ba01552e29..638fba19f244 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace.py @@ -82,9 +82,8 @@ class Marketplace(Resource): :vartype publisher_name: str :ivar plan_name: The name of plan. :vartype plan_name: str - :ivar additional_info: Additional info of this usage item. - :vartype additional_info: str - :ivar is_recurring_charge: + :ivar is_recurring_charge: Flag indicating whether this is a recurring + charge or not. :vartype is_recurring_charge: bool """ @@ -117,7 +116,6 @@ class Marketplace(Resource): 'additional_properties': {'readonly': True}, 'publisher_name': {'readonly': True}, 'plan_name': {'readonly': True}, - 'additional_info': {'readonly': True}, 'is_recurring_charge': {'readonly': True}, } @@ -150,7 +148,6 @@ class Marketplace(Resource): 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, } @@ -180,5 +177,4 @@ def __init__(self, **kwargs): self.additional_properties = None self.publisher_name = None self.plan_name = None - self.additional_info = None self.is_recurring_charge = None diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py index baf6bc93bb7e..776cec56d753 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/marketplace_py3.py @@ -82,9 +82,8 @@ class Marketplace(Resource): :vartype publisher_name: str :ivar plan_name: The name of plan. :vartype plan_name: str - :ivar additional_info: Additional info of this usage item. - :vartype additional_info: str - :ivar is_recurring_charge: + :ivar is_recurring_charge: Flag indicating whether this is a recurring + charge or not. :vartype is_recurring_charge: bool """ @@ -117,7 +116,6 @@ class Marketplace(Resource): 'additional_properties': {'readonly': True}, 'publisher_name': {'readonly': True}, 'plan_name': {'readonly': True}, - 'additional_info': {'readonly': True}, 'is_recurring_charge': {'readonly': True}, } @@ -150,7 +148,6 @@ class Marketplace(Resource): 'additional_properties': {'key': 'properties.additionalProperties', 'type': 'str'}, 'publisher_name': {'key': 'properties.publisherName', 'type': 'str'}, 'plan_name': {'key': 'properties.planName', 'type': 'str'}, - 'additional_info': {'key': 'properties.additionalInfo', 'type': 'str'}, 'is_recurring_charge': {'key': 'properties.isRecurringCharge', 'type': 'bool'}, } @@ -180,5 +177,4 @@ def __init__(self, **kwargs) -> None: self.additional_properties = None self.publisher_name = None self.plan_name = None - self.additional_info = None self.is_recurring_charge = None From 4093d12aea32207e58f07842134f3710368e043b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 28 Aug 2018 00:30:34 +0000 Subject: [PATCH 4/4] Generated from 4dc063876d7280e0d2b8bf258a2c6145bc5f9475 merged with master --- .../models/management_group_aggregated_cost_result.py | 6 ++++++ .../models/management_group_aggregated_cost_result_py3.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py b/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py index 9c794e4de9f4..d177f93839f3 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result.py @@ -26,6 +26,9 @@ class ManagementGroupAggregatedCostResult(Resource): :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 + aggregated cost 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 @@ -51,6 +54,7 @@ class ManagementGroupAggregatedCostResult(Resource): '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}, @@ -64,6 +68,7 @@ class ManagementGroupAggregatedCostResult(Resource): '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'}, 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, @@ -75,6 +80,7 @@ class ManagementGroupAggregatedCostResult(Resource): def __init__(self, **kwargs): super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) + self.billing_period_id = None self.usage_start = None self.usage_end = None self.azure_charges = 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/management_group_aggregated_cost_result_py3.py index bd0e565d8d18..bad5e1ed6016 100644 --- a/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py +++ b/azure-mgmt-consumption/azure/mgmt/consumption/models/management_group_aggregated_cost_result_py3.py @@ -26,6 +26,9 @@ class ManagementGroupAggregatedCostResult(Resource): :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 + aggregated cost 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 @@ -51,6 +54,7 @@ class ManagementGroupAggregatedCostResult(Resource): '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}, @@ -64,6 +68,7 @@ class ManagementGroupAggregatedCostResult(Resource): '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'}, 'azure_charges': {'key': 'properties.azureCharges', 'type': 'decimal'}, @@ -75,6 +80,7 @@ class ManagementGroupAggregatedCostResult(Resource): def __init__(self, *, children=None, **kwargs) -> None: super(ManagementGroupAggregatedCostResult, self).__init__(**kwargs) + self.billing_period_id = None self.usage_start = None self.usage_end = None self.azure_charges = None