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: