From ed68bf9b75e2442fc171f5669b1b541c7eadaff7 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Fri, 12 Dec 2025 15:22:03 +0000 Subject: [PATCH] feat: update generated APIs --- .../product_catalog/v2alpha1/__init__.py | 20 +++ .../product_catalog/v2alpha1/marshalling.py | 167 ++++++++++++++++++ .../product_catalog/v2alpha1/types.py | 94 ++++++++++ .../product_catalog/v2alpha1/__init__.py | 20 +++ .../product_catalog/v2alpha1/marshalling.py | 167 ++++++++++++++++++ .../product_catalog/v2alpha1/types.py | 94 ++++++++++ 6 files changed, 562 insertions(+) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index 3f6d7aac8..166dd5e05 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py @@ -5,6 +5,11 @@ from .types import PublicCatalogProductProductBadge from .types import PublicCatalogProductPropertiesGenerativeApisConsumptionMode from .types import PublicCatalogProductPropertiesHardwareCPUArch +from .types import PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass +from .types import ( + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, +) +from .types import PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType from .types import PublicCatalogProductStatus from .types import PublicCatalogProductUnitOfMeasureCountableUnit from .types import PublicCatalogProductPropertiesHardwareCPUPhysical @@ -14,6 +19,10 @@ from .types import PublicCatalogProductPropertiesHardwareNetwork from .types import PublicCatalogProductPropertiesHardwareRAM from .types import PublicCatalogProductPropertiesHardwareStorage +from .types import PublicCatalogProductPropertiesObjectStorageClassType +from .types import PublicCatalogProductPropertiesObjectStorageInternetTrafficType +from .types import PublicCatalogProductPropertiesObjectStorageRegionTrafficType +from .types import PublicCatalogProductPropertiesObjectStorageRestoreType from .types import PublicCatalogProductPropertiesAppleSilicon from .types import PublicCatalogProductPropertiesBlockStorage from .types import PublicCatalogProductPropertiesDedibox @@ -21,9 +30,11 @@ from .types import PublicCatalogProductPropertiesGenerativeApis from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance +from .types import PublicCatalogProductPropertiesKeyManager from .types import PublicCatalogProductPropertiesLoadBalancer from .types import PublicCatalogProductPropertiesManagedInference from .types import PublicCatalogProductPropertiesObjectStorage +from .types import PublicCatalogProductPropertiesSecretManager from .types import PublicCatalogProductEnvironmentalImpactEstimation from .types import PublicCatalogProductLocality from .types import PublicCatalogProductPrice @@ -40,6 +51,9 @@ "PublicCatalogProductProductBadge", "PublicCatalogProductPropertiesGenerativeApisConsumptionMode", "PublicCatalogProductPropertiesHardwareCPUArch", + "PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass", + "PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType", + "PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType", "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUPhysical", @@ -49,6 +63,10 @@ "PublicCatalogProductPropertiesHardwareNetwork", "PublicCatalogProductPropertiesHardwareRAM", "PublicCatalogProductPropertiesHardwareStorage", + "PublicCatalogProductPropertiesObjectStorageClassType", + "PublicCatalogProductPropertiesObjectStorageInternetTrafficType", + "PublicCatalogProductPropertiesObjectStorageRegionTrafficType", + "PublicCatalogProductPropertiesObjectStorageRestoreType", "PublicCatalogProductPropertiesAppleSilicon", "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", @@ -56,9 +74,11 @@ "PublicCatalogProductPropertiesGenerativeApis", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", + "PublicCatalogProductPropertiesKeyManager", "PublicCatalogProductPropertiesLoadBalancer", "PublicCatalogProductPropertiesManagedInference", "PublicCatalogProductPropertiesObjectStorage", + "PublicCatalogProductPropertiesSecretManager", "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 a8644b6f0..94c2aaed3 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py @@ -10,6 +10,9 @@ from .types import ( PublicCatalogProductProductBadge, PublicCatalogProductPropertiesHardwareCPUArch, + PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass, + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, + PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType, PublicCatalogProductStatus, PublicCatalogProductPropertiesHardwareCPUPhysical, PublicCatalogProductPropertiesHardwareCPUVirtual, @@ -18,6 +21,10 @@ PublicCatalogProductPropertiesHardwareNetwork, PublicCatalogProductPropertiesHardwareRAM, PublicCatalogProductPropertiesHardwareStorage, + PublicCatalogProductPropertiesObjectStorageClassType, + PublicCatalogProductPropertiesObjectStorageInternetTrafficType, + PublicCatalogProductPropertiesObjectStorageRegionTrafficType, + PublicCatalogProductPropertiesObjectStorageRestoreType, PublicCatalogProductPropertiesAppleSilicon, PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, @@ -25,9 +32,11 @@ PublicCatalogProductPropertiesGenerativeApis, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, + PublicCatalogProductPropertiesKeyManager, PublicCatalogProductPropertiesLoadBalancer, PublicCatalogProductPropertiesManagedInference, PublicCatalogProductPropertiesObjectStorage, + PublicCatalogProductPropertiesSecretManager, PublicCatalogProductEnvironmentalImpactEstimation, PublicCatalogProductLocality, PublicCatalogProductPrice, @@ -277,6 +286,88 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage( return PublicCatalogProductPropertiesHardwareStorage(**args) +def unmarshal_PublicCatalogProductPropertiesObjectStorageClassType( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorageClassType: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageClassType' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("storage_class", None) + if field is not None: + args["storage_class"] = field + else: + args["storage_class"] = ( + PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass.UNKNOWN_STORAGE_CLASS + ) + + return PublicCatalogProductPropertiesObjectStorageClassType(**args) + + +def unmarshal_PublicCatalogProductPropertiesObjectStorageInternetTrafficType( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorageInternetTrafficType: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageInternetTrafficType' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("traffic_type", None) + if field is not None: + args["traffic_type"] = field + else: + args["traffic_type"] = ( + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType.UNKNOWN_TRAFFIC_TYPE + ) + + return PublicCatalogProductPropertiesObjectStorageInternetTrafficType(**args) + + +def unmarshal_PublicCatalogProductPropertiesObjectStorageRegionTrafficType( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorageRegionTrafficType: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRegionTrafficType' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("region_destination", None) + if field is not None: + args["region_destination"] = field + else: + args["region_destination"] = None + + return PublicCatalogProductPropertiesObjectStorageRegionTrafficType(**args) + + +def unmarshal_PublicCatalogProductPropertiesObjectStorageRestoreType( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorageRestoreType: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRestoreType' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("restore_type", None) + if field is not None: + args["restore_type"] = field + else: + args["restore_type"] = ( + PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType.UNKNOWN_RESTORE_TYPE + ) + + return PublicCatalogProductPropertiesObjectStorageRestoreType(**args) + + def unmarshal_PublicCatalogProductPropertiesAppleSilicon( data: Any, ) -> PublicCatalogProductPropertiesAppleSilicon: @@ -482,6 +573,19 @@ def unmarshal_PublicCatalogProductPropertiesInstance( return PublicCatalogProductPropertiesInstance(**args) +def unmarshal_PublicCatalogProductPropertiesKeyManager( + data: Any, +) -> PublicCatalogProductPropertiesKeyManager: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesKeyManager' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return PublicCatalogProductPropertiesKeyManager(**args) + + def unmarshal_PublicCatalogProductPropertiesLoadBalancer( data: Any, ) -> PublicCatalogProductPropertiesLoadBalancer: @@ -524,9 +628,58 @@ def unmarshal_PublicCatalogProductPropertiesObjectStorage( args: dict[str, Any] = {} + field = data.get("class", None) + if field is not None: + args["class_"] = unmarshal_PublicCatalogProductPropertiesObjectStorageClassType( + field + ) + else: + args["class_"] = None + + field = data.get("restore", None) + if field is not None: + args["restore"] = ( + unmarshal_PublicCatalogProductPropertiesObjectStorageRestoreType(field) + ) + else: + args["restore"] = None + + field = data.get("internet_traffic", None) + if field is not None: + args["internet_traffic"] = ( + unmarshal_PublicCatalogProductPropertiesObjectStorageInternetTrafficType( + field + ) + ) + else: + args["internet_traffic"] = None + + field = data.get("region_traffic", None) + if field is not None: + args["region_traffic"] = ( + unmarshal_PublicCatalogProductPropertiesObjectStorageRegionTrafficType( + field + ) + ) + else: + args["region_traffic"] = None + return PublicCatalogProductPropertiesObjectStorage(**args) +def unmarshal_PublicCatalogProductPropertiesSecretManager( + data: Any, +) -> PublicCatalogProductPropertiesSecretManager: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesSecretManager' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return PublicCatalogProductPropertiesSecretManager(**args) + + def unmarshal_PublicCatalogProductEnvironmentalImpactEstimation( data: Any, ) -> PublicCatalogProductEnvironmentalImpactEstimation: @@ -688,6 +841,20 @@ def unmarshal_PublicCatalogProductProperties( else: args["load_balancer"] = None + field = data.get("secret_manager", None) + if field is not None: + args["secret_manager"] = unmarshal_PublicCatalogProductPropertiesSecretManager( + field + ) + else: + args["secret_manager"] = None + + field = data.get("key_manager", None) + if field is not None: + args["key_manager"] = unmarshal_PublicCatalogProductPropertiesKeyManager(field) + else: + args["key_manager"] = 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 11e99e34d..f06a04fab 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -28,6 +28,8 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe MANAGED_INFERENCE = "managed_inference" GENERATIVE_APIS = "generative_apis" LOAD_BALANCER = "load_balancer" + SECRET_MANAGER = "secret_manager" + KEY_MANAGER = "key_manager" def __str__(self) -> str: return str(self.value) @@ -83,6 +85,40 @@ def __str__(self) -> str: return str(self.value) +class PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass( + str, Enum, metaclass=StrEnumMeta +): + UNKNOWN_STORAGE_CLASS = "unknown_storage_class" + STANDARD = "standard" + GLACIER = "glacier" + ONEZONE_IA = "onezone_ia" + + def __str__(self) -> str: + return str(self.value) + + +class PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType( + str, Enum, metaclass=StrEnumMeta +): + UNKNOWN_TRAFFIC_TYPE = "unknown_traffic_type" + INGRESS = "ingress" + EGRESS = "egress" + ALLIANCE = "alliance" + + def __str__(self) -> str: + return str(self.value) + + +class PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType( + str, Enum, metaclass=StrEnumMeta +): + UNKNOWN_RESTORE_TYPE = "unknown_restore_type" + STANDARD = "standard" + + def __str__(self) -> str: + return str(self.value) + + class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta): UNKNOWN_STATUS = "unknown_status" PUBLIC_BETA = "public_beta" @@ -271,6 +307,40 @@ class PublicCatalogProductPropertiesHardwareStorage: """ +@dataclass +class PublicCatalogProductPropertiesObjectStorageClassType: + storage_class: PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass + """ + The storage class. + """ + + +@dataclass +class PublicCatalogProductPropertiesObjectStorageInternetTrafficType: + traffic_type: ( + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType + ) + """ + The type of internet traffic. + """ + + +@dataclass +class PublicCatalogProductPropertiesObjectStorageRegionTrafficType: + region_destination: str + """ + The destination region for the region traffic. + """ + + +@dataclass +class PublicCatalogProductPropertiesObjectStorageRestoreType: + restore_type: PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType + """ + The type of restore. + """ + + @dataclass class PublicCatalogProductPropertiesAppleSilicon: range: str @@ -376,6 +446,11 @@ class PublicCatalogProductPropertiesInstance: """ +@dataclass +class PublicCatalogProductPropertiesKeyManager: + pass + + @dataclass class PublicCatalogProductPropertiesLoadBalancer: pass @@ -391,6 +466,21 @@ class PublicCatalogProductPropertiesManagedInference: @dataclass class PublicCatalogProductPropertiesObjectStorage: + class_: Optional[PublicCatalogProductPropertiesObjectStorageClassType] = None + + restore: Optional[PublicCatalogProductPropertiesObjectStorageRestoreType] = None + + internet_traffic: Optional[ + PublicCatalogProductPropertiesObjectStorageInternetTrafficType + ] = None + + region_traffic: Optional[ + PublicCatalogProductPropertiesObjectStorageRegionTrafficType + ] = None + + +@dataclass +class PublicCatalogProductPropertiesSecretManager: pass @@ -444,6 +534,10 @@ class PublicCatalogProductProperties: load_balancer: Optional[PublicCatalogProductPropertiesLoadBalancer] = None + secret_manager: Optional[PublicCatalogProductPropertiesSecretManager] = None + + key_manager: Optional[PublicCatalogProductPropertiesKeyManager] = None + @dataclass class PublicCatalogProductUnitOfMeasure: diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index 3f6d7aac8..166dd5e05 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py @@ -5,6 +5,11 @@ from .types import PublicCatalogProductProductBadge from .types import PublicCatalogProductPropertiesGenerativeApisConsumptionMode from .types import PublicCatalogProductPropertiesHardwareCPUArch +from .types import PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass +from .types import ( + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, +) +from .types import PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType from .types import PublicCatalogProductStatus from .types import PublicCatalogProductUnitOfMeasureCountableUnit from .types import PublicCatalogProductPropertiesHardwareCPUPhysical @@ -14,6 +19,10 @@ from .types import PublicCatalogProductPropertiesHardwareNetwork from .types import PublicCatalogProductPropertiesHardwareRAM from .types import PublicCatalogProductPropertiesHardwareStorage +from .types import PublicCatalogProductPropertiesObjectStorageClassType +from .types import PublicCatalogProductPropertiesObjectStorageInternetTrafficType +from .types import PublicCatalogProductPropertiesObjectStorageRegionTrafficType +from .types import PublicCatalogProductPropertiesObjectStorageRestoreType from .types import PublicCatalogProductPropertiesAppleSilicon from .types import PublicCatalogProductPropertiesBlockStorage from .types import PublicCatalogProductPropertiesDedibox @@ -21,9 +30,11 @@ from .types import PublicCatalogProductPropertiesGenerativeApis from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance +from .types import PublicCatalogProductPropertiesKeyManager from .types import PublicCatalogProductPropertiesLoadBalancer from .types import PublicCatalogProductPropertiesManagedInference from .types import PublicCatalogProductPropertiesObjectStorage +from .types import PublicCatalogProductPropertiesSecretManager from .types import PublicCatalogProductEnvironmentalImpactEstimation from .types import PublicCatalogProductLocality from .types import PublicCatalogProductPrice @@ -40,6 +51,9 @@ "PublicCatalogProductProductBadge", "PublicCatalogProductPropertiesGenerativeApisConsumptionMode", "PublicCatalogProductPropertiesHardwareCPUArch", + "PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass", + "PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType", + "PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType", "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUPhysical", @@ -49,6 +63,10 @@ "PublicCatalogProductPropertiesHardwareNetwork", "PublicCatalogProductPropertiesHardwareRAM", "PublicCatalogProductPropertiesHardwareStorage", + "PublicCatalogProductPropertiesObjectStorageClassType", + "PublicCatalogProductPropertiesObjectStorageInternetTrafficType", + "PublicCatalogProductPropertiesObjectStorageRegionTrafficType", + "PublicCatalogProductPropertiesObjectStorageRestoreType", "PublicCatalogProductPropertiesAppleSilicon", "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", @@ -56,9 +74,11 @@ "PublicCatalogProductPropertiesGenerativeApis", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", + "PublicCatalogProductPropertiesKeyManager", "PublicCatalogProductPropertiesLoadBalancer", "PublicCatalogProductPropertiesManagedInference", "PublicCatalogProductPropertiesObjectStorage", + "PublicCatalogProductPropertiesSecretManager", "PublicCatalogProductEnvironmentalImpactEstimation", "PublicCatalogProductLocality", "PublicCatalogProductPrice", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index a8644b6f0..94c2aaed3 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py @@ -10,6 +10,9 @@ from .types import ( PublicCatalogProductProductBadge, PublicCatalogProductPropertiesHardwareCPUArch, + PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass, + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, + PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType, PublicCatalogProductStatus, PublicCatalogProductPropertiesHardwareCPUPhysical, PublicCatalogProductPropertiesHardwareCPUVirtual, @@ -18,6 +21,10 @@ PublicCatalogProductPropertiesHardwareNetwork, PublicCatalogProductPropertiesHardwareRAM, PublicCatalogProductPropertiesHardwareStorage, + PublicCatalogProductPropertiesObjectStorageClassType, + PublicCatalogProductPropertiesObjectStorageInternetTrafficType, + PublicCatalogProductPropertiesObjectStorageRegionTrafficType, + PublicCatalogProductPropertiesObjectStorageRestoreType, PublicCatalogProductPropertiesAppleSilicon, PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, @@ -25,9 +32,11 @@ PublicCatalogProductPropertiesGenerativeApis, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, + PublicCatalogProductPropertiesKeyManager, PublicCatalogProductPropertiesLoadBalancer, PublicCatalogProductPropertiesManagedInference, PublicCatalogProductPropertiesObjectStorage, + PublicCatalogProductPropertiesSecretManager, PublicCatalogProductEnvironmentalImpactEstimation, PublicCatalogProductLocality, PublicCatalogProductPrice, @@ -277,6 +286,88 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage( return PublicCatalogProductPropertiesHardwareStorage(**args) +def unmarshal_PublicCatalogProductPropertiesObjectStorageClassType( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorageClassType: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageClassType' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("storage_class", None) + if field is not None: + args["storage_class"] = field + else: + args["storage_class"] = ( + PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass.UNKNOWN_STORAGE_CLASS + ) + + return PublicCatalogProductPropertiesObjectStorageClassType(**args) + + +def unmarshal_PublicCatalogProductPropertiesObjectStorageInternetTrafficType( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorageInternetTrafficType: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageInternetTrafficType' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("traffic_type", None) + if field is not None: + args["traffic_type"] = field + else: + args["traffic_type"] = ( + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType.UNKNOWN_TRAFFIC_TYPE + ) + + return PublicCatalogProductPropertiesObjectStorageInternetTrafficType(**args) + + +def unmarshal_PublicCatalogProductPropertiesObjectStorageRegionTrafficType( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorageRegionTrafficType: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRegionTrafficType' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("region_destination", None) + if field is not None: + args["region_destination"] = field + else: + args["region_destination"] = None + + return PublicCatalogProductPropertiesObjectStorageRegionTrafficType(**args) + + +def unmarshal_PublicCatalogProductPropertiesObjectStorageRestoreType( + data: Any, +) -> PublicCatalogProductPropertiesObjectStorageRestoreType: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRestoreType' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("restore_type", None) + if field is not None: + args["restore_type"] = field + else: + args["restore_type"] = ( + PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType.UNKNOWN_RESTORE_TYPE + ) + + return PublicCatalogProductPropertiesObjectStorageRestoreType(**args) + + def unmarshal_PublicCatalogProductPropertiesAppleSilicon( data: Any, ) -> PublicCatalogProductPropertiesAppleSilicon: @@ -482,6 +573,19 @@ def unmarshal_PublicCatalogProductPropertiesInstance( return PublicCatalogProductPropertiesInstance(**args) +def unmarshal_PublicCatalogProductPropertiesKeyManager( + data: Any, +) -> PublicCatalogProductPropertiesKeyManager: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesKeyManager' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return PublicCatalogProductPropertiesKeyManager(**args) + + def unmarshal_PublicCatalogProductPropertiesLoadBalancer( data: Any, ) -> PublicCatalogProductPropertiesLoadBalancer: @@ -524,9 +628,58 @@ def unmarshal_PublicCatalogProductPropertiesObjectStorage( args: dict[str, Any] = {} + field = data.get("class", None) + if field is not None: + args["class_"] = unmarshal_PublicCatalogProductPropertiesObjectStorageClassType( + field + ) + else: + args["class_"] = None + + field = data.get("restore", None) + if field is not None: + args["restore"] = ( + unmarshal_PublicCatalogProductPropertiesObjectStorageRestoreType(field) + ) + else: + args["restore"] = None + + field = data.get("internet_traffic", None) + if field is not None: + args["internet_traffic"] = ( + unmarshal_PublicCatalogProductPropertiesObjectStorageInternetTrafficType( + field + ) + ) + else: + args["internet_traffic"] = None + + field = data.get("region_traffic", None) + if field is not None: + args["region_traffic"] = ( + unmarshal_PublicCatalogProductPropertiesObjectStorageRegionTrafficType( + field + ) + ) + else: + args["region_traffic"] = None + return PublicCatalogProductPropertiesObjectStorage(**args) +def unmarshal_PublicCatalogProductPropertiesSecretManager( + data: Any, +) -> PublicCatalogProductPropertiesSecretManager: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesSecretManager' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + return PublicCatalogProductPropertiesSecretManager(**args) + + def unmarshal_PublicCatalogProductEnvironmentalImpactEstimation( data: Any, ) -> PublicCatalogProductEnvironmentalImpactEstimation: @@ -688,6 +841,20 @@ def unmarshal_PublicCatalogProductProperties( else: args["load_balancer"] = None + field = data.get("secret_manager", None) + if field is not None: + args["secret_manager"] = unmarshal_PublicCatalogProductPropertiesSecretManager( + field + ) + else: + args["secret_manager"] = None + + field = data.get("key_manager", None) + if field is not None: + args["key_manager"] = unmarshal_PublicCatalogProductPropertiesKeyManager(field) + else: + args["key_manager"] = None + return PublicCatalogProductProperties(**args) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index 11e99e34d..f06a04fab 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -28,6 +28,8 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe MANAGED_INFERENCE = "managed_inference" GENERATIVE_APIS = "generative_apis" LOAD_BALANCER = "load_balancer" + SECRET_MANAGER = "secret_manager" + KEY_MANAGER = "key_manager" def __str__(self) -> str: return str(self.value) @@ -83,6 +85,40 @@ def __str__(self) -> str: return str(self.value) +class PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass( + str, Enum, metaclass=StrEnumMeta +): + UNKNOWN_STORAGE_CLASS = "unknown_storage_class" + STANDARD = "standard" + GLACIER = "glacier" + ONEZONE_IA = "onezone_ia" + + def __str__(self) -> str: + return str(self.value) + + +class PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType( + str, Enum, metaclass=StrEnumMeta +): + UNKNOWN_TRAFFIC_TYPE = "unknown_traffic_type" + INGRESS = "ingress" + EGRESS = "egress" + ALLIANCE = "alliance" + + def __str__(self) -> str: + return str(self.value) + + +class PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType( + str, Enum, metaclass=StrEnumMeta +): + UNKNOWN_RESTORE_TYPE = "unknown_restore_type" + STANDARD = "standard" + + def __str__(self) -> str: + return str(self.value) + + class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta): UNKNOWN_STATUS = "unknown_status" PUBLIC_BETA = "public_beta" @@ -271,6 +307,40 @@ class PublicCatalogProductPropertiesHardwareStorage: """ +@dataclass +class PublicCatalogProductPropertiesObjectStorageClassType: + storage_class: PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass + """ + The storage class. + """ + + +@dataclass +class PublicCatalogProductPropertiesObjectStorageInternetTrafficType: + traffic_type: ( + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType + ) + """ + The type of internet traffic. + """ + + +@dataclass +class PublicCatalogProductPropertiesObjectStorageRegionTrafficType: + region_destination: str + """ + The destination region for the region traffic. + """ + + +@dataclass +class PublicCatalogProductPropertiesObjectStorageRestoreType: + restore_type: PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType + """ + The type of restore. + """ + + @dataclass class PublicCatalogProductPropertiesAppleSilicon: range: str @@ -376,6 +446,11 @@ class PublicCatalogProductPropertiesInstance: """ +@dataclass +class PublicCatalogProductPropertiesKeyManager: + pass + + @dataclass class PublicCatalogProductPropertiesLoadBalancer: pass @@ -391,6 +466,21 @@ class PublicCatalogProductPropertiesManagedInference: @dataclass class PublicCatalogProductPropertiesObjectStorage: + class_: Optional[PublicCatalogProductPropertiesObjectStorageClassType] = None + + restore: Optional[PublicCatalogProductPropertiesObjectStorageRestoreType] = None + + internet_traffic: Optional[ + PublicCatalogProductPropertiesObjectStorageInternetTrafficType + ] = None + + region_traffic: Optional[ + PublicCatalogProductPropertiesObjectStorageRegionTrafficType + ] = None + + +@dataclass +class PublicCatalogProductPropertiesSecretManager: pass @@ -444,6 +534,10 @@ class PublicCatalogProductProperties: load_balancer: Optional[PublicCatalogProductPropertiesLoadBalancer] = None + secret_manager: Optional[PublicCatalogProductPropertiesSecretManager] = None + + key_manager: Optional[PublicCatalogProductPropertiesKeyManager] = None + @dataclass class PublicCatalogProductUnitOfMeasure: