@scaleway/sdk 1.34.0 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/api/account/v2/api.gen.js +1 -1
  2. package/dist/api/account/v3/api.gen.js +1 -1
  3. package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
  4. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
  5. package/dist/api/baremetal/v1/api.gen.js +6 -6
  6. package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
  7. package/dist/api/billing/v2alpha1/api.gen.js +3 -3
  8. package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
  9. package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
  10. package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
  11. package/dist/api/container/v1beta1/api.gen.js +11 -11
  12. package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
  13. package/dist/api/document_db/v1beta1/api.gen.js +6 -6
  14. package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
  15. package/dist/api/domain/v2beta1/api.gen.js +45 -38
  16. package/dist/api/domain/v2beta1/index.gen.js +2 -0
  17. package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
  18. package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
  19. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
  20. package/dist/api/function/v1beta1/api.gen.js +11 -11
  21. package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
  22. package/dist/api/iam/v1alpha1/api.gen.js +64 -32
  23. package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
  24. package/dist/api/instance/v1/api.gen.js +1 -1
  25. package/dist/api/instance/v1/marshalling.gen.js +397 -602
  26. package/dist/api/iot/v1/api.gen.js +35 -27
  27. package/dist/api/iot/v1/marshalling.gen.js +111 -162
  28. package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
  29. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
  30. package/dist/api/k8s/v1/api.gen.js +3 -3
  31. package/dist/api/k8s/v1/marshalling.gen.js +109 -194
  32. package/dist/api/lb/v1/api.gen.js +583 -552
  33. package/dist/api/lb/v1/marshalling.gen.js +245 -361
  34. package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
  35. package/dist/api/marketplace/v2/api.gen.js +6 -6
  36. package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
  37. package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
  38. package/dist/api/rdb/v1/api.gen.js +7 -7
  39. package/dist/api/rdb/v1/marshalling.gen.js +184 -240
  40. package/dist/api/redis/v1/api.gen.js +1 -1
  41. package/dist/api/redis/v1/marshalling.gen.js +73 -97
  42. package/dist/api/registry/v1/api.gen.js +3 -3
  43. package/dist/api/registry/v1/marshalling.gen.js +5 -7
  44. package/dist/api/secret/v1alpha1/api.gen.js +2 -2
  45. package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
  46. package/dist/api/tem/v1alpha1/api.gen.js +1 -1
  47. package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
  48. package/dist/api/test/v1/api.gen.js +8 -25
  49. package/dist/api/test/v1/marshalling.gen.js +5 -7
  50. package/dist/api/vpc/v1/api.gen.js +1 -1
  51. package/dist/api/vpc/v2/api.gen.js +2 -2
  52. package/dist/api/vpc/v2/marshalling.gen.js +3 -5
  53. package/dist/api/vpcgw/v1/api.gen.js +6 -6
  54. package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
  55. package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
  56. package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
  57. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
  58. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
  59. package/dist/index.cjs +3127 -3989
  60. package/dist/index.d.ts +9658 -12221
  61. package/package.json +2 -2
@@ -4,49 +4,46 @@ import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf, unmarshalMapOfObje
4
4
 
5
5
  // This file was automatically generated. DO NOT EDIT.
6
6
  // If you have any remark or suggestion do not hesitate to open an issue.
7
- const unmarshalDomainRecordGeoIPConfigMatch = data => {
7
+ const unmarshalContactExtensionNL = data => {
8
8
  if (!isJSONObject(data)) {
9
- throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfigMatch' failed as data isn't a dictionary.`);
9
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionNL' failed as data isn't a dictionary.`);
10
10
  }
11
11
  return {
12
- continents: data.continents,
13
- countries: data.countries,
14
- data: data.data
12
+ legalForm: data.legal_form,
13
+ legalFormRegistrationNumber: data.legal_form_registration_number
15
14
  };
16
15
  };
17
- const unmarshalDomainRecordViewConfigView = data => {
16
+ const unmarshalContactExtensionEU = data => {
18
17
  if (!isJSONObject(data)) {
19
- throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfigView' failed as data isn't a dictionary.`);
18
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionEU' failed as data isn't a dictionary.`);
20
19
  }
21
20
  return {
22
- data: data.data,
23
- subnet: data.subnet
21
+ europeanCitizenship: data.european_citizenship
24
22
  };
25
23
  };
26
- const unmarshalDomainRecordWeightedConfigWeightedIP = data => {
24
+ const unmarshalContactExtensionFRCodeAuthAfnicInfo = data => {
27
25
  if (!isJSONObject(data)) {
28
- throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfigWeightedIP' failed as data isn't a dictionary.`);
26
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionFRCodeAuthAfnicInfo' failed as data isn't a dictionary.`);
29
27
  }
30
28
  return {
31
- ip: data.ip,
32
- weight: data.weight
29
+ codeAuthAfnic: data.code_auth_afnic
33
30
  };
34
31
  };
35
- const unmarshalContactExtensionFRAssociationInfo = data => {
32
+ const unmarshalContactExtensionFRTrademarkInfo = data => {
36
33
  if (!isJSONObject(data)) {
37
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRAssociationInfo' failed as data isn't a dictionary.`);
34
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionFRTrademarkInfo' failed as data isn't a dictionary.`);
38
35
  }
39
36
  return {
40
- publicationJo: unmarshalDate(data.publication_jo),
41
- publicationJoPage: data.publication_jo_page
37
+ trademarkInpi: data.trademark_inpi
42
38
  };
43
39
  };
44
- const unmarshalContactExtensionFRCodeAuthAfnicInfo = data => {
40
+ const unmarshalContactExtensionFRAssociationInfo = data => {
45
41
  if (!isJSONObject(data)) {
46
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRCodeAuthAfnicInfo' failed as data isn't a dictionary.`);
42
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionFRAssociationInfo' failed as data isn't a dictionary.`);
47
43
  }
48
44
  return {
49
- codeAuthAfnic: data.code_auth_afnic
45
+ publicationJo: unmarshalDate(data.publication_jo),
46
+ publicationJoPage: data.publication_jo_page
50
47
  };
51
48
  };
52
49
  const unmarshalContactExtensionFRDunsInfo = data => {
@@ -66,67 +63,6 @@ const unmarshalContactExtensionFRIndividualInfo = data => {
66
63
  whoisOptIn: data.whois_opt_in
67
64
  };
68
65
  };
