diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index 46226ce1f..25f12d788 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py @@ -2,6 +2,7 @@ # If you have any remark or suggestion do not hesitate to open an issue. from .types import ListPublicCatalogProductsRequestProductType from .types import ListPublicCatalogProductsRequestStatus +from .types import PublicCatalogProductProductBadge from .types import PublicCatalogProductPropertiesHardwareCPUArch from .types import PublicCatalogProductStatus from .types import PublicCatalogProductUnitOfMeasureCountableUnit @@ -16,6 +17,7 @@ from .types import PublicCatalogProductPropertiesBlockStorage from .types import PublicCatalogProductPropertiesDedibox from .types import PublicCatalogProductPropertiesElasticMetal +from .types import PublicCatalogProductPropertiesGenerativeApis from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance from .types import PublicCatalogProductPropertiesManagedInference @@ -33,6 +35,7 @@ __all__ = [ "ListPublicCatalogProductsRequestProductType", "ListPublicCatalogProductsRequestStatus", + "PublicCatalogProductProductBadge", "PublicCatalogProductPropertiesHardwareCPUArch", "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", @@ -47,6 +50,7 @@ "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", "PublicCatalogProductPropertiesElasticMetal", + "PublicCatalogProductPropertiesGenerativeApis", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", "PublicCatalogProductPropertiesManagedInference", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py index a77c9aed8..837aecbe8 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py @@ -8,6 +8,7 @@ unmarshal_Money, ) from .types import ( + PublicCatalogProductProductBadge, PublicCatalogProductPropertiesHardwareCPUArch, PublicCatalogProductStatus, PublicCatalogProductPropertiesHardwareCPUPhysical, @@ -21,6 +22,7 @@ PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, + PublicCatalogProductPropertiesGenerativeApis, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, PublicCatalogProductPropertiesManagedInference, @@ -374,6 +376,31 @@ def unmarshal_PublicCatalogProductPropertiesElasticMetal( return PublicCatalogProductPropertiesElasticMetal(**args) +def unmarshal_PublicCatalogProductPropertiesGenerativeApis( + data: Any, +) -> PublicCatalogProductPropertiesGenerativeApis: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesGenerativeApis' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("reasoning", None) + if field is not None: + args["reasoning"] = field + else: + args["reasoning"] = None + + field = data.get("supported_apis", None) + if field is not None: + args["supported_apis"] = field + else: + args["supported_apis"] = None + + return PublicCatalogProductPropertiesGenerativeApis(**args) + + def unmarshal_PublicCatalogProductPropertiesHardware( data: Any, ) -> PublicCatalogProductPropertiesHardware: @@ -625,6 +652,14 @@ def unmarshal_PublicCatalogProductProperties( else: args["managed_inference"] = None + field = data.get("generative_apis", None) + if field is not None: + args["generative_apis"] = ( + unmarshal_PublicCatalogProductPropertiesGenerativeApis(field) + ) + else: + args["generative_apis"] = None + return PublicCatalogProductProperties(**args) @@ -703,6 +738,16 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct: else: args["status"] = PublicCatalogProductStatus.UNKNOWN_STATUS + field = data.get("badges", None) + if field is not None: + args["badges"] = ( + [PublicCatalogProductProductBadge(v) for v in field] + if field is not None + else None + ) + else: + args["badges"] = [] + field = data.get("locality", None) if field is not None: args["locality"] = unmarshal_PublicCatalogProductLocality(field) diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py index a222d26f4..19585aafd 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -26,6 +26,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe BLOCK_STORAGE = "block_storage" OBJECT_STORAGE = "object_storage" MANAGED_INFERENCE = "managed_inference" + GENERATIVE_APIS = "generative_apis" def __str__(self) -> str: return str(self.value) @@ -46,6 +47,17 @@ def __str__(self) -> str: return str(self.value) +class PublicCatalogProductProductBadge(str, Enum, metaclass=StrEnumMeta): + UNKNOWN_PRODUCT_BADGE = "unknown_product_badge" + NEW_PRODUCT = "new_product" + BEST_SELLER = "best_seller" + BEST_VALUE = "best_value" + POPULAR = "popular" + + def __str__(self) -> str: + return str(self.value) + + class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta): UNKNOWN_ARCH = "unknown_arch" X64 = "x64" @@ -295,6 +307,12 @@ class PublicCatalogProductPropertiesElasticMetal: """ +@dataclass +class PublicCatalogProductPropertiesGenerativeApis: + reasoning: bool + supported_apis: list[str] + + @dataclass class PublicCatalogProductPropertiesHardware: cpu: Optional[PublicCatalogProductPropertiesHardwareCPU] = None @@ -400,6 +418,8 @@ class PublicCatalogProductProperties: managed_inference: Optional[PublicCatalogProductPropertiesManagedInference] = None + generative_apis: Optional[PublicCatalogProductPropertiesGenerativeApis] = None + @dataclass class PublicCatalogProductUnitOfMeasure: @@ -444,6 +464,11 @@ class PublicCatalogProduct: The status of the product. """ + badges: list[PublicCatalogProductProductBadge] + """ + Different badges that can be associated with the product. + """ + locality: Optional[PublicCatalogProductLocality] = None """ The locality of the product. diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index 46226ce1f..25f12d788 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py @@ -2,6 +2,7 @@ # If you have any remark or suggestion do not hesitate to open an issue. from .types import ListPublicCatalogProductsRequestProductType from .types import ListPublicCatalogProductsRequestStatus +from .types import PublicCatalogProductProductBadge from .types import PublicCatalogProductPropertiesHardwareCPUArch from .types import PublicCatalogProductStatus from .types import PublicCatalogProductUnitOfMeasureCountableUnit @@ -16,6 +17,7 @@ from .types import PublicCatalogProductPropertiesBlockStorage from .types import PublicCatalogProductPropertiesDedibox from .types import PublicCatalogProductPropertiesElasticMetal +from .types import PublicCatalogProductPropertiesGenerativeApis from .types import PublicCatalogProductPropertiesHardware from .types import PublicCatalogProductPropertiesInstance from .types import PublicCatalogProductPropertiesManagedInference @@ -33,6 +35,7 @@ __all__ = [ "ListPublicCatalogProductsRequestProductType", "ListPublicCatalogProductsRequestStatus", + "PublicCatalogProductProductBadge", "PublicCatalogProductPropertiesHardwareCPUArch", "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", @@ -47,6 +50,7 @@ "PublicCatalogProductPropertiesBlockStorage", "PublicCatalogProductPropertiesDedibox", "PublicCatalogProductPropertiesElasticMetal", + "PublicCatalogProductPropertiesGenerativeApis", "PublicCatalogProductPropertiesHardware", "PublicCatalogProductPropertiesInstance", "PublicCatalogProductPropertiesManagedInference", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py index a77c9aed8..837aecbe8 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/marshalling.py @@ -8,6 +8,7 @@ unmarshal_Money, ) from .types import ( + PublicCatalogProductProductBadge, PublicCatalogProductPropertiesHardwareCPUArch, PublicCatalogProductStatus, PublicCatalogProductPropertiesHardwareCPUPhysical, @@ -21,6 +22,7 @@ PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, + PublicCatalogProductPropertiesGenerativeApis, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesInstance, PublicCatalogProductPropertiesManagedInference, @@ -374,6 +376,31 @@ def unmarshal_PublicCatalogProductPropertiesElasticMetal( return PublicCatalogProductPropertiesElasticMetal(**args) +def unmarshal_PublicCatalogProductPropertiesGenerativeApis( + data: Any, +) -> PublicCatalogProductPropertiesGenerativeApis: + if not isinstance(data, dict): + raise TypeError( + "Unmarshalling the type 'PublicCatalogProductPropertiesGenerativeApis' failed as data isn't a dictionary." + ) + + args: dict[str, Any] = {} + + field = data.get("reasoning", None) + if field is not None: + args["reasoning"] = field + else: + args["reasoning"] = None + + field = data.get("supported_apis", None) + if field is not None: + args["supported_apis"] = field + else: + args["supported_apis"] = None + + return PublicCatalogProductPropertiesGenerativeApis(**args) + + def unmarshal_PublicCatalogProductPropertiesHardware( data: Any, ) -> PublicCatalogProductPropertiesHardware: @@ -625,6 +652,14 @@ def unmarshal_PublicCatalogProductProperties( else: args["managed_inference"] = None + field = data.get("generative_apis", None) + if field is not None: + args["generative_apis"] = ( + unmarshal_PublicCatalogProductPropertiesGenerativeApis(field) + ) + else: + args["generative_apis"] = None + return PublicCatalogProductProperties(**args) @@ -703,6 +738,16 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct: else: args["status"] = PublicCatalogProductStatus.UNKNOWN_STATUS + field = data.get("badges", None) + if field is not None: + args["badges"] = ( + [PublicCatalogProductProductBadge(v) for v in field] + if field is not None + else None + ) + else: + args["badges"] = [] + field = data.get("locality", None) if field is not None: args["locality"] = unmarshal_PublicCatalogProductLocality(field) diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index a222d26f4..19585aafd 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -26,6 +26,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe BLOCK_STORAGE = "block_storage" OBJECT_STORAGE = "object_storage" MANAGED_INFERENCE = "managed_inference" + GENERATIVE_APIS = "generative_apis" def __str__(self) -> str: return str(self.value) @@ -46,6 +47,17 @@ def __str__(self) -> str: return str(self.value) +class PublicCatalogProductProductBadge(str, Enum, metaclass=StrEnumMeta): + UNKNOWN_PRODUCT_BADGE = "unknown_product_badge" + NEW_PRODUCT = "new_product" + BEST_SELLER = "best_seller" + BEST_VALUE = "best_value" + POPULAR = "popular" + + def __str__(self) -> str: + return str(self.value) + + class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta): UNKNOWN_ARCH = "unknown_arch" X64 = "x64" @@ -295,6 +307,12 @@ class PublicCatalogProductPropertiesElasticMetal: """ +@dataclass +class PublicCatalogProductPropertiesGenerativeApis: + reasoning: bool + supported_apis: list[str] + + @dataclass class PublicCatalogProductPropertiesHardware: cpu: Optional[PublicCatalogProductPropertiesHardwareCPU] = None @@ -400,6 +418,8 @@ class PublicCatalogProductProperties: managed_inference: Optional[PublicCatalogProductPropertiesManagedInference] = None + generative_apis: Optional[PublicCatalogProductPropertiesGenerativeApis] = None + @dataclass class PublicCatalogProductUnitOfMeasure: @@ -444,6 +464,11 @@ class PublicCatalogProduct: The status of the product. """ + badges: list[PublicCatalogProductProductBadge] + """ + Different badges that can be associated with the product. + """ + locality: Optional[PublicCatalogProductLocality] = None """ The locality of the product.