From d0f73d1f7634635f94a5f00e6018e420fd3a5b0f Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Fri, 14 Aug 2026 14:32:41 +0000 Subject: [PATCH] chore(product_catalog): add file storage --- .../product_catalog/v2alpha1/__init__.py | 2 ++ .../product_catalog/v2alpha1/marshalling.py | 34 +++++++++++++++++++ .../product_catalog/v2alpha1/types.py | 16 +++++++++ .../scaleway_async/search/v1alpha1/types.py | 1 + .../product_catalog/v2alpha1/__init__.py | 2 ++ .../product_catalog/v2alpha1/marshalling.py | 34 +++++++++++++++++++ .../product_catalog/v2alpha1/types.py | 16 +++++++++ scaleway/scaleway/search/v1alpha1/types.py | 1 + 8 files changed, 106 insertions(+) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index af8a0e998..8ec9438a6 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py @@ -67,6 +67,7 @@ from .types import PublicCatalogProductPropertiesBlockStorage from .types import PublicCatalogProductPropertiesDedibox from .types import PublicCatalogProductPropertiesElasticMetal +from .types import PublicCatalogProductPropertiesFileStorage from .types import PublicCatalogProductPropertiesGenerativeApis from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance @@ -155,6 +156,7 @@ "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", "PublicCatalogProductPropertiesElasticMetal", + "PublicCatalogProductPropertiesFileStorage", "PublicCatalogProductPropertiesGenerativeApis", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py index 4dbf89798..c2816ab2c 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py @@ -62,6 +62,7 @@ PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, + PublicCatalogProductPropertiesFileStorage, PublicCatalogProductPropertiesGenerativeApis, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, @@ -1063,6 +1064,31 @@ def unmarshal_PublicCatalogProductPropertiesElasticMetal( return PublicCatalogProductPropertiesElasticMetal(**args) +def unmarshal_PublicCatalogProductPropertiesFileStorage( + data: Any, +) -> PublicCatalogProductPropertiesFileStorage: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesFileStorage' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("min_size", None) + if field is not None: + args["min_size"] = field + else: + args["min_size"] = 0 + + field = data.get("max_size", None) + if field is not None: + args["max_size"] = field + else: + args["max_size"] = 0 + + return PublicCatalogProductPropertiesFileStorage(**args) + + def unmarshal_PublicCatalogProductPropertiesGenerativeApis( data: Any, ) -> PublicCatalogProductPropertiesGenerativeApis: @@ -1915,6 +1941,14 @@ def unmarshal_PublicCatalogProductProperties( else: args["instance_local_ssd_storage"] = None + field = data.get("file_storage", None) + if field is not None: + args["file_storage"] = unmarshal_PublicCatalogProductPropertiesFileStorage( + field + ) + else: + args["file_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 ced4d8828..033549e0e 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -41,6 +41,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe OPEN_SEARCH = "open_search" INSTANCE_LOCAL_SSD_SNAPSHOT = "instance_local_ssd_snapshot" INSTANCE_LOCAL_SSD_STORAGE = "instance_local_ssd_storage" + FILE_STORAGE = "file_storage" def __str__(self) -> str: return str(self.value) @@ -730,6 +731,19 @@ class PublicCatalogProductPropertiesElasticMetal: """ +@dataclass +class PublicCatalogProductPropertiesFileStorage: + min_size: int + """ + The minimum size of storage volume for this product in bytes. + """ + + max_size: int + """ + The maximum size of storage volume for this product in bytes. + """ + + @dataclass class PublicCatalogProductPropertiesGenerativeApis: reasoning: bool @@ -1027,6 +1041,8 @@ class PublicCatalogProductProperties: PublicCatalogProductPropertiesInstanceLocalSSDStorage ] = None + file_storage: Optional[PublicCatalogProductPropertiesFileStorage] = None + @dataclass class PublicCatalogProductUnitOfMeasure: diff --git a/scaleway-async/scaleway_async/search/v1alpha1/types.py b/scaleway-async/scaleway_async/search/v1alpha1/types.py index d12938eb6..0ddb6c3c8 100644 --- a/scaleway-async/scaleway_async/search/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/search/v1alpha1/types.py @@ -44,6 +44,7 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): INSTANCE_PRIVATE_NIC = "instance_private_nic" INSTANCE_SNAPSHOT = "instance_snapshot" INSTANCE_PLACEMENT_GROUP = "instance_placement_group" + INSTANCE_TEMPLATE = "instance_template" K8S_CLUSTER = "k8s_cluster" K8S_POOL = "k8s_pool" K8S_NODE = "k8s_node" diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index af8a0e998..8ec9438a6 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py @@ -67,6 +67,7 @@ from .types import PublicCatalogProductPropertiesBlockStorage from .types import PublicCatalogProductPropertiesDedibox from .types import PublicCatalogProductPropertiesElasticMetal +from .types import PublicCatalogProductPropertiesFileStorage from .types import PublicCatalogProductPropertiesGenerativeApis from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance @@ -155,6 +156,7 @@ "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", "PublicCatalogProductPropertiesElasticMetal", + "PublicCatalogProductPropertiesFileStorage", "PublicCatalogProductPropertiesGenerativeApis", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index 4dbf89798..c2816ab2c 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py @@ -62,6 +62,7 @@ PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, + PublicCatalogProductPropertiesFileStorage, PublicCatalogProductPropertiesGenerativeApis, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, @@ -1063,6 +1064,31 @@ def unmarshal_PublicCatalogProductPropertiesElasticMetal( return PublicCatalogProductPropertiesElasticMetal(**args) +def unmarshal_PublicCatalogProductPropertiesFileStorage( + data: Any, +) -> PublicCatalogProductPropertiesFileStorage: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesFileStorage' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("min_size", None) + if field is not None: + args["min_size"] = field + else: + args["min_size"] = 0 + + field = data.get("max_size", None) + if field is not None: + args["max_size"] = field + else: + args["max_size"] = 0 + + return PublicCatalogProductPropertiesFileStorage(**args) + + def unmarshal_PublicCatalogProductPropertiesGenerativeApis( data: Any, ) -> PublicCatalogProductPropertiesGenerativeApis: @@ -1915,6 +1941,14 @@ def unmarshal_PublicCatalogProductProperties( else: args["instance_local_ssd_storage"] = None + field = data.get("file_storage", None) + if field is not None: + args["file_storage"] = unmarshal_PublicCatalogProductPropertiesFileStorage( + field + ) + else: + args["file_storage"] = None + return PublicCatalogProductProperties(**args) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index ced4d8828..033549e0e 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -41,6 +41,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe OPEN_SEARCH = "open_search" INSTANCE_LOCAL_SSD_SNAPSHOT = "instance_local_ssd_snapshot" INSTANCE_LOCAL_SSD_STORAGE = "instance_local_ssd_storage" + FILE_STORAGE = "file_storage" def __str__(self) -> str: return str(self.value) @@ -730,6 +731,19 @@ class PublicCatalogProductPropertiesElasticMetal: """ +@dataclass +class PublicCatalogProductPropertiesFileStorage: + min_size: int + """ + The minimum size of storage volume for this product in bytes. + """ + + max_size: int + """ + The maximum size of storage volume for this product in bytes. + """ + + @dataclass class PublicCatalogProductPropertiesGenerativeApis: reasoning: bool @@ -1027,6 +1041,8 @@ class PublicCatalogProductProperties: PublicCatalogProductPropertiesInstanceLocalSSDStorage ] = None + file_storage: Optional[PublicCatalogProductPropertiesFileStorage] = None + @dataclass class PublicCatalogProductUnitOfMeasure: diff --git a/scaleway/scaleway/search/v1alpha1/types.py b/scaleway/scaleway/search/v1alpha1/types.py index d12938eb6..0ddb6c3c8 100644 --- a/scaleway/scaleway/search/v1alpha1/types.py +++ b/scaleway/scaleway/search/v1alpha1/types.py @@ -44,6 +44,7 @@ class ResourceType(str, Enum, metaclass=StrEnumMeta): INSTANCE_PRIVATE_NIC = "instance_private_nic" INSTANCE_SNAPSHOT = "instance_snapshot" INSTANCE_PLACEMENT_GROUP = "instance_placement_group" + INSTANCE_TEMPLATE = "instance_template" K8S_CLUSTER = "k8s_cluster" K8S_POOL = "k8s_pool" K8S_NODE = "k8s_node"