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,6 +1,7 @@
# 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 PublicCatalogProductPropertiesHardwareCPUArch
from .types import PublicCatalogProductStatus
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
from .types import PublicCatalogProductPropertiesHardwareCPUVirtual
Expand All @@ -26,6 +27,7 @@

__all__ = [
"PublicCatalogProductPropertiesHardwareCPUArch",
"PublicCatalogProductStatus",
"PublicCatalogProductUnitOfMeasureCountableUnit",
"PublicCatalogProductPropertiesHardwareCPUPhysical",
"PublicCatalogProductPropertiesHardwareCPUVirtual",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# If you have any remark or suggestion do not hesitate to open an issue.

from typing import Any, Dict
from dateutil import parser

from scaleway_core.bridge import (
unmarshal_Money,
Expand Down Expand Up @@ -332,6 +333,14 @@ def unmarshal_PublicCatalogProductPropertiesInstance(
if field is not None:
args["range"] = field

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

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

return PublicCatalogProductPropertiesInstance(**args)


Expand Down Expand Up @@ -508,6 +517,10 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct:
if field is not None:
args["description"] = field

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

field = data.get("locality", None)
if field is not None:
args["locality"] = unmarshal_PublicCatalogProductLocality(field)
Expand Down Expand Up @@ -540,6 +553,14 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct:
else:
args["unit_of_measure"] = None

field = data.get("end_of_life_at", None)
if field is not None:
args["end_of_life_at"] = (
parser.isoparse(field) if isinstance(field, str) else field
)
else:
args["end_of_life_at"] = None

return PublicCatalogProduct(**args)


Expand Down
33 changes: 33 additions & 0 deletions scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

from dataclasses import dataclass
from datetime import datetime
from enum import Enum
from typing import List, Optional

Expand All @@ -27,6 +28,18 @@ def __str__(self) -> str:
return str(self.value)


class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_STATUS = "unknown_status"
PUBLIC_BETA = "public_beta"
PREVIEW = "preview"
GENERAL_AVAILABILITY = "general_availability"
END_OF_DEPLOYMENT = "end_of_deployment"
END_OF_SUPPORT = "end_of_support"

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


class PublicCatalogProductUnitOfMeasureCountableUnit(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit"
CHUNK = "chunk"
Expand Down Expand Up @@ -253,6 +266,16 @@ class PublicCatalogProductPropertiesInstance:
The range of the Instance server.
"""

offer_id: str
"""
The offer ID of the Instance server.
"""

recommended_replacement_offer_ids: List[str]
"""
The recommended replacement offer IDs of the Instance server.
"""


@dataclass
class PublicCatalogProductEnvironmentalImpactEstimation:
Expand Down Expand Up @@ -330,6 +353,11 @@ class PublicCatalogProduct:
The product description.
"""

status: PublicCatalogProductStatus
"""
The status of the product.
"""

locality: Optional[PublicCatalogProductLocality]
"""
The locality of the product.
Expand Down Expand Up @@ -357,6 +385,11 @@ class PublicCatalogProduct:
The unit of measure of the product.
"""

end_of_life_at: Optional[datetime]
"""
The end of life date of the product.
"""


@dataclass
class ListPublicCatalogProductsResponse:
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
@@ -1,6 +1,7 @@
# 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 PublicCatalogProductPropertiesHardwareCPUArch
from .types import PublicCatalogProductStatus
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
from .types import PublicCatalogProductPropertiesHardwareCPUVirtual
Expand All @@ -26,6 +27,7 @@

__all__ = [
"PublicCatalogProductPropertiesHardwareCPUArch",
"PublicCatalogProductStatus",
"PublicCatalogProductUnitOfMeasureCountableUnit",
"PublicCatalogProductPropertiesHardwareCPUPhysical",
"PublicCatalogProductPropertiesHardwareCPUVirtual",
Expand Down
21 changes: 21 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# If you have any remark or suggestion do not hesitate to open an issue.

from typing import Any, Dict
from dateutil import parser

from scaleway_core.bridge import (
unmarshal_Money,
Expand Down Expand Up @@ -332,6 +333,14 @@ def unmarshal_PublicCatalogProductPropertiesInstance(
if field is not None:
args["range"] = field

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

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

return PublicCatalogProductPropertiesInstance(**args)


Expand Down Expand Up @@ -508,6 +517,10 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct:
if field is not None:
args["description"] = field

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

field = data.get("locality", None)
if field is not None:
args["locality"] = unmarshal_PublicCatalogProductLocality(field)
Expand Down Expand Up @@ -540,6 +553,14 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct:
else:
args["unit_of_measure"] = None

field = data.get("end_of_life_at", None)
if field is not None:
args["end_of_life_at"] = (
parser.isoparse(field) if isinstance(field, str) else field
)
else:
args["end_of_life_at"] = None

return PublicCatalogProduct(**args)


Expand Down
33 changes: 33 additions & 0 deletions scaleway/scaleway/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

from dataclasses import dataclass
from datetime import datetime
from enum import Enum
from typing import List, Optional

Expand All @@ -27,6 +28,18 @@ def __str__(self) -> str:
return str(self.value)


class PublicCatalogProductStatus(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_STATUS = "unknown_status"
PUBLIC_BETA = "public_beta"
PREVIEW = "preview"
GENERAL_AVAILABILITY = "general_availability"
END_OF_DEPLOYMENT = "end_of_deployment"
END_OF_SUPPORT = "end_of_support"

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


class PublicCatalogProductUnitOfMeasureCountableUnit(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit"
CHUNK = "chunk"
Expand Down Expand Up @@ -253,6 +266,16 @@ class PublicCatalogProductPropertiesInstance:
The range of the Instance server.
"""

offer_id: str
"""
The offer ID of the Instance server.
"""

recommended_replacement_offer_ids: List[str]
"""
The recommended replacement offer IDs of the Instance server.
"""


@dataclass
class PublicCatalogProductEnvironmentalImpactEstimation:
Expand Down Expand Up @@ -330,6 +353,11 @@ class PublicCatalogProduct:
The product description.
"""

status: PublicCatalogProductStatus
"""
The status of the product.
"""

locality: Optional[PublicCatalogProductLocality]
"""
The locality of the product.
Expand Down Expand Up @@ -357,6 +385,11 @@ class PublicCatalogProduct:
The unit of measure of the product.
"""

end_of_life_at: Optional[datetime]
"""
The end of life date of the product.
"""


@dataclass
class ListPublicCatalogProductsResponse:
Expand Down