|
10 | 10 | from .types import ( |
11 | 11 | PublicCatalogProductProductBadge, |
12 | 12 | PublicCatalogProductPropertiesHardwareCPUArch, |
| 13 | + PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass, |
| 14 | + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType, |
| 15 | + PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType, |
13 | 16 | PublicCatalogProductStatus, |
14 | 17 | PublicCatalogProductPropertiesHardwareCPUPhysical, |
15 | 18 | PublicCatalogProductPropertiesHardwareCPUVirtual, |
|
18 | 21 | PublicCatalogProductPropertiesHardwareNetwork, |
19 | 22 | PublicCatalogProductPropertiesHardwareRAM, |
20 | 23 | PublicCatalogProductPropertiesHardwareStorage, |
| 24 | + PublicCatalogProductPropertiesObjectStorageClassType, |
| 25 | + PublicCatalogProductPropertiesObjectStorageInternetTrafficType, |
| 26 | + PublicCatalogProductPropertiesObjectStorageRegionTrafficType, |
| 27 | + PublicCatalogProductPropertiesObjectStorageRestoreType, |
21 | 28 | PublicCatalogProductPropertiesAppleSilicon, |
22 | 29 | PublicCatalogProductPropertiesBlockStorage, |
23 | 30 | PublicCatalogProductPropertiesDedibox, |
@@ -279,6 +286,88 @@ def unmarshal_PublicCatalogProductPropertiesHardwareStorage( |
279 | 286 | return PublicCatalogProductPropertiesHardwareStorage(**args) |
280 | 287 |
|
281 | 288 |
|
| 289 | +def unmarshal_PublicCatalogProductPropertiesObjectStorageClassType( |
| 290 | + data: Any, |
| 291 | +) -> PublicCatalogProductPropertiesObjectStorageClassType: |
| 292 | + if not isinstance(data, dict): |
| 293 | + raise TypeError( |
| 294 | + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageClassType' failed as data isn't a dictionary." |
| 295 | + ) |
| 296 | + |
| 297 | + args: dict[str, Any] = {} |
| 298 | + |
| 299 | + field = data.get("storage_class", None) |
| 300 | + if field is not None: |
| 301 | + args["storage_class"] = field |
| 302 | + else: |
| 303 | + args["storage_class"] = ( |
| 304 | + PublicCatalogProductPropertiesObjectStorageClassTypeStorageClass.UNKNOWN_STORAGE_CLASS |
| 305 | + ) |
| 306 | + |
| 307 | + return PublicCatalogProductPropertiesObjectStorageClassType(**args) |
| 308 | + |
| 309 | + |
| 310 | +def unmarshal_PublicCatalogProductPropertiesObjectStorageInternetTrafficType( |
| 311 | + data: Any, |
| 312 | +) -> PublicCatalogProductPropertiesObjectStorageInternetTrafficType: |
| 313 | + if not isinstance(data, dict): |
| 314 | + raise TypeError( |
| 315 | + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageInternetTrafficType' failed as data isn't a dictionary." |
| 316 | + ) |
| 317 | + |
| 318 | + args: dict[str, Any] = {} |
| 319 | + |
| 320 | + field = data.get("traffic_type", None) |
| 321 | + if field is not None: |
| 322 | + args["traffic_type"] = field |
| 323 | + else: |
| 324 | + args["traffic_type"] = ( |
| 325 | + PublicCatalogProductPropertiesObjectStorageInternetTrafficTypeTrafficType.UNKNOWN_TRAFFIC_TYPE |
| 326 | + ) |
| 327 | + |
| 328 | + return PublicCatalogProductPropertiesObjectStorageInternetTrafficType(**args) |
| 329 | + |
| 330 | + |
| 331 | +def unmarshal_PublicCatalogProductPropertiesObjectStorageRegionTrafficType( |
| 332 | + data: Any, |
| 333 | +) -> PublicCatalogProductPropertiesObjectStorageRegionTrafficType: |
| 334 | + if not isinstance(data, dict): |
| 335 | + raise TypeError( |
| 336 | + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRegionTrafficType' failed as data isn't a dictionary." |
| 337 | + ) |
| 338 | + |
| 339 | + args: dict[str, Any] = {} |
| 340 | + |
| 341 | + field = data.get("region_destination", None) |
| 342 | + if field is not None: |
| 343 | + args["region_destination"] = field |
| 344 | + else: |
| 345 | + args["region_destination"] = None |
| 346 | + |
| 347 | + return PublicCatalogProductPropertiesObjectStorageRegionTrafficType(**args) |
| 348 | + |
| 349 | + |
| 350 | +def unmarshal_PublicCatalogProductPropertiesObjectStorageRestoreType( |
| 351 | + data: Any, |
| 352 | +) -> PublicCatalogProductPropertiesObjectStorageRestoreType: |
| 353 | + if not isinstance(data, dict): |
| 354 | + raise TypeError( |
| 355 | + "Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRestoreType' failed as data isn't a dictionary." |
| 356 | + ) |
| 357 | + |
| 358 | + args: dict[str, Any] = {} |
| 359 | + |
| 360 | + field = data.get("restore_type", None) |
| 361 | + if field is not None: |
| 362 | + args["restore_type"] = field |
| 363 | + else: |
| 364 | + args["restore_type"] = ( |
| 365 | + PublicCatalogProductPropertiesObjectStorageRestoreTypeRestoreType.UNKNOWN_RESTORE_TYPE |
| 366 | + ) |
| 367 | + |
| 368 | + return PublicCatalogProductPropertiesObjectStorageRestoreType(**args) |
| 369 | + |
| 370 | + |
282 | 371 | def unmarshal_PublicCatalogProductPropertiesAppleSilicon( |
283 | 372 | data: Any, |
284 | 373 | ) -> PublicCatalogProductPropertiesAppleSilicon: |
@@ -539,6 +628,42 @@ def unmarshal_PublicCatalogProductPropertiesObjectStorage( |
539 | 628 |
|
540 | 629 | args: dict[str, Any] = {} |
541 | 630 |
|
| 631 | + field = data.get("class", None) |
| 632 | + if field is not None: |
| 633 | + args["class_"] = unmarshal_PublicCatalogProductPropertiesObjectStorageClassType( |
| 634 | + field |
| 635 | + ) |
| 636 | + else: |
| 637 | + args["class_"] = None |
| 638 | + |
| 639 | + field = data.get("restore", None) |
| 640 | + if field is not None: |
| 641 | + args["restore"] = ( |
| 642 | + unmarshal_PublicCatalogProductPropertiesObjectStorageRestoreType(field) |
| 643 | + ) |
| 644 | + else: |
| 645 | + args["restore"] = None |
| 646 | + |
| 647 | + field = data.get("internet_traffic", None) |
| 648 | + if field is not None: |
| 649 | + args["internet_traffic"] = ( |
| 650 | + unmarshal_PublicCatalogProductPropertiesObjectStorageInternetTrafficType( |
| 651 | + field |
| 652 | + ) |
| 653 | + ) |
| 654 | + else: |
| 655 | + args["internet_traffic"] = None |
| 656 | + |
| 657 | + field = data.get("region_traffic", None) |
| 658 | + if field is not None: |
| 659 | + args["region_traffic"] = ( |
| 660 | + unmarshal_PublicCatalogProductPropertiesObjectStorageRegionTrafficType( |
| 661 | + field |
| 662 | + ) |
| 663 | + ) |
| 664 | + else: |
| 665 | + args["region_traffic"] = None |
| 666 | + |
542 | 667 | return PublicCatalogProductPropertiesObjectStorage(**args) |
543 | 668 |
|
544 | 669 |
|
|
0 commit comments