Skip to content

Commit 1158be9

Browse files
authored
feat(product_catalog): remove deprecated fields (#967)
1 parent c66ac07 commit 1158be9

File tree

6 files changed

+0
-172
lines changed

6 files changed

+0
-172
lines changed

scaleway-async/scaleway_async/product_catalog/v2alpha1/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# This file was automatically generated. DO NOT EDIT.
22
# If you have any remark or suggestion do not hesitate to open an issue.
3-
from .types import PublicCatalogProductPriceUnitOfMeasureCountableUnit
43
from .types import PublicCatalogProductPropertiesHardwareCPUArch
54
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
65
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
@@ -10,7 +9,6 @@
109
from .types import PublicCatalogProductPropertiesHardwareNetwork
1110
from .types import PublicCatalogProductPropertiesHardwareRAM
1211
from .types import PublicCatalogProductPropertiesHardwareStorage
13-
from .types import PublicCatalogProductPriceUnitOfMeasure
1412
from .types import PublicCatalogProductPropertiesAppleSilicon
1513
from .types import PublicCatalogProductPropertiesDedibox
1614
from .types import PublicCatalogProductPropertiesElasticMetal
@@ -27,7 +25,6 @@
2725
from .api import ProductCatalogV2Alpha1PublicCatalogAPI
2826

2927
__all__ = [
30-
"PublicCatalogProductPriceUnitOfMeasureCountableUnit",
3128
"PublicCatalogProductPropertiesHardwareCPUArch",
3229
"PublicCatalogProductUnitOfMeasureCountableUnit",
3330
"PublicCatalogProductPropertiesHardwareCPUPhysical",
@@ -37,7 +34,6 @@
3734
"PublicCatalogProductPropertiesHardwareNetwork",
3835
"PublicCatalogProductPropertiesHardwareRAM",
3936
"PublicCatalogProductPropertiesHardwareStorage",
40-
"PublicCatalogProductPriceUnitOfMeasure",
4137
"PublicCatalogProductPropertiesAppleSilicon",
4238
"PublicCatalogProductPropertiesDedibox",
4339
"PublicCatalogProductPropertiesElasticMetal",

scaleway-async/scaleway_async/product_catalog/v2alpha1/marshalling.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
PublicCatalogProductPropertiesHardwareNetwork,
1515
PublicCatalogProductPropertiesHardwareRAM,
1616
PublicCatalogProductPropertiesHardwareStorage,
17-
PublicCatalogProductPriceUnitOfMeasure,
1817
PublicCatalogProductPropertiesAppleSilicon,
1918
PublicCatalogProductPropertiesDedibox,
2019
PublicCatalogProductPropertiesElasticMetal,
@@ -225,27 +224,6 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage(
225224
return PublicCatalogProductPropertiesHardwareStorage(**args)
226225

227226

228-
def unmarshal_PublicCatalogProductPriceUnitOfMeasure(
229-
data: Any,
230-
) -> PublicCatalogProductPriceUnitOfMeasure:
231-
if not isinstance(data, dict):
232-
raise TypeError(
233-
"Unmarshalling the type 'PublicCatalogProductPriceUnitOfMeasure' failed as data isn't a dictionary."
234-
)
235-
236-
args: Dict[str, Any] = {}
237-
238-
field = data.get("unit", None)
239-
if field is not None:
240-
args["unit"] = field
241-
242-
field = data.get("size", None)
243-
if field is not None:
244-
args["size"] = field
245-
246-
return PublicCatalogProductPriceUnitOfMeasure(**args)
247-
248-
249227
def unmarshal_PublicCatalogProductPropertiesAppleSilicon(
250228
data: Any,
251229
) -> PublicCatalogProductPropertiesAppleSilicon:
@@ -431,14 +409,6 @@ def unmarshal_PublicCatalogProductPrice(data: Any) -> PublicCatalogProductPrice:
431409
else:
432410
args["retail_price"] = None
433411

434-
field = data.get("unit_of_measure", None)
435-
if field is not None:
436-
args["unit_of_measure"] = unmarshal_PublicCatalogProductPriceUnitOfMeasure(
437-
field
438-
)
439-
else:
440-
args["unit_of_measure"] = None
441-
442412
return PublicCatalogProductPrice(**args)
443413

444414

scaleway-async/scaleway_async/product_catalog/v2alpha1/types.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,6 @@
1616
)
1717

1818

19-
class PublicCatalogProductPriceUnitOfMeasureCountableUnit(
20-
str, Enum, metaclass=StrEnumMeta
21-
):
22-
UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit"
23-
CHUNK = "chunk"
24-
CORE = "core"
25-
CURRENCY = "currency"
26-
DEVICE = "device"
27-
DOMAIN = "domain"
28-
EMAIL = "email"
29-
GB_S = "gb_s"
30-
GIGABYTE = "gigabyte"
31-
HOUR = "hour"
32-
IOPS_GIGABYTE = "iops_gigabyte"
33-
IP = "ip"
34-
MONTH = "month"
35-
NODE = "node"
36-
PLAN = "plan"
37-
QUERY = "query"
38-
REQUEST = "request"
39-
SESSION = "session"
40-
VCPU_S = "vcpu_s"
41-
VERSION = "version"
42-
YEAR = "year"
43-
KEY = "key"
44-
TOKEN = "token"
45-
MINUTE = "minute"
46-
SETUP = "setup"
47-
DAY = "day"
48-
49-
def __str__(self) -> str:
50-
return str(self.value)
51-
52-
5319
class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta):
5420
UNKNOWN_ARCH = "unknown_arch"
5521
X64 = "x64"
@@ -228,19 +194,6 @@ class PublicCatalogProductPropertiesHardwareStorage:
228194
"""
229195

230196

231-
@dataclass
232-
class PublicCatalogProductPriceUnitOfMeasure:
233-
unit: PublicCatalogProductPriceUnitOfMeasureCountableUnit
234-
"""
235-
The unit of measure.
236-
"""
237-
238-
size: int
239-
"""
240-
The size of the unit.
241-
"""
242-
243-
244197
@dataclass
245198
class PublicCatalogProductPropertiesAppleSilicon:
246199
range: str
@@ -326,11 +279,6 @@ class PublicCatalogProductPrice:
326279
The retail price of the product.
327280
"""
328281

329-
unit_of_measure: Optional[PublicCatalogProductPriceUnitOfMeasure]
330-
"""
331-
The unit of measure of the price (deprecated).
332-
"""
333-
334282

335283
@dataclass
336284
class PublicCatalogProductProperties:

scaleway/scaleway/product_catalog/v2alpha1/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# This file was automatically generated. DO NOT EDIT.
22
# If you have any remark or suggestion do not hesitate to open an issue.
3-
from .types import PublicCatalogProductPriceUnitOfMeasureCountableUnit
43
from .types import PublicCatalogProductPropertiesHardwareCPUArch
54
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
65
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
@@ -10,7 +9,6 @@
109
from .types import PublicCatalogProductPropertiesHardwareNetwork
1110
from .types import PublicCatalogProductPropertiesHardwareRAM
1211
from .types import PublicCatalogProductPropertiesHardwareStorage
13-
from .types import PublicCatalogProductPriceUnitOfMeasure
1412
from .types import PublicCatalogProductPropertiesAppleSilicon
1513
from .types import PublicCatalogProductPropertiesDedibox
1614
from .types import PublicCatalogProductPropertiesElasticMetal
@@ -27,7 +25,6 @@
2725
from .api import ProductCatalogV2Alpha1PublicCatalogAPI
2826

2927
__all__ = [
30-
"PublicCatalogProductPriceUnitOfMeasureCountableUnit",
3128
"PublicCatalogProductPropertiesHardwareCPUArch",
3229
"PublicCatalogProductUnitOfMeasureCountableUnit",
3330
"PublicCatalogProductPropertiesHardwareCPUPhysical",
@@ -37,7 +34,6 @@
3734
"PublicCatalogProductPropertiesHardwareNetwork",
3835
"PublicCatalogProductPropertiesHardwareRAM",
3936
"PublicCatalogProductPropertiesHardwareStorage",
40-
"PublicCatalogProductPriceUnitOfMeasure",
4137
"PublicCatalogProductPropertiesAppleSilicon",
4238
"PublicCatalogProductPropertiesDedibox",
4339
"PublicCatalogProductPropertiesElasticMetal",

scaleway/scaleway/product_catalog/v2alpha1/marshalling.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
PublicCatalogProductPropertiesHardwareNetwork,
1515
PublicCatalogProductPropertiesHardwareRAM,
1616
PublicCatalogProductPropertiesHardwareStorage,
17-
PublicCatalogProductPriceUnitOfMeasure,
1817
PublicCatalogProductPropertiesAppleSilicon,
1918
PublicCatalogProductPropertiesDedibox,
2019
PublicCatalogProductPropertiesElasticMetal,
@@ -225,27 +224,6 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage(
225224
return PublicCatalogProductPropertiesHardwareStorage(**args)
226225

227226

228-
def unmarshal_PublicCatalogProductPriceUnitOfMeasure(
229-
data: Any,
230-
) -> PublicCatalogProductPriceUnitOfMeasure:
231-
if not isinstance(data, dict):
232-
raise TypeError(
233-
"Unmarshalling the type 'PublicCatalogProductPriceUnitOfMeasure' failed as data isn't a dictionary."
234-
)
235-
236-
args: Dict[str, Any] = {}
237-
238-
field = data.get("unit", None)
239-
if field is not None:
240-
args["unit"] = field
241-
242-
field = data.get("size", None)
243-
if field is not None:
244-
args["size"] = field
245-
246-
return PublicCatalogProductPriceUnitOfMeasure(**args)
247-
248-
249227
def unmarshal_PublicCatalogProductPropertiesAppleSilicon(
250228
data: Any,
251229
) -> PublicCatalogProductPropertiesAppleSilicon:
@@ -431,14 +409,6 @@ def unmarshal_PublicCatalogProductPrice(data: Any) -> PublicCatalogProductPrice:
431409
else:
432410
args["retail_price"] = None
433411

434-
field = data.get("unit_of_measure", None)
435-
if field is not None:
436-
args["unit_of_measure"] = unmarshal_PublicCatalogProductPriceUnitOfMeasure(
437-
field
438-
)
439-
else:
440-
args["unit_of_measure"] = None
441-
442412
return PublicCatalogProductPrice(**args)
443413

444414

scaleway/scaleway/product_catalog/v2alpha1/types.py

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,6 @@
1616
)
1717

1818

19-
class PublicCatalogProductPriceUnitOfMeasureCountableUnit(
20-
str, Enum, metaclass=StrEnumMeta
21-
):
22-
UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit"
23-
CHUNK = "chunk"
24-
CORE = "core"
25-
CURRENCY = "currency"
26-
DEVICE = "device"
27-
DOMAIN = "domain"
28-
EMAIL = "email"
29-
GB_S = "gb_s"
30-
GIGABYTE = "gigabyte"
31-
HOUR = "hour"
32-
IOPS_GIGABYTE = "iops_gigabyte"
33-
IP = "ip"
34-
MONTH = "month"
35-
NODE = "node"
36-
PLAN = "plan"
37-
QUERY = "query"
38-
REQUEST = "request"
39-
SESSION = "session"
40-
VCPU_S = "vcpu_s"
41-
VERSION = "version"
42-
YEAR = "year"
43-
KEY = "key"
44-
TOKEN = "token"
45-
MINUTE = "minute"
46-
SETUP = "setup"
47-
DAY = "day"
48-
49-
def __str__(self) -> str:
50-
return str(self.value)
51-
52-
5319
class PublicCatalogProductPropertiesHardwareCPUArch(str, Enum, metaclass=StrEnumMeta):
5420
UNKNOWN_ARCH = "unknown_arch"
5521
X64 = "x64"
@@ -228,19 +194,6 @@ class PublicCatalogProductPropertiesHardwareStorage:
228194
"""
229195

230196

231-
@dataclass
232-
class PublicCatalogProductPriceUnitOfMeasure:
233-
unit: PublicCatalogProductPriceUnitOfMeasureCountableUnit
234-
"""
235-
The unit of measure.
236-
"""
237-
238-
size: int
239-
"""
240-
The size of the unit.
241-
"""
242-
243-
244197
@dataclass
245198
class PublicCatalogProductPropertiesAppleSilicon:
246199
range: str
@@ -326,11 +279,6 @@ class PublicCatalogProductPrice:
326279
The retail price of the product.
327280
"""
328281

329-
unit_of_measure: Optional[PublicCatalogProductPriceUnitOfMeasure]
330-
"""
331-
The unit of measure of the price (deprecated).
332-
"""
333-
334282

335283
@dataclass
336284
class PublicCatalogProductProperties:

0 commit comments

Comments
 (0)