Skip to content

Commit 0e6e72c

Browse files
authored
Merge branch 'main' into v1.6428.0
2 parents 68e1a69 + de2508f commit 0e6e72c

File tree

10 files changed

+272
-42
lines changed

10 files changed

+272
-42
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# If you have any remark or suggestion do not hesitate to open an issue.
33
from .types import PublicCatalogProductPriceUnitOfMeasureCountableUnit
44
from .types import PublicCatalogProductPropertiesHardwareCPUArch
5+
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
56
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
67
from .types import PublicCatalogProductPropertiesHardwareCPUVirtual
78
from .types import PublicCatalogProductPropertiesHardwareCPU
@@ -15,10 +16,11 @@
1516
from .types import PublicCatalogProductPropertiesElasticMetal
1617
from .types import PublicCatalogProductPropertiesHardware
1718
from .types import PublicCatalogProductPropertiesInstance
18-
from .types import PublicCatalogProductEnvironmentalImpact
19+
from .types import PublicCatalogProductEnvironmentalImpactEstimation
1920
from .types import PublicCatalogProductLocality
2021
from .types import PublicCatalogProductPrice
2122
from .types import PublicCatalogProductProperties
23+
from .types import PublicCatalogProductUnitOfMeasure
2224
from .types import PublicCatalogProduct
2325
from .types import ListPublicCatalogProductsResponse
2426
from .types import PublicCatalogApiListPublicCatalogProductsRequest
@@ -27,6 +29,7 @@
2729
__all__ = [
2830
"PublicCatalogProductPriceUnitOfMeasureCountableUnit",
2931
"PublicCatalogProductPropertiesHardwareCPUArch",
32+
"PublicCatalogProductUnitOfMeasureCountableUnit",
3033
"PublicCatalogProductPropertiesHardwareCPUPhysical",
3134
"PublicCatalogProductPropertiesHardwareCPUVirtual",
3235
"PublicCatalogProductPropertiesHardwareCPU",
@@ -40,10 +43,11 @@
4043
"PublicCatalogProductPropertiesElasticMetal",
4144
"PublicCatalogProductPropertiesHardware",
4245
"PublicCatalogProductPropertiesInstance",
43-
"PublicCatalogProductEnvironmentalImpact",
46+
"PublicCatalogProductEnvironmentalImpactEstimation",
4447
"PublicCatalogProductLocality",
4548
"PublicCatalogProductPrice",
4649
"PublicCatalogProductProperties",
50+
"PublicCatalogProductUnitOfMeasure",
4751
"PublicCatalogProduct",
4852
"ListPublicCatalogProductsResponse",
4953
"PublicCatalogApiListPublicCatalogProductsRequest",

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

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
PublicCatalogProductPropertiesElasticMetal,
2121
PublicCatalogProductPropertiesHardware,
2222
PublicCatalogProductPropertiesInstance,
23-
PublicCatalogProductEnvironmentalImpact,
23+
PublicCatalogProductEnvironmentalImpactEstimation,
2424
PublicCatalogProductLocality,
2525
PublicCatalogProductPrice,
2626
PublicCatalogProductProperties,
27+
PublicCatalogProductUnitOfMeasure,
2728
PublicCatalogProduct,
2829
ListPublicCatalogProductsResponse,
2930
)
@@ -356,12 +357,12 @@ def unmarshal_PublicCatalogProductPropertiesInstance(
356357
return PublicCatalogProductPropertiesInstance(**args)
357358

358359

359-
def unmarshal_PublicCatalogProductEnvironmentalImpact(
360+
def unmarshal_PublicCatalogProductEnvironmentalImpactEstimation(
360361
data: Any,
361-
) -> PublicCatalogProductEnvironmentalImpact:
362+
) -> PublicCatalogProductEnvironmentalImpactEstimation:
362363
if not isinstance(data, dict):
363364
raise TypeError(
364-
"Unmarshalling the type 'PublicCatalogProductEnvironmentalImpact' failed as data isn't a dictionary."
365+
"Unmarshalling the type 'PublicCatalogProductEnvironmentalImpactEstimation' failed as data isn't a dictionary."
365366
)
366367

367368
args: Dict[str, Any] = {}
@@ -378,7 +379,7 @@ def unmarshal_PublicCatalogProductEnvironmentalImpact(
378379
else:
379380
args["m3_water_usage"] = None
380381

381-
return PublicCatalogProductEnvironmentalImpact(**args)
382+
return PublicCatalogProductEnvironmentalImpactEstimation(**args)
382383

383384

384385
def unmarshal_PublicCatalogProductLocality(data: Any) -> PublicCatalogProductLocality:
@@ -488,6 +489,27 @@ def unmarshal_PublicCatalogProductProperties(
488489
return PublicCatalogProductProperties(**args)
489490

490491

492+
def unmarshal_PublicCatalogProductUnitOfMeasure(
493+
data: Any,
494+
) -> PublicCatalogProductUnitOfMeasure:
495+
if not isinstance(data, dict):
496+
raise TypeError(
497+
"Unmarshalling the type 'PublicCatalogProductUnitOfMeasure' failed as data isn't a dictionary."
498+
)
499+
500+
args: Dict[str, Any] = {}
501+
502+
field = data.get("unit", None)
503+
if field is not None:
504+
args["unit"] = field
505+
506+
field = data.get("size", None)
507+
if field is not None:
508+
args["size"] = field
509+
510+
return PublicCatalogProductUnitOfMeasure(**args)
511+
512+
491513
def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct:
492514
if not isinstance(data, dict):
493515
raise TypeError(
@@ -534,13 +556,19 @@ def unmarshal_PublicCatalogProduct(data: Any) -> PublicCatalogProduct:
534556
else:
535557
args["properties"] = None
536558

537-
field = data.get("environmental_impact", None)
559+
field = data.get("environmental_impact_estimation", None)
538560
if field is not None:
539-
args["environmental_impact"] = (
540-
unmarshal_PublicCatalogProductEnvironmentalImpact(field)
561+
args["environmental_impact_estimation"] = (
562+
unmarshal_PublicCatalogProductEnvironmentalImpactEstimation(field)
541563
)
542564
else:
543-
args["environmental_impact"] = None
565+
args["environmental_impact_estimation"] = None
566+
567+
field = data.get("unit_of_measure", None)
568+
if field is not None:
569+
args["unit_of_measure"] = unmarshal_PublicCatalogProductUnitOfMeasure(field)
570+
else:
571+
args["unit_of_measure"] = None
544572

545573
return PublicCatalogProduct(**args)
546574

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

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,38 @@ def __str__(self) -> str:
6161
return str(self.value)
6262

6363

64+
class PublicCatalogProductUnitOfMeasureCountableUnit(str, Enum, metaclass=StrEnumMeta):
65+
UNKNOWN_COUNTABLE_UNIT = "unknown_countable_unit"
66+
CHUNK = "chunk"
67+
CORE = "core"
68+
CURRENCY = "currency"
69+
DEVICE = "device"
70+
DOMAIN = "domain"
71+
EMAIL = "email"
72+
GB_S = "gb_s"
73+
GIGABYTE = "gigabyte"
74+
HOUR = "hour"
75+
IOPS_GIGABYTE = "iops_gigabyte"
76+
IP = "ip"
77+
MONTH = "month"
78+
NODE = "node"
79+
PLAN = "plan"
80+
QUERY = "query"
81+
REQUEST = "request"
82+
SESSION = "session"
83+
VCPU_S = "vcpu_s"
84+
VERSION = "version"
85+
YEAR = "year"
86+
KEY = "key"
87+
TOKEN = "token"
88+
MINUTE = "minute"
89+
SETUP = "setup"
90+
DAY = "day"
91+
92+
def __str__(self) -> str:
93+
return str(self.value)
94+
95+
6496
@dataclass
6597
class PublicCatalogProductPropertiesHardwareCPUPhysical:
6698
sockets: int
@@ -270,16 +302,10 @@ class PublicCatalogProductPropertiesInstance:
270302

271303

272304
@dataclass
273-
class PublicCatalogProductEnvironmentalImpact:
305+
class PublicCatalogProductEnvironmentalImpactEstimation:
274306
kg_co2_equivalent: Optional[float]
275-
"""
276-
Kilograms of CO2 that would need to be released to produce the equivalent warming impact.
277-
"""
278307

279308
m3_water_usage: Optional[float]
280-
"""
281-
Cubic meters of water used.
282-
"""
283309

284310

285311
@dataclass
@@ -302,7 +328,7 @@ class PublicCatalogProductPrice:
302328

303329
unit_of_measure: Optional[PublicCatalogProductPriceUnitOfMeasure]
304330
"""
305-
The unit of measure of the price.
331+
The unit of measure of the price (deprecated).
306332
"""
307333

308334

@@ -322,6 +348,13 @@ class PublicCatalogProductProperties:
322348
instance: Optional[PublicCatalogProductPropertiesInstance]
323349

324350

351+
@dataclass
352+
class PublicCatalogProductUnitOfMeasure:
353+
unit: PublicCatalogProductUnitOfMeasureCountableUnit
354+
355+
size: int
356+
357+
325358
@dataclass
326359
class PublicCatalogProduct:
327360
sku: str
@@ -364,9 +397,16 @@ class PublicCatalogProduct:
364397
The properties of the product.
365398
"""
366399

367-
environmental_impact: Optional[PublicCatalogProductEnvironmentalImpact]
400+
environmental_impact_estimation: Optional[
401+
PublicCatalogProductEnvironmentalImpactEstimation
402+
]
403+
"""
404+
The environmental impact estimation of the product.
405+
"""
406+
407+
unit_of_measure: Optional[PublicCatalogProductUnitOfMeasure]
368408
"""
369-
The environmental impact of the product.
409+
The unit of measure of the product.
370410
"""
371411

372412

scaleway-async/scaleway_async/qaas/v1alpha1/marshalling.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,14 @@ def unmarshal_Platform(data: Any) -> Platform:
238238
if field is not None:
239239
args["max_qubit_count"] = field
240240

241+
field = data.get("max_shot_count", None)
242+
if field is not None:
243+
args["max_shot_count"] = field
244+
245+
field = data.get("max_circuit_count", None)
246+
if field is not None:
247+
args["max_circuit_count"] = field
248+
241249
field = data.get("availability", None)
242250
if field is not None:
243251
args["availability"] = field
@@ -252,6 +260,18 @@ def unmarshal_Platform(data: Any) -> Platform:
252260
else:
253261
args["price_per_hour"] = None
254262

263+
field = data.get("price_per_shot", None)
264+
if field is not None:
265+
args["price_per_shot"] = unmarshal_Money(field)
266+
else:
267+
args["price_per_shot"] = None
268+
269+
field = data.get("price_per_circuit", None)
270+
if field is not None:
271+
args["price_per_circuit"] = unmarshal_Money(field)
272+
else:
273+
args["price_per_circuit"] = None
274+
255275
field = data.get("hardware", None)
256276
if field is not None:
257277
args["hardware"] = unmarshal_PlatformHardware(field)

scaleway-async/scaleway_async/qaas/v1alpha1/types.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class PlatformAvailability(str, Enum, metaclass=StrEnumMeta):
135135
AVAILABLE = "available"
136136
SHORTAGE = "shortage"
137137
SCARCE = "scarce"
138+
MAINTENANCE = "maintenance"
138139

139140
def __str__(self) -> str:
140141
return str(self.value)
@@ -144,6 +145,8 @@ class PlatformTechnology(str, Enum, metaclass=StrEnumMeta):
144145
UNKNOWN_TECHNOLOGY = "unknown_technology"
145146
PHOTONIC = "photonic"
146147
GENERAL_PURPOSE = "general_purpose"
148+
TRAPPED_ION = "trapped_ion"
149+
SUPERCONDUCTING = "superconducting"
147150

148151
def __str__(self) -> str:
149152
return str(self.value)
@@ -396,6 +399,16 @@ class Platform:
396399
Estimated maximum number of qubits supported by the platform.
397400
"""
398401

402+
max_shot_count: int
403+
"""
404+
Maximum number of shots during a circuit execution.
405+
"""
406+
407+
max_circuit_count: int
408+
"""
409+
Maximum number of circuit that can be executed in one call.
410+
"""
411+
399412
availability: PlatformAvailability
400413
"""
401414
Availability of the platform.
@@ -411,6 +424,16 @@ class Platform:
411424
Price to be paid per hour (excluding free tiers).
412425
"""
413426

427+
price_per_shot: Optional[Money]
428+
"""
429+
Price to be paid per shot (excluding free tiers).
430+
"""
431+
432+
price_per_circuit: Optional[Money]
433+
"""
434+
Price to be paid per circuit setup before its execution (excluding free tiers).
435+
"""
436+
414437
hardware: Optional[PlatformHardware]
415438
"""
416439
Specifications of the underlying hardware.

scaleway/scaleway/product_catalog/v2alpha1/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# If you have any remark or suggestion do not hesitate to open an issue.
33
from .types import PublicCatalogProductPriceUnitOfMeasureCountableUnit
44
from .types import PublicCatalogProductPropertiesHardwareCPUArch
5+
from .types import PublicCatalogProductUnitOfMeasureCountableUnit
56
from .types import PublicCatalogProductPropertiesHardwareCPUPhysical
67
from .types import PublicCatalogProductPropertiesHardwareCPUVirtual
78
from .types import PublicCatalogProductPropertiesHardwareCPU
@@ -15,10 +16,11 @@
1516
from .types import PublicCatalogProductPropertiesElasticMetal
1617
from .types import PublicCatalogProductPropertiesHardware
1718
from .types import PublicCatalogProductPropertiesInstance
18-
from .types import PublicCatalogProductEnvironmentalImpact
19+
from .types import PublicCatalogProductEnvironmentalImpactEstimation
1920
from .types import PublicCatalogProductLocality
2021
from .types import PublicCatalogProductPrice
2122
from .types import PublicCatalogProductProperties
23+
from .types import PublicCatalogProductUnitOfMeasure
2224
from .types import PublicCatalogProduct
2325
from .types import ListPublicCatalogProductsResponse
2426
from .types import PublicCatalogApiListPublicCatalogProductsRequest
@@ -27,6 +29,7 @@
2729
__all__ = [
2830
"PublicCatalogProductPriceUnitOfMeasureCountableUnit",
2931
"PublicCatalogProductPropertiesHardwareCPUArch",
32+
"PublicCatalogProductUnitOfMeasureCountableUnit",
3033
"PublicCatalogProductPropertiesHardwareCPUPhysical",
3134
"PublicCatalogProductPropertiesHardwareCPUVirtual",
3235
"PublicCatalogProductPropertiesHardwareCPU",
@@ -40,10 +43,11 @@
4043
"PublicCatalogProductPropertiesElasticMetal",
4144
"PublicCatalogProductPropertiesHardware",
4245
"PublicCatalogProductPropertiesInstance",
43-
"PublicCatalogProductEnvironmentalImpact",
46+
"PublicCatalogProductEnvironmentalImpactEstimation",
4447
"PublicCatalogProductLocality",
4548
"PublicCatalogProductPrice",
4649
"PublicCatalogProductProperties",
50+
"PublicCatalogProductUnitOfMeasure",
4751
"PublicCatalogProduct",
4852
"ListPublicCatalogProductsResponse",
4953
"PublicCatalogApiListPublicCatalogProductsRequest",

0 commit comments

Comments
 (0)