From 9fdc6428f23424469aa45e378f532896489c085c Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 30 Apr 2025 14:25:28 +0000 Subject: [PATCH] feat: update generated APIs --- .../product_catalog/v2alpha1/__init__.py | 4 -- .../product_catalog/v2alpha1/marshalling.py | 30 ----------- .../product_catalog/v2alpha1/types.py | 52 ------------------- .../product_catalog/v2alpha1/__init__.py | 4 -- .../product_catalog/v2alpha1/marshalling.py | 30 ----------- .../product_catalog/v2alpha1/types.py | 52 ------------------- 6 files changed, 172 deletions(-) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index 9282b8e9c..d4e903e68 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py @@ -1,6 +1,5 @@ # This file was automatically generated. DO NOT EDIT. # If you have any remark or suggestion do not hesitate to open an issue. -from .types import PublicCatalogProductPriceUnitOfMeasureCountableUnit from .types import PublicCatalogProductPropertiesHardwareCPUArch from .types import PublicCatalogProductUnitOfMeasureCountableUnit from .types import PublicCatalogProductPropertiesHardwareCPUPhysical @@ -10,7 +9,6 @@ from .types import PublicCatalogProductPropertiesHardwareNetwork from .types import PublicCatalogProductPropertiesHardwareRAM from .types import PublicCatalogProductPropertiesHardwareStorage -from .types import PublicCatalogProductPriceUnitOfMeasure from .types import PublicCatalogProductPropertiesAppleSilicon from .types import PublicCatalogProductPropertiesDedibox from .types import PublicCatalogProductPropertiesElasticMetal @@ -27,7 +25,6 @@ from .api import ProductCatalogV2Alpha1PublicCatalogAPI __all__ = [ - "PublicCatalogProductPriceUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUArch", "PublicCatalogProductUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUPhysical", @@ -37,7 +34,6 @@ "PublicCatalogProductPropertiesHardwareNetwork", "PublicCatalogProductPropertiesHardwareRAM", "PublicCatalogProductPropertiesHardwareStorage", - "PublicCatalogProductPriceUnitOfMeasure", "PublicCatalogProductPropertiesAppleSilicon", "PublicCatalogProductPropertiesDedibox", "PublicCatalogProductPropertiesElasticMetal", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py index f28f9861f..1f0022d63 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py @@ -14,7 +14,6 @@ PublicCatalogProductPropertiesHardwareNetwork, PublicCatalogProductPropertiesHardwareRAM, PublicCatalogProductPropertiesHardwareStorage, - PublicCatalogProductPriceUnitOfMeasure, PublicCatalogProductPropertiesAppleSilicon, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, @@ -225,27 +224,6 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage( return PublicCatalogProductPropertiesHardwareStorage(**args) -def unmarshal_PublicCatalogProductPriceUnitOfMeasure( - data: Any, -) -> PublicCatalogProductPriceUnitOfMeasure: - if not isinstance(data, dict): - raise TypeError( - "Unmarshalling the type 'PublicCatalogProductPriceUnitOfMeasure' failed as data isn't a dictionary." - ) - - args: Dict[str, Any] = {} - - field = data.get("unit", None) - if field is not None: - args["unit"] = field - - field = data.get("size", None) - if field is not None: - args["size"] = field - - return PublicCatalogProductPriceUnitOfMeasure(**args) - - def unmarshal_PublicCatalogProductPropertiesAppleSilicon( data: Any, ) -> PublicCatalogProductPropertiesAppleSilicon: @@ -431,14 +409,6 @@ def unmarshal_PublicCatalogProductPrice(data: Any) -> PublicCatalogProductPrice: else: args["retail_price"] = None - field = data.get("unit_of_measure", None) - if field is not None: - args["unit_of_measure"] = unmarshal_PublicCatalogProductPriceUnitOfMeasure( - field - ) - else: - args["unit_of_measure"] = None - return PublicCatalogProductPrice(**args) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py index 2ebb0d511..3e7a5e020 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -16,40 +16,6 @@ ) -class PublicCatalogProductPriceUnitOfMeasureCountableUnit( - str, Enum, metaclass=StrEnumMeta -): - UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit" - CHUNK = "chunk" - CORE = "core" - CURRENCY = "currency" - DEVICE = "device" - DOMAIN = "domain" - EMAIL = "email" - GB_S = "gb_s" - GIGABYTE = "gigabyte" - HOUR = "hour" - IOPS_GIGABYTE = "iops_gigabyte" - IP = "ip" - MONTH = "month" - NODE = "node" - PLAN = "plan" - QUERY = "query" - REQUEST = "request" - SESSION = "session" - VCPU_S = "vcpu_s" - VERSION = "version" - YEAR = "year" - KEY = "key" - TOKEN = "token" - MINUTE = "minute" - SETUP = "setup" - DAY = "day" - - def __str__(self) -> str: - return str(self.value) - - class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta): UNKNOWN_ARCH = "unknown_arch" X64 = "x64" @@ -228,19 +194,6 @@ class PublicCatalogProductPropertiesHardwareStorage: """ -@dataclass -class PublicCatalogProductPriceUnitOfMeasure: - unit: PublicCatalogProductPriceUnitOfMeasureCountableUnit - """ - The unit of measure. - """ - - size: int - """ - The size of the unit. - """ - - @dataclass class PublicCatalogProductPropertiesAppleSilicon: range: str @@ -326,11 +279,6 @@ class PublicCatalogProductPrice: The retail price of the product. """ - unit_of_measure: Optional[PublicCatalogProductPriceUnitOfMeasure] - """ - The unit of measure of the price (deprecated). - """ - @dataclass class PublicCatalogProductProperties: diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index 9282b8e9c..d4e903e68 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py @@ -1,6 +1,5 @@ # This file was automatically generated. DO NOT EDIT. # If you have any remark or suggestion do not hesitate to open an issue. -from .types import PublicCatalogProductPriceUnitOfMeasureCountableUnit from .types import PublicCatalogProductPropertiesHardwareCPUArch from .types import PublicCatalogProductUnitOfMeasureCountableUnit from .types import PublicCatalogProductPropertiesHardwareCPUPhysical @@ -10,7 +9,6 @@ from .types import PublicCatalogProductPropertiesHardwareNetwork from .types import PublicCatalogProductPropertiesHardwareRAM from .types import PublicCatalogProductPropertiesHardwareStorage -from .types import PublicCatalogProductPriceUnitOfMeasure from .types import PublicCatalogProductPropertiesAppleSilicon from .types import PublicCatalogProductPropertiesDedibox from .types import PublicCatalogProductPropertiesElasticMetal @@ -27,7 +25,6 @@ from .api import ProductCatalogV2Alpha1PublicCatalogAPI __all__ = [ - "PublicCatalogProductPriceUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUArch", "PublicCatalogProductUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUPhysical", @@ -37,7 +34,6 @@ "PublicCatalogProductPropertiesHardwareNetwork", "PublicCatalogProductPropertiesHardwareRAM", "PublicCatalogProductPropertiesHardwareStorage", - "PublicCatalogProductPriceUnitOfMeasure", "PublicCatalogProductPropertiesAppleSilicon", "PublicCatalogProductPropertiesDedibox", "PublicCatalogProductPropertiesElasticMetal", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index f28f9861f..1f0022d63 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py @@ -14,7 +14,6 @@ PublicCatalogProductPropertiesHardwareNetwork, PublicCatalogProductPropertiesHardwareRAM, PublicCatalogProductPropertiesHardwareStorage, - PublicCatalogProductPriceUnitOfMeasure, PublicCatalogProductPropertiesAppleSilicon, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, @@ -225,27 +224,6 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage( return PublicCatalogProductPropertiesHardwareStorage(**args) -def unmarshal_PublicCatalogProductPriceUnitOfMeasure( - data: Any, -) -> PublicCatalogProductPriceUnitOfMeasure: - if not isinstance(data, dict): - raise TypeError( - "Unmarshalling the type 'PublicCatalogProductPriceUnitOfMeasure' failed as data isn't a dictionary." - ) - - args: Dict[str, Any] = {} - - field = data.get("unit", None) - if field is not None: - args["unit"] = field - - field = data.get("size", None) - if field is not None: - args["size"] = field - - return PublicCatalogProductPriceUnitOfMeasure(**args) - - def unmarshal_PublicCatalogProductPropertiesAppleSilicon( data: Any, ) -> PublicCatalogProductPropertiesAppleSilicon: @@ -431,14 +409,6 @@ def unmarshal_PublicCatalogProductPrice(data: Any) -> PublicCatalogProductPrice: else: args["retail_price"] = None - field = data.get("unit_of_measure", None) - if field is not None: - args["unit_of_measure"] = unmarshal_PublicCatalogProductPriceUnitOfMeasure( - field - ) - else: - args["unit_of_measure"] = None - return PublicCatalogProductPrice(**args) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index 2ebb0d511..3e7a5e020 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -16,40 +16,6 @@ ) -class PublicCatalogProductPriceUnitOfMeasureCountableUnit( - str, Enum, metaclass=StrEnumMeta -): - UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit" - CHUNK = "chunk" - CORE = "core" - CURRENCY = "currency" - DEVICE = "device" - DOMAIN = "domain" - EMAIL = "email" - GB_S = "gb_s" - GIGABYTE = "gigabyte" - HOUR = "hour" - IOPS_GIGABYTE = "iops_gigabyte" - IP = "ip" - MONTH = "month" - NODE = "node" - PLAN = "plan" - QUERY = "query" - REQUEST = "request" - SESSION = "session" - VCPU_S = "vcpu_s" - VERSION = "version" - YEAR = "year" - KEY = "key" - TOKEN = "token" - MINUTE = "minute" - SETUP = "setup" - DAY = "day" - - def __str__(self) -> str: - return str(self.value) - - class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta): UNKNOWN_ARCH = "unknown_arch" X64 = "x64" @@ -228,19 +194,6 @@ class PublicCatalogProductPropertiesHardwareStorage: """ -@dataclass -class PublicCatalogProductPriceUnitOfMeasure: - unit: PublicCatalogProductPriceUnitOfMeasureCountableUnit - """ - The unit of measure. - """ - - size: int - """ - The size of the unit. - """ - - @dataclass class PublicCatalogProductPropertiesAppleSilicon: range: str @@ -326,11 +279,6 @@ class PublicCatalogProductPrice: The retail price of the product. """ - unit_of_measure: Optional[PublicCatalogProductPriceUnitOfMeasure] - """ - The unit of measure of the price (deprecated). - """ - @dataclass class PublicCatalogProductProperties: