@scaleway/sdk 2.0.0-alpha.12 → 2.0.0-alpha.14

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 (63) hide show
  1. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +12 -12
  2. package/dist/api/baremetal/v1/marshalling.gen.js +60 -49
  3. package/dist/api/block/v1alpha1/api.gen.js +23 -19
  4. package/dist/api/block/v1alpha1/marshalling.gen.js +47 -40
  5. package/dist/api/block/v1alpha1/validation-rules.gen.js +11 -1
  6. package/dist/api/cockpit/v1beta1/api.gen.js +143 -48
  7. package/dist/api/cockpit/v1beta1/marshalling.gen.js +86 -35
  8. package/dist/api/container/v1beta1/index.gen.js +2 -0
  9. package/dist/api/container/v1beta1/marshalling.gen.js +63 -35
  10. package/dist/api/container/v1beta1/validation-rules.gen.js +44 -0
  11. package/dist/api/document_db/v1beta1/marshalling.gen.js +117 -61
  12. package/dist/api/domain/v2beta1/api.gen.js +29 -37
  13. package/dist/api/domain/v2beta1/index.gen.js +0 -2
  14. package/dist/api/domain/v2beta1/marshalling.gen.js +408 -194
  15. package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -14
  16. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
  17. package/dist/api/function/v1beta1/index.gen.js +2 -0
  18. package/dist/api/function/v1beta1/marshalling.gen.js +64 -36
  19. package/dist/api/function/v1beta1/validation-rules.gen.js +44 -0
  20. package/dist/api/iam/v1alpha1/api.gen.js +26 -42
  21. package/dist/api/iam/v1alpha1/marshalling.gen.js +44 -33
  22. package/dist/api/instance/v1/api.gen.js +1 -1
  23. package/dist/api/instance/v1/marshalling.gen.js +394 -185
  24. package/dist/api/iot/v1/api.gen.js +24 -32
  25. package/dist/api/iot/v1/marshalling.gen.js +87 -36
  26. package/dist/api/ipam/index.js +2 -0
  27. package/dist/api/ipam/v1/api.gen.js +113 -0
  28. package/dist/api/ipam/v1/index.gen.js +6 -0
  29. package/dist/api/ipam/v1/marshalling.gen.js +77 -0
  30. package/dist/api/ipam/v1/validation-rules.gen.js +11 -0
  31. package/dist/api/ipfs/v1alpha1/api.gen.js +120 -3
  32. package/dist/api/ipfs/v1alpha1/content.gen.js +4 -1
  33. package/dist/api/ipfs/v1alpha1/index.gen.js +2 -2
  34. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +78 -19
  35. package/dist/api/k8s/v1/marshalling.gen.js +125 -37
  36. package/dist/api/lb/v1/api.gen.js +1 -1
  37. package/dist/api/lb/v1/marshalling.gen.js +251 -135
  38. package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
  39. package/dist/api/marketplace/v2/api.gen.js +3 -3
  40. package/dist/api/mnq/index.js +2 -0
  41. package/dist/api/mnq/v1alpha1/api.gen.js +12 -20
  42. package/dist/api/mnq/v1alpha1/marshalling.gen.js +19 -14
  43. package/dist/api/mnq/v1beta1/api.gen.js +529 -0
  44. package/dist/api/mnq/v1beta1/index.gen.js +6 -0
  45. package/dist/api/mnq/v1beta1/marshalling.gen.js +212 -0
  46. package/dist/api/mnq/v1beta1/validation-rules.gen.js +77 -0
  47. package/dist/api/rdb/v1/marshalling.gen.js +122 -64
  48. package/dist/api/redis/v1/marshalling.gen.js +51 -27
  49. package/dist/api/registry/v1/marshalling.gen.js +3 -1
  50. package/dist/api/secret/v1alpha1/marshalling.gen.js +11 -4
  51. package/dist/api/tem/v1alpha1/marshalling.gen.js +22 -13
  52. package/dist/api/test/v1/marshalling.gen.js +2 -0
  53. package/dist/api/vpc/v2/marshalling.gen.js +2 -0
  54. package/dist/api/vpcgw/v1/marshalling.gen.js +47 -24
  55. package/dist/api/webhosting/v1alpha1/api.gen.js +2 -54
  56. package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
  57. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +14 -41
  58. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +1 -10
  59. package/dist/index.cjs +3735 -1615
  60. package/dist/index.d.ts +5809 -2209
  61. package/dist/index.js +30 -28
  62. package/dist/scw/constants.js +1 -1
  63. package/package.json +2 -2
