diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py index 22c30abd8..18c07338f 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 ListPublicCatalogProductsRequestProductType +from .types import ListPublicCatalogProductsRequestStatus from .types import PublicCatalogProductPropertiesHardwareCPUArch from .types import PublicCatalogProductStatus from .types import PublicCatalogProductUnitOfMeasureCountableUnit @@ -30,6 +31,7 @@ __all__ = [ "ListPublicCatalogProductsRequestProductType", + "ListPublicCatalogProductsRequestStatus", "PublicCatalogProductPropertiesHardwareCPUArch", "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/api.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/api.py index 204693c38..72e75adcb 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/api.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/api.py @@ -15,6 +15,7 @@ ) from .types import ( ListPublicCatalogProductsRequestProductType, + ListPublicCatalogProductsRequestStatus, ListPublicCatalogProductsResponse, PublicCatalogProduct, ) @@ -38,6 +39,7 @@ async def list_public_catalog_products( region: Optional[ScwRegion] = None, zone: Optional[ScwZone] = None, datacenter: Optional[str] = None, + status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None, ) -> ListPublicCatalogProductsResponse: """ List all available products. @@ -53,6 +55,7 @@ async def list_public_catalog_products( One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set. :param datacenter: Filter products by datacenter. One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set. + :param status: The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned. :return: :class:`ListPublicCatalogProductsResponse ` Usage: @@ -68,6 +71,7 @@ async def list_public_catalog_products( "page": page, "page_size": page_size or self.client.default_page_size, "product_types": product_types, + "status": status, **resolve_one_of( [ OneOfPossibility("datacenter", datacenter), @@ -94,6 +98,7 @@ async def list_public_catalog_products_all( region: Optional[ScwRegion] = None, zone: Optional[ScwZone] = None, datacenter: Optional[str] = None, + status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None, ) -> list[PublicCatalogProduct]: """ List all available products. @@ -109,6 +114,7 @@ async def list_public_catalog_products_all( One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set. :param datacenter: Filter products by datacenter. One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set. + :param status: The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned. :return: :class:`list[PublicCatalogProduct] ` Usage: @@ -125,6 +131,7 @@ async def list_public_catalog_products_all( "page": page, "page_size": page_size, "product_types": product_types, + "status": status, "global_": global_, "region": region, "zone": zone, diff --git a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py index 0f2906333..3318b2d5a 100644 --- a/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py +++ b/scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py @@ -30,6 +30,21 @@ def __str__(self) -> str: return str(self.value) +class ListPublicCatalogProductsRequestStatus(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" + END_OF_SALE = "end_of_sale" + END_OF_LIFE = "end_of_life" + RETIRED = "retired" + + def __str__(self) -> str: + return str(self.value) + + class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta): UNKNOWN_ARCH = "unknown_arch" X64 = "x64" @@ -49,6 +64,8 @@ class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta): END_OF_DEPLOYMENT = "end_of_deployment" END_OF_SUPPORT = "end_of_support" END_OF_SALE = "end_of_sale" + END_OF_LIFE = "end_of_life" + RETIRED = "retired" def __str__(self) -> str: return str(self.value) @@ -481,6 +498,13 @@ class PublicCatalogApiListPublicCatalogProductsRequest: The list of filtered product categories. """ + status: Optional[list[ListPublicCatalogProductsRequestStatus]] = field( + default_factory=list + ) + """ + The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned. + """ + global_: Optional[bool] = False region: Optional[ScwRegion] = None diff --git a/scaleway/scaleway/product_catalog/v2alpha1/__init__.py b/scaleway/scaleway/product_catalog/v2alpha1/__init__.py index 22c30abd8..18c07338f 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 ListPublicCatalogProductsRequestProductType +from .types import ListPublicCatalogProductsRequestStatus from .types import PublicCatalogProductPropertiesHardwareCPUArch from .types import PublicCatalogProductStatus from .types import PublicCatalogProductUnitOfMeasureCountableUnit @@ -30,6 +31,7 @@ __all__ = [ "ListPublicCatalogProductsRequestProductType", + "ListPublicCatalogProductsRequestStatus", "PublicCatalogProductPropertiesHardwareCPUArch", "PublicCatalogProductStatus", "PublicCatalogProductUnitOfMeasureCountableUnit", diff --git a/scaleway/scaleway/product_catalog/v2alpha1/api.py b/scaleway/scaleway/product_catalog/v2alpha1/api.py index 4a83a3710..9cafb5f30 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/api.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/api.py @@ -15,6 +15,7 @@ ) from .types import ( ListPublicCatalogProductsRequestProductType, + ListPublicCatalogProductsRequestStatus, ListPublicCatalogProductsResponse, PublicCatalogProduct, ) @@ -38,6 +39,7 @@ def list_public_catalog_products( region: Optional[ScwRegion] = None, zone: Optional[ScwZone] = None, datacenter: Optional[str] = None, + status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None, ) -> ListPublicCatalogProductsResponse: """ List all available products. @@ -53,6 +55,7 @@ def list_public_catalog_products( One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set. :param datacenter: Filter products by datacenter. One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set. + :param status: The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned. :return: :class:`ListPublicCatalogProductsResponse ` Usage: @@ -68,6 +71,7 @@ def list_public_catalog_products( "page": page, "page_size": page_size or self.client.default_page_size, "product_types": product_types, + "status": status, **resolve_one_of( [ OneOfPossibility("datacenter", datacenter), @@ -94,6 +98,7 @@ def list_public_catalog_products_all( region: Optional[ScwRegion] = None, zone: Optional[ScwZone] = None, datacenter: Optional[str] = None, + status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None, ) -> list[PublicCatalogProduct]: """ List all available products. @@ -109,6 +114,7 @@ def list_public_catalog_products_all( One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set. :param datacenter: Filter products by datacenter. One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set. + :param status: The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned. :return: :class:`list[PublicCatalogProduct] ` Usage: @@ -125,6 +131,7 @@ def list_public_catalog_products_all( "page": page, "page_size": page_size, "product_types": product_types, + "status": status, "global_": global_, "region": region, "zone": zone, diff --git a/scaleway/scaleway/product_catalog/v2alpha1/types.py b/scaleway/scaleway/product_catalog/v2alpha1/types.py index 0f2906333..3318b2d5a 100644 --- a/scaleway/scaleway/product_catalog/v2alpha1/types.py +++ b/scaleway/scaleway/product_catalog/v2alpha1/types.py @@ -30,6 +30,21 @@ def __str__(self) -> str: return str(self.value) +class ListPublicCatalogProductsRequestStatus(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" + END_OF_SALE = "end_of_sale" + END_OF_LIFE = "end_of_life" + RETIRED = "retired" + + def __str__(self) -> str: + return str(self.value) + + class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta): UNKNOWN_ARCH = "unknown_arch" X64 = "x64" @@ -49,6 +64,8 @@ class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta): END_OF_DEPLOYMENT = "end_of_deployment" END_OF_SUPPORT = "end_of_support" END_OF_SALE = "end_of_sale" + END_OF_LIFE = "end_of_life" + RETIRED = "retired" def __str__(self) -> str: return str(self.value) @@ -481,6 +498,13 @@ class PublicCatalogApiListPublicCatalogProductsRequest: The list of filtered product categories. """ + status: Optional[list[ListPublicCatalogProductsRequestStatus]] = field( + default_factory=list + ) + """ + The lists of filtered product status, if empty only products with status public_beta, general_availability, preview, end_of_deployment, end_of_support, end_of_sale, end_of_life or retired will be returned. + """ + global_: Optional[bool] = False region: Optional[ScwRegion] = None