From 104d36c0388ab18c110f444bb34f6e1a36bbe159 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Thu, 24 Oct 2019 14:31:53 +0800 Subject: [PATCH] [AutoPR reservations/resource-manager] Updating swagger spec to fix billing plans schema in catalogs response. (#7984) * Generated from 1175f21020d781bcd32041246ab560177fe3edcf Updating swagger spec to fix billing plans schema in catalogs response. * version and history --- .../azure-mgmt-reservations/HISTORY.rst | 11 +++++++ .../mgmt/reservations/models/__init__.py | 3 -- .../azure/mgmt/reservations/models/_models.py | 29 ++----------------- .../mgmt/reservations/models/_models_py3.py | 29 ++----------------- .../azure/mgmt/reservations/version.py | 2 +- 5 files changed, 18 insertions(+), 56 deletions(-) diff --git a/sdk/reservations/azure-mgmt-reservations/HISTORY.rst b/sdk/reservations/azure-mgmt-reservations/HISTORY.rst index d5442a3da98..9dcfbee7a86 100644 --- a/sdk/reservations/azure-mgmt-reservations/HISTORY.rst +++ b/sdk/reservations/azure-mgmt-reservations/HISTORY.rst @@ -3,6 +3,17 @@ Release History =============== +0.6.0 (2019-10-24) +++++++++++++++++++ + +**Bugfix** + +- Fixed Catalog model structure not matching actual API + +**Breaking changes** + +- Removed CatalogBillingPlansItem that could be considered a breaking change + 0.5.0 (2019-10-04) ++++++++++++++++++ diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py index 26dff26dac8..a01006e0d7b 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/__init__.py @@ -17,7 +17,6 @@ from ._models_py3 import CalculatePriceResponsePropertiesBillingCurrencyTotal from ._models_py3 import CalculatePriceResponsePropertiesPricingCurrencyTotal from ._models_py3 import Catalog - from ._models_py3 import CatalogBillingPlansItem from ._models_py3 import Error, ErrorException from ._models_py3 import ExtendedErrorInfo from ._models_py3 import ExtendedStatusInfo @@ -54,7 +53,6 @@ from ._models import CalculatePriceResponsePropertiesBillingCurrencyTotal from ._models import CalculatePriceResponsePropertiesPricingCurrencyTotal from ._models import Catalog - from ._models import CatalogBillingPlansItem from ._models import Error, ErrorException from ._models import ExtendedErrorInfo from ._models import ExtendedStatusInfo @@ -105,7 +103,6 @@ 'CalculatePriceResponsePropertiesBillingCurrencyTotal', 'CalculatePriceResponsePropertiesPricingCurrencyTotal', 'Catalog', - 'CatalogBillingPlansItem', 'Error', 'ErrorException', 'ExtendedErrorInfo', 'ExtendedStatusInfo', diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py index e18fb68f978..5489a136050 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models.py @@ -188,8 +188,8 @@ class Catalog(Model): :ivar name: The name of SKU :vartype name: str :param billing_plans: The billing plan options available for this SKU. - :type billing_plans: - list[~azure.mgmt.reservations.models.CatalogBillingPlansItem] + :type billing_plans: dict[str, list[str or + ~azure.mgmt.reservations.models.ReservationBillingPlan]] :ivar terms: Available reservation terms for this resource :vartype terms: list[str or ~azure.mgmt.reservations.models.ReservationTerm] @@ -214,7 +214,7 @@ class Catalog(Model): _attribute_map = { 'resource_type': {'key': 'resourceType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'billing_plans': {'key': 'billingPlans', 'type': '[CatalogBillingPlansItem]'}, + 'billing_plans': {'key': 'billingPlans', 'type': '{[str]}'}, 'terms': {'key': 'terms', 'type': '[str]'}, 'locations': {'key': 'locations', 'type': '[str]'}, 'sku_properties': {'key': 'skuProperties', 'type': '[SkuProperty]'}, @@ -232,29 +232,6 @@ def __init__(self, **kwargs): self.restrictions = None -class CatalogBillingPlansItem(Model): - """CatalogBillingPlansItem. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, list[str or - ~azure.mgmt.reservations.models.ReservationBillingPlan]] - :param name: The term for the billing SKU is available for. Possible - values include: 'P1Y', 'P3Y' - :type name: str or ~azure.mgmt.reservations.models.ReservationTerm - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{[str]}'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CatalogBillingPlansItem, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.name = kwargs.get('name', None) - - class CloudError(Model): """CloudError. """ diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py index af871bedb7b..f33c6cee610 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/models/_models_py3.py @@ -188,8 +188,8 @@ class Catalog(Model): :ivar name: The name of SKU :vartype name: str :param billing_plans: The billing plan options available for this SKU. - :type billing_plans: - list[~azure.mgmt.reservations.models.CatalogBillingPlansItem] + :type billing_plans: dict[str, list[str or + ~azure.mgmt.reservations.models.ReservationBillingPlan]] :ivar terms: Available reservation terms for this resource :vartype terms: list[str or ~azure.mgmt.reservations.models.ReservationTerm] @@ -214,7 +214,7 @@ class Catalog(Model): _attribute_map = { 'resource_type': {'key': 'resourceType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'billing_plans': {'key': 'billingPlans', 'type': '[CatalogBillingPlansItem]'}, + 'billing_plans': {'key': 'billingPlans', 'type': '{[str]}'}, 'terms': {'key': 'terms', 'type': '[str]'}, 'locations': {'key': 'locations', 'type': '[str]'}, 'sku_properties': {'key': 'skuProperties', 'type': '[SkuProperty]'}, @@ -232,29 +232,6 @@ def __init__(self, *, billing_plans=None, **kwargs) -> None: self.restrictions = None -class CatalogBillingPlansItem(Model): - """CatalogBillingPlansItem. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, list[str or - ~azure.mgmt.reservations.models.ReservationBillingPlan]] - :param name: The term for the billing SKU is available for. Possible - values include: 'P1Y', 'P3Y' - :type name: str or ~azure.mgmt.reservations.models.ReservationTerm - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{[str]}'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, additional_properties=None, name=None, **kwargs) -> None: - super(CatalogBillingPlansItem, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.name = name - - class CloudError(Model): """CloudError. """ diff --git a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/version.py b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/version.py index 266f5a486d7..5a7feab42d2 100644 --- a/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/version.py +++ b/sdk/reservations/azure-mgmt-reservations/azure/mgmt/reservations/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.5.0" +VERSION = "0.6.0"