@@ -4,21 +4,13 @@ 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 unmarshalContactExtensionNL = data => {
8
- if (!isJSONObject(data)) {
9
- throw new TypeError(`Unmarshalling the type 'ContactExtensionNL' failed as data isn't a dictionary.`);
10
- }
11
- return {
12
- legalForm: data.legal_form,
13
- legalFormRegistrationNumber: data.legal_form_registration_number
14
- };
15
- };
16
- const unmarshalContactExtensionEU = data => {
7
+ const unmarshalContactExtensionFRAssociationInfo = data => {
17
8
  if (!isJSONObject(data)) {
18
- throw new TypeError(`Unmarshalling the type 'ContactExtensionEU' failed as data isn't a dictionary.`);
9
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionFRAssociationInfo' failed as data isn't a dictionary.`);
19
10
  }
20
11
  return {
21
- europeanCitizenship: data.european_citizenship
12
+ publicationJo: unmarshalDate(data.publication_jo),
13
+ publicationJoPage: data.publication_jo_page
22
14
  };
23
15
  };
24
16
  const unmarshalContactExtensionFRCodeAuthAfnicInfo = data => {
@@ -29,38 +21,37 @@ const unmarshalContactExtensionFRCodeAuthAfnicInfo = data => {
29
21
  codeAuthAfnic: data.code_auth_afnic
30
22
  };
31
23
  };
32
- const unmarshalContactExtensionFRTrademarkInfo = data => {
24
+ const unmarshalContactExtensionFRDunsInfo = data => {
33
25
  if (!isJSONObject(data)) {
34
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRTrademarkInfo' failed as data isn't a dictionary.`);
26
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionFRDunsInfo' failed as data isn't a dictionary.`);
35
27
  }
36
28
  return {
37
- trademarkInpi: data.trademark_inpi
29
+ dunsId: data.duns_id,
30
+ localId: data.local_id
38
31
  };
39
32
  };
40
- const unmarshalContactExtensionFRAssociationInfo = data => {
33
+ const unmarshalContactExtensionFRIndividualInfo = data => {
41
34
  if (!isJSONObject(data)) {
42
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRAssociationInfo' failed as data isn't a dictionary.`);
35
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionFRIndividualInfo' failed as data isn't a dictionary.`);
43
36
  }
44
37
  return {
45
- publicationJo: unmarshalDate(data.publication_jo),
46
- publicationJoPage: data.publication_jo_page
38
+ whoisOptIn: data.whois_opt_in
47
39
  };
48
40
  };
49
- const unmarshalContactExtensionFRDunsInfo = data => {
41
+ const unmarshalContactExtensionFRTrademarkInfo = data => {
50
42
  if (!isJSONObject(data)) {
51
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRDunsInfo' failed as data isn't a dictionary.`);
43
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionFRTrademarkInfo' failed as data isn't a dictionary.`);
52
44
  }
53
45
  return {
54
- dunsId: data.duns_id,
55
- localId: data.local_id
46
+ trademarkInpi: data.trademark_inpi
56
47
  };
57
48
  };
58
- const unmarshalContactExtensionFRIndividualInfo = data => {
49
+ const unmarshalContactExtensionEU = data => {
59
50
  if (!isJSONObject(data)) {
60
- throw new TypeError(`Unmarshalling the type 'ContactExtensionFRIndividualInfo' failed as data isn't a dictionary.`);
51
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionEU' failed as data isn't a dictionary.`);
61
52
  }
62
53
  return {
63
- whoisOptIn: data.whois_opt_in
54
+ europeanCitizenship: data.european_citizenship
64
55
  };
65
56
  };
66
57
  const unmarshalContactExtensionFR = data => {
@@ -76,6 +67,15 @@ const unmarshalContactExtensionFR = data => {
76
67
  trademarkInfo: data.trademark_info ? unmarshalContactExtensionFRTrademarkInfo(data.trademark_info) : undefined
77
68
  };
78
69
  };
70
+ const unmarshalContactExtensionNL = data => {
71
+ if (!isJSONObject(data)) {
72
+ throw new TypeError(`Unmarshalling the type 'ContactExtensionNL' failed as data isn't a dictionary.`);
73
+ }
74
+ return {
75
+ legalForm: data.legal_form,
76
+ legalFormRegistrationNumber: data.legal_form_registration_number
77
+ };
78
+ };
79
79
  const unmarshalContactQuestion = data => {
80
80
  if (!isJSONObject(data)) {
81
81
  throw new TypeError(`Unmarshalling the type 'ContactQuestion' failed as data isn't a dictionary.`);
@@ -99,9 +99,9 @@ const unmarshalContact = data => {
99
99
  email: data.email,
100
100
  emailAlt: data.email_alt,
101
101
  emailStatus: data.email_status,
102
- extensionEu: unmarshalContactExtensionEU(data.extension_eu),
103
- extensionFr: unmarshalContactExtensionFR(data.extension_fr),
104
- extensionNl: unmarshalContactExtensionNL(data.extension_nl),
102
+ extensionEu: data.extension_eu ? unmarshalContactExtensionEU(data.extension_eu) : undefined,
103
+ extensionFr: data.extension_fr ? unmarshalContactExtensionFR(data.extension_fr) : undefined,
104
+ extensionNl: data.extension_nl ? unmarshalContactExtensionNL(data.extension_nl) : undefined,
105
105
  faxNumber: data.fax_number,
106
106
  firstname: data.firstname,
107
107
  id: data.id,
@@ -123,7 +123,7 @@ const unmarshalDNSZone = data => {
123
123
  }
124
124
  return {
125
125
  domain: data.domain,
126
- message: data.message ? data.message : undefined,
126
+ message: data.message,
127
127
  ns: data.ns,
128
128
  nsDefault: data.ns_default,
129
129
  nsMaster: data.ns_master,
@@ -164,7 +164,7 @@ const unmarshalCheckContactsCompatibilityResponseContactCheckResult = data => {
164
164
  }
165
165
  return {
166
166
  compatible: data.compatible,
167
- errorMessage: data.error_message ? data.error_message : undefined
167
+ errorMessage: data.error_message
168
168
  };
169
169
  };
170
170
  const unmarshalCheckContactsCompatibilityResponse = data => {
@@ -172,10 +172,10 @@ const unmarshalCheckContactsCompatibilityResponse = data => {
172
172
  throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
173
173
  }
174
174
  return {
175
- administrativeCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result),
175
+ administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : undefined,
176
176
  compatible: data.compatible,
177
- ownerCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result),
178
- technicalCheckResult: unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result)
177
+ ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result) : undefined,
178
+ technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result) : undefined
179
179
  };
180
180
  };
181
181
  const unmarshalClearDNSZoneRecordsResponse = data => {
@@ -202,84 +202,84 @@ const unmarshalDeleteSSLCertificateResponse = data => {
202
202
  }
203
203
  return {};
204
204
  };
