|
17 | 17 | IP,
|
18 | 18 | OSOSField,
|
19 | 19 | OS,
|
| 20 | + CertificationOption, |
| 21 | + LicenseOption, |
| 22 | + PrivateNetworkOption, |
| 23 | + PublicBandwidthOption, |
| 24 | + RemoteAccessOption, |
20 | 25 | CPU,
|
21 | 26 | Disk,
|
22 | 27 | Memory,
|
@@ -190,6 +195,69 @@ def unmarshal_OS(data: Any) -> OS:
|
190 | 195 | return OS(**args)
|
191 | 196 |
|
192 | 197 |
|
| 198 | +def unmarshal_CertificationOption(data: Any) -> CertificationOption: |
| 199 | + if not isinstance(data, dict): |
| 200 | + raise TypeError( |
| 201 | + "Unmarshalling the type 'CertificationOption' failed as data isn't a dictionary." |
| 202 | + ) |
| 203 | + |
| 204 | + args: Dict[str, Any] = {} |
| 205 | + |
| 206 | + return CertificationOption(**args) |
| 207 | + |
| 208 | + |
| 209 | +def unmarshal_LicenseOption(data: Any) -> LicenseOption: |
| 210 | + if not isinstance(data, dict): |
| 211 | + raise TypeError( |
| 212 | + "Unmarshalling the type 'LicenseOption' failed as data isn't a dictionary." |
| 213 | + ) |
| 214 | + |
| 215 | + args: Dict[str, Any] = {} |
| 216 | + |
| 217 | + field = data.get("os_id", None) |
| 218 | + if field is not None: |
| 219 | + args["os_id"] = field |
| 220 | + |
| 221 | + return LicenseOption(**args) |
| 222 | + |
| 223 | + |
| 224 | +def unmarshal_PrivateNetworkOption(data: Any) -> PrivateNetworkOption: |
| 225 | + if not isinstance(data, dict): |
| 226 | + raise TypeError( |
| 227 | + "Unmarshalling the type 'PrivateNetworkOption' failed as data isn't a dictionary." |
| 228 | + ) |
| 229 | + |
| 230 | + args: Dict[str, Any] = {} |
| 231 | + |
| 232 | + return PrivateNetworkOption(**args) |
| 233 | + |
| 234 | + |
| 235 | +def unmarshal_PublicBandwidthOption(data: Any) -> PublicBandwidthOption: |
| 236 | + if not isinstance(data, dict): |
| 237 | + raise TypeError( |
| 238 | + "Unmarshalling the type 'PublicBandwidthOption' failed as data isn't a dictionary." |
| 239 | + ) |
| 240 | + |
| 241 | + args: Dict[str, Any] = {} |
| 242 | + |
| 243 | + field = data.get("bandwidth_in_bps", None) |
| 244 | + if field is not None: |
| 245 | + args["bandwidth_in_bps"] = field |
| 246 | + |
| 247 | + return PublicBandwidthOption(**args) |
| 248 | + |
| 249 | + |
| 250 | +def unmarshal_RemoteAccessOption(data: Any) -> RemoteAccessOption: |
| 251 | + if not isinstance(data, dict): |
| 252 | + raise TypeError( |
| 253 | + "Unmarshalling the type 'RemoteAccessOption' failed as data isn't a dictionary." |
| 254 | + ) |
| 255 | + |
| 256 | + args: Dict[str, Any] = {} |
| 257 | + |
| 258 | + return RemoteAccessOption(**args) |
| 259 | + |
| 260 | + |
193 | 261 | def unmarshal_CPU(data: Any) -> CPU:
|
194 | 262 | if not isinstance(data, dict):
|
195 | 263 | raise TypeError(
|
@@ -307,6 +375,36 @@ def unmarshal_OfferOptionOffer(data: Any) -> OfferOptionOffer:
|
307 | 375 | else:
|
308 | 376 | args["os_id"] = None
|
309 | 377 |
|
| 378 | + field = data.get("license", None) |
| 379 | + if field is not None: |
| 380 | + args["license"] = unmarshal_LicenseOption(field) |
| 381 | + else: |
| 382 | + args["license"] = None |
| 383 | + |
| 384 | + field = data.get("public_bandwidth", None) |
| 385 | + if field is not None: |
| 386 | + args["public_bandwidth"] = unmarshal_PublicBandwidthOption(field) |
| 387 | + else: |
| 388 | + args["public_bandwidth"] = None |
| 389 | + |
| 390 | + field = data.get("private_network", None) |
| 391 | + if field is not None: |
| 392 | + args["private_network"] = unmarshal_PrivateNetworkOption(field) |
| 393 | + else: |
| 394 | + args["private_network"] = None |
| 395 | + |
| 396 | + field = data.get("remote_access", None) |
| 397 | + if field is not None: |
| 398 | + args["remote_access"] = unmarshal_RemoteAccessOption(field) |
| 399 | + else: |
| 400 | + args["remote_access"] = None |
| 401 | + |
| 402 | + field = data.get("certification", None) |
| 403 | + if field is not None: |
| 404 | + args["certification"] = unmarshal_CertificationOption(field) |
| 405 | + else: |
| 406 | + args["certification"] = None |
| 407 | + |
310 | 408 | return OfferOptionOffer(**args)
|
311 | 409 |
|
312 | 410 |
|
@@ -495,6 +593,36 @@ def unmarshal_Option(data: Any) -> Option:
|
495 | 593 | if field is not None:
|
496 | 594 | args["manageable"] = field
|
497 | 595 |
|
| 596 | + field = data.get("license", None) |
| 597 | + if field is not None: |
| 598 | + args["license"] = unmarshal_LicenseOption(field) |
| 599 | + else: |
| 600 | + args["license"] = None |
| 601 | + |
| 602 | + field = data.get("public_bandwidth", None) |
| 603 | + if field is not None: |
| 604 | + args["public_bandwidth"] = unmarshal_PublicBandwidthOption(field) |
| 605 | + else: |
| 606 | + args["public_bandwidth"] = None |
| 607 | + |
| 608 | + field = data.get("private_network", None) |
| 609 | + if field is not None: |
| 610 | + args["private_network"] = unmarshal_PrivateNetworkOption(field) |
| 611 | + else: |
| 612 | + args["private_network"] = None |
| 613 | + |
| 614 | + field = data.get("remote_access", None) |
| 615 | + if field is not None: |
| 616 | + args["remote_access"] = unmarshal_RemoteAccessOption(field) |
| 617 | + else: |
| 618 | + args["remote_access"] = None |
| 619 | + |
| 620 | + field = data.get("certification", None) |
| 621 | + if field is not None: |
| 622 | + args["certification"] = unmarshal_CertificationOption(field) |
| 623 | + else: |
| 624 | + args["certification"] = None |
| 625 | + |
498 | 626 | return Option(**args)
|
499 | 627 |
|
500 | 628 |
|
@@ -616,6 +744,36 @@ def unmarshal_ServerOption(data: Any) -> ServerOption:
|
616 | 744 | else:
|
617 | 745 | args["expires_at"] = None
|
618 | 746 |
|
| 747 | + field = data.get("license", None) |
| 748 | + if field is not None: |
| 749 | + args["license"] = unmarshal_LicenseOption(field) |
| 750 | + else: |
| 751 | + args["license"] = None |
| 752 | + |
| 753 | + field = data.get("public_bandwidth", None) |
| 754 | + if field is not None: |
| 755 | + args["public_bandwidth"] = unmarshal_PublicBandwidthOption(field) |
| 756 | + else: |
| 757 | + args["public_bandwidth"] = None |
| 758 | + |
| 759 | + field = data.get("private_network", None) |
| 760 | + if field is not None: |
| 761 | + args["private_network"] = unmarshal_PrivateNetworkOption(field) |
| 762 | + else: |
| 763 | + args["private_network"] = None |
| 764 | + |
| 765 | + field = data.get("remote_access", None) |
| 766 | + if field is not None: |
| 767 | + args["remote_access"] = unmarshal_RemoteAccessOption(field) |
| 768 | + else: |
| 769 | + args["remote_access"] = None |
| 770 | + |
| 771 | + field = data.get("certification", None) |
| 772 | + if field is not None: |
| 773 | + args["certification"] = unmarshal_CertificationOption(field) |
| 774 | + else: |
| 775 | + args["certification"] = None |
| 776 | + |
619 | 777 | return ServerOption(**args)
|
620 | 778 |
|
621 | 779 |
|
|
0 commit comments