|
16 | 16 | EndpointPrivateNetworkDetails, |
17 | 17 | EndpointPublicDetails, |
18 | 18 | Endpoint, |
| 19 | + ClusterMonoAZDetails, |
| 20 | + ClusterMultiAZDetails, |
19 | 21 | ClusterSetting, |
20 | 22 | Volume, |
21 | 23 | Cluster, |
@@ -112,6 +114,34 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: |
112 | 114 | return Endpoint(**args) |
113 | 115 |
|
114 | 116 |
|
| 117 | +def unmarshal_ClusterMonoAZDetails(data: Any) -> ClusterMonoAZDetails: |
| 118 | + if not isinstance(data, dict): |
| 119 | + raise TypeError( |
| 120 | + "Unmarshalling the type 'ClusterMonoAZDetails' failed as data isn't a dictionary." |
| 121 | + ) |
| 122 | + |
| 123 | + args: dict[str, Any] = {} |
| 124 | + |
| 125 | + field = data.get("zone", None) |
| 126 | + if field is not None: |
| 127 | + args["zone"] = field |
| 128 | + else: |
| 129 | + args["zone"] = None |
| 130 | + |
| 131 | + return ClusterMonoAZDetails(**args) |
| 132 | + |
| 133 | + |
| 134 | +def unmarshal_ClusterMultiAZDetails(data: Any) -> ClusterMultiAZDetails: |
| 135 | + if not isinstance(data, dict): |
| 136 | + raise TypeError( |
| 137 | + "Unmarshalling the type 'ClusterMultiAZDetails' failed as data isn't a dictionary." |
| 138 | + ) |
| 139 | + |
| 140 | + args: dict[str, Any] = {} |
| 141 | + |
| 142 | + return ClusterMultiAZDetails(**args) |
| 143 | + |
| 144 | + |
115 | 145 | def unmarshal_ClusterSetting(data: Any) -> ClusterSetting: |
116 | 146 | if not isinstance(data, dict): |
117 | 147 | raise TypeError( |
@@ -278,6 +308,18 @@ def unmarshal_Cluster(data: Any) -> Cluster: |
278 | 308 | else: |
279 | 309 | args["updated_at"] = None |
280 | 310 |
|
| 311 | + field = data.get("multi_az", None) |
| 312 | + if field is not None: |
| 313 | + args["multi_az"] = unmarshal_ClusterMultiAZDetails(field) |
| 314 | + else: |
| 315 | + args["multi_az"] = None |
| 316 | + |
| 317 | + field = data.get("mono_az", None) |
| 318 | + if field is not None: |
| 319 | + args["mono_az"] = unmarshal_ClusterMonoAZDetails(field) |
| 320 | + else: |
| 321 | + args["mono_az"] = None |
| 322 | + |
281 | 323 | return Cluster(**args) |
282 | 324 |
|
283 | 325 |
|
@@ -735,6 +777,27 @@ def marshal_EndpointSpecPublicDetails( |
735 | 777 | return output |
736 | 778 |
|
737 | 779 |
|
| 780 | +def marshal_ClusterMonoAZDetails( |
| 781 | + request: ClusterMonoAZDetails, |
| 782 | + defaults: ProfileDefaults, |
| 783 | +) -> dict[str, Any]: |
| 784 | + output: dict[str, Any] = {} |
| 785 | + |
| 786 | + if request.zone is not None: |
| 787 | + output["zone"] = request.zone |
| 788 | + |
| 789 | + return output |
| 790 | + |
| 791 | + |
| 792 | +def marshal_ClusterMultiAZDetails( |
| 793 | + request: ClusterMultiAZDetails, |
| 794 | + defaults: ProfileDefaults, |
| 795 | +) -> dict[str, Any]: |
| 796 | + output: dict[str, Any] = {} |
| 797 | + |
| 798 | + return output |
| 799 | + |
| 800 | + |
738 | 801 | def marshal_CreateClusterRequestVolumeSpec( |
739 | 802 | request: CreateClusterRequestVolumeSpec, |
740 | 803 | defaults: ProfileDefaults, |
@@ -780,6 +843,22 @@ def marshal_CreateClusterRequest( |
780 | 843 | defaults: ProfileDefaults, |
781 | 844 | ) -> dict[str, Any]: |
782 | 845 | output: dict[str, Any] = {} |
| 846 | + output.update( |
| 847 | + resolve_one_of( |
| 848 | + [ |
| 849 | + OneOfPossibility( |
| 850 | + param="multi_az", |
| 851 | + value=request.multi_az, |
| 852 | + marshal_func=marshal_ClusterMultiAZDetails, |
| 853 | + ), |
| 854 | + OneOfPossibility( |
| 855 | + param="mono_az", |
| 856 | + value=request.mono_az, |
| 857 | + marshal_func=marshal_ClusterMonoAZDetails, |
| 858 | + ), |
| 859 | + ] |
| 860 | + ), |
| 861 | + ) |
783 | 862 |
|
784 | 863 | if request.version is not None: |
785 | 864 | output["version"] = request.version |
|
0 commit comments