|
11 | 11 | from dateutil import parser |
12 | 12 | from .types import ( |
13 | 13 | PATRuleProtocol, |
| 14 | + CreateGatewayNetworkRequestIpamConfig, |
14 | 15 | DHCP, |
15 | 16 | DHCPEntry, |
16 | 17 | Gateway, |
|
30 | 31 | SetDHCPEntriesResponse, |
31 | 32 | SetPATRulesRequestRule, |
32 | 33 | SetPATRulesResponse, |
| 34 | + UpdateGatewayNetworkRequestIpamConfig, |
33 | 35 | CreateGatewayRequest, |
34 | 36 | UpdateGatewayRequest, |
35 | 37 | CreateGatewayNetworkRequest, |
@@ -123,6 +125,9 @@ def unmarshal_IpamConfig(data: Any) -> IpamConfig: |
123 | 125 |
|
124 | 126 | args: Dict[str, Any] = {} |
125 | 127 |
|
| 128 | + field = data.get("ipam_ip_id", None) |
| 129 | + args["ipam_ip_id"] = field |
| 130 | + |
126 | 131 | field = data.get("push_default_route", None) |
127 | 132 | args["push_default_route"] = field |
128 | 133 |
|
@@ -595,12 +600,15 @@ def marshal_CreateDHCPRequest( |
595 | 600 | return output |
596 | 601 |
|
597 | 602 |
|
598 | | -def marshal_IpamConfig( |
599 | | - request: IpamConfig, |
| 603 | +def marshal_CreateGatewayNetworkRequestIpamConfig( |
| 604 | + request: CreateGatewayNetworkRequestIpamConfig, |
600 | 605 | defaults: ProfileDefaults, |
601 | 606 | ) -> Dict[str, Any]: |
602 | 607 | output: Dict[str, Any] = {} |
603 | 608 |
|
| 609 | + if request.ipam_ip_id is not None: |
| 610 | + output["ipam_ip_id"] = request.ipam_ip_id |
| 611 | + |
604 | 612 | if request.push_default_route is not None: |
605 | 613 | output["push_default_route"] = request.push_default_route |
606 | 614 |
|
@@ -643,6 +651,21 @@ def marshal_SetPATRulesRequestRule( |
643 | 651 | return output |
644 | 652 |
|
645 | 653 |
|
| 654 | +def marshal_UpdateGatewayNetworkRequestIpamConfig( |
| 655 | + request: UpdateGatewayNetworkRequestIpamConfig, |
| 656 | + defaults: ProfileDefaults, |
| 657 | +) -> Dict[str, Any]: |
| 658 | + output: Dict[str, Any] = {} |
| 659 | + |
| 660 | + if request.ipam_ip_id is not None: |
| 661 | + output["ipam_ip_id"] = request.ipam_ip_id |
| 662 | + |
| 663 | + if request.push_default_route is not None: |
| 664 | + output["push_default_route"] = request.push_default_route |
| 665 | + |
| 666 | + return output |
| 667 | + |
| 668 | + |
646 | 669 | def marshal_CreateDHCPEntryRequest( |
647 | 670 | request: CreateDHCPEntryRequest, |
648 | 671 | defaults: ProfileDefaults, |
@@ -683,7 +706,9 @@ def marshal_CreateGatewayNetworkRequest( |
683 | 706 | ), |
684 | 707 | OneOfPossibility( |
685 | 708 | "ipam_config", |
686 | | - marshal_IpamConfig(request.ipam_config, defaults) |
| 709 | + marshal_CreateGatewayNetworkRequestIpamConfig( |
| 710 | + request.ipam_config, defaults |
| 711 | + ) |
687 | 712 | if request.ipam_config is not None |
688 | 713 | else None, |
689 | 714 | ), |
@@ -892,7 +917,9 @@ def marshal_UpdateGatewayNetworkRequest( |
892 | 917 | ), |
893 | 918 | OneOfPossibility( |
894 | 919 | "ipam_config", |
895 | | - marshal_IpamConfig(request.ipam_config, defaults) |
| 920 | + marshal_UpdateGatewayNetworkRequestIpamConfig( |
| 921 | + request.ipam_config, defaults |
| 922 | + ) |
896 | 923 | if request.ipam_config is not None |
897 | 924 | else None, |
898 | 925 | ), |
|
0 commit comments