205
- const unmarshalTldOffer = data => {
205
+ const unmarshalDSRecordPublicKey = data => {
206
206
  if (!isJSONObject(data)) {
207
- throw new TypeError(`Unmarshalling the type 'TldOffer' failed as data isn't a dictionary.`);
207
+ throw new TypeError(`Unmarshalling the type 'DSRecordPublicKey' failed as data isn't a dictionary.`);
208
208
  }
209
209
  return {
210
- action: data.action,
211
- operationPath: data.operation_path,
212
- price: data.price ? unmarshalMoney(data.price) : undefined
210
+ key: data.key
213
211
  };
214
212
  };
215
- const unmarshalTld = data => {
213
+ const unmarshalDSRecordDigest = data => {
216
214
  if (!isJSONObject(data)) {
217
- throw new TypeError(`Unmarshalling the type 'Tld' failed as data isn't a dictionary.`);
215
+ throw new TypeError(`Unmarshalling the type 'DSRecordDigest' failed as data isn't a dictionary.`);
218
216
  }
219
217
  return {
220
- dnssecSupport: data.dnssec_support,
221
- durationInYearsMax: data.duration_in_years_max,
222
- durationInYearsMin: data.duration_in_years_min,
223
- idnSupport: data.idn_support,
224
- name: data.name,
225
- offers: unmarshalMapOfObject(data.offers, unmarshalTldOffer),
226
- specifications: data.specifications
218
+ digest: data.digest,
219
+ publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : undefined,
220
+ type: data.type
227
221
  };
228
222
  };
229
- const unmarshalDomainRegistrationStatusTransfer = data => {
223
+ const unmarshalDSRecord = data => {
230
224
  if (!isJSONObject(data)) {
231
- throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusTransfer' failed as data isn't a dictionary.`);
225
+ throw new TypeError(`Unmarshalling the type 'DSRecord' failed as data isn't a dictionary.`);
232
226
  }
233
227
  return {
234
- status: data.status,
235
- voteCurrentOwner: data.vote_current_owner,
236
- voteNewOwner: data.vote_new_owner
228
+ algorithm: data.algorithm,
229
+ digest: data.digest ? unmarshalDSRecordDigest(data.digest) : undefined,
230
+ keyId: data.key_id,
231
+ publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : undefined
237
232
  };
238
233
  };
239
- const unmarshalDomainRegistrationStatusExternalDomain = data => {
234
+ const unmarshalTldOffer = data => {
240
235
  if (!isJSONObject(data)) {
241
- throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusExternalDomain' failed as data isn't a dictionary.`);
236
+ throw new TypeError(`Unmarshalling the type 'TldOffer' failed as data isn't a dictionary.`);
242
237
  }
243
238
  return {
244
- validationToken: data.validation_token
239
+ action: data.action,
240
+ operationPath: data.operation_path,
241
+ price: data.price ? unmarshalMoney(data.price) : undefined
245
242
  };
246
243
  };
247
- const unmarshalDSRecordPublicKey = data => {
244
+ const unmarshalDomainDNSSEC = data => {
248
245
  if (!isJSONObject(data)) {
249
- throw new TypeError(`Unmarshalling the type 'DSRecordPublicKey' failed as data isn't a dictionary.`);
246
+ throw new TypeError(`Unmarshalling the type 'DomainDNSSEC' failed as data isn't a dictionary.`);
250
247
  }
251
248
  return {
252
- key: data.key
249
+ dsRecords: unmarshalArrayOfObject(data.ds_records, unmarshalDSRecord),
250
+ status: data.status
253
251
  };
254
252
  };
255
- const unmarshalDSRecordDigest = data => {
253
+ const unmarshalDomainRegistrationStatusExternalDomain = data => {
256
254
  if (!isJSONObject(data)) {
257
- throw new TypeError(`Unmarshalling the type 'DSRecordDigest' failed as data isn't a dictionary.`);
255
+ throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusExternalDomain' failed as data isn't a dictionary.`);
258
256
  }
259
257
  return {
260
- digest: data.digest,
261
- publicKey: unmarshalDSRecordPublicKey(data.public_key),
262
- type: data.type
258
+ validationToken: data.validation_token
263
259
  };
264
260
  };
265
- const unmarshalDSRecord = data => {
261
+ const unmarshalDomainRegistrationStatusTransfer = data => {
266
262
  if (!isJSONObject(data)) {
267
- throw new TypeError(`Unmarshalling the type 'DSRecord' failed as data isn't a dictionary.`);
263
+ throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusTransfer' failed as data isn't a dictionary.`);
268
264
  }
269
265
  return {
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
266
+ status: data.status,
267
+ voteCurrentOwner: data.vote_current_owner,
268
+ voteNewOwner: data.vote_new_owner
274
269
  };
275
270
  };
276
- const unmarshalDomainDNSSEC = data => {
271
+ const unmarshalTld = data => {
277
272
  if (!isJSONObject(data)) {
278
- throw new TypeError(`Unmarshalling the type 'DomainDNSSEC' failed as data isn't a dictionary.`);
273
+ throw new TypeError(`Unmarshalling the type 'Tld' failed as data isn't a dictionary.`);
279
274
  }
280
275
  return {
281
- dsRecords: unmarshalArrayOfObject(data.ds_records, unmarshalDSRecord),
282
- status: data.status
276
+ dnssecSupport: data.dnssec_support,
277
+ durationInYearsMax: data.duration_in_years_max,
278
+ durationInYearsMin: data.duration_in_years_min,
279
+ idnSupport: data.idn_support,
280
+ name: data.name,
281
+ offers: unmarshalMapOfObject(data.offers, unmarshalTldOffer),
282
+ specifications: data.specifications
283
283
  };
284
284
  };
285
285
  const unmarshalDomain = data => {
@@ -287,22 +287,22 @@ const unmarshalDomain = data => {
287
287
  throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
288
288
  }
289
289
  return {
290
- administrativeContact: unmarshalContact(data.administrative_contact),
290
+ administrativeContact: data.administrative_contact ? unmarshalContact(data.administrative_contact) : undefined,
291
291
  autoRenewStatus: data.auto_renew_status,
292
292
  dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
293
- dnssec: unmarshalDomainDNSSEC(data.dnssec),
293
+ dnssec: data.dnssec ? unmarshalDomainDNSSEC(data.dnssec) : undefined,
294
294
  domain: data.domain,
295
295
  eppCode: data.epp_code,
296
296
  expiredAt: unmarshalDate(data.expired_at),
297
297
  externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : undefined,
298
298
  isExternal: data.is_external,
299
299
  organizationId: data.organization_id,
300
- ownerContact: unmarshalContact(data.owner_contact),
300
+ ownerContact: data.owner_contact ? unmarshalContact(data.owner_contact) : undefined,
301
301
  projectId: data.project_id,
302
302
  registrar: data.registrar,
303
303
  status: data.status,
304
- technicalContact: unmarshalContact(data.technical_contact),
305
- tld: unmarshalTld(data.tld),
304
+ technicalContact: data.technical_contact ? unmarshalContact(data.technical_contact) : undefined,
305
+ tld: data.tld ? unmarshalTld(data.tld) : undefined,
306
306
  transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : undefined,
307
307
  updatedAt: unmarshalDate(data.updated_at)
308
308
  };
@@ -317,40 +317,14 @@ const unmarshalGetDNSZoneTsigKeyResponse = data => {
317
317
  name: data.name
318
318
  };
319
319
  };
320
- const unmarshalRecordChangeClear = data => {
321
- if (!isJSONObject(data)) {
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.`);
329
- }
330
- return {
331
- id: data.id ? data.id : undefined,
332
- idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined
333
- };
334
- };
335
- const unmarshalRecordIdentifier = data => {
336
- if (!isJSONObject(data)) {
337
- throw new TypeError(`Unmarshalling the type 'RecordIdentifier' failed as data isn't a dictionary.`);
338
- }
339
- return {
340
- data: data.data ? data.data : undefined,
341
- name: data.name,
342
- ttl: data.ttl ? data.ttl : undefined,
343
- type: data.type
344
- };
345
- };
346
- const unmarshalRecordChangeSet = data => {
320
+ const unmarshalDomainRecordGeoIPConfigMatch = data => {
347
321
  if (!isJSONObject(data)) {
348
- throw new TypeError(`Unmarshalling the type 'RecordChangeSet' failed as data isn't a dictionary.`);
322
+ throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfigMatch' failed as data isn't a dictionary.`);
349
323
  }
350
324
  return {
351
- id: data.id ? data.id : undefined,
352
- idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined,
353
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
325
+ continents: data.continents,
326
+ countries: data.countries,
327
+ data: data.data
354
328
  };
355
329
  };
356
330
  const unmarshalDomainRecordViewConfigView = data => {
@@ -362,14 +336,6 @@ const unmarshalDomainRecordViewConfigView = data => {
362
336
  subnet: data.subnet
363
337
  };
364
338
  };
365
- const unmarshalDomainRecordViewConfig = data => {
366
- if (!isJSONObject(data)) {
367
- throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfig' failed as data isn't a dictionary.`);
368
- }
369
- return {
370
- views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView)
371
- };
372
- };
373
339
  const unmarshalDomainRecordWeightedConfigWeightedIP = data => {
374
340
  if (!isJSONObject(data)) {
375
341
  throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfigWeightedIP' failed as data isn't a dictionary.`);
@@ -379,12 +345,13 @@ const unmarshalDomainRecordWeightedConfigWeightedIP = data => {
379
345
  weight: data.weight
380
346
  };
381
347
  };
382
- const unmarshalDomainRecordWeightedConfig = data => {
348
+ const unmarshalDomainRecordGeoIPConfig = data => {
383
349
  if (!isJSONObject(data)) {
384
- throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfig' failed as data isn't a dictionary.`);
350
+ throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfig' failed as data isn't a dictionary.`);
385
351
  }
386
352
  return {
387
- weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP)
353
+ default: data.default,
354
+ matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
388
355
  };
389
356
  };
390
357
  const unmarshalDomainRecordHTTPServiceConfig = data => {
@@ -393,29 +360,26 @@ const unmarshalDomainRecordHTTPServiceConfig = data => {
393
360
  }
394
361
  return {
395
362
  ips: data.ips,
396
- mustContain: data.must_contain ? data.must_contain : undefined,
363
+ mustContain: data.must_contain,
397
364
  strategy: data.strategy,
398
365
  url: data.url,
399
- userAgent: data.user_agent ? data.user_agent : undefined
366
+ userAgent: data.user_agent
400
367
  };
401
368
  };
402
- const unmarshalDomainRecordGeoIPConfigMatch = data => {
369
+ const unmarshalDomainRecordViewConfig = data => {
403
370
  if (!isJSONObject(data)) {
404
- throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfigMatch' failed as data isn't a dictionary.`);
371
+ throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfig' failed as data isn't a dictionary.`);
405
372
  }
406
373
  return {
407
- continents: data.continents,
408
- countries: data.countries,
409
- data: data.data
374
+ views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView)
410
375
  };
411
376
  };
412
- const unmarshalDomainRecordGeoIPConfig = data => {
377
+ const unmarshalDomainRecordWeightedConfig = data => {
413
378
  if (!isJSONObject(data)) {
414
- throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfig' failed as data isn't a dictionary.`);
379
+ throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfig' failed as data isn't a dictionary.`);
415
380
  }
416
381
  return {
417
- default: data.default,
418
- matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
382
+ weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP)
419
383
  };
420
384
  };
421
385
  const unmarshalDomainRecord = data => {
@@ -423,7 +387,7 @@ const unmarshalDomainRecord = data => {
423
387
  throw new TypeError(`Unmarshalling the type 'DomainRecord' failed as data isn't a dictionary.`);
424
388
  }
425
389
  return {
426
- comment: data.comment ? data.comment : undefined,
390
+ comment: data.comment,
427
391
  data: data.data,
428
392
  geoIpConfig: data.geo_ip_config ? unmarshalDomainRecordGeoIPConfig(data.geo_ip_config) : undefined,
429
393
  httpServiceConfig: data.http_service_config ? unmarshalDomainRecordHTTPServiceConfig(data.http_service_config) : undefined,
@@ -436,6 +400,17 @@ const unmarshalDomainRecord = data => {
436
400
  weightedConfig: data.weighted_config ? unmarshalDomainRecordWeightedConfig(data.weighted_config) : undefined
437
401
  };
438
402
  };
403
+ const unmarshalRecordIdentifier = data => {
404
+ if (!isJSONObject(data)) {
405
+ throw new TypeError(`Unmarshalling the type 'RecordIdentifier' failed as data isn't a dictionary.`);
406
+ }
407
+ return {
408
+ data: data.data,
409
+ name: data.name,
410
+ ttl: data.ttl,
411
+ type: data.type
412
+ };
413
+ };
439
414
  const unmarshalRecordChangeAdd = data => {
440
415
  if (!isJSONObject(data)) {
441
416
  throw new TypeError(`Unmarshalling the type 'RecordChangeAdd' failed as data isn't a dictionary.`);
@@ -444,6 +419,31 @@ const unmarshalRecordChangeAdd = data => {
444
419
  records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
445
420
  };
446
421
  };
422
+ const unmarshalRecordChangeClear = data => {
423
+ if (!isJSONObject(data)) {
424
+ throw new TypeError(`Unmarshalling the type 'RecordChangeClear' failed as data isn't a dictionary.`);
425
+ }
426
+ return {};
427
+ };
428
+ const unmarshalRecordChangeDelete = data => {
429
+ if (!isJSONObject(data)) {
430
+ throw new TypeError(`Unmarshalling the type 'RecordChangeDelete' failed as data isn't a dictionary.`);
431
+ }
432
+ return {
433
+ id: data.id,
434
+ idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined
435
+ };
436
+ };
437
+ const unmarshalRecordChangeSet = data => {
438
+ if (!isJSONObject(data)) {
439
+ throw new TypeError(`Unmarshalling the type 'RecordChangeSet' failed as data isn't a dictionary.`);
440
+ }
441
+ return {
442
+ id: data.id,
443
+ idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : undefined,
444
+ records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
445
+ };
446
+ };
447
447
  const unmarshalRecordChange = data => {
448
448
  if (!isJSONObject(data)) {
449
449
  throw new TypeError(`Unmarshalling the type 'RecordChange' failed as data isn't a dictionary.`);
@@ -502,7 +502,7 @@ const unmarshalContactRoles = data => {
502
502
  throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
503
503
  }
504
504
  return {
505
- contact: unmarshalContact(data.contact),
505
+ contact: data.contact ? unmarshalContact(data.contact) : undefined,
506
506
  roles: unmarshalMapOfObject(data.roles, unmarshalContactRolesRoles)
507
507
  };
508
508
  };
@@ -627,9 +627,9 @@ const unmarshalRenewableDomain = data => {
627
627
  limitRenewAt: unmarshalDate(data.limit_renew_at),
628
628
  organizationId: data.organization_id,
629
629
  projectId: data.project_id,
630
- renewableDurationInYears: data.renewable_duration_in_years ? data.renewable_duration_in_years : undefined,
630
+ renewableDurationInYears: data.renewable_duration_in_years,
631
631
  status: data.status,
632
- tld: unmarshalTld(data.tld)
632
+ tld: data.tld ? unmarshalTld(data.tld) : undefined
633
633
  };
634
634
  };
635
635
  const unmarshalListRenewableDomainsResponse = data => {
@@ -655,9 +655,9 @@ const unmarshalTask = data => {
655
655
  throw new TypeError(`Unmarshalling the type 'Task' failed as data isn't a dictionary.`);
656
656
  }
657
657
  return {
658
- domain: data.domain ? data.domain : undefined,
658
+ domain: data.domain,
659
659
  id: data.id,
660
- message: data.message ? data.message : undefined,
660
+ message: data.message,
661
661
  organizationId: data.organization_id,
662
662
  projectId: data.project_id,
663
663
  startedAt: unmarshalDate(data.started_at),
@@ -729,7 +729,7 @@ const unmarshalAvailableDomain = data => {
729
729
  return {
730
730
  available: data.available,
731
731
  domain: data.domain,
732
- tld: unmarshalTld(data.tld)
732
+ tld: data.tld ? unmarshalTld(data.tld) : undefined
733
733
  };
734
734
  };
735
735
  const unmarshalSearchAvailableDomainsResponse = data => {
@@ -759,7 +759,7 @@ const unmarshalUpdateDNSZoneRecordsResponse = data => {
759
759
  const marshalCloneDNSZoneRequest = (request, defaults) => ({
760
760
  dest_dns_zone: request.destDnsZone,
761
761
  overwrite: request.overwrite,
762
- project_id: request.projectId
762
+ project_id: request.projectId ?? defaults.defaultProjectId
763
763
  });
764
764
  const marshalCreateDNSZoneRequest = (request, defaults) => ({
765
765
  domain: request.domain,
@@ -770,85 +770,191 @@ const marshalCreateSSLCertificateRequest = (request, defaults) => ({
770
770
  alternative_dns_zones: request.alternativeDnsZones,
771
771
  dns_zone: request.dnsZone
772
772
  });
773
+ const marshalImportProviderDNSZoneRequestOnlineV1 = (request, defaults) => ({
774
+ token: request.token
775
+ });
773
776
  const marshalImportProviderDNSZoneRequest = (request, defaults) => ({
774
777
  ...resolveOneOf([{
775
778
  param: 'online_v1',
776
- value: request.onlineV1
779
+ value: request.onlineV1 !== undefined ? marshalImportProviderDNSZoneRequestOnlineV1(request.onlineV1) : undefined
777
780
  }])
778
781
  });
782
+ const marshalImportRawDNSZoneRequestTsigKey = (request, defaults) => ({
783
+ algorithm: request.algorithm,
784
+ key: request.key,
785
+ name: request.name
786
+ });
787
+ const marshalImportRawDNSZoneRequestAXFRSource = (request, defaults) => ({
788
+ name_server: request.nameServer,
789
+ tsig_key: request.tsigKey !== undefined ? marshalImportRawDNSZoneRequestTsigKey(request.tsigKey) : undefined
790
+ });
791
+ const marshalImportRawDNSZoneRequestBindSource = (request, defaults) => ({
792
+ content: request.content
793
+ });
779
794
  const marshalImportRawDNSZoneRequest = (request, defaults) => ({
780
795
  content: request.content,
781
796
  format: request.format,
782
797
  project_id: request.projectId ?? defaults.defaultProjectId,
783
798
  ...resolveOneOf([{
784
- param: 'axfr_source',
785
- value: request.axfrSource
786
- }, {
787
799
  param: 'bind_source',
788
- value: request.bindSource
800
+ value: request.bindSource !== undefined ? marshalImportRawDNSZoneRequestBindSource(request.bindSource) : undefined
801
+ }, {
802
+ param: 'axfr_source',
803
+ value: request.axfrSource !== undefined ? marshalImportRawDNSZoneRequestAXFRSource(request.axfrSource) : undefined
789
804
  }])
790
805
  });
791
806
  const marshalRefreshDNSZoneRequest = (request, defaults) => ({
792
807
  recreate_dns_zone: request.recreateDnsZone,
793
808
  recreate_sub_dns_zone: request.recreateSubDnsZone
794
809
  });
810
+ const marshalContactExtensionFRAssociationInfo = (request, defaults) => ({
811
+ publication_jo: request.publicationJo,
812
+ publication_jo_page: request.publicationJoPage
813
+ });
814
+ const marshalContactExtensionFRCodeAuthAfnicInfo = (request, defaults) => ({
815
+ code_auth_afnic: request.codeAuthAfnic
816
+ });
817
+ const marshalContactExtensionFRDunsInfo = (request, defaults) => ({
818
+ duns_id: request.dunsId,
819
+ local_id: request.localId
820
+ });
821
+ const marshalContactExtensionFRIndividualInfo = (request, defaults) => ({
822
+ whois_opt_in: request.whoisOptIn
823
+ });
824
+ const marshalContactExtensionFRTrademarkInfo = (request, defaults) => ({
825
+ trademark_inpi: request.trademarkInpi
826
+ });
827
+ const marshalContactExtensionEU = (request, defaults) => ({
828
+ european_citizenship: request.europeanCitizenship
829
+ });
830
+ const marshalContactExtensionFR = (request, defaults) => ({
831
+ mode: request.mode,
832
+ ...resolveOneOf([{
833
+ param: 'individual_info',
834
+ value: request.individualInfo !== undefined ? marshalContactExtensionFRIndividualInfo(request.individualInfo) : undefined
835
+ }, {
836
+ param: 'duns_info',
837
+ value: request.dunsInfo !== undefined ? marshalContactExtensionFRDunsInfo(request.dunsInfo) : undefined
838
+ }, {
839
+ param: 'association_info',
840
+ value: request.associationInfo !== undefined ? marshalContactExtensionFRAssociationInfo(request.associationInfo) : undefined
841
+ }, {
842
+ param: 'trademark_info',
843
+ value: request.trademarkInfo !== undefined ? marshalContactExtensionFRTrademarkInfo(request.trademarkInfo) : undefined
844
+ }, {
845
+ param: 'code_auth_afnic_info',
846
+ value: request.codeAuthAfnicInfo !== undefined ? marshalContactExtensionFRCodeAuthAfnicInfo(request.codeAuthAfnicInfo) : undefined
847
+ }])
848
+ });
849
+ const marshalContactExtensionNL = (request, defaults) => ({
850
+ legal_form: request.legalForm,
851
+ legal_form_registration_number: request.legalFormRegistrationNumber
852
+ });
853
+ const marshalContactQuestion = (request, defaults) => ({
854
+ answer: request.answer,
855
+ question: request.question
856
+ });
857
+ const marshalNewContact = (request, defaults) => ({
858
+ address_line_1: request.addressLine1,
859
+ address_line_2: request.addressLine2,
860
+ city: request.city,
861
+ company_identification_code: request.companyIdentificationCode,
862
+ company_name: request.companyName,
863
+ country: request.country,
864
+ email: request.email,
865
+ email_alt: request.emailAlt,
866
+ extension_eu: request.extensionEu !== undefined ? marshalContactExtensionEU(request.extensionEu) : undefined,
867
+ extension_fr: request.extensionFr !== undefined ? marshalContactExtensionFR(request.extensionFr) : undefined,
868
+ extension_nl: request.extensionNl !== undefined ? marshalContactExtensionNL(request.extensionNl) : undefined,
869
+ fax_number: request.faxNumber,
870
+ firstname: request.firstname,
871
+ lang: request.lang,
872
+ lastname: request.lastname,
873
+ legal_form: request.legalForm,
874
+ phone_number: request.phoneNumber,
875
+ questions: request.questions !== undefined ? request.questions.map(elt => marshalContactQuestion(elt)) : undefined,
876
+ resale: request.resale,
877
+ state: request.state,
878
+ vat_identification_code: request.vatIdentificationCode,
879
+ whois_opt_in: request.whoisOptIn,
880
+ zip: request.zip
881
+ });
795
882
  const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
796
883
  domains: request.domains,
797
884
  duration_in_years: request.durationInYears,
798
885
  project_id: request.projectId ?? defaults.defaultProjectId,
799
886
  ...resolveOneOf([{
800
- param: 'owner_contact',
801
- value: request.ownerContact
802
- }, {
803
887
  param: 'owner_contact_id',
804
888
  value: request.ownerContactId
889
+ }, {
890
+ param: 'owner_contact',
891
+ value: request.ownerContact !== undefined ? marshalNewContact(request.ownerContact) : undefined
805
892
  }]),
806
893
  ...resolveOneOf([{
807
- param: 'administrative_contact',
808
- value: request.administrativeContact
809
- }, {
810
894
  param: 'administrative_contact_id',
811
895
  value: request.administrativeContactId
896
+ }, {
897
+ param: 'administrative_contact',
898
+ value: request.administrativeContact !== undefined ? marshalNewContact(request.administrativeContact) : undefined
812
899
  }]),
813
900
  ...resolveOneOf([{
814
- param: 'technical_contact',
815
- value: request.technicalContact
816
- }, {
817
901
  param: 'technical_contact_id',
818
902
  value: request.technicalContactId
903
+ }, {
904
+ param: 'technical_contact',
905
+ value: request.technicalContact !== undefined ? marshalNewContact(request.technicalContact) : undefined
819
906
  }])
820
907
  });
821
908
  const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({
822
909
  domains: request.domains,
823
910
  tlds: request.tlds,
824
911
  ...resolveOneOf([{
825
- param: 'owner_contact',
826
- value: request.ownerContact
827
- }, {
828
912
  param: 'owner_contact_id',
829
913
  value: request.ownerContactId
914
+ }, {
915
+ param: 'owner_contact',
916
+ value: request.ownerContact !== undefined ? marshalNewContact(request.ownerContact) : undefined
830
917
  }]),
831
918
  ...resolveOneOf([{
832
- param: 'administrative_contact',
833
- value: request.administrativeContact
834
- }, {
835
919
  param: 'administrative_contact_id',
836
920
  value: request.administrativeContactId
921
+ }, {
922
+ param: 'administrative_contact',
923
+ value: request.administrativeContact !== undefined ? marshalNewContact(request.administrativeContact) : undefined
837
924
  }]),
838
925
  ...resolveOneOf([{
839
- param: 'technical_contact',
840
- value: request.technicalContact
841
- }, {
842
926
  param: 'technical_contact_id',
843
927
  value: request.technicalContactId
928
+ }, {
929
+ param: 'technical_contact',
930
+ value: request.technicalContact !== undefined ? marshalNewContact(request.technicalContact) : undefined
844
931
  }])
845
932
  });
846
933
  const marshalRegistrarApiCreateDomainHostRequest = (request, defaults) => ({
847
934
  ips: request.ips,
848
935
  name: request.name
849
936
  });
937
+ const marshalDSRecordPublicKey = (request, defaults) => ({
938
+ key: request.key
939
+ });
940
+ const marshalDSRecordDigest = (request, defaults) => ({
941
+ digest: request.digest,
942
+ public_key: request.publicKey !== undefined ? marshalDSRecordPublicKey(request.publicKey) : undefined,
943
+ type: request.type
944
+ });
945
+ const marshalDSRecord = (request, defaults) => ({
946
+ algorithm: request.algorithm,
947
+ key_id: request.keyId,
948
+ ...resolveOneOf([{
949
+ param: 'digest',
950
+ value: request.digest !== undefined ? marshalDSRecordDigest(request.digest) : undefined
951
+ }, {
952
+ param: 'public_key',
953
+ value: request.publicKey !== undefined ? marshalDSRecordPublicKey(request.publicKey) : undefined
954
+ }])
955
+ });
850
956
  const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({
851
- ds_record: request.dsRecord
957
+ ds_record: request.dsRecord !== undefined ? marshalDSRecord(request.dsRecord) : undefined
852
958
  });
853
959
  const marshalRegistrarApiRegisterExternalDomainRequest = (request, defaults) => ({
854
960
  domain: request.domain,
@@ -860,40 +966,48 @@ const marshalRegistrarApiRenewDomainsRequest = (request, defaults) => ({
860
966
  force_late_renewal: request.forceLateRenewal
861
967
  });
862
968
  const marshalRegistrarApiTradeDomainRequest = (request, defaults) => ({
863
- project_id: request.projectId,
969
+ project_id: request.projectId ?? defaults.defaultProjectId,
864
970
  ...resolveOneOf([{
865
- param: 'new_owner_contact',
866
- value: request.newOwnerContact
867
- }, {
868
971
  param: 'new_owner_contact_id',
869
972
  value: request.newOwnerContactId
973
+ }, {
974
+ param: 'new_owner_contact',
975
+ value: request.newOwnerContact !== undefined ? marshalNewContact(request.newOwnerContact) : undefined
870
976
  }])
871
977
  });
978
+ const marshalTransferInDomainRequestTransferRequest = (request, defaults) => ({
979
+ auth_code: request.authCode,
980
+ domain: request.domain
981
+ });
872
982
  const marshalRegistrarApiTransferInDomainRequest = (request, defaults) => ({
873
- domains: request.domains,
983
+ domains: request.domains.map(elt => marshalTransferInDomainRequestTransferRequest(elt)),
874
984
  project_id: request.projectId ?? defaults.defaultProjectId,
875
985
  ...resolveOneOf([{
876
- param: 'owner_contact',
877
- value: request.ownerContact
878
- }, {
879
986
  param: 'owner_contact_id',
880
987
  value: request.ownerContactId
988
+ }, {
989
+ param: 'owner_contact',
990
+ value: request.ownerContact !== undefined ? marshalNewContact(request.ownerContact) : undefined
881
991
  }]),
882
992
  ...resolveOneOf([{
883
- param: 'administrative_contact',
884
- value: request.administrativeContact
885
- }, {
886
993
  param: 'administrative_contact_id',
887
994
  value: request.administrativeContactId
995
+ }, {
996
+ param: 'administrative_contact',
997
+ value: request.administrativeContact !== undefined ? marshalNewContact(request.administrativeContact) : undefined
888
998
  }]),
889
999
  ...resolveOneOf([{
890
- param: 'technical_contact',
891
- value: request.technicalContact
892
- }, {
893
1000
  param: 'technical_contact_id',
894
1001
  value: request.technicalContactId
1002
+ }, {
1003
+ param: 'technical_contact',
1004
+ value: request.technicalContact !== undefined ? marshalNewContact(request.technicalContact) : undefined
895
1005
  }])
896
1006
  });
1007
+ const marshalUpdateContactRequestQuestion = (request, defaults) => ({
1008
+ answer: request.answer,
1009
+ question: request.question
1010
+ });
897
1011
  const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
898
1012
  address_line_1: request.addressLine1,
899
1013
  address_line_2: request.addressLine2,
@@ -902,13 +1016,13 @@ const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
902
1016
  country: request.country,
903
1017
  email: request.email,
904
1018
  email_alt: request.emailAlt,
905
- extension_eu: request.extensionEu,
906
- extension_fr: request.extensionFr,
907
- extension_nl: request.extensionNl,
1019
+ extension_eu: request.extensionEu !== undefined ? marshalContactExtensionEU(request.extensionEu) : undefined,
1020
+ extension_fr: request.extensionFr !== undefined ? marshalContactExtensionFR(request.extensionFr) : undefined,
1021
+ extension_nl: request.extensionNl !== undefined ? marshalContactExtensionNL(request.extensionNl) : undefined,
908
1022
  fax_number: request.faxNumber,
909
1023
  lang: request.lang,
910
1024
  phone_number: request.phoneNumber,
911
- questions: request.questions,
1025
+ questions: request.questions !== undefined ? request.questions.map(elt => marshalUpdateContactRequestQuestion(elt)) : undefined,
912
1026
  resale: request.resale,
913
1027
  state: request.state,
914
1028
  vat_identification_code: request.vatIdentificationCode,
@@ -920,32 +1034,132 @@ const marshalRegistrarApiUpdateDomainHostRequest = (request, defaults) => ({
920
1034
  });
921
1035
  const marshalRegistrarApiUpdateDomainRequest = (request, defaults) => ({
922
1036
  ...resolveOneOf([{
923
- param: 'technical_contact',
924
- value: request.technicalContact
925
- }, {
926
1037
  param: 'technical_contact_id',
927
1038
  value: request.technicalContactId
1039
+ }, {
1040
+ param: 'technical_contact',
1041
+ value: request.technicalContact !== undefined ? marshalNewContact(request.technicalContact) : undefined
928
1042
  }]),
929
1043
  ...resolveOneOf([{
930
- param: 'owner_contact',
931
- value: request.ownerContact
932
- }, {
933
1044
  param: 'owner_contact_id',
934
1045
  value: request.ownerContactId
1046
+ }, {
1047
+ param: 'owner_contact',
1048
+ value: request.ownerContact !== undefined ? marshalNewContact(request.ownerContact) : undefined
935
1049
  }]),
936
1050
  ...resolveOneOf([{
937
- param: 'administrative_contact',
938
- value: request.administrativeContact
939
- }, {
940
1051
  param: 'administrative_contact_id',
941
1052
  value: request.administrativeContactId
1053
+ }, {
1054
+ param: 'administrative_contact',
1055
+ value: request.administrativeContact !== undefined ? marshalNewContact(request.administrativeContact) : undefined
942
1056
  }])
943
1057
  });
1058
+ const marshalNameserver = (request, defaults) => ({
1059
+ ip: request.ip,
1060
+ name: request.name
1061
+ });
944
1062
  const marshalUpdateDNSZoneNameserversRequest = (request, defaults) => ({
945
- ns: request.ns
1063
+ ns: request.ns.map(elt => marshalNameserver(elt))
1064
+ });
1065
+ const marshalDomainRecordGeoIPConfigMatch = (request, defaults) => ({
1066
+ continents: request.continents,
1067
+ countries: request.countries,
1068
+ data: request.data
1069
+ });
1070
+ const marshalDomainRecordViewConfigView = (request, defaults) => ({
1071
+ data: request.data,
1072
+ subnet: request.subnet
1073
+ });
1074
+ const marshalDomainRecordWeightedConfigWeightedIP = (request, defaults) => ({
1075
+ ip: request.ip,
1076
+ weight: request.weight
1077
+ });
1078
+ const marshalDomainRecordGeoIPConfig = (request, defaults) => ({
1079
+ default: request.default,
1080
+ matches: request.matches.map(elt => marshalDomainRecordGeoIPConfigMatch(elt))
1081
+ });
1082
+ const marshalDomainRecordHTTPServiceConfig = (request, defaults) => ({
1083
+ ips: request.ips,
1084
+ must_contain: request.mustContain,
1085
+ strategy: request.strategy,
1086
+ url: request.url,
1087
+ user_agent: request.userAgent
1088
+ });
1089
+ const marshalDomainRecordViewConfig = (request, defaults) => ({
1090
+ views: request.views.map(elt => marshalDomainRecordViewConfigView(elt))
1091
+ });
1092
+ const marshalDomainRecordWeightedConfig = (request, defaults) => ({
1093
+ weighted_ips: request.weightedIps.map(elt => marshalDomainRecordWeightedConfigWeightedIP(elt))
1094
+ });
1095
+ const marshalDomainRecord = (request, defaults) => ({
1096
+ comment: request.comment,
1097
+ data: request.data,
1098
+ id: request.id,
1099
+ name: request.name,
1100
+ priority: request.priority,
1101
+ ttl: request.ttl,
1102
+ type: request.type,
1103
+ ...resolveOneOf([{
1104
+ param: 'geo_ip_config',
1105
+ value: request.geoIpConfig !== undefined ? marshalDomainRecordGeoIPConfig(request.geoIpConfig) : undefined
1106
+ }, {
1107
+ param: 'http_service_config',
1108
+ value: request.httpServiceConfig !== undefined ? marshalDomainRecordHTTPServiceConfig(request.httpServiceConfig) : undefined
1109
+ }, {
1110
+ param: 'weighted_config',
1111
+ value: request.weightedConfig !== undefined ? marshalDomainRecordWeightedConfig(request.weightedConfig) : undefined
1112
+ }, {
1113
+ param: 'view_config',
1114
+ value: request.viewConfig !== undefined ? marshalDomainRecordViewConfig(request.viewConfig) : undefined
1115
+ }])
1116
+ });
1117
+ const marshalRecordIdentifier = (request, defaults) => ({
1118
+ data: request.data,
1119
+ name: request.name,
1120
+ ttl: request.ttl,
1121
+ type: request.type
1122
+ });
1123
+ const marshalRecordChangeAdd = (request, defaults) => ({
1124
+ records: request.records.map(elt => marshalDomainRecord(elt))
1125
+ });
1126
+ const marshalRecordChangeClear = (request, defaults) => ({});
1127
+ const marshalRecordChangeDelete = (request, defaults) => ({
1128
+ ...resolveOneOf([{
1129
+ param: 'id',
1130
+ value: request.id
1131
+ }, {
1132
+ param: 'id_fields',
1133
+ value: request.idFields !== undefined ? marshalRecordIdentifier(request.idFields) : undefined
1134
+ }])
1135
+ });
1136
+ const marshalRecordChangeSet = (request, defaults) => ({
1137
+ records: request.records.map(elt => marshalDomainRecord(elt)),
1138
+ ...resolveOneOf([{
1139
+ param: 'id',
1140
+ value: request.id
1141
+ }, {
1142
+ param: 'id_fields',
1143
+ value: request.idFields !== undefined ? marshalRecordIdentifier(request.idFields) : undefined
1144
+ }])
1145
+ });
1146
+ const marshalRecordChange = (request, defaults) => ({
1147
+ ...resolveOneOf([{
1148
+ param: 'add',
1149
+ value: request.add !== undefined ? marshalRecordChangeAdd(request.add) : undefined
1150
+ }, {
1151
+ param: 'set',
1152
+ value: request.set !== undefined ? marshalRecordChangeSet(request.set) : undefined
1153
+ }, {
1154
+ param: 'delete',
1155
+ value: request.delete !== undefined ? marshalRecordChangeDelete(request.delete) : undefined
1156
+ }, {
1157
+ param: 'clear',
1158
+ value: request.clear !== undefined ? marshalRecordChangeClear(request.clear) : undefined
1159
+ }])
946
1160
  });
947
1161
  const marshalUpdateDNSZoneRecordsRequest = (request, defaults) => ({
948
- changes: request.changes,
1162
+ changes: request.changes.map(elt => marshalRecordChange(elt)),
949
1163
  disallow_new_zone_creation: request.disallowNewZoneCreation,
950
1164
  return_all_records: request.returnAllRecords,
951
1165
  serial: request.serial
@@ -955,4 +1169,4 @@ const marshalUpdateDNSZoneRequest = (request, defaults) => ({
955
1169
  project_id: request.projectId ?? defaults.defaultProjectId
956
1170
  });
957
1171
 
958
- export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiCheckContactsCompatibilityRequest, marshalRegistrarApiCreateDomainHostRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainHostRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalHost, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainHostsResponse, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalListTldsResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };
1172
+ export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalDSRecord, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiCheckContactsCompatibilityRequest, marshalRegistrarApiCreateDomainHostRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainHostRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDSRecord, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalHost, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainHostsResponse, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalListTldsResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsResponse, unmarshalTask, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };