From 2454cbb3c198e2bc14b88e859099ec7d2408b347 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 2 Jul 2025 14:17:59 +0000 Subject: [PATCH 1/2] feat: update generated APIs --- .../product_catalog/v2alpha1/__init__.py | 2 ++ .../product_catalog/v2alpha1/marshalling.py | 30 +++++++++++++++++++ .../product_catalog/v2alpha1/types.py | 15 ++++++++++ .../product_catalog/v2alpha1/__init__.py | 2 ++ .../product_catalog/v2alpha1/marshalling.py | 30 +++++++++++++++++++ .../product_catalog/v2alpha1/types.py | 15 ++++++++++ 6 files changed, 94 insertions(+) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index 7239fbf22..b283f1c0e 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py @@ -12,6 +12,7 @@ from .types import PublicCatalogProductPropertiesHardwareRAM from .types import PublicCatalogProductPropertiesHardwareStorage from .types import PublicCatalogProductPropertiesAppleSilicon +from .types import PublicCatalogProductPropertiesBlockStorage from .types import PublicCatalogProductPropertiesDedibox from .types import PublicCatalogProductPropertiesElasticMetal from .types import PublicCatalogProductPropertiesHardware @@ -39,6 +40,7 @@ "PublicCatalogProductPropertiesHardwareRAM", "PublicCatalogProductPropertiesHardwareStorage", "PublicCatalogProductPropertiesAppleSilicon", + "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", "PublicCatalogProductPropertiesElasticMetal", "PublicCatalogProductPropertiesHardware", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py index e1f552a6f..07b14b443 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py @@ -16,6 +16,7 @@ PublicCatalogProductPropertiesHardwareRAM, PublicCatalogProductPropertiesHardwareStorage, PublicCatalogProductPropertiesAppleSilicon, + PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, PublicCatalogProductPropertiesHardware, @@ -242,6 +243,27 @@ def unmarshal_PublicCatalogProductPropertiesAppleSilicon( return PublicCatalogProductPropertiesAppleSilicon(**args) +def unmarshal_PublicCatalogProductPropertiesBlockStorage( + data: Any, +) -> PublicCatalogProductPropertiesBlockStorage: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("min_volume_size", None) + if field is not None: + args["min_volume_size"] = field + + field = data.get("max_volume_size", None) + if field is not None: + args["max_volume_size"] = field + + return PublicCatalogProductPropertiesBlockStorage(**args) + + def unmarshal_PublicCatalogProductPropertiesDedibox( data: Any, ) -> PublicCatalogProductPropertiesDedibox: @@ -465,6 +487,14 @@ def unmarshal_PublicCatalogProductProperties( else: args["instance"] = None + field = data.get("block_storage", None) + if field is not None: + args["block_storage"] = unmarshal_PublicCatalogProductPropertiesBlockStorage( + field + ) + else: + args["block_storage"] = None + return PublicCatalogProductProperties(**args) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py index 51f823e25..2ce5d8014 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -227,6 +227,19 @@ class PublicCatalogProductPropertiesAppleSilicon: """ +@dataclass +class PublicCatalogProductPropertiesBlockStorage: + min_volume_size: int + """ + The minimum size of storage volume for this product in bytes. + """ + + max_volume_size: int + """ + The maximum size of storage volume for this product in bytes. + """ + + @dataclass class PublicCatalogProductPropertiesDedibox: range: str @@ -330,6 +343,8 @@ class PublicCatalogProductProperties: instance: Optional[PublicCatalogProductPropertiesInstance] + block_storage: Optional[PublicCatalogProductPropertiesBlockStorage] + @dataclass class PublicCatalogProductUnitOfMeasure: diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index 7239fbf22..b283f1c0e 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py @@ -12,6 +12,7 @@ from .types import PublicCatalogProductPropertiesHardwareRAM from .types import PublicCatalogProductPropertiesHardwareStorage from .types import PublicCatalogProductPropertiesAppleSilicon +from .types import PublicCatalogProductPropertiesBlockStorage from .types import PublicCatalogProductPropertiesDedibox from .types import PublicCatalogProductPropertiesElasticMetal from .types import PublicCatalogProductPropertiesHardware @@ -39,6 +40,7 @@ "PublicCatalogProductPropertiesHardwareRAM", "PublicCatalogProductPropertiesHardwareStorage", "PublicCatalogProductPropertiesAppleSilicon", + "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", "PublicCatalogProductPropertiesElasticMetal", "PublicCatalogProductPropertiesHardware", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index e1f552a6f..07b14b443 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py @@ -16,6 +16,7 @@ PublicCatalogProductPropertiesHardwareRAM, PublicCatalogProductPropertiesHardwareStorage, PublicCatalogProductPropertiesAppleSilicon, + PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, PublicCatalogProductPropertiesHardware, @@ -242,6 +243,27 @@ def unmarshal_PublicCatalogProductPropertiesAppleSilicon( return PublicCatalogProductPropertiesAppleSilicon(**args) +def unmarshal_PublicCatalogProductPropertiesBlockStorage( + data: Any, +) -> PublicCatalogProductPropertiesBlockStorage: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + field = data.get("min_volume_size", None) + if field is not None: + args["min_volume_size"] = field + + field = data.get("max_volume_size", None) + if field is not None: + args["max_volume_size"] = field + + return PublicCatalogProductPropertiesBlockStorage(**args) + + def unmarshal_PublicCatalogProductPropertiesDedibox( data: Any, ) -> PublicCatalogProductPropertiesDedibox: @@ -465,6 +487,14 @@ def unmarshal_PublicCatalogProductProperties( else: args["instance"] = None + field = data.get("block_storage", None) + if field is not None: + args["block_storage"] = unmarshal_PublicCatalogProductPropertiesBlockStorage( + field + ) + else: + args["block_storage"] = None + return PublicCatalogProductProperties(**args) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index 51f823e25..2ce5d8014 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -227,6 +227,19 @@ class PublicCatalogProductPropertiesAppleSilicon: """ +@dataclass +class PublicCatalogProductPropertiesBlockStorage: + min_volume_size: int + """ + The minimum size of storage volume for this product in bytes. + """ + + max_volume_size: int + """ + The maximum size of storage volume for this product in bytes. + """ + + @dataclass class PublicCatalogProductPropertiesDedibox: range: str @@ -330,6 +343,8 @@ class PublicCatalogProductProperties: instance: Optional[PublicCatalogProductPropertiesInstance] + block_storage: Optional[PublicCatalogProductPropertiesBlockStorage] + @dataclass class PublicCatalogProductUnitOfMeasure: From 3254c5ae1523e62611b3d2d2eb6be1e9ed2e7ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Fri, 18 Jul 2025 13:49:02 +0200 Subject: [PATCH 2/2] fix --- scaleway-async/poetry.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scaleway-async/poetry.lock b/scaleway-async/poetry.lock index c720aca40..7a65be93c 100644 --- a/scaleway-async/poetry.lock +++ b/scaleway-async/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. [[package]] name = "certifi" @@ -374,7 +374,7 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.8" groups = ["dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"},