|
21 | 21 | FtpAccount, |
22 | 22 | MailAccount, |
23 | 23 | CheckUserOwnsDomainResponse, |
| 24 | + AutoConfigDomainDns, |
24 | 25 | DnsRecord, |
25 | 26 | Nameserver, |
26 | 27 | DnsRecords, |
27 | | - AutoConfigDomainDns, |
28 | 28 | Domain, |
29 | 29 | PlatformControlPanelUrls, |
30 | 30 | OfferOption, |
@@ -164,6 +164,37 @@ def unmarshal_CheckUserOwnsDomainResponse(data: Any) -> CheckUserOwnsDomainRespo |
164 | 164 | return CheckUserOwnsDomainResponse(**args) |
165 | 165 |
|
166 | 166 |
|
| 167 | +def unmarshal_AutoConfigDomainDns(data: Any) -> AutoConfigDomainDns: |
| 168 | + if not isinstance(data, dict): |
| 169 | + raise TypeError( |
| 170 | + "Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary." |
| 171 | + ) |
| 172 | + |
| 173 | + args: Dict[str, Any] = {} |
| 174 | + |
| 175 | + field = data.get("nameservers", None) |
| 176 | + if field is not None: |
| 177 | + args["nameservers"] = field |
| 178 | + |
| 179 | + field = data.get("web_records", None) |
| 180 | + if field is not None: |
| 181 | + args["web_records"] = field |
| 182 | + |
| 183 | + field = data.get("mail_records", None) |
| 184 | + if field is not None: |
| 185 | + args["mail_records"] = field |
| 186 | + |
| 187 | + field = data.get("all_records", None) |
| 188 | + if field is not None: |
| 189 | + args["all_records"] = field |
| 190 | + |
| 191 | + field = data.get("none", None) |
| 192 | + if field is not None: |
| 193 | + args["none"] = field |
| 194 | + |
| 195 | + return AutoConfigDomainDns(**args) |
| 196 | + |
| 197 | + |
167 | 198 | def unmarshal_DnsRecord(data: Any) -> DnsRecord: |
168 | 199 | if not isinstance(data, dict): |
169 | 200 | raise TypeError( |
@@ -257,35 +288,16 @@ def unmarshal_DnsRecords(data: Any) -> DnsRecords: |
257 | 288 | args["dns_config"] = ( |
258 | 289 | [DomainDnsAction(v) for v in field] if field is not None else None |
259 | 290 | ) |
| 291 | + else: |
| 292 | + args["dns_config"] = None |
260 | 293 |
|
261 | | - return DnsRecords(**args) |
262 | | - |
263 | | - |
264 | | -def unmarshal_AutoConfigDomainDns(data: Any) -> AutoConfigDomainDns: |
265 | | - if not isinstance(data, dict): |
266 | | - raise TypeError( |
267 | | - "Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary." |
268 | | - ) |
269 | | - |
270 | | - args: Dict[str, Any] = {} |
271 | | - |
272 | | - field = data.get("nameservers", None) |
273 | | - if field is not None: |
274 | | - args["nameservers"] = field |
275 | | - |
276 | | - field = data.get("web_records", None) |
277 | | - if field is not None: |
278 | | - args["web_records"] = field |
279 | | - |
280 | | - field = data.get("mail_records", None) |
281 | | - if field is not None: |
282 | | - args["mail_records"] = field |
283 | | - |
284 | | - field = data.get("all_records", None) |
| 294 | + field = data.get("auto_config_domain_dns", None) |
285 | 295 | if field is not None: |
286 | | - args["all_records"] = field |
| 296 | + args["auto_config_domain_dns"] = unmarshal_AutoConfigDomainDns(field) |
| 297 | + else: |
| 298 | + args["auto_config_domain_dns"] = None |
287 | 299 |
|
288 | | - return AutoConfigDomainDns(**args) |
| 300 | + return DnsRecords(**args) |
289 | 301 |
|
290 | 302 |
|
291 | 303 | def unmarshal_Domain(data: Any) -> Domain: |
@@ -1124,6 +1136,9 @@ def marshal_AutoConfigDomainDns( |
1124 | 1136 | if request.all_records is not None: |
1125 | 1137 | output["all_records"] = request.all_records |
1126 | 1138 |
|
| 1139 | + if request.none is not None: |
| 1140 | + output["none"] = request.none |
| 1141 | + |
1127 | 1142 | return output |
1128 | 1143 |
|
1129 | 1144 |
|
|
0 commit comments