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
Expand Up @@ -67,6 +67,7 @@
from .types import PublicCatalogProductPropertiesBlockStorage
from .types import PublicCatalogProductPropertiesDedibox
from .types import PublicCatalogProductPropertiesElasticMetal
from .types import PublicCatalogProductPropertiesFileStorage
from .types import PublicCatalogProductPropertiesGenerativeApis
from .types import PublicCatalogProductPropertiesHardware
from .types import PublicCatalogProductPropertiesInstance
Expand Down Expand Up @@ -155,6 +156,7 @@
"PublicCatalogProductPropertiesBlockStorage",
"PublicCatalogProductPropertiesDedibox",
"PublicCatalogProductPropertiesElasticMetal",
"PublicCatalogProductPropertiesFileStorage",
"PublicCatalogProductPropertiesGenerativeApis",
"PublicCatalogProductPropertiesHardware",
"PublicCatalogProductPropertiesInstance",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
PublicCatalogProductPropertiesBlockStorage,
PublicCatalogProductPropertiesDedibox,
PublicCatalogProductPropertiesElasticMetal,
PublicCatalogProductPropertiesFileStorage,
PublicCatalogProductPropertiesGenerativeApis,
PublicCatalogProductPropertiesHardware,
PublicCatalogProductPropertiesInstance,
Expand Down Expand Up @@ -1063,6 +1064,31 @@ def unmarshal_PublicCatalogProductPropertiesElasticMetal(
return PublicCatalogProductPropertiesElasticMetal(**args)


def unmarshal_PublicCatalogProductPropertiesFileStorage(
data: Any,
) -> PublicCatalogProductPropertiesFileStorage:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'PublicCatalogProductPropertiesFileStorage' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

field = data.get("min_size", None)
if field is not None:
args["min_size"] = field
else:
args["min_size"] = 0

field = data.get("max_size", None)
if field is not None:
args["max_size"] = field
else:
args["max_size"] = 0

return PublicCatalogProductPropertiesFileStorage(**args)


def unmarshal_PublicCatalogProductPropertiesGenerativeApis(
data: Any,
) -> PublicCatalogProductPropertiesGenerativeApis:
Expand Down Expand Up @@ -1915,6 +1941,14 @@ def unmarshal_PublicCatalogProductProperties(
else:
args["instance_local_ssd_storage"] = None

field = data.get("file_storage", None)
if field is not None:
args["file_storage"] = unmarshal_PublicCatalogProductPropertiesFileStorage(
field
)
else:
args["file_storage"] = None

return PublicCatalogProductProperties(**args)


Expand Down
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 @@ -41,6 +41,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe
OPEN_SEARCH = "open_search"
INSTANCE_LOCAL_SSD_SNAPSHOT = "instance_local_ssd_snapshot"
INSTANCE_LOCAL_SSD_STORAGE = "instance_local_ssd_storage"
FILE_STORAGE = "file_storage"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -730,6 +731,19 @@ class PublicCatalogProductPropertiesElasticMetal:
"""


@dataclass
class PublicCatalogProductPropertiesFileStorage:
min_size: int
"""
The minimum size of storage volume for this product in bytes.
"""

max_size: int
"""
The maximum size of storage volume for this product in bytes.
"""


@dataclass
class PublicCatalogProductPropertiesGenerativeApis:
reasoning: bool
Expand Down Expand Up @@ -1027,6 +1041,8 @@ class PublicCatalogProductProperties:
PublicCatalogProductPropertiesInstanceLocalSSDStorage
] = None

file_storage: Optional[PublicCatalogProductPropertiesFileStorage] = None


@dataclass
class PublicCatalogProductUnitOfMeasure:
Expand Down
2 changes: 2 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
from .types import PublicCatalogProductPropertiesBlockStorage
from .types import PublicCatalogProductPropertiesDedibox
from .types import PublicCatalogProductPropertiesElasticMetal
from .types import PublicCatalogProductPropertiesFileStorage
from .types import PublicCatalogProductPropertiesGenerativeApis
from .types import PublicCatalogProductPropertiesHardware
from .types import PublicCatalogProductPropertiesInstance
Expand Down Expand Up @@ -155,6 +156,7 @@
"PublicCatalogProductPropertiesBlockStorage",
"PublicCatalogProductPropertiesDedibox",
"PublicCatalogProductPropertiesElasticMetal",
"PublicCatalogProductPropertiesFileStorage",
"PublicCatalogProductPropertiesGenerativeApis",
"PublicCatalogProductPropertiesHardware",
"PublicCatalogProductPropertiesInstance",
Expand Down
34 changes: 34 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
PublicCatalogProductPropertiesBlockStorage,
PublicCatalogProductPropertiesDedibox,
PublicCatalogProductPropertiesElasticMetal,
PublicCatalogProductPropertiesFileStorage,
PublicCatalogProductPropertiesGenerativeApis,
PublicCatalogProductPropertiesHardware,
PublicCatalogProductPropertiesInstance,
Expand Down Expand Up @@ -1063,6 +1064,31 @@ def unmarshal_PublicCatalogProductPropertiesElasticMetal(
return PublicCatalogProductPropertiesElasticMetal(**args)


def unmarshal_PublicCatalogProductPropertiesFileStorage(
data: Any,
) -> PublicCatalogProductPropertiesFileStorage:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'PublicCatalogProductPropertiesFileStorage' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

field = data.get("min_size", None)
if field is not None:
args["min_size"] = field
else:
args["min_size"] = 0

field = data.get("max_size", None)
if field is not None:
args["max_size"] = field
else:
args["max_size"] = 0

return PublicCatalogProductPropertiesFileStorage(**args)


def unmarshal_PublicCatalogProductPropertiesGenerativeApis(
data: Any,
) -> PublicCatalogProductPropertiesGenerativeApis:
Expand Down Expand Up @@ -1915,6 +1941,14 @@ def unmarshal_PublicCatalogProductProperties(
else:
args["instance_local_ssd_storage"] = None

field = data.get("file_storage", None)
if field is not None:
args["file_storage"] = unmarshal_PublicCatalogProductPropertiesFileStorage(
field
)
else:
args["file_storage"] = None

return PublicCatalogProductProperties(**args)


Expand Down
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 @@ -41,6 +41,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe
OPEN_SEARCH = "open_search"
INSTANCE_LOCAL_SSD_SNAPSHOT = "instance_local_ssd_snapshot"
INSTANCE_LOCAL_SSD_STORAGE = "instance_local_ssd_storage"
FILE_STORAGE = "file_storage"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -730,6 +731,19 @@ class PublicCatalogProductPropertiesElasticMetal:
"""


@dataclass
class PublicCatalogProductPropertiesFileStorage:
min_size: int
"""
The minimum size of storage volume for this product in bytes.
"""

max_size: int
"""
The maximum size of storage volume for this product in bytes.
"""


@dataclass
class PublicCatalogProductPropertiesGenerativeApis:
reasoning: bool
Expand Down Expand Up @@ -1027,6 +1041,8 @@ class PublicCatalogProductProperties:
PublicCatalogProductPropertiesInstanceLocalSSDStorage
] = None

file_storage: Optional[PublicCatalogProductPropertiesFileStorage] = None


@dataclass
class PublicCatalogProductUnitOfMeasure:
Expand Down
Loading