Skip to content

Commit e262d6c

Browse files
feat(product_catalog): add support for ListPublicCatalogProductsRequestStatus (#1376)
Co-authored-by: Rémy Léone <[email protected]>
1 parent fbd90fb commit e262d6c

File tree

6 files changed

+66
-0
lines changed

6 files changed

+66
-0
lines changed

scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file was automatically generated. DO NOT EDIT.
22
# If you have any remark or suggestion do not hesitate to open an issue.
33
from .types import ListPublicCatalogProductsRequestProductType
4+
from .types import ListPublicCatalogProductsRequestStatus
45
from .types import PublicCatalogProductPropertiesHardwareCPUArch
56
from .types import PublicCatalogProductStatus
67
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
@@ -30,6 +31,7 @@
3031

3132
__all__ = [
3233
"ListPublicCatalogProductsRequestProductType",
34+
"ListPublicCatalogProductsRequestStatus",
3335
"PublicCatalogProductPropertiesHardwareCPUArch",
3436
"PublicCatalogProductStatus",
3537
"PublicCatalogProductUnitOfMeasureCountableUnit",

scaleway-async/scaleway_async/product_catalog/v2alpha1/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
)
1616
from .types import (
1717
ListPublicCatalogProductsRequestProductType,
18+
ListPublicCatalogProductsRequestStatus,
1819
ListPublicCatalogProductsResponse,
1920
PublicCatalogProduct,
2021
)
@@ -38,6 +39,7 @@ async def list_public_catalog_products(
3839
region: Optional[ScwRegion] = None,
3940
zone: Optional[ScwZone] = None,
4041
datacenter: Optional[str] = None,
42+
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None,
4143
) -> ListPublicCatalogProductsResponse:
4244
"""
4345
List all available products.
@@ -53,6 +55,7 @@ async def list_public_catalog_products(
5355
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
5456
:param datacenter: Filter products by datacenter.
5557
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
58+
: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.
5659
:return: :class:`ListPublicCatalogProductsResponse <ListPublicCatalogProductsResponse>`
5760
5861
Usage:
@@ -68,6 +71,7 @@ async def list_public_catalog_products(
6871
"page": page,
6972
"page_size": page_size or self.client.default_page_size,
7073
"product_types": product_types,
74+
"status": status,
7175
**resolve_one_of(
7276
[
7377
OneOfPossibility("datacenter", datacenter),
@@ -94,6 +98,7 @@ async def list_public_catalog_products_all(
9498
region: Optional[ScwRegion] = None,
9599
zone: Optional[ScwZone] = None,
96100
datacenter: Optional[str] = None,
101+
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None,
97102
) -> list[PublicCatalogProduct]:
98103
"""
99104
List all available products.
@@ -109,6 +114,7 @@ async def list_public_catalog_products_all(
109114
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
110115
:param datacenter: Filter products by datacenter.
111116
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
117+
: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.
112118
:return: :class:`list[PublicCatalogProduct] <list[PublicCatalogProduct]>`
113119
114120
Usage:
@@ -125,6 +131,7 @@ async def list_public_catalog_products_all(
125131
"page": page,
126132
"page_size": page_size,
127133
"product_types": product_types,
134+
"status": status,
128135
"global_": global_,
129136
"region": region,
130137
"zone": zone,

scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ def __str__(self) -> str:
3030
return str(self.value)
3131

3232

33+
class ListPublicCatalogProductsRequestStatus(str, Enum, metaclass=StrEnumMeta):
34+
UNKNOWN_STATUS = "unknown_status"
35+
PUBLIC_BETA = "public_beta"
36+
PREVIEW = "preview"
37+
GENERAL_AVAILABILITY = "general_availability"
38+
END_OF_DEPLOYMENT = "end_of_deployment"
39+
END_OF_SUPPORT = "end_of_support"
40+
END_OF_SALE = "end_of_sale"
41+
END_OF_LIFE = "end_of_life"
42+
RETIRED = "retired"
43+
44+
def __str__(self) -> str:
45+
return str(self.value)
46+
47+
3348
class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta):
3449
UNKNOWN_ARCH = "unknown_arch"
3550
X64 = "x64"
@@ -49,6 +64,8 @@ class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta):
4964
END_OF_DEPLOYMENT = "end_of_deployment"
5065
END_OF_SUPPORT = "end_of_support"
5166
END_OF_SALE = "end_of_sale"
67+
END_OF_LIFE = "end_of_life"
68+
RETIRED = "retired"
5269

5370
def __str__(self) -> str:
5471
return str(self.value)
@@ -481,6 +498,13 @@ class PublicCatalogApiListPublicCatalogProductsRequest:
481498
The list of filtered product categories.
482499
"""
483500

501+
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = field(
502+
default_factory=list
503+
)
504+
"""
505+
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.
506+
"""
507+
484508
global_: Optional[bool] = False
485509

486510
region: Optional[ScwRegion] = None

scaleway/scaleway/product_catalog/v2alpha1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file was automatically generated. DO NOT EDIT.
22
# If you have any remark or suggestion do not hesitate to open an issue.
33
from .types import ListPublicCatalogProductsRequestProductType
4+
from .types import ListPublicCatalogProductsRequestStatus
45
from .types import PublicCatalogProductPropertiesHardwareCPUArch
56
from .types import PublicCatalogProductStatus
67
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
@@ -30,6 +31,7 @@
3031

3132
__all__ = [
3233
"ListPublicCatalogProductsRequestProductType",
34+
"ListPublicCatalogProductsRequestStatus",
3335
"PublicCatalogProductPropertiesHardwareCPUArch",
3436
"PublicCatalogProductStatus",
3537
"PublicCatalogProductUnitOfMeasureCountableUnit",

scaleway/scaleway/product_catalog/v2alpha1/api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
)
1616
from .types import (
1717
ListPublicCatalogProductsRequestProductType,
18+
ListPublicCatalogProductsRequestStatus,
1819
ListPublicCatalogProductsResponse,
1920
PublicCatalogProduct,
2021
)
@@ -38,6 +39,7 @@ def list_public_catalog_products(
3839
region: Optional[ScwRegion] = None,
3940
zone: Optional[ScwZone] = None,
4041
datacenter: Optional[str] = None,
42+
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None,
4143
) -> ListPublicCatalogProductsResponse:
4244
"""
4345
List all available products.
@@ -53,6 +55,7 @@ def list_public_catalog_products(
5355
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
5456
:param datacenter: Filter products by datacenter.
5557
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
58+
: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.
5659
:return: :class:`ListPublicCatalogProductsResponse <ListPublicCatalogProductsResponse>`
5760
5861
Usage:
@@ -68,6 +71,7 @@ def list_public_catalog_products(
6871
"page": page,
6972
"page_size": page_size or self.client.default_page_size,
7073
"product_types": product_types,
74+
"status": status,
7175
**resolve_one_of(
7276
[
7377
OneOfPossibility("datacenter", datacenter),
@@ -94,6 +98,7 @@ def list_public_catalog_products_all(
9498
region: Optional[ScwRegion] = None,
9599
zone: Optional[ScwZone] = None,
96100
datacenter: Optional[str] = None,
101+
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = None,
97102
) -> list[PublicCatalogProduct]:
98103
"""
99104
List all available products.
@@ -109,6 +114,7 @@ def list_public_catalog_products_all(
109114
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
110115
:param datacenter: Filter products by datacenter.
111116
One-Of ('locality'): at most one of 'global_', 'region', 'zone', 'datacenter' could be set.
117+
: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.
112118
:return: :class:`list[PublicCatalogProduct] <list[PublicCatalogProduct]>`
113119
114120
Usage:
@@ -125,6 +131,7 @@ def list_public_catalog_products_all(
125131
"page": page,
126132
"page_size": page_size,
127133
"product_types": product_types,
134+
"status": status,
128135
"global_": global_,
129136
"region": region,
130137
"zone": zone,

scaleway/scaleway/product_catalog/v2alpha1/types.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ def __str__(self) -> str:
3030
return str(self.value)
3131

3232

33+
class ListPublicCatalogProductsRequestStatus(str, Enum, metaclass=StrEnumMeta):
34+
UNKNOWN_STATUS = "unknown_status"
35+
PUBLIC_BETA = "public_beta"
36+
PREVIEW = "preview"
37+
GENERAL_AVAILABILITY = "general_availability"
38+
END_OF_DEPLOYMENT = "end_of_deployment"
39+
END_OF_SUPPORT = "end_of_support"
40+
END_OF_SALE = "end_of_sale"
41+
END_OF_LIFE = "end_of_life"
42+
RETIRED = "retired"
43+
44+
def __str__(self) -> str:
45+
return str(self.value)
46+
47+
3348
class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta):
3449
UNKNOWN_ARCH = "unknown_arch"
3550
X64 = "x64"
@@ -49,6 +64,8 @@ class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta):
4964
END_OF_DEPLOYMENT = "end_of_deployment"
5065
END_OF_SUPPORT = "end_of_support"
5166
END_OF_SALE = "end_of_sale"
67+
END_OF_LIFE = "end_of_life"
68+
RETIRED = "retired"
5269

5370
def __str__(self) -> str:
5471
return str(self.value)
@@ -481,6 +498,13 @@ class PublicCatalogApiListPublicCatalogProductsRequest:
481498
The list of filtered product categories.
482499
"""
483500

501+
status: Optional[list[ListPublicCatalogProductsRequestStatus]] = field(
502+
default_factory=list
503+
)
504+
"""
505+
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.
506+
"""
507+
484508
global_: Optional[bool] = False
485509

486510
region: Optional[ScwRegion] = None

0 commit comments

Comments
 (0)