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,5 @@
# 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 PublicCatalogProductPriceUnitOfMeasureCountableUnit
from .types import PublicCatalogProductPropertiesHardwareCPUArch
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
Expand All @@ -10,7 +9,6 @@
from .types import PublicCatalogProductPropertiesHardwareNetwork
from .types import PublicCatalogProductPropertiesHardwareRAM
from .types import PublicCatalogProductPropertiesHardwareStorage
from .types import PublicCatalogProductPriceUnitOfMeasure
from .types import PublicCatalogProductPropertiesAppleSilicon
from .types import PublicCatalogProductPropertiesDedibox
from .types import PublicCatalogProductPropertiesElasticMetal
Expand All @@ -27,7 +25,6 @@
from .api import ProductCatalogV2Alpha1PublicCatalogAPI

__all__ = [
"PublicCatalogProductPriceUnitOfMeasureCountableUnit",
"PublicCatalogProductPropertiesHardwareCPUArch",
"PublicCatalogProductUnitOfMeasureCountableUnit",
"PublicCatalogProductPropertiesHardwareCPUPhysical",
Expand All @@ -37,7 +34,6 @@
"PublicCatalogProductPropertiesHardwareNetwork",
"PublicCatalogProductPropertiesHardwareRAM",
"PublicCatalogProductPropertiesHardwareStorage",
"PublicCatalogProductPriceUnitOfMeasure",
"PublicCatalogProductPropertiesAppleSilicon",
"PublicCatalogProductPropertiesDedibox",
"PublicCatalogProductPropertiesElasticMetal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
PublicCatalogProductPropertiesHardwareNetwork,
PublicCatalogProductPropertiesHardwareRAM,
PublicCatalogProductPropertiesHardwareStorage,
PublicCatalogProductPriceUnitOfMeasure,
PublicCatalogProductPropertiesAppleSilicon,
PublicCatalogProductPropertiesDedibox,
PublicCatalogProductPropertiesElasticMetal,
Expand Down Expand Up @@ -225,27 +224,6 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage(
return PublicCatalogProductPropertiesHardwareStorage(**args)


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

args: Dict[str, Any] = {}

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

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

return PublicCatalogProductPriceUnitOfMeasure(**args)


def unmarshal_PublicCatalogProductPropertiesAppleSilicon(
data: Any,
) -> PublicCatalogProductPropertiesAppleSilicon:
Expand Down Expand Up @@ -431,14 +409,6 @@ def unmarshal_PublicCatalogProductPrice(data: Any) -> PublicCatalogProductPrice:
else:
args["retail_price"] = None

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

return PublicCatalogProductPrice(**args)


Expand Down
52 changes: 0 additions & 52 deletions scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,6 @@
)


class PublicCatalogProductPriceUnitOfMeasureCountableUnit(
str, Enum, metaclass=StrEnumMeta
):
UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit"
CHUNK = "chunk"
CORE = "core"
CURRENCY = "currency"
DEVICE = "device"
DOMAIN = "domain"
EMAIL = "email"
GB_S = "gb_s"
GIGABYTE = "gigabyte"
HOUR = "hour"
IOPS_GIGABYTE = "iops_gigabyte"
IP = "ip"
MONTH = "month"
NODE = "node"
PLAN = "plan"
QUERY = "query"
REQUEST = "request"
SESSION = "session"
VCPU_S = "vcpu_s"
VERSION = "version"
YEAR = "year"
KEY = "key"
TOKEN = "token"
MINUTE = "minute"
SETUP = "setup"
DAY = "day"

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


class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_ARCH = "unknown_arch"
X64 = "x64"
Expand Down Expand Up @@ -228,19 +194,6 @@ class PublicCatalogProductPropertiesHardwareStorage:
"""


@dataclass
class PublicCatalogProductPriceUnitOfMeasure:
unit: PublicCatalogProductPriceUnitOfMeasureCountableUnit
"""
The unit of measure.
"""

size: int
"""
The size of the unit.
"""


@dataclass
class PublicCatalogProductPropertiesAppleSilicon:
range: str
Expand Down Expand Up @@ -326,11 +279,6 @@ class PublicCatalogProductPrice:
The retail price of the product.
"""

unit_of_measure: Optional[PublicCatalogProductPriceUnitOfMeasure]
"""
The unit of measure of the price (deprecated).
"""


@dataclass
class PublicCatalogProductProperties:
Expand Down
4 changes: 0 additions & 4 deletions scaleway/scaleway/product_catalog/v2alpha1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# 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 PublicCatalogProductPriceUnitOfMeasureCountableUnit
from .types import PublicCatalogProductPropertiesHardwareCPUArch
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
Expand All @@ -10,7 +9,6 @@
from .types import PublicCatalogProductPropertiesHardwareNetwork
from .types import PublicCatalogProductPropertiesHardwareRAM
from .types import PublicCatalogProductPropertiesHardwareStorage
from .types import PublicCatalogProductPriceUnitOfMeasure
from .types import PublicCatalogProductPropertiesAppleSilicon
from .types import PublicCatalogProductPropertiesDedibox
from .types import PublicCatalogProductPropertiesElasticMetal
Expand All @@ -27,7 +25,6 @@
from .api import ProductCatalogV2Alpha1PublicCatalogAPI

__all__ = [
"PublicCatalogProductPriceUnitOfMeasureCountableUnit",
"PublicCatalogProductPropertiesHardwareCPUArch",
"PublicCatalogProductUnitOfMeasureCountableUnit",
"PublicCatalogProductPropertiesHardwareCPUPhysical",
Expand All @@ -37,7 +34,6 @@
"PublicCatalogProductPropertiesHardwareNetwork",
"PublicCatalogProductPropertiesHardwareRAM",
"PublicCatalogProductPropertiesHardwareStorage",
"PublicCatalogProductPriceUnitOfMeasure",
"PublicCatalogProductPropertiesAppleSilicon",
"PublicCatalogProductPropertiesDedibox",
"PublicCatalogProductPropertiesElasticMetal",
Expand Down
30 changes: 0 additions & 30 deletions scaleway/scaleway/product_catalog/v2alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
PublicCatalogProductPropertiesHardwareNetwork,
PublicCatalogProductPropertiesHardwareRAM,
PublicCatalogProductPropertiesHardwareStorage,
PublicCatalogProductPriceUnitOfMeasure,
PublicCatalogProductPropertiesAppleSilicon,
PublicCatalogProductPropertiesDedibox,
PublicCatalogProductPropertiesElasticMetal,
Expand Down Expand Up @@ -225,27 +224,6 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage(
return PublicCatalogProductPropertiesHardwareStorage(**args)


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

args: Dict[str, Any] = {}

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

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

return PublicCatalogProductPriceUnitOfMeasure(**args)


def unmarshal_PublicCatalogProductPropertiesAppleSilicon(
data: Any,
) -> PublicCatalogProductPropertiesAppleSilicon:
Expand Down Expand Up @@ -431,14 +409,6 @@ def unmarshal_PublicCatalogProductPrice(data: Any) -> PublicCatalogProductPrice:
else:
args["retail_price"] = None

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

return PublicCatalogProductPrice(**args)


Expand Down
52 changes: 0 additions & 52 deletions scaleway/scaleway/product_catalog/v2alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,6 @@
)


class PublicCatalogProductPriceUnitOfMeasureCountableUnit(
str, Enum, metaclass=StrEnumMeta
):
UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit"
CHUNK = "chunk"
CORE = "core"
CURRENCY = "currency"
DEVICE = "device"
DOMAIN = "domain"
EMAIL = "email"
GB_S = "gb_s"
GIGABYTE = "gigabyte"
HOUR = "hour"
IOPS_GIGABYTE = "iops_gigabyte"
IP = "ip"
MONTH = "month"
NODE = "node"
PLAN = "plan"
QUERY = "query"
REQUEST = "request"
SESSION = "session"
VCPU_S = "vcpu_s"
VERSION = "version"
YEAR = "year"
KEY = "key"
TOKEN = "token"
MINUTE = "minute"
SETUP = "setup"
DAY = "day"

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


class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta):
UNKNOWN_ARCH = "unknown_arch"
X64 = "x64"
Expand Down Expand Up @@ -228,19 +194,6 @@ class PublicCatalogProductPropertiesHardwareStorage:
"""


@dataclass
class PublicCatalogProductPriceUnitOfMeasure:
unit: PublicCatalogProductPriceUnitOfMeasureCountableUnit
"""
The unit of measure.
"""

size: int
"""
The size of the unit.
"""


@dataclass
class PublicCatalogProductPropertiesAppleSilicon:
range: str
Expand Down Expand Up @@ -326,11 +279,6 @@ class PublicCatalogProductPrice:
The retail price of the product.
"""

unit_of_measure: Optional[PublicCatalogProductPriceUnitOfMeasure]
"""
The unit of measure of the price (deprecated).
"""


@dataclass
class PublicCatalogProductProperties:
Expand Down