Skip to content
Open
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 @@ -18,6 +18,7 @@
from .types import PublicCatalogProductPropertiesElasticMetal
from .types import PublicCatalogProductPropertiesHardware
from .types import PublicCatalogProductPropertiesInstance
from .types import PublicCatalogProductPropertiesManagedInference
from .types import PublicCatalogProductPropertiesObjectStorage
from .types import PublicCatalogProductEnvironmentalImpactEstimation
from .types import PublicCatalogProductLocality
Expand Down Expand Up @@ -48,6 +49,7 @@
"PublicCatalogProductPropertiesElasticMetal",
"PublicCatalogProductPropertiesHardware",
"PublicCatalogProductPropertiesInstance",
"PublicCatalogProductPropertiesManagedInference",
"PublicCatalogProductPropertiesObjectStorage",
"PublicCatalogProductEnvironmentalImpactEstimation",
"PublicCatalogProductLocality",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
PublicCatalogProductPropertiesElasticMetal,
PublicCatalogProductPropertiesHardware,
PublicCatalogProductPropertiesInstance,
PublicCatalogProductPropertiesManagedInference,
PublicCatalogProductPropertiesObjectStorage,
PublicCatalogProductEnvironmentalImpactEstimation,
PublicCatalogProductLocality,
Expand Down Expand Up @@ -447,6 +448,25 @@ def unmarshal_PublicCatalogProductPropertiesInstance(
return PublicCatalogProductPropertiesInstance(**args)


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

args: dict[str, Any] = {}

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

return PublicCatalogProductPropertiesManagedInference(**args)


def unmarshal_PublicCatalogProductPropertiesObjectStorage(
data: Any,
) -> PublicCatalogProductPropertiesObjectStorage:
Expand Down Expand Up @@ -597,6 +617,14 @@ def unmarshal_PublicCatalogProductProperties(
else:
args["object_storage"] = None

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

return PublicCatalogProductProperties(**args)


Expand Down
11 changes: 11 additions & 0 deletions scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe
DEDIBOX = "dedibox"
BLOCK_STORAGE = "block_storage"
OBJECT_STORAGE = "object_storage"
MANAGED_INFERENCE = "managed_inference"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -340,6 +341,14 @@ class PublicCatalogProductPropertiesInstance:
"""


@dataclass
class PublicCatalogProductPropertiesManagedInference:
instance_gpu_name: str
"""
The name of the associated instance GPU to this node type.
"""


@dataclass
class PublicCatalogProductPropertiesObjectStorage:
pass
Expand Down Expand Up @@ -389,6 +398,8 @@ class PublicCatalogProductProperties:

object_storage: Optional[PublicCatalogProductPropertiesObjectStorage] = None

managed_inference: Optional[PublicCatalogProductPropertiesManagedInference] = 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 @@ -18,6 +18,7 @@
from .types import PublicCatalogProductPropertiesElasticMetal
from .types import PublicCatalogProductPropertiesHardware
from .types import PublicCatalogProductPropertiesInstance
from .types import PublicCatalogProductPropertiesManagedInference
from .types import PublicCatalogProductPropertiesObjectStorage
from .types import PublicCatalogProductEnvironmentalImpactEstimation
from .types import PublicCatalogProductLocality
Expand Down Expand Up @@ -48,6 +49,7 @@
"PublicCatalogProductPropertiesElasticMetal",
"PublicCatalogProductPropertiesHardware",
"PublicCatalogProductPropertiesInstance",
"PublicCatalogProductPropertiesManagedInference",
"PublicCatalogProductPropertiesObjectStorage",
"PublicCatalogProductEnvironmentalImpactEstimation",
"PublicCatalogProductLocality",
Expand Down
28 changes: 28 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
PublicCatalogProductPropertiesElasticMetal,
PublicCatalogProductPropertiesHardware,
PublicCatalogProductPropertiesInstance,
PublicCatalogProductPropertiesManagedInference,
PublicCatalogProductPropertiesObjectStorage,
PublicCatalogProductEnvironmentalImpactEstimation,
PublicCatalogProductLocality,
Expand Down Expand Up @@ -447,6 +448,25 @@ def unmarshal_PublicCatalogProductPropertiesInstance(
return PublicCatalogProductPropertiesInstance(**args)


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

args: dict[str, Any] = {}

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

return PublicCatalogProductPropertiesManagedInference(**args)


def unmarshal_PublicCatalogProductPropertiesObjectStorage(
data: Any,
) -> PublicCatalogProductPropertiesObjectStorage:
Expand Down Expand Up @@ -597,6 +617,14 @@ def unmarshal_PublicCatalogProductProperties(
else:
args["object_storage"] = None

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

return PublicCatalogProductProperties(**args)


Expand Down
11 changes: 11 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ListPublicCatalogProductsRequestProductType(str, Enum, metaclass=StrEnumMe
DEDIBOX = "dedibox"
BLOCK_STORAGE = "block_storage"
OBJECT_STORAGE = "object_storage"
MANAGED_INFERENCE = "managed_inference"

def __str__(self) -> str:
return str(self.value)
Expand Down Expand Up @@ -340,6 +341,14 @@ class PublicCatalogProductPropertiesInstance:
"""


@dataclass
class PublicCatalogProductPropertiesManagedInference:
instance_gpu_name: str
"""
The name of the associated instance GPU to this node type.
"""


@dataclass
class PublicCatalogProductPropertiesObjectStorage:
pass
Expand Down Expand Up @@ -389,6 +398,8 @@ class PublicCatalogProductProperties:

object_storage: Optional[PublicCatalogProductPropertiesObjectStorage] = None

managed_inference: Optional[PublicCatalogProductPropertiesManagedInference] = None


@dataclass
class PublicCatalogProductUnitOfMeasure:
Expand Down