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 @@ -5,6 +5,11 @@
from .types import PublicCatalogProductProductBadge
from .types import PublicCatalogProductPropertiesGenerativeApisConsumptionMode
from .types import PublicCatalogProductPropertiesHardwareCPUArch
from .types import PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass
from .types import (
PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType,
)
from .types import PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType
from .types import PublicCatalogProductStatus
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
Expand All @@ -14,6 +19,10 @@
from .types import PublicCatalogProductPropertiesHardwareNetwork
from .types import PublicCatalogProductPropertiesHardwareRAM
from .types import PublicCatalogProductPropertiesHardwareStorage
from .types import PublicCatalogProductPropertiesObjectStorageClassType
from .types import PublicCatalogProductPropertiesObjectStorageInternetTrafficType
from .types import PublicCatalogProductPropertiesObjectStorageRegionTrafficType
from .types import PublicCatalogProductPropertiesObjectStorageRestoreType
from .types import PublicCatalogProductPropertiesAppleSilicon
from .types import PublicCatalogProductPropertiesBlockStorage
from .types import PublicCatalogProductPropertiesDedibox
Expand Down Expand Up @@ -42,6 +51,9 @@
"PublicCatalogProductProductBadge",
"PublicCatalogProductPropertiesGenerativeApisConsumptionMode",
"PublicCatalogProductPropertiesHardwareCPUArch",
"PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass",
"PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType",
"PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType",
"PublicCatalogProductStatus",
"PublicCatalogProductUnitOfMeasureCountableUnit",
"PublicCatalogProductPropertiesHardwareCPUPhysical",
Expand All @@ -51,6 +63,10 @@
"PublicCatalogProductPropertiesHardwareNetwork",
"PublicCatalogProductPropertiesHardwareRAM",
"PublicCatalogProductPropertiesHardwareStorage",
"PublicCatalogProductPropertiesObjectStorageClassType",
"PublicCatalogProductPropertiesObjectStorageInternetTrafficType",
"PublicCatalogProductPropertiesObjectStorageRegionTrafficType",
"PublicCatalogProductPropertiesObjectStorageRestoreType",
"PublicCatalogProductPropertiesAppleSilicon",
"PublicCatalogProductPropertiesBlockStorage",
"PublicCatalogProductPropertiesDedibox",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from .types import (
PublicCatalogProductProductBadge,
PublicCatalogProductPropertiesHardwareCPUArch,
PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass,
PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType,
PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType,
PublicCatalogProductStatus,
PublicCatalogProductPropertiesHardwareCPUPhysical,
PublicCatalogProductPropertiesHardwareCPUVirtual,
Expand All @@ -18,6 +21,10 @@
PublicCatalogProductPropertiesHardwareNetwork,
PublicCatalogProductPropertiesHardwareRAM,
PublicCatalogProductPropertiesHardwareStorage,
PublicCatalogProductPropertiesObjectStorageClassType,
PublicCatalogProductPropertiesObjectStorageInternetTrafficType,
PublicCatalogProductPropertiesObjectStorageRegionTrafficType,
PublicCatalogProductPropertiesObjectStorageRestoreType,
PublicCatalogProductPropertiesAppleSilicon,
PublicCatalogProductPropertiesBlockStorage,
PublicCatalogProductPropertiesDedibox,
Expand Down Expand Up @@ -279,6 +286,88 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage(
return PublicCatalogProductPropertiesHardwareStorage(**args)


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

args: dict[str, Any] = {}

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

return PublicCatalogProductPropertiesObjectStorageClassType(**args)


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

args: dict[str, Any] = {}

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

return PublicCatalogProductPropertiesObjectStorageInternetTrafficType(**args)


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

args: dict[str, Any] = {}

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

return PublicCatalogProductPropertiesObjectStorageRegionTrafficType(**args)


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

args: dict[str, Any] = {}

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

return PublicCatalogProductPropertiesObjectStorageRestoreType(**args)


def unmarshal_PublicCatalogProductPropertiesAppleSilicon(
data: Any,
) -> PublicCatalogProductPropertiesAppleSilicon:
Expand Down Expand Up @@ -539,6 +628,42 @@ def unmarshal_PublicCatalogProductPropertiesObjectStorage(

args: dict[str, Any] = {}

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

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

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

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

return PublicCatalogProductPropertiesObjectStorage(**args)


Expand Down
83 changes: 83 additions & 0 deletions scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,40 @@ def __str__(self) -> str:
return str(self.value)


class PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass(
str, Enum, metaclass=StrEnumMeta
):
UNKNOWN_STORAGE_CLASS = "unknown_storage_class"
STANDARD = "standard"
GLACIER = "glacier"
ONEZONE_IA = "onezone_ia"

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


class PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType(
str, Enum, metaclass=StrEnumMeta
):
UNKNOWN_TRAFFIC_TYPE = "unknown_traffic_type"
INGRESS = "ingress"
EGRESS = "egress"
ALLIANCE = "alliance"

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


class PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType(
str, Enum, metaclass=StrEnumMeta
):
UNKNOWN_RESTORE_TYPE = "unknown_restore_type"
STANDARD = "standard"

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


class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_STATUS = "unknown_status"
PUBLIC_BETA = "public_beta"
Expand Down Expand Up @@ -273,6 +307,40 @@ class PublicCatalogProductPropertiesHardwareStorage:
"""


@dataclass
class PublicCatalogProductPropertiesObjectStorageClassType:
storage_class: PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass
"""
The storage class.
"""


@dataclass
class PublicCatalogProductPropertiesObjectStorageInternetTrafficType:
traffic_type: (
PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType
)
"""
The type of internet traffic.
"""


@dataclass
class PublicCatalogProductPropertiesObjectStorageRegionTrafficType:
region_destination: str
"""
The destination region for the region traffic.
"""


@dataclass
class PublicCatalogProductPropertiesObjectStorageRestoreType:
restore_type: PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType
"""
The type of restore.
"""


@dataclass
class PublicCatalogProductPropertiesAppleSilicon:
range: str
Expand Down Expand Up @@ -398,6 +466,21 @@ class PublicCatalogProductPropertiesManagedInference:

@dataclass
class PublicCatalogProductPropertiesObjectStorage:
class_: Optional[PublicCatalogProductPropertiesObjectStorageClassType] = None

restore: Optional[PublicCatalogProductPropertiesObjectStorageRestoreType] = None

internet_traffic: Optional[
PublicCatalogProductPropertiesObjectStorageInternetTrafficType
] = None

region_traffic: Optional[
PublicCatalogProductPropertiesObjectStorageRegionTrafficType
] = None


@dataclass
class PublicCatalogProductPropertiesSecretManager:
pass


Expand Down
16 changes: 16 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
from .types import PublicCatalogProductProductBadge
from .types import PublicCatalogProductPropertiesGenerativeApisConsumptionMode
from .types import PublicCatalogProductPropertiesHardwareCPUArch
from .types import PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass
from .types import (
PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType,
)
from .types import PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType
from .types import PublicCatalogProductStatus
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
Expand All @@ -14,6 +19,10 @@
from .types import PublicCatalogProductPropertiesHardwareNetwork
from .types import PublicCatalogProductPropertiesHardwareRAM
from .types import PublicCatalogProductPropertiesHardwareStorage
from .types import PublicCatalogProductPropertiesObjectStorageClassType
from .types import PublicCatalogProductPropertiesObjectStorageInternetTrafficType
from .types import PublicCatalogProductPropertiesObjectStorageRegionTrafficType
from .types import PublicCatalogProductPropertiesObjectStorageRestoreType
from .types import PublicCatalogProductPropertiesAppleSilicon
from .types import PublicCatalogProductPropertiesBlockStorage
from .types import PublicCatalogProductPropertiesDedibox
Expand Down Expand Up @@ -42,6 +51,9 @@
"PublicCatalogProductProductBadge",
"PublicCatalogProductPropertiesGenerativeApisConsumptionMode",
"PublicCatalogProductPropertiesHardwareCPUArch",
"PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass",
"PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType",
"PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType",
"PublicCatalogProductStatus",
"PublicCatalogProductUnitOfMeasureCountableUnit",
"PublicCatalogProductPropertiesHardwareCPUPhysical",
Expand All @@ -51,6 +63,10 @@
"PublicCatalogProductPropertiesHardwareNetwork",
"PublicCatalogProductPropertiesHardwareRAM",
"PublicCatalogProductPropertiesHardwareStorage",
"PublicCatalogProductPropertiesObjectStorageClassType",
"PublicCatalogProductPropertiesObjectStorageInternetTrafficType",
"PublicCatalogProductPropertiesObjectStorageRegionTrafficType",
"PublicCatalogProductPropertiesObjectStorageRestoreType",
"PublicCatalogProductPropertiesAppleSilicon",
"PublicCatalogProductPropertiesBlockStorage",
"PublicCatalogProductPropertiesDedibox",
Expand Down
Loading
Loading