Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 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 PublicCatalogProductPropertiesHardwareCPUArch
from .types import PublicCatalogProductStatus
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
Expand All @@ -26,6 +27,7 @@
from .api import ProductCatalogV2Alpha1PublicCatalogAPI

__all__ = [
"ListPublicCatalogProductsRequestProductType",
"PublicCatalogProductPropertiesHardwareCPUArch",
"PublicCatalogProductStatus",
"PublicCatalogProductUnitOfMeasureCountableUnit",
Expand Down
11 changes: 11 additions & 0 deletions scaleway-async/scaleway_async/product_catalog/v2alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
fetch_all_pages_async,
)
from .types import (
ListPublicCatalogProductsRequestProductType,
ListPublicCatalogProductsResponse,
PublicCatalogProduct,
)
Expand All @@ -24,12 +25,16 @@ async def list_public_catalog_products(
*,
page: Optional[int] = None,
page_size: Optional[int] = None,
product_types: Optional[
List[ListPublicCatalogProductsRequestProductType]
] = None,
) -> ListPublicCatalogProductsResponse:
"""
List all available products.
List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
:param page: Number of the page. Value must be greater or equal to 1.
:param page_size: The number of products per page. Value must be greater or equal to 1.
:param product_types: The list of filtered product categories.
:return: :class:`ListPublicCatalogProductsResponse <ListPublicCatalogProductsResponse>`

Usage:
Expand All @@ -44,6 +49,7 @@ async def list_public_catalog_products(
params={
"page": page,
"page_size": page_size or self.client.default_page_size,
"product_types": product_types,
},
)

Expand All @@ -55,12 +61,16 @@ async def list_public_catalog_products_all(
*,
page: Optional[int] = None,
page_size: Optional[int] = None,
product_types: Optional[
List[ListPublicCatalogProductsRequestProductType]
] = None,
) -> List[PublicCatalogProduct]:
"""
List all available products.
List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
:param page: Number of the page. Value must be greater or equal to 1.
:param page_size: The number of products per page. Value must be greater or equal to 1.
:param product_types: The list of filtered product categories.
:return: :class:`List[PublicCatalogProduct] <List[PublicCatalogProduct]>`

Usage:
Expand All @@ -76,5 +86,6 @@ async def list_public_catalog_products_all(
args={
"page": page,
"page_size": page_size,
"product_types": product_types,
},
)
16 changes: 16 additions & 0 deletions scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
)


class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_PRODUCT_TYPE = "unknown_product_type"
INSTANCE = "instance"
APPLE_SILICON = "apple_silicon"
ELASTIC_METAL = "elastic_metal"
DEDIBOX = "dedibox"

def __str__(self) -> str:
return str(self.value)


class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_ARCH = "unknown_arch"
X64 = "x64"
Expand Down Expand Up @@ -415,3 +426,8 @@ class PublicCatalogApiListPublicCatalogProductsRequest:
"""
The number of products per page. Value must be greater or equal to 1.
"""

product_types: Optional[List[ListPublicCatalogProductsRequestProductType]]
"""
The list of filtered product categories.
"""
2 changes: 2 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 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 PublicCatalogProductPropertiesHardwareCPUArch
from .types import PublicCatalogProductStatus
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
Expand All @@ -26,6 +27,7 @@
from .api import ProductCatalogV2Alpha1PublicCatalogAPI

__all__ = [
"ListPublicCatalogProductsRequestProductType",
"PublicCatalogProductPropertiesHardwareCPUArch",
"PublicCatalogProductStatus",
"PublicCatalogProductUnitOfMeasureCountableUnit",
Expand Down
11 changes: 11 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
fetch_all_pages,
)
from .types import (
ListPublicCatalogProductsRequestProductType,
ListPublicCatalogProductsResponse,
PublicCatalogProduct,
)
Expand All @@ -24,12 +25,16 @@ def list_public_catalog_products(
*,
page: Optional[int] = None,
page_size: Optional[int] = None,
product_types: Optional[
List[ListPublicCatalogProductsRequestProductType]
] = None,
) -> ListPublicCatalogProductsResponse:
"""
List all available products.
List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
:param page: Number of the page. Value must be greater or equal to 1.
:param page_size: The number of products per page. Value must be greater or equal to 1.
:param product_types: The list of filtered product categories.
:return: :class:`ListPublicCatalogProductsResponse <ListPublicCatalogProductsResponse>`

Usage:
Expand All @@ -44,6 +49,7 @@ def list_public_catalog_products(
params={
"page": page,
"page_size": page_size or self.client.default_page_size,
"product_types": product_types,
},
)

Expand All @@ -55,12 +61,16 @@ def list_public_catalog_products_all(
*,
page: Optional[int] = None,
page_size: Optional[int] = None,
product_types: Optional[
List[ListPublicCatalogProductsRequestProductType]
] = None,
) -> List[PublicCatalogProduct]:
"""
List all available products.
List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
:param page: Number of the page. Value must be greater or equal to 1.
:param page_size: The number of products per page. Value must be greater or equal to 1.
:param product_types: The list of filtered product categories.
:return: :class:`List[PublicCatalogProduct] <List[PublicCatalogProduct]>`

Usage:
Expand All @@ -76,5 +86,6 @@ def list_public_catalog_products_all(
args={
"page": page,
"page_size": page_size,
"product_types": product_types,
},
)
16 changes: 16 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
)


class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_PRODUCT_TYPE = "unknown_product_type"
INSTANCE = "instance"
APPLE_SILICON = "apple_silicon"
ELASTIC_METAL = "elastic_metal"
DEDIBOX = "dedibox"

def __str__(self) -> str:
return str(self.value)


class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_ARCH = "unknown_arch"
X64 = "x64"
Expand Down Expand Up @@ -415,3 +426,8 @@ class PublicCatalogApiListPublicCatalogProductsRequest:
"""
The number of products per page. Value must be greater or equal to 1.
"""

product_types: Optional[List[ListPublicCatalogProductsRequestProductType]]
"""
The list of filtered product categories.
"""