69
- const unmarshalContactExtensionFRTrademarkInfo = data => {
70
- if (!isJSONObject(data)) {
71
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRTrademarkInfo' failed as data isn't a dictionary.`);
72
- }
73
- return {
74
- trademarkInpi: data.trademark_inpi
75
- };
76
- };
77
- const unmarshalDSRecordPublicKey = data => {
78
- if (!isJSONObject(data)) {
79
- throw new TypeError(`Unmarshalling the type 'DSRecordPublicKey' failed as data isn't a dictionary.`);
80
- }
81
- return {
82
- key: data.key
83
- };
84
- };
85
- const unmarshalDomainRecordGeoIPConfig = data => {
86
- if (!isJSONObject(data)) {
87
- throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfig' failed as data isn't a dictionary.`);
88
- }
89
- return {
90
- default: data.default,
91
- matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
92
- };
93
- };
94
- const unmarshalDomainRecordHTTPServiceConfig = data => {
95
- if (!isJSONObject(data)) {
96
- throw new TypeError(`Unmarshalling the type 'DomainRecordHTTPServiceConfig' failed as data isn't a dictionary.`);
97
- }
98
- return {
99
- ips: data.ips,
100
- mustContain: data.must_contain,
101
- strategy: data.strategy,
102
- url: data.url,
103
- userAgent: data.user_agent
104
- };
105
- };
106
- const unmarshalDomainRecordViewConfig = data => {
107
- if (!isJSONObject(data)) {
108
- throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfig' failed as data isn't a dictionary.`);
109
- }
110
- return {
111
- views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView)
112
- };
113
- };
114
- const unmarshalDomainRecordWeightedConfig = data => {
115
- if (!isJSONObject(data)) {
116
- throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfig' failed as data isn't a dictionary.`);
117
- }
118
- return {
119
- weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP)
120
- };
121
- };
122
- const unmarshalContactExtensionEU = data => {
123
- if (!isJSONObject(data)) {
124
- throw new TypeError(`Unmarshalling the type 'ContactExtensionEU' failed as data isn't a dictionary.`);
125
- }
126
- return {
127
- europeanCitizenship: data.european_citizenship
128
- };
129
- };
130
66
  const unmarshalContactExtensionFR = data => {
131
67
  if (!isJSONObject(data)) {
132
68
  throw new TypeError(`Unmarshalling the type 'ContactExtensionFR' failed as data isn't a dictionary.`);
@@ -140,15 +76,6 @@ const unmarshalContactExtensionFR = data => {
140
76
  trademarkInfo: data.trademark_info ? unmarshalContactExtensionFRTrademarkInfo(data.trademark_info) : undefined
141
77
  };
142
78
  };
143
- const unmarshalContactExtensionNL = data => {
144
- if (!isJSONObject(data)) {
145
- throw new TypeError(`Unmarshalling the type 'ContactExtensionNL' failed as data isn't a dictionary.`);
146
- }
147
- return {
148
- legalForm: data.legal_form,
149
- legalFormRegistrationNumber: data.legal_form_registration_number
150
- };
151
- };
152
79
  const unmarshalContactQuestion = data => {
153
80
  if (!isJSONObject(data)) {
154
81
  throw new TypeError(`Unmarshalling the type 'ContactQuestion' failed as data isn't a dictionary.`);
@@ -158,55 +85,6 @@ const unmarshalContactQuestion = data => {
158
85
  question: data.question
159
86
  };
160
87
  };
161
- const unmarshalDSRecordDigest = data => {
162
- if (!isJSONObject(data)) {
163
- throw new TypeError(`Unmarshalling the type 'DSRecordDigest' failed as data isn't a dictionary.`);
164
- }
165
- return {
166
- digest: data.digest,
167
- publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : undefined,
168
- type: data.type
169
- };
170
- };
171
- const unmarshalDomainRecord = data => {
172
- if (!isJSONObject(data)) {
173
- throw new TypeError(`Unmarshalling the type 'DomainRecord' failed as data isn't a dictionary.`);
174
- }
175
- return {
176
- comment: data.comment,
177
- data: data.data,
178
- geoIpConfig: data.geo_ip_config ? unmarshalDomainRecordGeoIPConfig(data.geo_ip_config) : undefined,
179
- httpServiceConfig: data.http_service_config ? unmarshalDomainRecordHTTPServiceConfig(data.http_service_config) : undefined,
180
- id: data.id,
181
- name: data.name,
182
- priority: data.priority,
183
- ttl: data.ttl,
184
- type: data.type,
185
- viewConfig: data.view_config ? unmarshalDomainRecordViewConfig(data.view_config) : undefined,
186
- weightedConfig: data.weighted_config ? unmarshalDomainRecordWeightedConfig(data.weighted_config) : undefined
187
- };
188
- };
189
- const unmarshalRecordIdentifier = data => {
190
- if (!isJSONObject(data)) {
191
- throw new TypeError(`Unmarshalling the type 'RecordIdentifier' failed as data isn't a dictionary.`);
192
- }
193
- return {
194
- data: data.data,
195
- name: data.name,
196
- ttl: data.ttl,
197
- type: data.type
198
- };
199
- };
200
- const unmarshalTldOffer = data => {
201
- if (!isJSONObject(data)) {
202
- throw new TypeError(`Unmarshalling the type 'TldOffer' failed as data isn't a dictionary.`);
203
- }
204
- return {
205
- action: data.action,
206
- operationPath: data.operation_path,
207
- price: data.price ? unmarshalMoney(data.price) : undefined
208
- };
209
- };
210
88
  const unmarshalContact = data => {
211
89
  if (!isJSONObject(data)) {
212
90
  throw new TypeError(`Unmarshalling the type 'Contact' failed as data isn't a dictionary.`);
@@ -221,9 +99,9 @@ const unmarshalContact = data => {
221
99
  email: data.email,
222
100
  emailAlt: data.email_alt,
223
101
  emailStatus: data.email_status,
224
- extensionEu: data.extension_eu ? unmarshalContactExtensionEU(data.extension_eu) : undefined,
225
- extensionFr: data.extension_fr ? unmarshalContactExtensionFR(data.extension_fr) : undefined,
226
- extensionNl: data.extension_nl ? unmarshalContactExtensionNL(data.extension_nl) : undefined,
102
+ extensionEu: unmarshalContactExtensionEU(data.extension_eu),
103
+ extensionFr: unmarshalContactExtensionFR(data.extension_fr),
104
+ extensionNl: unmarshalContactExtensionNL(data.extension_nl),
227
105
  faxNumber: data.fax_number,
228
106
  firstname: data.firstname,
229
107
  id: data.id,
@@ -231,7 +109,7 @@ const unmarshalContact = data => {
231
109
  lastname: data.lastname,
232
110
  legalForm: data.legal_form,
233
111
  phoneNumber: data.phone_number,
234
- questions: unmarshalArrayOfObject(data.questions, unmarshalContactQuestion, false),
112
+ questions: data.questions ? unmarshalArrayOfObject(data.questions, unmarshalContactQuestion) : undefined,
235
113
  resale: data.resale,
236
114
  state: data.state,
237
115
  vatIdentificationCode: data.vat_identification_code,
@@ -239,76 +117,99 @@ const unmarshalContact = data => {
239
117
  zip: data.zip
240
118
  };
241
119
  };
242
- const unmarshalContactRolesRoles = data => {
120
+ const unmarshalDNSZone = data => {
243
121
  if (!isJSONObject(data)) {
244
- throw new TypeError(`Unmarshalling the type 'ContactRolesRoles' failed as data isn't a dictionary.`);
122
+ throw new TypeError(`Unmarshalling the type 'DNSZone' failed as data isn't a dictionary.`);
245
123
  }
246
124
  return {
247
- isAdministrative: data.is_administrative,
248
- isOwner: data.is_owner,
249
- isTechnical: data.is_technical
125
+ domain: data.domain,
126
+ message: data.message ? data.message : undefined,
127
+ ns: data.ns,
128
+ nsDefault: data.ns_default,
129
+ nsMaster: data.ns_master,
130
+ projectId: data.project_id,
131
+ status: data.status,
132
+ subdomain: data.subdomain,
133
+ updatedAt: unmarshalDate(data.updated_at)
250
134
  };
251
135
  };
252
- const unmarshalDSRecord = data => {
136
+ const unmarshalHost = data => {
253
137
  if (!isJSONObject(data)) {
254
- throw new TypeError(`Unmarshalling the type 'DSRecord' failed as data isn't a dictionary.`);
138
+ throw new TypeError(`Unmarshalling the type 'Host' failed as data isn't a dictionary.`);
255
139
  }
256
140
  return {
257
- algorithm: data.algorithm,
258
- digest: data.digest ? unmarshalDSRecordDigest(data.digest) : undefined,
259
- keyId: data.key_id,
260
- publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : undefined
141
+ domain: data.domain,
142
+ ips: data.ips,
143
+ name: data.name,
144
+ status: data.status
261
145
  };
262
146
  };
263
- const unmarshalDomainRegistrationStatusExternalDomain = data => {
147
+ const unmarshalSSLCertificate = data => {
264
148
  if (!isJSONObject(data)) {
265
- throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusExternalDomain' failed as data isn't a dictionary.`);
149
+ throw new TypeError(`Unmarshalling the type 'SSLCertificate' failed as data isn't a dictionary.`);
266
150
  }
267
151
  return {
268
- validationToken: data.validation_token
152
+ alternativeDnsZones: data.alternative_dns_zones,
153
+ certificateChain: data.certificate_chain,
154
+ createdAt: unmarshalDate(data.created_at),
155
+ dnsZone: data.dns_zone,
156
+ expiredAt: unmarshalDate(data.expired_at),
157
+ privateKey: data.private_key,
158
+ status: data.status
269
159
  };
270
160
  };
271
- const unmarshalDomainRegistrationStatusTransfer = data => {
161
+ const unmarshalCheckContactsCompatibilityResponseContactCheckResult = data => {
272
162
  if (!isJSONObject(data)) {
273
- throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusTransfer' failed as data isn't a dictionary.`);
163
+ throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`);
274
164
  }
275
165
  return {
276
- status: data.status,
277
- voteCurrentOwner: data.vote_current_owner,
278
- voteNewOwner: data.vote_new_owner
166
+ compatible: data.compatible,
167
+ errorMessage: data.error_message ? data.error_message : undefined
279
168
  };
280
169
  };
281
- const unmarshalRecordChangeAdd = data => {
170
+ const unmarshalCheckContactsCompatibilityResponse = data => {
282
171
  if (!isJSONObject(data)) {
283
- throw new TypeError(`Unmarshalling the type 'RecordChangeAdd' failed as data isn't a dictionary.`);
172
+ throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
284
173
  }
285
174
  return {
286
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
175
+ administrativeCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result),
176
+ compatible: data.compatible,
177
+ ownerCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result),
178
+ technicalCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result)
287
179
  };
288
180
  };
289
- const unmarshalRecordChangeClear = data => {
181
+ const unmarshalClearDNSZoneRecordsResponse = data => {
290
182
  if (!isJSONObject(data)) {
291
- throw new TypeError(`Unmarshalling the type 'RecordChangeClear' failed as data isn't a dictionary.`);
183
+ throw new TypeError(`Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
292
184
  }
293
185
  return {};
294
186
  };
295
- const unmarshalRecordChangeDelete = data => {
187
+ const unmarshalDeleteDNSZoneResponse = data => {
296
188
  if (!isJSONObject(data)) {
297
- throw new TypeError(`Unmarshalling the type 'RecordChangeDelete' failed as data isn't a dictionary.`);
189
+ throw new TypeError(`Unmarshalling the type 'DeleteDNSZoneResponse' failed as data isn't a dictionary.`);
298
190
  }
299
- return {
300
- id: data.id,
301
- idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined
302
- };
191
+ return {};
303
192
  };
304
- const unmarshalRecordChangeSet = data => {
193
+ const unmarshalDeleteExternalDomainResponse = data => {
305
194
  if (!isJSONObject(data)) {
306
- throw new TypeError(`Unmarshalling the type 'RecordChangeSet' failed as data isn't a dictionary.`);
195
+ throw new TypeError(`Unmarshalling the type 'DeleteExternalDomainResponse' failed as data isn't a dictionary.`);
196
+ }
197
+ return {};
198
+ };
199
+ const unmarshalDeleteSSLCertificateResponse = data => {
200
+ if (!isJSONObject(data)) {
201
+ throw new TypeError(`Unmarshalling the type 'DeleteSSLCertificateResponse' failed as data isn't a dictionary.`);
202
+ }
203
+ return {};
204
+ };
205
+ const unmarshalTldOffer = data => {
206
+ if (!isJSONObject(data)) {
207
+ throw new TypeError(`Unmarshalling the type 'TldOffer' failed as data isn't a dictionary.`);
307
208
  }
308
209
  return {
309
- id: data.id,
310
- idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined,
311
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
210
+ action: data.action,
211
+ operationPath: data.operation_path,
212
+ price: data.price ? unmarshalMoney(data.price) : undefined
312
213
  };
313
214
  };
314
215
  const unmarshalTld = data => {
@@ -325,57 +226,51 @@ const unmarshalTld = data => {
325
226
  specifications: data.specifications
326
227
  };
327
228
  };
328
- const unmarshalAvailableDomain = data => {
229
+ const unmarshalDomainRegistrationStatusTransfer = data => {
329
230
  if (!isJSONObject(data)) {
330
- throw new TypeError(`Unmarshalling the type 'AvailableDomain' failed as data isn't a dictionary.`);
231
+ throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusTransfer' failed as data isn't a dictionary.`);
331
232
  }
332
233
  return {
333
- available: data.available,
334
- domain: data.domain,
335
- tld: data.tld ? unmarshalTld(data.tld) : undefined
234
+ status: data.status,
235
+ voteCurrentOwner: data.vote_current_owner,
236
+ voteNewOwner: data.vote_new_owner
336
237
  };
337
238
  };
338
- const unmarshalCheckContactsCompatibilityResponseContactCheckResult = data => {
239
+ const unmarshalDomainRegistrationStatusExternalDomain = data => {
339
240
  if (!isJSONObject(data)) {
340
- throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`);
241
+ throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusExternalDomain' failed as data isn't a dictionary.`);
341
242
  }
342
243
  return {
343
- compatible: data.compatible,
344
- errorMessage: data.error_message
244
+ validationToken: data.validation_token
345
245
  };
346
246
  };
347
- const unmarshalContactRoles = data => {
247
+ const unmarshalDSRecordPublicKey = data => {
348
248
  if (!isJSONObject(data)) {
349
- throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
249
+ throw new TypeError(`Unmarshalling the type 'DSRecordPublicKey' failed as data isn't a dictionary.`);
350
250
  }
351
251
  return {
352
- contact: data.contact ? unmarshalContact(data.contact) : undefined,
353
- roles: unmarshalMapOfObject(data.roles, unmarshalContactRolesRoles)
252
+ key: data.key
354
253
  };
355
254
  };
356
- const unmarshalDNSZone = data => {
255
+ const unmarshalDSRecordDigest = data => {
357
256
  if (!isJSONObject(data)) {
358
- throw new TypeError(`Unmarshalling the type 'DNSZone' failed as data isn't a dictionary.`);
257
+ throw new TypeError(`Unmarshalling the type 'DSRecordDigest' failed as data isn't a dictionary.`);
359
258
  }
360
259
  return {
361
- domain: data.domain,
362
- message: data.message,
363
- ns: data.ns,
364
- nsDefault: data.ns_default,
365
- nsMaster: data.ns_master,
366
- projectId: data.project_id,
367
- status: data.status,
368
- subdomain: data.subdomain,
369
- updatedAt: unmarshalDate(data.updated_at)
260
+ digest: data.digest,
261
+ publicKey: unmarshalDSRecordPublicKey(data.public_key),
262
+ type: data.type
370
263
  };
371
264
  };
372
- const unmarshalDNSZoneVersion = data => {
265
+ const unmarshalDSRecord = data => {
373
266
  if (!isJSONObject(data)) {
374
- throw new TypeError(`Unmarshalling the type 'DNSZoneVersion' failed as data isn't a dictionary.`);
267
+ throw new TypeError(`Unmarshalling the type 'DSRecord' failed as data isn't a dictionary.`);
375
268
  }
376
269
  return {
377
- createdAt: unmarshalDate(data.created_at),
378
- id: data.id
270
+ algorithm: data.algorithm,
271
+ digest: data.digest ? unmarshalDSRecordDigest(data.digest) : undefined,
272
+ keyId: data.key_id,
273
+ publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : undefined
379
274
  };
380
275
  };
381
276
  const unmarshalDomainDNSSEC = data => {
@@ -387,172 +282,177 @@ const unmarshalDomainDNSSEC = data => {
387
282
  status: data.status
388
283
  };
389
284
  };
390
- const unmarshalDomainSummary = data => {
285
+ const unmarshalDomain = data => {
391
286
  if (!isJSONObject(data)) {
392
- throw new TypeError(`Unmarshalling the type 'DomainSummary' failed as data isn't a dictionary.`);
287
+ throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
393
288
  }
394
289
  return {
290
+ administrativeContact: unmarshalContact(data.administrative_contact),
395
291
  autoRenewStatus: data.auto_renew_status,
396
- dnssecStatus: data.dnssec_status,
292
+ dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
293
+ dnssec: unmarshalDomainDNSSEC(data.dnssec),
397
294
  domain: data.domain,
398
295
  eppCode: data.epp_code,
399
296
  expiredAt: unmarshalDate(data.expired_at),
400
297
  externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : undefined,
401
298
  isExternal: data.is_external,
402
299
  organizationId: data.organization_id,
300
+ ownerContact: unmarshalContact(data.owner_contact),
403
301
  projectId: data.project_id,
404
302
  registrar: data.registrar,
405
303
  status: data.status,
304
+ technicalContact: unmarshalContact(data.technical_contact),
305
+ tld: unmarshalTld(data.tld),
406
306
  transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : undefined,
407
307
  updatedAt: unmarshalDate(data.updated_at)
408
308
  };
409
309
  };
410
- const unmarshalHost = data => {
310
+ const unmarshalGetDNSZoneTsigKeyResponse = data => {
411
311
  if (!isJSONObject(data)) {
412
- throw new TypeError(`Unmarshalling the type 'Host' failed as data isn't a dictionary.`);
312
+ throw new TypeError(`Unmarshalling the type 'GetDNSZoneTsigKeyResponse' failed as data isn't a dictionary.`);
413
313
  }
414
314
  return {
415
- domain: data.domain,
416
- ips: data.ips,
417
- name: data.name,
418
- status: data.status
315
+ algorithm: data.algorithm,
316
+ key: data.key,
317
+ name: data.name
419
318
  };
420
319
  };
421
- const unmarshalNameserver = data => {
320
+ const unmarshalRecordChangeClear = data => {
422
321
  if (!isJSONObject(data)) {
423
- throw new TypeError(`Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`);
322
+ throw new TypeError(`Unmarshalling the type 'RecordChangeClear' failed as data isn't a dictionary.`);
323
+ }
324
+ return {};
325
+ };
326
+ const unmarshalRecordChangeDelete = data => {
327
+ if (!isJSONObject(data)) {
328
+ throw new TypeError(`Unmarshalling the type 'RecordChangeDelete' failed as data isn't a dictionary.`);
424
329
  }
425
330
  return {
426
- ip: data.ip,
427
- name: data.name
331
+ id: data.id ? data.id : undefined,
332
+ idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined
428
333
  };
429
334
  };
430
- const unmarshalRecordChange = data => {
335
+ const unmarshalRecordIdentifier = data => {
431
336
  if (!isJSONObject(data)) {
432
- throw new TypeError(`Unmarshalling the type 'RecordChange' failed as data isn't a dictionary.`);
337
+ throw new TypeError(`Unmarshalling the type 'RecordIdentifier' failed as data isn't a dictionary.`);
433
338
  }
434
339
  return {
435
- add: data.add ? unmarshalRecordChangeAdd(data.add) : undefined,
436
- clear: data.clear ? unmarshalRecordChangeClear(data.clear) : undefined,
437
- delete: data.delete ? unmarshalRecordChangeDelete(data.delete) : undefined,
438
- set: data.set ? unmarshalRecordChangeSet(data.set) : undefined
340
+ data: data.data ? data.data : undefined,
341
+ name: data.name,
342
+ ttl: data.ttl ? data.ttl : undefined,
343
+ type: data.type
439
344
  };
440
345
  };
441
- const unmarshalRenewableDomain = data => {
346
+ const unmarshalRecordChangeSet = data => {
442
347
  if (!isJSONObject(data)) {
443
- throw new TypeError(`Unmarshalling the type 'RenewableDomain' failed as data isn't a dictionary.`);
348
+ throw new TypeError(`Unmarshalling the type 'RecordChangeSet' failed as data isn't a dictionary.`);
444
349
  }
445
350
  return {
446
- domain: data.domain,
447
- estimatedDeleteAt: unmarshalDate(data.estimated_delete_at),
448
- expiredAt: unmarshalDate(data.expired_at),
449
- limitRedemptionAt: unmarshalDate(data.limit_redemption_at),
450
- limitRenewAt: unmarshalDate(data.limit_renew_at),
451
- organizationId: data.organization_id,
452
- projectId: data.project_id,
453
- renewableDurationInYears: data.renewable_duration_in_years,
454
- status: data.status,
455
- tld: data.tld ? unmarshalTld(data.tld) : undefined
351
+ id: data.id ? data.id : undefined,
352
+ idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined,
353
+ records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
456
354
  };
457
355
  };
458
- const unmarshalSSLCertificate = data => {
356
+ const unmarshalDomainRecordViewConfigView = data => {
459
357
  if (!isJSONObject(data)) {
460
- throw new TypeError(`Unmarshalling the type 'SSLCertificate' failed as data isn't a dictionary.`);
358
+ throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfigView' failed as data isn't a dictionary.`);
461
359
  }
462
360
  return {
463
- alternativeDnsZones: data.alternative_dns_zones,
464
- certificateChain: data.certificate_chain,
465
- createdAt: unmarshalDate(data.created_at),
466
- dnsZone: data.dns_zone,
467
- expiredAt: unmarshalDate(data.expired_at),
468
- privateKey: data.private_key,
469
- status: data.status
361
+ data: data.data,
362
+ subnet: data.subnet
470
363
  };
471
364
  };
472
- const unmarshalTask = data => {
365
+ const unmarshalDomainRecordViewConfig = data => {
473
366
  if (!isJSONObject(data)) {
474
- throw new TypeError(`Unmarshalling the type 'Task' failed as data isn't a dictionary.`);
367
+ throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfig' failed as data isn't a dictionary.`);
475
368
  }
476
369
  return {
477
- domain: data.domain,
478
- id: data.id,
479
- message: data.message,
480
- organizationId: data.organization_id,
481
- projectId: data.project_id,
482
- startedAt: unmarshalDate(data.started_at),
483
- status: data.status,
484
- type: data.type,
485
- updatedAt: unmarshalDate(data.updated_at)
370
+ views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView)
486
371
  };
487
372
  };
488
- const unmarshalCheckContactsCompatibilityResponse = data => {
373
+ const unmarshalDomainRecordWeightedConfigWeightedIP = data => {
489
374
  if (!isJSONObject(data)) {
490
- throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
375
+ throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfigWeightedIP' failed as data isn't a dictionary.`);
491
376
  }
492
377
  return {
493
- administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : undefined,
494
- compatible: data.compatible,
495
- ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result) : undefined,
496
- technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result) : undefined
378
+ ip: data.ip,
379
+ weight: data.weight
497
380
  };
498
381
  };
499
- const unmarshalClearDNSZoneRecordsResponse = data => {
382
+ const unmarshalDomainRecordWeightedConfig = data => {
500
383
  if (!isJSONObject(data)) {
501
- throw new TypeError(`Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
384
+ throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfig' failed as data isn't a dictionary.`);
502
385
  }
503
- return {};
386
+ return {
387
+ weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP)
388
+ };
504
389
  };
505
- const unmarshalDeleteDNSZoneResponse = data => {
390
+ const unmarshalDomainRecordHTTPServiceConfig = data => {
506
391
  if (!isJSONObject(data)) {
507
- throw new TypeError(`Unmarshalling the type 'DeleteDNSZoneResponse' failed as data isn't a dictionary.`);
392
+ throw new TypeError(`Unmarshalling the type 'DomainRecordHTTPServiceConfig' failed as data isn't a dictionary.`);
508
393
  }
509
- return {};
394
+ return {
395
+ ips: data.ips,
396
+ mustContain: data.must_contain ? data.must_contain : undefined,
397
+ strategy: data.strategy,
398
+ url: data.url,
399
+ userAgent: data.user_agent ? data.user_agent : undefined
400
+ };
510
401
  };
511
- const unmarshalDeleteExternalDomainResponse = data => {
402
+ const unmarshalDomainRecordGeoIPConfigMatch = data => {
512
403
  if (!isJSONObject(data)) {
513
- throw new TypeError(`Unmarshalling the type 'DeleteExternalDomainResponse' failed as data isn't a dictionary.`);
404
+ throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfigMatch' failed as data isn't a dictionary.`);
514
405
  }
515
- return {};
406
+ return {
407
+ continents: data.continents,
408
+ countries: data.countries,
409
+ data: data.data
410
+ };
516
411
  };
517
- const unmarshalDeleteSSLCertificateResponse = data => {
412
+ const unmarshalDomainRecordGeoIPConfig = data => {
518
413
  if (!isJSONObject(data)) {
519
- throw new TypeError(`Unmarshalling the type 'DeleteSSLCertificateResponse' failed as data isn't a dictionary.`);
414
+ throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfig' failed as data isn't a dictionary.`);
520
415
  }
521
- return {};
416
+ return {
417
+ default: data.default,
418
+ matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
419
+ };
522
420
  };
523
- const unmarshalDomain = data => {
421
+ const unmarshalDomainRecord = data => {
524
422
  if (!isJSONObject(data)) {
525
- throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
423
+ throw new TypeError(`Unmarshalling the type 'DomainRecord' failed as data isn't a dictionary.`);
526
424
  }
527
425
  return {
528
- administrativeContact: data.administrative_contact ? unmarshalContact(data.administrative_contact) : undefined,
529
- autoRenewStatus: data.auto_renew_status,
530
- dnssec: data.dnssec ? unmarshalDomainDNSSEC(data.dnssec) : undefined,
531
- dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
532
- domain: data.domain,
533
- eppCode: data.epp_code,
534
- expiredAt: unmarshalDate(data.expired_at),
535
- externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : undefined,
536
- isExternal: data.is_external,
537
- organizationId: data.organization_id,
538
- ownerContact: data.owner_contact ? unmarshalContact(data.owner_contact) : undefined,
539
- projectId: data.project_id,
540
- registrar: data.registrar,
541
- status: data.status,
542
- technicalContact: data.technical_contact ? unmarshalContact(data.technical_contact) : undefined,
543
- tld: data.tld ? unmarshalTld(data.tld) : undefined,
544
- transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : undefined,
545
- updatedAt: unmarshalDate(data.updated_at)
426
+ comment: data.comment ? data.comment : undefined,
427
+ data: data.data,
428
+ geoIpConfig: data.geo_ip_config ? unmarshalDomainRecordGeoIPConfig(data.geo_ip_config) : undefined,
429
+ httpServiceConfig: data.http_service_config ? unmarshalDomainRecordHTTPServiceConfig(data.http_service_config) : undefined,
430
+ id: data.id,
431
+ name: data.name,
432
+ priority: data.priority,
433
+ ttl: data.ttl,
434
+ type: data.type,
435
+ viewConfig: data.view_config ? unmarshalDomainRecordViewConfig(data.view_config) : undefined,
436
+ weightedConfig: data.weighted_config ? unmarshalDomainRecordWeightedConfig(data.weighted_config) : undefined
437
+ };
438
+ };
439
+ const unmarshalRecordChangeAdd = data => {
440
+ if (!isJSONObject(data)) {
441
+ throw new TypeError(`Unmarshalling the type 'RecordChangeAdd' failed as data isn't a dictionary.`);
442
+ }
443
+ return {
444
+ records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
546
445
  };
547
446
  };
548
- const unmarshalGetDNSZoneTsigKeyResponse = data => {
447
+ const unmarshalRecordChange = data => {
549
448
  if (!isJSONObject(data)) {
550
- throw new TypeError(`Unmarshalling the type 'GetDNSZoneTsigKeyResponse' failed as data isn't a dictionary.`);
449
+ throw new TypeError(`Unmarshalling the type 'RecordChange' failed as data isn't a dictionary.`);
551
450
  }
552
451
  return {
553
- algorithm: data.algorithm,
554
- key: data.key,
555
- name: data.name
452
+ add: data.add ? unmarshalRecordChangeAdd(data.add) : undefined,
453
+ clear: data.clear ? unmarshalRecordChangeClear(data.clear) : undefined,
454
+ delete: data.delete ? unmarshalRecordChangeDelete(data.delete) : undefined,
455
+ set: data.set ? unmarshalRecordChangeSet(data.set) : undefined
556
456
  };
557
457
  };
558
458
  const unmarshalGetDNSZoneVersionDiffResponse = data => {
@@ -587,6 +487,25 @@ const unmarshalImportRawDNSZoneResponse = data => {
587
487
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
588
488
  };
589
489
  };
490
+ const unmarshalContactRolesRoles = data => {
491
+ if (!isJSONObject(data)) {
492
+ throw new TypeError(`Unmarshalling the type 'ContactRolesRoles' failed as data isn't a dictionary.`);
493
+ }
494
+ return {
495
+ isAdministrative: data.is_administrative,
496
+ isOwner: data.is_owner,
497
+ isTechnical: data.is_technical
498
+ };
499
+ };
500
+ const unmarshalContactRoles = data => {
501
+ if (!isJSONObject(data)) {
502
+ throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
503
+ }
504
+ return {
505
+ contact: unmarshalContact(data.contact),
506
+ roles: unmarshalMapOfObject(data.roles, unmarshalContactRolesRoles)
507
+ };
508
+ };
590
509
  const unmarshalListContactsResponse = data => {
591
510
  if (!isJSONObject(data)) {
592
511
  throw new TypeError(`Unmarshalling the type 'ListContactsResponse' failed as data isn't a dictionary.`);
@@ -596,6 +515,15 @@ const unmarshalListContactsResponse = data => {
596
515
  totalCount: data.total_count
597
516
  };
598
517
  };
518
+ const unmarshalNameserver = data => {
519
+ if (!isJSONObject(data)) {
520
+ throw new TypeError(`Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`);
521
+ }
522
+ return {
523
+ ip: data.ip,
524
+ name: data.name
525
+ };
526
+ };
599
527
  const unmarshalListDNSZoneNameserversResponse = data => {
600
528
  if (!isJSONObject(data)) {
601
529
  throw new TypeError(`Unmarshalling the type 'ListDNSZoneNameserversResponse' failed as data isn't a dictionary.`);
@@ -622,6 +550,15 @@ const unmarshalListDNSZoneVersionRecordsResponse = data => {
622
550
  totalCount: data.total_count
623
551
  };
624
552
  };
553
+ const unmarshalDNSZoneVersion = data => {
554
+ if (!isJSONObject(data)) {
555
+ throw new TypeError(`Unmarshalling the type 'DNSZoneVersion' failed as data isn't a dictionary.`);
556
+ }
557
+ return {
558
+ createdAt: unmarshalDate(data.created_at),
559
+ id: data.id
560
+ };
561
+ };
625
562
  const unmarshalListDNSZoneVersionsResponse = data => {
626
563
  if (!isJSONObject(data)) {
627
564
  throw new TypeError(`Unmarshalling the type 'ListDNSZoneVersionsResponse' failed as data isn't a dictionary.`);
@@ -649,6 +586,26 @@ const unmarshalListDomainHostsResponse = data => {
649
586
  totalCount: data.total_count
650
587
  };
651
588
  };
589
+ const unmarshalDomainSummary = data => {
590
+ if (!isJSONObject(data)) {
591
+ throw new TypeError(`Unmarshalling the type 'DomainSummary' failed as data isn't a dictionary.`);
592
+ }
593
+ return {
594
+ autoRenewStatus: data.auto_renew_status,
595
+ dnssecStatus: data.dnssec_status,
596
+ domain: data.domain,
597
+ eppCode: data.epp_code,
598
+ expiredAt: unmarshalDate(data.expired_at),
599
+ externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : undefined,
600
+ isExternal: data.is_external,
601
+ organizationId: data.organization_id,
602
+ projectId: data.project_id,
603
+ registrar: data.registrar,
604
+ status: data.status,
605
+ transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : undefined,
606
+ updatedAt: unmarshalDate(data.updated_at)
607
+ };
608
+ };
652
609
  const unmarshalListDomainsResponse = data => {
653
610
  if (!isJSONObject(data)) {
654
611
  throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
@@ -658,6 +615,23 @@ const unmarshalListDomainsResponse = data => {
658
615
  totalCount: data.total_count
659
616
  };
660
617
  };
618
+ const unmarshalRenewableDomain = data => {
619
+ if (!isJSONObject(data)) {
620
+ throw new TypeError(`Unmarshalling the type 'RenewableDomain' failed as data isn't a dictionary.`);
621
+ }
622
+ return {
623
+ domain: data.domain,
624
+ estimatedDeleteAt: unmarshalDate(data.estimated_delete_at),
625
+ expiredAt: unmarshalDate(data.expired_at),
626
+ limitRedemptionAt: unmarshalDate(data.limit_redemption_at),
627
+ limitRenewAt: unmarshalDate(data.limit_renew_at),
628
+ organizationId: data.organization_id,
629
+ projectId: data.project_id,
630
+ renewableDurationInYears: data.renewable_duration_in_years ? data.renewable_duration_in_years : undefined,
631
+ status: data.status,
632
+ tld: unmarshalTld(data.tld)
633
+ };
634
+ };
661
635
  const unmarshalListRenewableDomainsResponse = data => {
662
636
  if (!isJSONObject(data)) {
663
637
  throw new TypeError(`Unmarshalling the type 'ListRenewableDomainsResponse' failed as data isn't a dictionary.`);
@@ -676,6 +650,22 @@ const unmarshalListSSLCertificatesResponse = data => {
676
650
  totalCount: data.total_count
677
651
  };
678
652
  };
653
+ const unmarshalTask = data => {
654
+ if (!isJSONObject(data)) {
655
+ throw new TypeError(`Unmarshalling the type 'Task' failed as data isn't a dictionary.`);
656
+ }
657
+ return {
658
+ domain: data.domain ? data.domain : undefined,
659
+ id: data.id,
660
+ message: data.message ? data.message : undefined,
661
+ organizationId: data.organization_id,
662
+ projectId: data.project_id,
663
+ startedAt: unmarshalDate(data.started_at),
664
+ status: data.status,
665
+ type: data.type,
666
+ updatedAt: unmarshalDate(data.updated_at)
667
+ };
668
+ };
679
669
  const unmarshalListTasksResponse = data => {
680
670
  if (!isJSONObject(data)) {
681
671
  throw new TypeError(`Unmarshalling the type 'ListTasksResponse' failed as data isn't a dictionary.`);
@@ -732,6 +722,16 @@ const unmarshalRestoreDNSZoneVersionResponse = data => {
732
722
  }
733
723
  return {};
734
724
  };
725
+ const unmarshalAvailableDomain = data => {
726
+ if (!isJSONObject(data)) {
727
+ throw new TypeError(`Unmarshalling the type 'AvailableDomain' failed as data isn't a dictionary.`);
728
+ }
729
+ return {
730
+ available: data.available,
731
+ domain: data.domain,
732
+ tld: unmarshalTld(data.tld)
733
+ };
734
+ };
735
735
  const unmarshalSearchAvailableDomainsResponse = data => {
736
736
  if (!isJSONObject(data)) {
737
737
  throw new TypeError(`Unmarshalling the type 'SearchAvailableDomainsResponse' failed as data isn't a dictionary.`);
@@ -756,220 +756,6 @@ const unmarshalUpdateDNSZoneRecordsResponse = data => {
756
756
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
757
757
  };
758
758
  };
759
- const marshalDomainRecordGeoIPConfigMatch = (request, defaults) => ({
760
- continents: request.continents,
761
- countries: request.countries,
762
- data: request.data
763
- });
764
- const marshalDomainRecordViewConfigView = (request, defaults) => ({
765
- data: request.data,
766
- subnet: request.subnet
767
- });
768
- const marshalDomainRecordWeightedConfigWeightedIP = (request, defaults) => ({
769
- ip: request.ip,
770
- weight: request.weight
771
- });
772
- const marshalDomainRecordGeoIPConfig = (request, defaults) => ({
773
- default: request.default,
774
- matches: request.matches.map(elt => marshalDomainRecordGeoIPConfigMatch(elt))
775
- });
776
- const marshalDomainRecordHTTPServiceConfig = (request, defaults) => ({
777
- ips: request.ips,
778
- must_contain: request.mustContain,
779
- strategy: request.strategy,
780
- url: request.url,
781
- user_agent: request.userAgent
782
- });
783
- const marshalDomainRecordViewConfig = (request, defaults) => ({
784
- views: request.views.map(elt => marshalDomainRecordViewConfigView(elt))
785
- });
786
- const marshalDomainRecordWeightedConfig = (request, defaults) => ({
787
- weighted_ips: request.weightedIps.map(elt => marshalDomainRecordWeightedConfigWeightedIP(elt))
788
- });
789
- const marshalContactExtensionFRAssociationInfo = (request, defaults) => ({
790
- publication_jo: request.publicationJo,
791
- publication_jo_page: request.publicationJoPage
792
- });
793
- const marshalContactExtensionFRCodeAuthAfnicInfo = (request, defaults) => ({
794
- code_auth_afnic: request.codeAuthAfnic
795
- });
796
- const marshalContactExtensionFRDunsInfo = (request, defaults) => ({
797
- duns_id: request.dunsId,
798
- local_id: request.localId
799
- });
800
- const marshalContactExtensionFRIndividualInfo = (request, defaults) => ({
801
- whois_opt_in: request.whoisOptIn
802
- });
803
- const marshalContactExtensionFRTrademarkInfo = (request, defaults) => ({
804
- trademark_inpi: request.trademarkInpi
805
- });
806
- const marshalDSRecordPublicKey = (request, defaults) => ({
807
- key: request.key
808
- });
809
- const marshalDomainRecord = (request, defaults) => ({
810
- comment: request.comment,
811
- data: request.data,
812
- id: request.id,
813
- name: request.name,
814
- priority: request.priority,
815
- ttl: request.ttl,
816
- type: request.type,
817
- ...resolveOneOf([{
818
- param: 'geo_ip_config',
819
- value: request.geoIpConfig ? marshalDomainRecordGeoIPConfig(request.geoIpConfig) : undefined
820
- }, {
821
- param: 'http_service_config',
822
- value: request.httpServiceConfig ? marshalDomainRecordHTTPServiceConfig(request.httpServiceConfig) : undefined
823
- }, {
824
- param: 'weighted_config',
825
- value: request.weightedConfig ? marshalDomainRecordWeightedConfig(request.weightedConfig) : undefined
826
- }, {
827
- param: 'view_config',
828
- value: request.viewConfig ? marshalDomainRecordViewConfig(request.viewConfig) : undefined
829
- }])
830
- });
831
- const marshalRecordIdentifier = (request, defaults) => ({
832
- data: request.data,
833
- name: request.name,
834
- ttl: request.ttl,
835
- type: request.type
836
- });
837
- const marshalContactExtensionEU = (request, defaults) => ({
838
- european_citizenship: request.europeanCitizenship
839
- });
840
- const marshalContactExtensionFR = (request, defaults) => ({
841
- mode: request.mode,
842
- ...resolveOneOf([{
843
- param: 'individual_info',
844
- value: request.individualInfo ? marshalContactExtensionFRIndividualInfo(request.individualInfo) : undefined
845
- }, {
846
- param: 'duns_info',
847
- value: request.dunsInfo ? marshalContactExtensionFRDunsInfo(request.dunsInfo) : undefined
848
- }, {
849
- param: 'association_info',
850
- value: request.associationInfo ? marshalContactExtensionFRAssociationInfo(request.associationInfo) : undefined
851
- }, {
852
- param: 'trademark_info',
853
- value: request.trademarkInfo ? marshalContactExtensionFRTrademarkInfo(request.trademarkInfo) : undefined
854
- }, {
855
- param: 'code_auth_afnic_info',
856
- value: request.codeAuthAfnicInfo ? marshalContactExtensionFRCodeAuthAfnicInfo(request.codeAuthAfnicInfo) : undefined
857
- }])
858
- });
859
- const marshalContactExtensionNL = (request, defaults) => ({
860
- legal_form: request.legalForm,
861
- legal_form_registration_number: request.legalFormRegistrationNumber
862
- });
863
- const marshalContactQuestion = (request, defaults) => ({
864
- answer: request.answer,
865
- question: request.question
866
- });
867
- const marshalDSRecordDigest = (request, defaults) => ({
868
- digest: request.digest,
869
- public_key: request.publicKey ? marshalDSRecordPublicKey(request.publicKey) : undefined,
870
- type: request.type
871
- });
872
- const marshalImportRawDNSZoneRequestTsigKey = (request, defaults) => ({
873
- algorithm: request.algorithm,
874
- key: request.key,
875
- name: request.name
876
- });
877
- const marshalRecordChangeAdd = (request, defaults) => ({
878
- records: request.records.map(elt => marshalDomainRecord(elt))
879
- });
880
- const marshalRecordChangeClear = (request, defaults) => ({});
881
- const marshalRecordChangeDelete = (request, defaults) => ({
882
- ...resolveOneOf([{
883
- param: 'id',
884
- value: request.id
885
- }, {
886
- param: 'id_fields',
887
- value: request.idFields ? marshalRecordIdentifier(request.idFields) : undefined
888
- }])
889
- });
890
- const marshalRecordChangeSet = (request, defaults) => ({
891
- records: request.records.map(elt => marshalDomainRecord(elt)),
892
- ...resolveOneOf([{
893
- param: 'id',
894
- value: request.id
895
- }, {
896
- param: 'id_fields',
897
- value: request.idFields ? marshalRecordIdentifier(request.idFields) : undefined
898
- }])
899
- });
900
- const marshalDSRecord = (request, defaults) => ({
901
- algorithm: request.algorithm,
902
- key_id: request.keyId,
903
- ...resolveOneOf([{
904
- param: 'digest',
905
- value: request.digest ? marshalDSRecordDigest(request.digest) : undefined
906
- }, {
907
- param: 'public_key',
908
- value: request.publicKey ? marshalDSRecordPublicKey(request.publicKey) : undefined
909
- }])
910
- });
911
- const marshalImportProviderDNSZoneRequestOnlineV1 = (request, defaults) => ({
912
- token: request.token
913
- });
914
- const marshalImportRawDNSZoneRequestAXFRSource = (request, defaults) => ({
915
- name_server: request.nameServer,
916
- tsig_key: request.tsigKey ? marshalImportRawDNSZoneRequestTsigKey(request.tsigKey) : undefined
917
- });
918
- const marshalImportRawDNSZoneRequestBindSource = (request, defaults) => ({
919
- content: request.content
920
- });
921
- const marshalNameserver = (request, defaults) => ({
922
- ip: request.ip,
923
- name: request.name
924
- });
925
- const marshalNewContact = (request, defaults) => ({
926
- address_line_1: request.addressLine1,
927
- address_line_2: request.addressLine2,
928
- city: request.city,
929
- company_identification_code: request.companyIdentificationCode,
930
- company_name: request.companyName,
931
- country: request.country,
932
- email: request.email,
933
- email_alt: request.emailAlt,
934
- extension_eu: request.extensionEu ? marshalContactExtensionEU(request.extensionEu) : undefined,
935
- extension_fr: request.extensionFr ? marshalContactExtensionFR(request.extensionFr) : undefined,
936
- extension_nl: request.extensionNl ? marshalContactExtensionNL(request.extensionNl) : undefined,
937
- fax_number: request.faxNumber,
938
- firstname: request.firstname,
939
- lang: request.lang,
940
- lastname: request.lastname,
941
- legal_form: request.legalForm,
942
- phone_number: request.phoneNumber,
943
- questions: request.questions ? request.questions.map(elt => marshalContactQuestion(elt)) : undefined,
944
- resale: request.resale,
945
- state: request.state,
946
- vat_identification_code: request.vatIdentificationCode,
947
- whois_opt_in: request.whoisOptIn,
948
- zip: request.zip
949
- });
950
- const marshalRecordChange = (request, defaults) => ({
951
- ...resolveOneOf([{
952
- param: 'add',
953
- value: request.add ? marshalRecordChangeAdd(request.add) : undefined
954
- }, {
955
- param: 'set',
956
- value: request.set ? marshalRecordChangeSet(request.set) : undefined
957
- }, {
958
- param: 'delete',
959
- value: request.delete ? marshalRecordChangeDelete(request.delete) : undefined
960
- }, {
961
- param: 'clear',
962
- value: request.clear ? marshalRecordChangeClear(request.clear) : undefined
963
- }])
964
- });
965
- const marshalTransferInDomainRequestTransferRequest = (request, defaults) => ({
966
- auth_code: request.authCode,
967
- domain: request.domain
968
- });
969
- const marshalUpdateContactRequestQuestion = (request, defaults) => ({
970
- answer: request.answer,
971
- question: request.question
972
- });
973
759
  const marshalCloneDNSZoneRequest = (request, defaults) => ({
974
760
  dest_dns_zone: request.destDnsZone,
975
761
  overwrite: request.overwrite,
@@ -987,7 +773,7 @@ const marshalCreateSSLCertificateRequest = (request, defaults) => ({
987
773
  const marshalImportProviderDNSZoneRequest = (request, defaults) => ({
988
774
  ...resolveOneOf([{
989
775
  param: 'online_v1',
990
- value: request.onlineV1 ? marshalImportProviderDNSZoneRequestOnlineV1(request.onlineV1) : undefined
776
+ value: request.onlineV1
991
777
  }])
992
778
  });
993
779
  const marshalImportRawDNSZoneRequest = (request, defaults) => ({
@@ -995,11 +781,11 @@ const marshalImportRawDNSZoneRequest = (request, defaults) => ({
995
781
  format: request.format,
996
782
  project_id: request.projectId ?? defaults.defaultProjectId,
997
783
  ...resolveOneOf([{
998
- param: 'bind_source',
999
- value: request.bindSource ? marshalImportRawDNSZoneRequestBindSource(request.bindSource) : undefined
1000
- }, {
1001
784
  param: 'axfr_source',
1002
- value: request.axfrSource ? marshalImportRawDNSZoneRequestAXFRSource(request.axfrSource) : undefined
785
+ value: request.axfrSource
786
+ }, {
787
+ param: 'bind_source',
788
+ value: request.bindSource
1003
789
  }])
1004
790
  });
1005
791
  const marshalRefreshDNSZoneRequest = (request, defaults) => ({
@@ -1011,50 +797,50 @@ const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
1011
797
  duration_in_years: request.durationInYears,
1012
798
  project_id: request.projectId ?? defaults.defaultProjectId,
1013
799
  ...resolveOneOf([{
1014
- param: 'administrative_contact_id',
1015
- value: request.administrativeContactId
800
+ param: 'owner_contact',
801
+ value: request.ownerContact
1016
802
  }, {
1017
- param: 'administrative_contact',
1018
- value: request.administrativeContact ? marshalNewContact(request.administrativeContact) : undefined
1019
- }]),
1020
- ...resolveOneOf([{
1021
803
  param: 'owner_contact_id',
1022
804
  value: request.ownerContactId
805
+ }]),
806
+ ...resolveOneOf([{
807
+ param: 'administrative_contact',
808
+ value: request.administrativeContact
1023
809
  }, {
1024
- param: 'owner_contact',
1025
- value: request.ownerContact ? marshalNewContact(request.ownerContact) : undefined
810
+ param: 'administrative_contact_id',
811
+ value: request.administrativeContactId
1026
812
  }]),
1027
813
  ...resolveOneOf([{
814
+ param: 'technical_contact',
815
+ value: request.technicalContact
816
+ }, {
1028
817
  param: 'technical_contact_id',
1029
818
  value: request.technicalContactId
1030
- }, {
1031
- param: 'technical_contact',
1032
- value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
1033
819
  }])
1034
820
  });
1035
821
  const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({
1036
822
  domains: request.domains,
1037
823
  tlds: request.tlds,
1038
824
  ...resolveOneOf([{
1039
- param: 'administrative_contact_id',
1040
- value: request.administrativeContactId
825
+ param: 'owner_contact',
826
+ value: request.ownerContact
1041
827
  }, {
1042
- param: 'administrative_contact',
1043
- value: request.administrativeContact ? marshalNewContact(request.administrativeContact) : undefined
1044
- }]),
1045
- ...resolveOneOf([{
1046
828
  param: 'owner_contact_id',
1047
829
  value: request.ownerContactId
830
+ }]),
831
+ ...resolveOneOf([{
832
+ param: 'administrative_contact',
833
+ value: request.administrativeContact
1048
834
  }, {
1049
- param: 'owner_contact',
1050
- value: request.ownerContact ? marshalNewContact(request.ownerContact) : undefined
835
+ param: 'administrative_contact_id',
836
+ value: request.administrativeContactId
1051
837
  }]),
1052
838
  ...resolveOneOf([{
839
+ param: 'technical_contact',
840
+ value: request.technicalContact
841
+ }, {
1053
842
  param: 'technical_contact_id',
1054
843
  value: request.technicalContactId
1055
- }, {
1056
- param: 'technical_contact',
1057
- value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
1058
844
  }])
1059
845
  });
1060
846
  const marshalRegistrarApiCreateDomainHostRequest = (request, defaults) => ({
@@ -1062,7 +848,7 @@ const marshalRegistrarApiCreateDomainHostRequest = (request, defaults) => ({
1062
848
  name: request.name
1063
849
  });
1064
850
  const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({
1065
- ds_record: request.dsRecord ? marshalDSRecord(request.dsRecord) : undefined
851
+ ds_record: request.dsRecord
1066
852
  });
1067
853
  const marshalRegistrarApiRegisterExternalDomainRequest = (request, defaults) => ({
1068
854
  domain: request.domain,
@@ -1076,36 +862,36 @@ const marshalRegistrarApiRenewDomainsRequest = (request, defaults) => ({
1076
862
  const marshalRegistrarApiTradeDomainRequest = (request, defaults) => ({
1077
863
  project_id: request.projectId,
1078
864
  ...resolveOneOf([{
865
+ param: 'new_owner_contact',
866
+ value: request.newOwnerContact
867
+ }, {
1079
868
  param: 'new_owner_contact_id',
1080
869
  value: request.newOwnerContactId
1081
- }, {
1082
- param: 'new_owner_contact',
1083
- value: request.newOwnerContact ? marshalNewContact(request.newOwnerContact) : undefined
1084
870
  }])
1085
871
  });
1086
872
  const marshalRegistrarApiTransferInDomainRequest = (request, defaults) => ({
1087
- domains: request.domains.map(elt => marshalTransferInDomainRequestTransferRequest(elt)),
873
+ domains: request.domains,
1088
874
  project_id: request.projectId ?? defaults.defaultProjectId,
1089
875
  ...resolveOneOf([{
1090
- param: 'administrative_contact_id',
1091
- value: request.administrativeContactId
876
+ param: 'owner_contact',
877
+ value: request.ownerContact
1092
878
  }, {
1093
- param: 'administrative_contact',
1094
- value: request.administrativeContact ? marshalNewContact(request.administrativeContact) : undefined
1095
- }]),
1096
- ...resolveOneOf([{
1097
879
  param: 'owner_contact_id',
1098
880
  value: request.ownerContactId
881
+ }]),
882
+ ...resolveOneOf([{
883
+ param: 'administrative_contact',
884
+ value: request.administrativeContact
1099
885
  }, {
1100
- param: 'owner_contact',
1101
- value: request.ownerContact ? marshalNewContact(request.ownerContact) : undefined
886
+ param: 'administrative_contact_id',
887
+ value: request.administrativeContactId
1102
888
  }]),
1103
889
  ...resolveOneOf([{
890
+ param: 'technical_contact',
891
+ value: request.technicalContact
892
+ }, {
1104
893
  param: 'technical_contact_id',
1105
894
  value: request.technicalContactId
1106
- }, {
1107
- param: 'technical_contact',
1108
- value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
1109
895
  }])
1110
896
  });
1111
897
  const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
@@ -1116,13 +902,13 @@ const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
1116
902
  country: request.country,
1117
903
  email: request.email,
1118
904
  email_alt: request.emailAlt,
1119
- extension_eu: request.extensionEu ? marshalContactExtensionEU(request.extensionEu) : undefined,
1120
- extension_fr: request.extensionFr ? marshalContactExtensionFR(request.extensionFr) : undefined,
1121
- extension_nl: request.extensionNl ? marshalContactExtensionNL(request.extensionNl) : undefined,
905
+ extension_eu: request.extensionEu,
906
+ extension_fr: request.extensionFr,
907
+ extension_nl: request.extensionNl,
1122
908
  fax_number: request.faxNumber,
1123
- lang: request.lang ?? 'unknown_language_code',
909
+ lang: request.lang,
1124
910
  phone_number: request.phoneNumber,
1125
- questions: request.questions ? request.questions.map(elt => marshalUpdateContactRequestQuestion(elt)) : undefined,
911
+ questions: request.questions,
1126
912
  resale: request.resale,
1127
913
  state: request.state,
1128
914
  vat_identification_code: request.vatIdentificationCode,
@@ -1134,32 +920,32 @@ const marshalRegistrarApiUpdateDomainHostRequest = (request, defaults) => ({
1134
920
  });
1135
921
  const marshalRegistrarApiUpdateDomainRequest = (request, defaults) => ({
1136
922
  ...resolveOneOf([{
1137
- param: 'administrative_contact_id',
1138
- value: request.administrativeContactId
923
+ param: 'technical_contact',
924
+ value: request.technicalContact
1139
925
  }, {
1140
- param: 'administrative_contact',
1141
- value: request.administrativeContact ? marshalNewContact(request.administrativeContact) : undefined
926
+ param: 'technical_contact_id',
927
+ value: request.technicalContactId
1142
928
  }]),
1143
929
  ...resolveOneOf([{
930
+ param: 'owner_contact',
931
+ value: request.ownerContact
932
+ }, {
1144
933
  param: 'owner_contact_id',
1145
934
  value: request.ownerContactId
1146
- }, {
1147
- param: 'owner_contact',
1148
- value: request.ownerContact ? marshalNewContact(request.ownerContact) : undefined
1149
935
  }]),
1150
936
  ...resolveOneOf([{
1151
- param: 'technical_contact_id',
1152
- value: request.technicalContactId
937
+ param: 'administrative_contact',
938
+ value: request.administrativeContact
1153
939
  }, {
1154
- param: 'technical_contact',
1155
- value: request.technicalContact ? marshalNewContact(request.technicalContact) : undefined
940
+ param: 'administrative_contact_id',
941
+ value: request.administrativeContactId
1156
942
  }])
1157
943
  });
1158
944
  const marshalUpdateDNSZoneNameserversRequest = (request, defaults) => ({
1159
- ns: request.ns.map(elt => marshalNameserver(elt))
945
+ ns: request.ns
1160
946
  });
1161
947
  const marshalUpdateDNSZoneRecordsRequest = (request, defaults) => ({
1162
- changes: request.changes.map(elt => marshalRecordChange(elt)),
948
+ changes: request.changes,
1163
949
  disallow_new_zone_creation: request.disallowNewZoneCreation,
1164
950
  return_all_records: request.returnAllRecords,
1165
951
  serial: request.serial