diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index b283f1c0e..22c30abd8 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py @@ -17,6 +17,7 @@ from .types import PublicCatalogProductPropertiesElasticMetal from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance +from .types import PublicCatalogProductPropertiesObjectStorage from .types import PublicCatalogProductEnvironmentalImpactEstimation from .types import PublicCatalogProductLocality from .types import PublicCatalogProductPrice @@ -45,6 +46,7 @@ "PublicCatalogProductPropertiesElasticMetal", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", + "PublicCatalogProductPropertiesObjectStorage", "PublicCatalogProductEnvironmentalImpactEstimation", "PublicCatalogProductLocality", "PublicCatalogProductPrice", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py index 07b14b443..62fa07af8 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py @@ -21,6 +21,7 @@ PublicCatalogProductPropertiesElasticMetal, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, + PublicCatalogProductPropertiesObjectStorage, PublicCatalogProductEnvironmentalImpactEstimation, PublicCatalogProductLocality, PublicCatalogProductPrice, @@ -256,10 +257,14 @@ def unmarshal_PublicCatalogProductPropertiesBlockStorage( field = data.get("min_volume_size", None) if field is not None: args["min_volume_size"] = field + else: + args["min_volume_size"] = None field = data.get("max_volume_size", None) if field is not None: args["max_volume_size"] = field + else: + args["max_volume_size"] = None return PublicCatalogProductPropertiesBlockStorage(**args) @@ -366,6 +371,19 @@ def unmarshal_PublicCatalogProductPropertiesInstance( return PublicCatalogProductPropertiesInstance(**args) +def unmarshal_PublicCatalogProductPropertiesObjectStorage( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorage: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorage' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + return PublicCatalogProductPropertiesObjectStorage(**args) + + def unmarshal_PublicCatalogProductEnvironmentalImpactEstimation( data: Any, ) -> PublicCatalogProductEnvironmentalImpactEstimation: @@ -495,6 +513,14 @@ def unmarshal_PublicCatalogProductProperties( else: args["block_storage"] = None + field = data.get("object_storage", None) + if field is not None: + args["object_storage"] = unmarshal_PublicCatalogProductPropertiesObjectStorage( + field + ) + else: + args["object_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 b44dfd6a0..abd464b52 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -24,6 +24,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe ELASTIC_METAL = "elastic_metal" DEDIBOX = "dedibox" BLOCK_STORAGE = "block_storage" + OBJECT_STORAGE = "object_storage" def __str__(self) -> str: return str(self.value) @@ -230,14 +231,14 @@ class PublicCatalogProductPropertiesAppleSilicon: @dataclass class PublicCatalogProductPropertiesBlockStorage: - min_volume_size: int + min_volume_size: Optional[int] """ - The minimum size of storage volume for this product in bytes. + The minimum size of storage volume for this product in bytes. Deprecated. """ - max_volume_size: int + max_volume_size: Optional[int] """ - The maximum size of storage volume for this product in bytes. + The maximum size of storage volume for this product in bytes. Deprecated. """ @@ -303,6 +304,11 @@ class PublicCatalogProductPropertiesInstance: """ +@dataclass +class PublicCatalogProductPropertiesObjectStorage: + pass + + @dataclass class PublicCatalogProductEnvironmentalImpactEstimation: kg_co2_equivalent: Optional[float] @@ -346,6 +352,8 @@ class PublicCatalogProductProperties: block_storage: Optional[PublicCatalogProductPropertiesBlockStorage] + object_storage: Optional[PublicCatalogProductPropertiesObjectStorage] + @dataclass class PublicCatalogProductUnitOfMeasure: diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index b283f1c0e..22c30abd8 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py @@ -17,6 +17,7 @@ from .types import PublicCatalogProductPropertiesElasticMetal from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance +from .types import PublicCatalogProductPropertiesObjectStorage from .types import PublicCatalogProductEnvironmentalImpactEstimation from .types import PublicCatalogProductLocality from .types import PublicCatalogProductPrice @@ -45,6 +46,7 @@ "PublicCatalogProductPropertiesElasticMetal", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", + "PublicCatalogProductPropertiesObjectStorage", "PublicCatalogProductEnvironmentalImpactEstimation", "PublicCatalogProductLocality", "PublicCatalogProductPrice", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index 07b14b443..62fa07af8 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py @@ -21,6 +21,7 @@ PublicCatalogProductPropertiesElasticMetal, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, + PublicCatalogProductPropertiesObjectStorage, PublicCatalogProductEnvironmentalImpactEstimation, PublicCatalogProductLocality, PublicCatalogProductPrice, @@ -256,10 +257,14 @@ def unmarshal_PublicCatalogProductPropertiesBlockStorage( field = data.get("min_volume_size", None) if field is not None: args["min_volume_size"] = field + else: + args["min_volume_size"] = None field = data.get("max_volume_size", None) if field is not None: args["max_volume_size"] = field + else: + args["max_volume_size"] = None return PublicCatalogProductPropertiesBlockStorage(**args) @@ -366,6 +371,19 @@ def unmarshal_PublicCatalogProductPropertiesInstance( return PublicCatalogProductPropertiesInstance(**args) +def unmarshal_PublicCatalogProductPropertiesObjectStorage( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorage: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorage' failed as data isn't a dictionary." + ) + + args: Dict[str, Any] = {} + + return PublicCatalogProductPropertiesObjectStorage(**args) + + def unmarshal_PublicCatalogProductEnvironmentalImpactEstimation( data: Any, ) -> PublicCatalogProductEnvironmentalImpactEstimation: @@ -495,6 +513,14 @@ def unmarshal_PublicCatalogProductProperties( else: args["block_storage"] = None + field = data.get("object_storage", None) + if field is not None: + args["object_storage"] = unmarshal_PublicCatalogProductPropertiesObjectStorage( + field + ) + else: + args["object_storage"] = None + return PublicCatalogProductProperties(**args) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index b44dfd6a0..abd464b52 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -24,6 +24,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe ELASTIC_METAL = "elastic_metal" DEDIBOX = "dedibox" BLOCK_STORAGE = "block_storage" + OBJECT_STORAGE = "object_storage" def __str__(self) -> str: return str(self.value) @@ -230,14 +231,14 @@ class PublicCatalogProductPropertiesAppleSilicon: @dataclass class PublicCatalogProductPropertiesBlockStorage: - min_volume_size: int + min_volume_size: Optional[int] """ - The minimum size of storage volume for this product in bytes. + The minimum size of storage volume for this product in bytes. Deprecated. """ - max_volume_size: int + max_volume_size: Optional[int] """ - The maximum size of storage volume for this product in bytes. + The maximum size of storage volume for this product in bytes. Deprecated. """ @@ -303,6 +304,11 @@ class PublicCatalogProductPropertiesInstance: """ +@dataclass +class PublicCatalogProductPropertiesObjectStorage: + pass + + @dataclass class PublicCatalogProductEnvironmentalImpactEstimation: kg_co2_equivalent: Optional[float] @@ -346,6 +352,8 @@ class PublicCatalogProductProperties: block_storage: Optional[PublicCatalogProductPropertiesBlockStorage] + object_storage: Optional[PublicCatalogProductPropertiesObjectStorage] + @dataclass class PublicCatalogProductUnitOfMeasure: