diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index 1e1d3d682..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 @@ -42,6 +51,9 @@ "PublicCatalogProductProductBadge", "PublicCatalogProductPropertiesGenerativeApisConsumptionMode", "PublicCatalogProductPropertiesHardwareCPUArch", + "PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass", + "PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType", + "PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType", "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUPhysical", @@ -51,6 +63,10 @@ "PublicCatalogProductPropertiesHardwareNetwork", "PublicCatalogProductPropertiesHardwareRAM", "PublicCatalogProductPropertiesHardwareStorage", + "PublicCatalogProductPropertiesObjectStorageClassType", + "PublicCatalogProductPropertiesObjectStorageInternetTrafficType", + "PublicCatalogProductPropertiesObjectStorageRegionTrafficType", + "PublicCatalogProductPropertiesObjectStorageRestoreType", "PublicCatalogProductPropertiesAppleSilicon", "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py index 0ed2e51b3..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, @@ -279,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: @@ -539,6 +628,42 @@ 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) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py index 9b1de8d2b..91dfc9629 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -85,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" @@ -273,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 @@ -398,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 diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index 1e1d3d682..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 @@ -42,6 +51,9 @@ "PublicCatalogProductProductBadge", "PublicCatalogProductPropertiesGenerativeApisConsumptionMode", "PublicCatalogProductPropertiesHardwareCPUArch", + "PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass", + "PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType", + "PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType", "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUPhysical", @@ -51,6 +63,10 @@ "PublicCatalogProductPropertiesHardwareNetwork", "PublicCatalogProductPropertiesHardwareRAM", "PublicCatalogProductPropertiesHardwareStorage", + "PublicCatalogProductPropertiesObjectStorageClassType", + "PublicCatalogProductPropertiesObjectStorageInternetTrafficType", + "PublicCatalogProductPropertiesObjectStorageRegionTrafficType", + "PublicCatalogProductPropertiesObjectStorageRestoreType", "PublicCatalogProductPropertiesAppleSilicon", "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index 0ed2e51b3..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, @@ -279,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: @@ -539,6 +628,42 @@ 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) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index 9b1de8d2b..91dfc9629 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -85,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" @@ -273,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 @@ -398,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