diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index d4e903e68..323b1122a 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py @@ -1,6 +1,7 @@ # This file was automatically generated. DO NOT EDIT. # If you have any remark or suggestion do not hesitate to open an issue. from .types import PublicCatalogProductPropertiesHardwareCPUArch +from .types import PublicCatalogProductStatus from .types import PublicCatalogProductUnitOfMeasureCountableUnit from .types import PublicCatalogProductPropertiesHardwareCPUPhysical from .types import PublicCatalogProductPropertiesHardwareCPUVirtual @@ -26,6 +27,7 @@ __all__ = [ "PublicCatalogProductPropertiesHardwareCPUArch", + "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUPhysical", "PublicCatalogProductPropertiesHardwareCPUVirtual", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py index 1f0022d63..e1f552a6f 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py @@ -2,6 +2,7 @@ # If you have any remark or suggestion do not hesitate to open an issue. from typing import Any, Dict +from dateutil import parser from scaleway_core.bridge import ( unmarshal_Money, @@ -332,6 +333,14 @@ def unmarshal_PublicCatalogProductPropertiesInstance( if field is not None: args["range"] = field + field = data.get("offer_id", None) + if field is not None: + args["offer_id"] = field + + field = data.get("recommended_replacement_offer_ids", None) + if field is not None: + args["recommended_replacement_offer_ids"] = field + return PublicCatalogProductPropertiesInstance(**args) @@ -508,6 +517,10 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct: if field is not None: args["description"] = field + field = data.get("status", None) + if field is not None: + args["status"] = field + field = data.get("locality", None) if field is not None: args["locality"] = unmarshal_PublicCatalogProductLocality(field) @@ -540,6 +553,14 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct: else: args["unit_of_measure"] = None + field = data.get("end_of_life_at", None) + if field is not None: + args["end_of_life_at"] = ( + parser.isoparse(field) if isinstance(field, str) else field + ) + else: + args["end_of_life_at"] = None + return PublicCatalogProduct(**args) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py index 3e7a5e020..0e1043d8f 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -3,6 +3,7 @@ from __future__ import annotations from dataclasses import dataclass +from datetime import datetime from enum import Enum from typing import List, Optional @@ -27,6 +28,18 @@ def __str__(self) -> str: return str(self.value) +class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta): + UNKNOWN_STATUS = "unknown_status" + PUBLIC_BETA = "public_beta" + PREVIEW = "preview" + GENERAL_AVAILABILITY = "general_availability" + END_OF_DEPLOYMENT = "end_of_deployment" + END_OF_SUPPORT = "end_of_support" + + def __str__(self) -> str: + return str(self.value) + + class PublicCatalogProductUnitOfMeasureCountableUnit(str, Enum, metaclass=StrEnumMeta): UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit" CHUNK = "chunk" @@ -253,6 +266,16 @@ class PublicCatalogProductPropertiesInstance: The range of the Instance server. """ + offer_id: str + """ + The offer ID of the Instance server. + """ + + recommended_replacement_offer_ids: List[str] + """ + The recommended replacement offer IDs of the Instance server. + """ + @dataclass class PublicCatalogProductEnvironmentalImpactEstimation: @@ -330,6 +353,11 @@ class PublicCatalogProduct: The product description. """ + status: PublicCatalogProductStatus + """ + The status of the product. + """ + locality: Optional[PublicCatalogProductLocality] """ The locality of the product. @@ -357,6 +385,11 @@ class PublicCatalogProduct: The unit of measure of the product. """ + end_of_life_at: Optional[datetime] + """ + The end of life date of the product. + """ + @dataclass class ListPublicCatalogProductsResponse: diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index d4e903e68..323b1122a 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py @@ -1,6 +1,7 @@ # This file was automatically generated. DO NOT EDIT. # If you have any remark or suggestion do not hesitate to open an issue. from .types import PublicCatalogProductPropertiesHardwareCPUArch +from .types import PublicCatalogProductStatus from .types import PublicCatalogProductUnitOfMeasureCountableUnit from .types import PublicCatalogProductPropertiesHardwareCPUPhysical from .types import PublicCatalogProductPropertiesHardwareCPUVirtual @@ -26,6 +27,7 @@ __all__ = [ "PublicCatalogProductPropertiesHardwareCPUArch", + "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", "PublicCatalogProductPropertiesHardwareCPUPhysical", "PublicCatalogProductPropertiesHardwareCPUVirtual", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index 1f0022d63..e1f552a6f 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py @@ -2,6 +2,7 @@ # If you have any remark or suggestion do not hesitate to open an issue. from typing import Any, Dict +from dateutil import parser from scaleway_core.bridge import ( unmarshal_Money, @@ -332,6 +333,14 @@ def unmarshal_PublicCatalogProductPropertiesInstance( if field is not None: args["range"] = field + field = data.get("offer_id", None) + if field is not None: + args["offer_id"] = field + + field = data.get("recommended_replacement_offer_ids", None) + if field is not None: + args["recommended_replacement_offer_ids"] = field + return PublicCatalogProductPropertiesInstance(**args) @@ -508,6 +517,10 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct: if field is not None: args["description"] = field + field = data.get("status", None) + if field is not None: + args["status"] = field + field = data.get("locality", None) if field is not None: args["locality"] = unmarshal_PublicCatalogProductLocality(field) @@ -540,6 +553,14 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct: else: args["unit_of_measure"] = None + field = data.get("end_of_life_at", None) + if field is not None: + args["end_of_life_at"] = ( + parser.isoparse(field) if isinstance(field, str) else field + ) + else: + args["end_of_life_at"] = None + return PublicCatalogProduct(**args) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index 3e7a5e020..0e1043d8f 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -3,6 +3,7 @@ from __future__ import annotations from dataclasses import dataclass +from datetime import datetime from enum import Enum from typing import List, Optional @@ -27,6 +28,18 @@ def __str__(self) -> str: return str(self.value) +class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta): + UNKNOWN_STATUS = "unknown_status" + PUBLIC_BETA = "public_beta" + PREVIEW = "preview" + GENERAL_AVAILABILITY = "general_availability" + END_OF_DEPLOYMENT = "end_of_deployment" + END_OF_SUPPORT = "end_of_support" + + def __str__(self) -> str: + return str(self.value) + + class PublicCatalogProductUnitOfMeasureCountableUnit(str, Enum, metaclass=StrEnumMeta): UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit" CHUNK = "chunk" @@ -253,6 +266,16 @@ class PublicCatalogProductPropertiesInstance: The range of the Instance server. """ + offer_id: str + """ + The offer ID of the Instance server. + """ + + recommended_replacement_offer_ids: List[str] + """ + The recommended replacement offer IDs of the Instance server. + """ + @dataclass class PublicCatalogProductEnvironmentalImpactEstimation: @@ -330,6 +353,11 @@ class PublicCatalogProduct: The product description. """ + status: PublicCatalogProductStatus + """ + The status of the product. + """ + locality: Optional[PublicCatalogProductLocality] """ The locality of the product. @@ -357,6 +385,11 @@ class PublicCatalogProduct: The unit of measure of the product. """ + end_of_life_at: Optional[datetime] + """ + The end of life date of the product. + """ + @dataclass class ListPublicCatalogProductsResponse: