@scaleway/sdk-domain 2.2.2 → 2.3.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.
@@ -1,1524 +1,1027 @@
1
- import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, unmarshalMoney } from "@scaleway/sdk-client";
2
- const unmarshalContactExtensionFRAssociationInfo = (data) => {
3
- if (!isJSONObject(data)) {
4
- throw new TypeError(
5
- `Unmarshalling the type 'ContactExtensionFRAssociationInfo' failed as data isn't a dictionary.`
6
- );
7
- }
8
- return {
9
- publicationJo: unmarshalDate(data.publication_jo),
10
- publicationJoPage: data.publication_jo_page
11
- };
12
- };
13
- const unmarshalContactExtensionFRCodeAuthAfnicInfo = (data) => {
14
- if (!isJSONObject(data)) {
15
- throw new TypeError(
16
- `Unmarshalling the type 'ContactExtensionFRCodeAuthAfnicInfo' failed as data isn't a dictionary.`
17
- );
18
- }
19
- return {
20
- codeAuthAfnic: data.code_auth_afnic
21
- };
22
- };
23
- const unmarshalContactExtensionFRDunsInfo = (data) => {
24
- if (!isJSONObject(data)) {
25
- throw new TypeError(
26
- `Unmarshalling the type 'ContactExtensionFRDunsInfo' failed as data isn't a dictionary.`
27
- );
28
- }
29
- return {
30
- dunsId: data.duns_id,
31
- localId: data.local_id
32
- };
33
- };
34
- const unmarshalContactExtensionFRIndividualInfo = (data) => {
35
- if (!isJSONObject(data)) {
36
- throw new TypeError(
37
- `Unmarshalling the type 'ContactExtensionFRIndividualInfo' failed as data isn't a dictionary.`
38
- );
39
- }
40
- return {
41
- whoisOptIn: data.whois_opt_in
42
- };
43
- };
44
- const unmarshalContactExtensionFRTrademarkInfo = (data) => {
45
- if (!isJSONObject(data)) {
46
- throw new TypeError(
47
- `Unmarshalling the type 'ContactExtensionFRTrademarkInfo' failed as data isn't a dictionary.`
48
- );
49
- }
50
- return {
51
- trademarkInpi: data.trademark_inpi
52
- };
53
- };
54
- const unmarshalContactExtensionEU = (data) => {
55
- if (!isJSONObject(data)) {
56
- throw new TypeError(
57
- `Unmarshalling the type 'ContactExtensionEU' failed as data isn't a dictionary.`
58
- );
59
- }
60
- return {
61
- europeanCitizenship: data.european_citizenship
62
- };
63
- };
64
- const unmarshalContactExtensionFR = (data) => {
65
- if (!isJSONObject(data)) {
66
- throw new TypeError(
67
- `Unmarshalling the type 'ContactExtensionFR' failed as data isn't a dictionary.`
68
- );
69
- }
70
- return {
71
- associationInfo: data.association_info ? unmarshalContactExtensionFRAssociationInfo(data.association_info) : void 0,
72
- codeAuthAfnicInfo: data.code_auth_afnic_info ? unmarshalContactExtensionFRCodeAuthAfnicInfo(data.code_auth_afnic_info) : void 0,
73
- dunsInfo: data.duns_info ? unmarshalContactExtensionFRDunsInfo(data.duns_info) : void 0,
74
- individualInfo: data.individual_info ? unmarshalContactExtensionFRIndividualInfo(data.individual_info) : void 0,
75
- mode: data.mode,
76
- trademarkInfo: data.trademark_info ? unmarshalContactExtensionFRTrademarkInfo(data.trademark_info) : void 0
77
- };
78
- };
79
- const unmarshalContactExtensionIT = (data) => {
80
- if (!isJSONObject(data)) {
81
- throw new TypeError(
82
- `Unmarshalling the type 'ContactExtensionIT' failed as data isn't a dictionary.`
83
- );
84
- }
85
- return {
86
- europeanCitizenship: data.european_citizenship,
87
- pin: data.pin,
88
- taxCode: data.tax_code
89
- };
90
- };
91
- const unmarshalContactExtensionNL = (data) => {
92
- if (!isJSONObject(data)) {
93
- throw new TypeError(
94
- `Unmarshalling the type 'ContactExtensionNL' failed as data isn't a dictionary.`
95
- );
96
- }
97
- return {
98
- legalForm: data.legal_form,
99
- legalFormRegistrationNumber: data.legal_form_registration_number
100
- };
101
- };
102
- const unmarshalContactQuestion = (data) => {
103
- if (!isJSONObject(data)) {
104
- throw new TypeError(
105
- `Unmarshalling the type 'ContactQuestion' failed as data isn't a dictionary.`
106
- );
107
- }
108
- return {
109
- answer: data.answer,
110
- question: data.question
111
- };
1
+ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, unmarshalMoney } from "@scaleway/sdk-client";
2
+ var unmarshalContactExtensionFRAssociationInfo = (data) => {
3
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionFRAssociationInfo' failed as data isn't a dictionary.`);
4
+ return {
5
+ publicationJo: unmarshalDate(data.publication_jo),
6
+ publicationJoPage: data.publication_jo_page
7
+ };
8
+ };
9
+ var unmarshalContactExtensionFRCodeAuthAfnicInfo = (data) => {
10
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionFRCodeAuthAfnicInfo' failed as data isn't a dictionary.`);
11
+ return { codeAuthAfnic: data.code_auth_afnic };
12
+ };
13
+ var unmarshalContactExtensionFRDunsInfo = (data) => {
14
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionFRDunsInfo' failed as data isn't a dictionary.`);
15
+ return {
16
+ dunsId: data.duns_id,
17
+ localId: data.local_id
18
+ };
19
+ };
20
+ var unmarshalContactExtensionFRIndividualInfo = (data) => {
21
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionFRIndividualInfo' failed as data isn't a dictionary.`);
22
+ return { whoisOptIn: data.whois_opt_in };
23
+ };
24
+ var unmarshalContactExtensionFRTrademarkInfo = (data) => {
25
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionFRTrademarkInfo' failed as data isn't a dictionary.`);
26
+ return { trademarkInpi: data.trademark_inpi };
27
+ };
28
+ var unmarshalContactExtensionEU = (data) => {
29
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionEU' failed as data isn't a dictionary.`);
30
+ return { europeanCitizenship: data.european_citizenship };
31
+ };
32
+ var unmarshalContactExtensionFR = (data) => {
33
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionFR' failed as data isn't a dictionary.`);
34
+ return {
35
+ associationInfo: data.association_info ? unmarshalContactExtensionFRAssociationInfo(data.association_info) : void 0,
36
+ codeAuthAfnicInfo: data.code_auth_afnic_info ? unmarshalContactExtensionFRCodeAuthAfnicInfo(data.code_auth_afnic_info) : void 0,
37
+ dunsInfo: data.duns_info ? unmarshalContactExtensionFRDunsInfo(data.duns_info) : void 0,
38
+ individualInfo: data.individual_info ? unmarshalContactExtensionFRIndividualInfo(data.individual_info) : void 0,
39
+ mode: data.mode,
40
+ trademarkInfo: data.trademark_info ? unmarshalContactExtensionFRTrademarkInfo(data.trademark_info) : void 0
41
+ };
42
+ };
43
+ var unmarshalContactExtensionIT = (data) => {
44
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionIT' failed as data isn't a dictionary.`);
45
+ return {
46
+ europeanCitizenship: data.european_citizenship,
47
+ pin: data.pin,
48
+ taxCode: data.tax_code
49
+ };
50
+ };
51
+ var unmarshalContactExtensionNL = (data) => {
52
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactExtensionNL' failed as data isn't a dictionary.`);
53
+ return {
54
+ legalForm: data.legal_form,
55
+ legalFormRegistrationNumber: data.legal_form_registration_number
56
+ };
57
+ };
58
+ var unmarshalContactQuestion = (data) => {
59
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactQuestion' failed as data isn't a dictionary.`);
60
+ return {
61
+ answer: data.answer,
62
+ question: data.question
63
+ };
112
64
  };
113
65
  const unmarshalContact = (data) => {
114
- if (!isJSONObject(data)) {
115
- throw new TypeError(
116
- `Unmarshalling the type 'Contact' failed as data isn't a dictionary.`
117
- );
118
- }
119
- return {
120
- addressLine1: data.address_line_1,
121
- addressLine2: data.address_line_2,
122
- city: data.city,
123
- companyIdentificationCode: data.company_identification_code,
124
- companyName: data.company_name,
125
- country: data.country,
126
- email: data.email,
127
- emailAlt: data.email_alt,
128
- emailStatus: data.email_status,
129
- extensionEu: data.extension_eu ? unmarshalContactExtensionEU(data.extension_eu) : void 0,
130
- extensionFr: data.extension_fr ? unmarshalContactExtensionFR(data.extension_fr) : void 0,
131
- extensionIt: data.extension_it ? unmarshalContactExtensionIT(data.extension_it) : void 0,
132
- extensionNl: data.extension_nl ? unmarshalContactExtensionNL(data.extension_nl) : void 0,
133
- faxNumber: data.fax_number,
134
- firstname: data.firstname,
135
- id: data.id,
136
- lang: data.lang,
137
- lastname: data.lastname,
138
- legalForm: data.legal_form,
139
- phoneNumber: data.phone_number,
140
- questions: data.questions ? unmarshalArrayOfObject(data.questions, unmarshalContactQuestion) : void 0,
141
- resale: data.resale,
142
- state: data.state,
143
- status: data.status,
144
- vatIdentificationCode: data.vat_identification_code,
145
- whoisOptIn: data.whois_opt_in,
146
- zip: data.zip
147
- };
66
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Contact' failed as data isn't a dictionary.`);
67
+ return {
68
+ addressLine1: data.address_line_1,
69
+ addressLine2: data.address_line_2,
70
+ city: data.city,
71
+ companyIdentificationCode: data.company_identification_code,
72
+ companyName: data.company_name,
73
+ country: data.country,
74
+ email: data.email,
75
+ emailAlt: data.email_alt,
76
+ emailStatus: data.email_status,
77
+ extensionEu: data.extension_eu ? unmarshalContactExtensionEU(data.extension_eu) : void 0,
78
+ extensionFr: data.extension_fr ? unmarshalContactExtensionFR(data.extension_fr) : void 0,
79
+ extensionIt: data.extension_it ? unmarshalContactExtensionIT(data.extension_it) : void 0,
80
+ extensionNl: data.extension_nl ? unmarshalContactExtensionNL(data.extension_nl) : void 0,
81
+ faxNumber: data.fax_number,
82
+ firstname: data.firstname,
83
+ id: data.id,
84
+ lang: data.lang,
85
+ lastname: data.lastname,
86
+ legalForm: data.legal_form,
87
+ phoneNumber: data.phone_number,
88
+ questions: unmarshalArrayOfObject(data.questions, unmarshalContactQuestion),
89
+ resale: data.resale,
90
+ state: data.state,
91
+ status: data.status,
92
+ vatIdentificationCode: data.vat_identification_code,
93
+ whoisOptIn: data.whois_opt_in,
94
+ zip: data.zip
95
+ };
148
96
  };
149
97
  const unmarshalDNSZone = (data) => {
150
- if (!isJSONObject(data)) {
151
- throw new TypeError(
152
- `Unmarshalling the type 'DNSZone' failed as data isn't a dictionary.`
153
- );
154
- }
155
- return {
156
- domain: data.domain,
157
- linkedProducts: data.linked_products,
158
- message: data.message,
159
- ns: data.ns,
160
- nsDefault: data.ns_default,
161
- nsMaster: data.ns_master,
162
- projectId: data.project_id,
163
- status: data.status,
164
- subdomain: data.subdomain,
165
- updatedAt: unmarshalDate(data.updated_at)
166
- };
98
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DNSZone' failed as data isn't a dictionary.`);
99
+ return {
100
+ domain: data.domain,
101
+ linkedProducts: data.linked_products,
102
+ message: data.message,
103
+ ns: data.ns,
104
+ nsDefault: data.ns_default,
105
+ nsMaster: data.ns_master,
106
+ projectId: data.project_id,
107
+ status: data.status,
108
+ subdomain: data.subdomain,
109
+ updatedAt: unmarshalDate(data.updated_at)
110
+ };
167
111
  };
168
112
  const unmarshalHost = (data) => {
169
- if (!isJSONObject(data)) {
170
- throw new TypeError(
171
- `Unmarshalling the type 'Host' failed as data isn't a dictionary.`
172
- );
173
- }
174
- return {
175
- domain: data.domain,
176
- ips: data.ips,
177
- name: data.name,
178
- status: data.status
179
- };
113
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Host' failed as data isn't a dictionary.`);
114
+ return {
115
+ domain: data.domain,
116
+ ips: data.ips,
117
+ name: data.name,
118
+ status: data.status
119
+ };
180
120
  };
181
121
  const unmarshalSSLCertificate = (data) => {
182
- if (!isJSONObject(data)) {
183
- throw new TypeError(
184
- `Unmarshalling the type 'SSLCertificate' failed as data isn't a dictionary.`
185
- );
186
- }
187
- return {
188
- alternativeDnsZones: data.alternative_dns_zones,
189
- certificateChain: data.certificate_chain,
190
- createdAt: unmarshalDate(data.created_at),
191
- dnsZone: data.dns_zone,
192
- expiredAt: unmarshalDate(data.expired_at),
193
- privateKey: data.private_key,
194
- status: data.status
195
- };
196
- };
197
- const unmarshalCheckContactsCompatibilityResponseContactCheckResult = (data) => {
198
- if (!isJSONObject(data)) {
199
- throw new TypeError(
200
- `Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`
201
- );
202
- }
203
- return {
204
- compatible: data.compatible,
205
- errorMessage: data.error_message
206
- };
122
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SSLCertificate' failed as data isn't a dictionary.`);
123
+ return {
124
+ alternativeDnsZones: data.alternative_dns_zones,
125
+ certificateChain: data.certificate_chain,
126
+ createdAt: unmarshalDate(data.created_at),
127
+ dnsZone: data.dns_zone,
128
+ expiredAt: unmarshalDate(data.expired_at),
129
+ privateKey: data.private_key,
130
+ status: data.status
131
+ };
132
+ };
133
+ var unmarshalCheckContactsCompatibilityResponseContactCheckResult = (data) => {
134
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponseContactCheckResult' failed as data isn't a dictionary.`);
135
+ return {
136
+ compatible: data.compatible,
137
+ errorMessage: data.error_message
138
+ };
207
139
  };
208
140
  const unmarshalCheckContactsCompatibilityResponse = (data) => {
209
- if (!isJSONObject(data)) {
210
- throw new TypeError(
211
- `Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`
212
- );
213
- }
214
- return {
215
- administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : void 0,
216
- compatible: data.compatible,
217
- ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result) : void 0,
218
- technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result) : void 0
219
- };
141
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CheckContactsCompatibilityResponse' failed as data isn't a dictionary.`);
142
+ return {
143
+ administrativeCheckResult: data.administrative_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.administrative_check_result) : void 0,
144
+ compatible: data.compatible,
145
+ ownerCheckResult: data.owner_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.owner_check_result) : void 0,
146
+ technicalCheckResult: data.technical_check_result ? unmarshalCheckContactsCompatibilityResponseContactCheckResult(data.technical_check_result) : void 0
147
+ };
220
148
  };
221
149
  const unmarshalClearDNSZoneRecordsResponse = (data) => {
222
- if (!isJSONObject(data)) {
223
- throw new TypeError(
224
- `Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`
225
- );
226
- }
227
- return {};
150
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClearDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
151
+ return {};
228
152
  };
229
153
  const unmarshalDeleteDNSZoneResponse = (data) => {
230
- if (!isJSONObject(data)) {
231
- throw new TypeError(
232
- `Unmarshalling the type 'DeleteDNSZoneResponse' failed as data isn't a dictionary.`
233
- );
234
- }
235
- return {};
154
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteDNSZoneResponse' failed as data isn't a dictionary.`);
155
+ return {};
236
156
  };
237
157
  const unmarshalDeleteExternalDomainResponse = (data) => {
238
- if (!isJSONObject(data)) {
239
- throw new TypeError(
240
- `Unmarshalling the type 'DeleteExternalDomainResponse' failed as data isn't a dictionary.`
241
- );
242
- }
243
- return {};
158
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteExternalDomainResponse' failed as data isn't a dictionary.`);
159
+ return {};
244
160
  };
245
161
  const unmarshalDeleteSSLCertificateResponse = (data) => {
246
- if (!isJSONObject(data)) {
247
- throw new TypeError(
248
- `Unmarshalling the type 'DeleteSSLCertificateResponse' failed as data isn't a dictionary.`
249
- );
250
- }
251
- return {};
252
- };
253
- const unmarshalDSRecordPublicKey = (data) => {
254
- if (!isJSONObject(data)) {
255
- throw new TypeError(
256
- `Unmarshalling the type 'DSRecordPublicKey' failed as data isn't a dictionary.`
257
- );
258
- }
259
- return {
260
- key: data.key
261
- };
262
- };
263
- const unmarshalDSRecordDigest = (data) => {
264
- if (!isJSONObject(data)) {
265
- throw new TypeError(
266
- `Unmarshalling the type 'DSRecordDigest' failed as data isn't a dictionary.`
267
- );
268
- }
269
- return {
270
- digest: data.digest,
271
- publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : void 0,
272
- type: data.type
273
- };
162
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteSSLCertificateResponse' failed as data isn't a dictionary.`);
163
+ return {};
164
+ };
165
+ var unmarshalDSRecordPublicKey = (data) => {
166
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DSRecordPublicKey' failed as data isn't a dictionary.`);
167
+ return { key: data.key };
168
+ };
169
+ var unmarshalDSRecordDigest = (data) => {
170
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DSRecordDigest' failed as data isn't a dictionary.`);
171
+ return {
172
+ digest: data.digest,
173
+ publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : void 0,
174
+ type: data.type
175
+ };
274
176
  };
275
177
  const unmarshalDSRecord = (data) => {
276
- if (!isJSONObject(data)) {
277
- throw new TypeError(
278
- `Unmarshalling the type 'DSRecord' failed as data isn't a dictionary.`
279
- );
280
- }
281
- return {
282
- algorithm: data.algorithm,
283
- digest: data.digest ? unmarshalDSRecordDigest(data.digest) : void 0,
284
- keyId: data.key_id,
285
- publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : void 0
286
- };
287
- };
288
- const unmarshalTldOffer = (data) => {
289
- if (!isJSONObject(data)) {
290
- throw new TypeError(
291
- `Unmarshalling the type 'TldOffer' failed as data isn't a dictionary.`
292
- );
293
- }
294
- return {
295
- action: data.action,
296
- operationPath: data.operation_path,
297
- price: data.price ? unmarshalMoney(data.price) : void 0
298
- };
299
- };
300
- const unmarshalDomainDNSSEC = (data) => {
301
- if (!isJSONObject(data)) {
302
- throw new TypeError(
303
- `Unmarshalling the type 'DomainDNSSEC' failed as data isn't a dictionary.`
304
- );
305
- }
306
- return {
307
- dsRecords: unmarshalArrayOfObject(data.ds_records, unmarshalDSRecord),
308
- status: data.status
309
- };
310
- };
311
- const unmarshalDomainRegistrationStatusExternalDomain = (data) => {
312
- if (!isJSONObject(data)) {
313
- throw new TypeError(
314
- `Unmarshalling the type 'DomainRegistrationStatusExternalDomain' failed as data isn't a dictionary.`
315
- );
316
- }
317
- return {
318
- validationToken: data.validation_token
319
- };
320
- };
321
- const unmarshalDomainRegistrationStatusTransfer = (data) => {
322
- if (!isJSONObject(data)) {
323
- throw new TypeError(
324
- `Unmarshalling the type 'DomainRegistrationStatusTransfer' failed as data isn't a dictionary.`
325
- );
326
- }
327
- return {
328
- status: data.status,
329
- voteCurrentOwner: data.vote_current_owner,
330
- voteNewOwner: data.vote_new_owner
331
- };
332
- };
333
- const unmarshalTld = (data) => {
334
- if (!isJSONObject(data)) {
335
- throw new TypeError(
336
- `Unmarshalling the type 'Tld' failed as data isn't a dictionary.`
337
- );
338
- }
339
- return {
340
- dnssecSupport: data.dnssec_support,
341
- durationInYearsMax: data.duration_in_years_max,
342
- durationInYearsMin: data.duration_in_years_min,
343
- idnSupport: data.idn_support,
344
- name: data.name,
345
- offers: unmarshalMapOfObject(data.offers, unmarshalTldOffer),
346
- specifications: data.specifications
347
- };
178
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DSRecord' failed as data isn't a dictionary.`);
179
+ return {
180
+ algorithm: data.algorithm,
181
+ digest: data.digest ? unmarshalDSRecordDigest(data.digest) : void 0,
182
+ keyId: data.key_id,
183
+ publicKey: data.public_key ? unmarshalDSRecordPublicKey(data.public_key) : void 0
184
+ };
185
+ };
186
+ var unmarshalTldOffer = (data) => {
187
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'TldOffer' failed as data isn't a dictionary.`);
188
+ return {
189
+ action: data.action,
190
+ operationPath: data.operation_path,
191
+ price: data.price ? unmarshalMoney(data.price) : void 0
192
+ };
193
+ };
194
+ var unmarshalDomainDNSSEC = (data) => {
195
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainDNSSEC' failed as data isn't a dictionary.`);
196
+ return {
197
+ dsRecords: unmarshalArrayOfObject(data.ds_records, unmarshalDSRecord),
198
+ status: data.status
199
+ };
200
+ };
201
+ var unmarshalDomainRegistrationStatusExternalDomain = (data) => {
202
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusExternalDomain' failed as data isn't a dictionary.`);
203
+ return { validationToken: data.validation_token };
204
+ };
205
+ var unmarshalDomainRegistrationStatusTransfer = (data) => {
206
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRegistrationStatusTransfer' failed as data isn't a dictionary.`);
207
+ return {
208
+ status: data.status,
209
+ voteCurrentOwner: data.vote_current_owner,
210
+ voteNewOwner: data.vote_new_owner
211
+ };
212
+ };
213
+ var unmarshalTld = (data) => {
214
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Tld' failed as data isn't a dictionary.`);
215
+ return {
216
+ dnssecSupport: data.dnssec_support,
217
+ durationInYearsMax: data.duration_in_years_max,
218
+ durationInYearsMin: data.duration_in_years_min,
219
+ idnSupport: data.idn_support,
220
+ name: data.name,
221
+ offers: unmarshalMapOfObject(data.offers, unmarshalTldOffer),
222
+ specifications: data.specifications
223
+ };
348
224
  };
349
225
  const unmarshalDomain = (data) => {
350
- if (!isJSONObject(data)) {
351
- throw new TypeError(
352
- `Unmarshalling the type 'Domain' failed as data isn't a dictionary.`
353
- );
354
- }
355
- return {
356
- administrativeContact: data.administrative_contact ? unmarshalContact(data.administrative_contact) : void 0,
357
- autoRenewStatus: data.auto_renew_status,
358
- dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
359
- dnssec: data.dnssec ? unmarshalDomainDNSSEC(data.dnssec) : void 0,
360
- domain: data.domain,
361
- eppCode: data.epp_code,
362
- expiredAt: unmarshalDate(data.expired_at),
363
- externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : void 0,
364
- isExternal: data.is_external,
365
- linkedProducts: data.linked_products,
366
- organizationId: data.organization_id,
367
- ownerContact: data.owner_contact ? unmarshalContact(data.owner_contact) : void 0,
368
- pendingTrade: data.pending_trade,
369
- projectId: data.project_id,
370
- registrar: data.registrar,
371
- status: data.status,
372
- technicalContact: data.technical_contact ? unmarshalContact(data.technical_contact) : void 0,
373
- tld: data.tld ? unmarshalTld(data.tld) : void 0,
374
- transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : void 0,
375
- updatedAt: unmarshalDate(data.updated_at)
376
- };
226
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
227
+ return {
228
+ administrativeContact: data.administrative_contact ? unmarshalContact(data.administrative_contact) : void 0,
229
+ autoRenewStatus: data.auto_renew_status,
230
+ dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
231
+ dnssec: data.dnssec ? unmarshalDomainDNSSEC(data.dnssec) : void 0,
232
+ domain: data.domain,
233
+ eppCode: data.epp_code,
234
+ expiredAt: unmarshalDate(data.expired_at),
235
+ externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : void 0,
236
+ isExternal: data.is_external,
237
+ linkedProducts: data.linked_products,
238
+ organizationId: data.organization_id,
239
+ ownerContact: data.owner_contact ? unmarshalContact(data.owner_contact) : void 0,
240
+ pendingTrade: data.pending_trade,
241
+ projectId: data.project_id,
242
+ registrar: data.registrar,
243
+ status: data.status,
244
+ technicalContact: data.technical_contact ? unmarshalContact(data.technical_contact) : void 0,
245
+ tld: data.tld ? unmarshalTld(data.tld) : void 0,
246
+ transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : void 0,
247
+ updatedAt: unmarshalDate(data.updated_at)
248
+ };
377
249
  };
378
250
  const unmarshalGetDNSZoneTsigKeyResponse = (data) => {
379
- if (!isJSONObject(data)) {
380
- throw new TypeError(
381
- `Unmarshalling the type 'GetDNSZoneTsigKeyResponse' failed as data isn't a dictionary.`
382
- );
383
- }
384
- return {
385
- algorithm: data.algorithm,
386
- key: data.key,
387
- name: data.name
388
- };
389
- };
390
- const unmarshalDomainRecordGeoIPConfigMatch = (data) => {
391
- if (!isJSONObject(data)) {
392
- throw new TypeError(
393
- `Unmarshalling the type 'DomainRecordGeoIPConfigMatch' failed as data isn't a dictionary.`
394
- );
395
- }
396
- return {
397
- continents: data.continents,
398
- countries: data.countries,
399
- data: data.data
400
- };
401
- };
402
- const unmarshalDomainRecordViewConfigView = (data) => {
403
- if (!isJSONObject(data)) {
404
- throw new TypeError(
405
- `Unmarshalling the type 'DomainRecordViewConfigView' failed as data isn't a dictionary.`
406
- );
407
- }
408
- return {
409
- data: data.data,
410
- subnet: data.subnet
411
- };
412
- };
413
- const unmarshalDomainRecordWeightedConfigWeightedIP = (data) => {
414
- if (!isJSONObject(data)) {
415
- throw new TypeError(
416
- `Unmarshalling the type 'DomainRecordWeightedConfigWeightedIP' failed as data isn't a dictionary.`
417
- );
418
- }
419
- return {
420
- ip: data.ip,
421
- weight: data.weight
422
- };
423
- };
424
- const unmarshalDomainRecordGeoIPConfig = (data) => {
425
- if (!isJSONObject(data)) {
426
- throw new TypeError(
427
- `Unmarshalling the type 'DomainRecordGeoIPConfig' failed as data isn't a dictionary.`
428
- );
429
- }
430
- return {
431
- default: data.default,
432
- matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
433
- };
434
- };
435
- const unmarshalDomainRecordHTTPServiceConfig = (data) => {
436
- if (!isJSONObject(data)) {
437
- throw new TypeError(
438
- `Unmarshalling the type 'DomainRecordHTTPServiceConfig' failed as data isn't a dictionary.`
439
- );
440
- }
441
- return {
442
- ips: data.ips,
443
- mustContain: data.must_contain,
444
- strategy: data.strategy,
445
- url: data.url,
446
- userAgent: data.user_agent
447
- };
448
- };
449
- const unmarshalDomainRecordViewConfig = (data) => {
450
- if (!isJSONObject(data)) {
451
- throw new TypeError(
452
- `Unmarshalling the type 'DomainRecordViewConfig' failed as data isn't a dictionary.`
453
- );
454
- }
455
- return {
456
- views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView)
457
- };
458
- };
459
- const unmarshalDomainRecordWeightedConfig = (data) => {
460
- if (!isJSONObject(data)) {
461
- throw new TypeError(
462
- `Unmarshalling the type 'DomainRecordWeightedConfig' failed as data isn't a dictionary.`
463
- );
464
- }
465
- return {
466
- weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP)
467
- };
468
- };
469
- const unmarshalDomainRecord = (data) => {
470
- if (!isJSONObject(data)) {
471
- throw new TypeError(
472
- `Unmarshalling the type 'DomainRecord' failed as data isn't a dictionary.`
473
- );
474
- }
475
- return {
476
- comment: data.comment,
477
- data: data.data,
478
- geoIpConfig: data.geo_ip_config ? unmarshalDomainRecordGeoIPConfig(data.geo_ip_config) : void 0,
479
- httpServiceConfig: data.http_service_config ? unmarshalDomainRecordHTTPServiceConfig(data.http_service_config) : void 0,
480
- id: data.id,
481
- name: data.name,
482
- priority: data.priority,
483
- ttl: data.ttl,
484
- type: data.type,
485
- viewConfig: data.view_config ? unmarshalDomainRecordViewConfig(data.view_config) : void 0,
486
- weightedConfig: data.weighted_config ? unmarshalDomainRecordWeightedConfig(data.weighted_config) : void 0
487
- };
488
- };
489
- const unmarshalRecordIdentifier = (data) => {
490
- if (!isJSONObject(data)) {
491
- throw new TypeError(
492
- `Unmarshalling the type 'RecordIdentifier' failed as data isn't a dictionary.`
493
- );
494
- }
495
- return {
496
- data: data.data,
497
- name: data.name,
498
- ttl: data.ttl,
499
- type: data.type
500
- };
501
- };
502
- const unmarshalRecordChangeAdd = (data) => {
503
- if (!isJSONObject(data)) {
504
- throw new TypeError(
505
- `Unmarshalling the type 'RecordChangeAdd' failed as data isn't a dictionary.`
506
- );
507
- }
508
- return {
509
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
510
- };
511
- };
512
- const unmarshalRecordChangeClear = (data) => {
513
- if (!isJSONObject(data)) {
514
- throw new TypeError(
515
- `Unmarshalling the type 'RecordChangeClear' failed as data isn't a dictionary.`
516
- );
517
- }
518
- return {};
519
- };
520
- const unmarshalRecordChangeDelete = (data) => {
521
- if (!isJSONObject(data)) {
522
- throw new TypeError(
523
- `Unmarshalling the type 'RecordChangeDelete' failed as data isn't a dictionary.`
524
- );
525
- }
526
- return {
527
- id: data.id,
528
- idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : void 0
529
- };
530
- };
531
- const unmarshalRecordChangeSet = (data) => {
532
- if (!isJSONObject(data)) {
533
- throw new TypeError(
534
- `Unmarshalling the type 'RecordChangeSet' failed as data isn't a dictionary.`
535
- );
536
- }
537
- return {
538
- id: data.id,
539
- idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : void 0,
540
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
541
- };
542
- };
543
- const unmarshalRecordChange = (data) => {
544
- if (!isJSONObject(data)) {
545
- throw new TypeError(
546
- `Unmarshalling the type 'RecordChange' failed as data isn't a dictionary.`
547
- );
548
- }
549
- return {
550
- add: data.add ? unmarshalRecordChangeAdd(data.add) : void 0,
551
- clear: data.clear ? unmarshalRecordChangeClear(data.clear) : void 0,
552
- delete: data.delete ? unmarshalRecordChangeDelete(data.delete) : void 0,
553
- set: data.set ? unmarshalRecordChangeSet(data.set) : void 0
554
- };
251
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetDNSZoneTsigKeyResponse' failed as data isn't a dictionary.`);
252
+ return {
253
+ algorithm: data.algorithm,
254
+ key: data.key,
255
+ name: data.name
256
+ };
257
+ };
258
+ var unmarshalDomainRecordGeoIPConfigMatch = (data) => {
259
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfigMatch' failed as data isn't a dictionary.`);
260
+ return {
261
+ continents: data.continents,
262
+ countries: data.countries,
263
+ data: data.data
264
+ };
265
+ };
266
+ var unmarshalDomainRecordViewConfigView = (data) => {
267
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfigView' failed as data isn't a dictionary.`);
268
+ return {
269
+ data: data.data,
270
+ subnet: data.subnet
271
+ };
272
+ };
273
+ var unmarshalDomainRecordWeightedConfigWeightedIP = (data) => {
274
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfigWeightedIP' failed as data isn't a dictionary.`);
275
+ return {
276
+ ip: data.ip,
277
+ weight: data.weight
278
+ };
279
+ };
280
+ var unmarshalDomainRecordGeoIPConfig = (data) => {
281
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordGeoIPConfig' failed as data isn't a dictionary.`);
282
+ return {
283
+ default: data.default,
284
+ matches: unmarshalArrayOfObject(data.matches, unmarshalDomainRecordGeoIPConfigMatch)
285
+ };
286
+ };
287
+ var unmarshalDomainRecordHTTPServiceConfig = (data) => {
288
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordHTTPServiceConfig' failed as data isn't a dictionary.`);
289
+ return {
290
+ ips: data.ips,
291
+ mustContain: data.must_contain,
292
+ strategy: data.strategy,
293
+ url: data.url,
294
+ userAgent: data.user_agent
295
+ };
296
+ };
297
+ var unmarshalDomainRecordViewConfig = (data) => {
298
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordViewConfig' failed as data isn't a dictionary.`);
299
+ return { views: unmarshalArrayOfObject(data.views, unmarshalDomainRecordViewConfigView) };
300
+ };
301
+ var unmarshalDomainRecordWeightedConfig = (data) => {
302
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecordWeightedConfig' failed as data isn't a dictionary.`);
303
+ return { weightedIps: unmarshalArrayOfObject(data.weighted_ips, unmarshalDomainRecordWeightedConfigWeightedIP) };
304
+ };
305
+ var unmarshalDomainRecord = (data) => {
306
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainRecord' failed as data isn't a dictionary.`);
307
+ return {
308
+ comment: data.comment,
309
+ data: data.data,
310
+ geoIpConfig: data.geo_ip_config ? unmarshalDomainRecordGeoIPConfig(data.geo_ip_config) : void 0,
311
+ httpServiceConfig: data.http_service_config ? unmarshalDomainRecordHTTPServiceConfig(data.http_service_config) : void 0,
312
+ id: data.id,
313
+ name: data.name,
314
+ priority: data.priority,
315
+ ttl: data.ttl,
316
+ type: data.type,
317
+ updatedAt: unmarshalDate(data.updated_at),
318
+ viewConfig: data.view_config ? unmarshalDomainRecordViewConfig(data.view_config) : void 0,
319
+ weightedConfig: data.weighted_config ? unmarshalDomainRecordWeightedConfig(data.weighted_config) : void 0
320
+ };
321
+ };
322
+ var unmarshalRecordIdentifier = (data) => {
323
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RecordIdentifier' failed as data isn't a dictionary.`);
324
+ return {
325
+ data: data.data,
326
+ name: data.name,
327
+ ttl: data.ttl,
328
+ type: data.type
329
+ };
330
+ };
331
+ var unmarshalRecordChangeAdd = (data) => {
332
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RecordChangeAdd' failed as data isn't a dictionary.`);
333
+ return { records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord) };
334
+ };
335
+ var unmarshalRecordChangeClear = (data) => {
336
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RecordChangeClear' failed as data isn't a dictionary.`);
337
+ return {};
338
+ };
339
+ var unmarshalRecordChangeDelete = (data) => {
340
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RecordChangeDelete' failed as data isn't a dictionary.`);
341
+ return {
342
+ id: data.id,
343
+ idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : void 0
344
+ };
345
+ };
346
+ var unmarshalRecordChangeSet = (data) => {
347
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RecordChangeSet' failed as data isn't a dictionary.`);
348
+ return {
349
+ id: data.id,
350
+ idFields: data.id_fields ? unmarshalRecordIdentifier(data.id_fields) : void 0,
351
+ records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
352
+ };
353
+ };
354
+ var unmarshalRecordChange = (data) => {
355
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RecordChange' failed as data isn't a dictionary.`);
356
+ return {
357
+ add: data.add ? unmarshalRecordChangeAdd(data.add) : void 0,
358
+ clear: data.clear ? unmarshalRecordChangeClear(data.clear) : void 0,
359
+ delete: data.delete ? unmarshalRecordChangeDelete(data.delete) : void 0,
360
+ set: data.set ? unmarshalRecordChangeSet(data.set) : void 0
361
+ };
555
362
  };
556
363
  const unmarshalGetDNSZoneVersionDiffResponse = (data) => {
557
- if (!isJSONObject(data)) {
558
- throw new TypeError(
559
- `Unmarshalling the type 'GetDNSZoneVersionDiffResponse' failed as data isn't a dictionary.`
560
- );
561
- }
562
- return {
563
- changes: unmarshalArrayOfObject(data.changes, unmarshalRecordChange)
564
- };
364
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetDNSZoneVersionDiffResponse' failed as data isn't a dictionary.`);
365
+ return { changes: unmarshalArrayOfObject(data.changes, unmarshalRecordChange) };
565
366
  };
566
367
  const unmarshalGetDomainAuthCodeResponse = (data) => {
567
- if (!isJSONObject(data)) {
568
- throw new TypeError(
569
- `Unmarshalling the type 'GetDomainAuthCodeResponse' failed as data isn't a dictionary.`
570
- );
571
- }
572
- return {
573
- authCode: data.auth_code
574
- };
368
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetDomainAuthCodeResponse' failed as data isn't a dictionary.`);
369
+ return { authCode: data.auth_code };
575
370
  };
576
371
  const unmarshalImportProviderDNSZoneResponse = (data) => {
577
- if (!isJSONObject(data)) {
578
- throw new TypeError(
579
- `Unmarshalling the type 'ImportProviderDNSZoneResponse' failed as data isn't a dictionary.`
580
- );
581
- }
582
- return {
583
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
584
- };
372
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ImportProviderDNSZoneResponse' failed as data isn't a dictionary.`);
373
+ return { records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord) };
585
374
  };
586
375
  const unmarshalImportRawDNSZoneResponse = (data) => {
587
- if (!isJSONObject(data)) {
588
- throw new TypeError(
589
- `Unmarshalling the type 'ImportRawDNSZoneResponse' failed as data isn't a dictionary.`
590
- );
591
- }
592
- return {
593
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
594
- };
595
- };
596
- const unmarshalContactRolesRoles = (data) => {
597
- if (!isJSONObject(data)) {
598
- throw new TypeError(
599
- `Unmarshalling the type 'ContactRolesRoles' failed as data isn't a dictionary.`
600
- );
601
- }
602
- return {
603
- isAdministrative: data.is_administrative,
604
- isOwner: data.is_owner,
605
- isTechnical: data.is_technical
606
- };
607
- };
608
- const unmarshalContactRoles = (data) => {
609
- if (!isJSONObject(data)) {
610
- throw new TypeError(
611
- `Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`
612
- );
613
- }
614
- return {
615
- contact: data.contact ? unmarshalContact(data.contact) : void 0,
616
- roles: unmarshalMapOfObject(data.roles, unmarshalContactRolesRoles)
617
- };
376
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ImportRawDNSZoneResponse' failed as data isn't a dictionary.`);
377
+ return { records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord) };
378
+ };
379
+ var unmarshalContactRolesRoles = (data) => {
380
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactRolesRoles' failed as data isn't a dictionary.`);
381
+ return {
382
+ isAdministrative: data.is_administrative,
383
+ isOwner: data.is_owner,
384
+ isTechnical: data.is_technical
385
+ };
386
+ };
387
+ var unmarshalContactRoles = (data) => {
388
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ContactRoles' failed as data isn't a dictionary.`);
389
+ return {
390
+ contact: data.contact ? unmarshalContact(data.contact) : void 0,
391
+ roles: unmarshalMapOfObject(data.roles, unmarshalContactRolesRoles)
392
+ };
618
393
  };
619
394
  const unmarshalListContactsResponse = (data) => {
620
- if (!isJSONObject(data)) {
621
- throw new TypeError(
622
- `Unmarshalling the type 'ListContactsResponse' failed as data isn't a dictionary.`
623
- );
624
- }
625
- return {
626
- contacts: unmarshalArrayOfObject(data.contacts, unmarshalContactRoles),
627
- totalCount: data.total_count
628
- };
629
- };
630
- const unmarshalNameserver = (data) => {
631
- if (!isJSONObject(data)) {
632
- throw new TypeError(
633
- `Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`
634
- );
635
- }
636
- return {
637
- ip: data.ip,
638
- name: data.name
639
- };
395
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListContactsResponse' failed as data isn't a dictionary.`);
396
+ return {
397
+ contacts: unmarshalArrayOfObject(data.contacts, unmarshalContactRoles),
398
+ totalCount: data.total_count
399
+ };
400
+ };
401
+ var unmarshalNameserver = (data) => {
402
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`);
403
+ return {
404
+ ip: data.ip,
405
+ name: data.name
406
+ };
640
407
  };
641
408
  const unmarshalListDNSZoneNameserversResponse = (data) => {
642
- if (!isJSONObject(data)) {
643
- throw new TypeError(
644
- `Unmarshalling the type 'ListDNSZoneNameserversResponse' failed as data isn't a dictionary.`
645
- );
646
- }
647
- return {
648
- ns: unmarshalArrayOfObject(data.ns, unmarshalNameserver)
649
- };
409
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDNSZoneNameserversResponse' failed as data isn't a dictionary.`);
410
+ return { ns: unmarshalArrayOfObject(data.ns, unmarshalNameserver) };
650
411
  };
651
412
  const unmarshalListDNSZoneRecordsResponse = (data) => {
652
- if (!isJSONObject(data)) {
653
- throw new TypeError(
654
- `Unmarshalling the type 'ListDNSZoneRecordsResponse' failed as data isn't a dictionary.`
655
- );
656
- }
657
- return {
658
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord),
659
- totalCount: data.total_count
660
- };
413
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
414
+ return {
415
+ records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord),
416
+ totalCount: data.total_count
417
+ };
661
418
  };
662
419
  const unmarshalListDNSZoneVersionRecordsResponse = (data) => {
663
- if (!isJSONObject(data)) {
664
- throw new TypeError(
665
- `Unmarshalling the type 'ListDNSZoneVersionRecordsResponse' failed as data isn't a dictionary.`
666
- );
667
- }
668
- return {
669
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord),
670
- totalCount: data.total_count
671
- };
672
- };
673
- const unmarshalDNSZoneVersion = (data) => {
674
- if (!isJSONObject(data)) {
675
- throw new TypeError(
676
- `Unmarshalling the type 'DNSZoneVersion' failed as data isn't a dictionary.`
677
- );
678
- }
679
- return {
680
- createdAt: unmarshalDate(data.created_at),
681
- id: data.id
682
- };
420
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDNSZoneVersionRecordsResponse' failed as data isn't a dictionary.`);
421
+ return {
422
+ records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord),
423
+ totalCount: data.total_count
424
+ };
425
+ };
426
+ var unmarshalDNSZoneVersion = (data) => {
427
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DNSZoneVersion' failed as data isn't a dictionary.`);
428
+ return {
429
+ createdAt: unmarshalDate(data.created_at),
430
+ id: data.id
431
+ };
683
432
  };
684
433
  const unmarshalListDNSZoneVersionsResponse = (data) => {
685
- if (!isJSONObject(data)) {
686
- throw new TypeError(
687
- `Unmarshalling the type 'ListDNSZoneVersionsResponse' failed as data isn't a dictionary.`
688
- );
689
- }
690
- return {
691
- totalCount: data.total_count,
692
- versions: unmarshalArrayOfObject(data.versions, unmarshalDNSZoneVersion)
693
- };
434
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDNSZoneVersionsResponse' failed as data isn't a dictionary.`);
435
+ return {
436
+ totalCount: data.total_count,
437
+ versions: unmarshalArrayOfObject(data.versions, unmarshalDNSZoneVersion)
438
+ };
694
439
  };
695
440
  const unmarshalListDNSZonesResponse = (data) => {
696
- if (!isJSONObject(data)) {
697
- throw new TypeError(
698
- `Unmarshalling the type 'ListDNSZonesResponse' failed as data isn't a dictionary.`
699
- );
700
- }
701
- return {
702
- dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
703
- totalCount: data.total_count
704
- };
441
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDNSZonesResponse' failed as data isn't a dictionary.`);
442
+ return {
443
+ dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone),
444
+ totalCount: data.total_count
445
+ };
705
446
  };
706
447
  const unmarshalListDomainHostsResponse = (data) => {
707
- if (!isJSONObject(data)) {
708
- throw new TypeError(
709
- `Unmarshalling the type 'ListDomainHostsResponse' failed as data isn't a dictionary.`
710
- );
711
- }
712
- return {
713
- hosts: unmarshalArrayOfObject(data.hosts, unmarshalHost),
714
- totalCount: data.total_count
715
- };
716
- };
717
- const unmarshalDomainSummary = (data) => {
718
- if (!isJSONObject(data)) {
719
- throw new TypeError(
720
- `Unmarshalling the type 'DomainSummary' failed as data isn't a dictionary.`
721
- );
722
- }
723
- return {
724
- autoRenewStatus: data.auto_renew_status,
725
- createdAt: unmarshalDate(data.created_at),
726
- dnssecStatus: data.dnssec_status,
727
- domain: data.domain,
728
- eppCode: data.epp_code,
729
- expiredAt: unmarshalDate(data.expired_at),
730
- externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : void 0,
731
- isExternal: data.is_external,
732
- organizationId: data.organization_id,
733
- pendingTrade: data.pending_trade,
734
- projectId: data.project_id,
735
- registrar: data.registrar,
736
- status: data.status,
737
- transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : void 0,
738
- updatedAt: unmarshalDate(data.updated_at)
739
- };
448
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDomainHostsResponse' failed as data isn't a dictionary.`);
449
+ return {
450
+ hosts: unmarshalArrayOfObject(data.hosts, unmarshalHost),
451
+ totalCount: data.total_count
452
+ };
453
+ };
454
+ var unmarshalDomainSummary = (data) => {
455
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainSummary' failed as data isn't a dictionary.`);
456
+ return {
457
+ autoRenewStatus: data.auto_renew_status,
458
+ createdAt: unmarshalDate(data.created_at),
459
+ dnssecStatus: data.dnssec_status,
460
+ domain: data.domain,
461
+ eppCode: data.epp_code,
462
+ expiredAt: unmarshalDate(data.expired_at),
463
+ externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : void 0,
464
+ isExternal: data.is_external,
465
+ organizationId: data.organization_id,
466
+ pendingTrade: data.pending_trade,
467
+ projectId: data.project_id,
468
+ registrar: data.registrar,
469
+ status: data.status,
470
+ transferRegistrationStatus: data.transfer_registration_status ? unmarshalDomainRegistrationStatusTransfer(data.transfer_registration_status) : void 0,
471
+ updatedAt: unmarshalDate(data.updated_at)
472
+ };
740
473
  };
741
474
  const unmarshalListDomainsResponse = (data) => {
742
- if (!isJSONObject(data)) {
743
- throw new TypeError(
744
- `Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`
745
- );
746
- }
747
- return {
748
- domains: unmarshalArrayOfObject(data.domains, unmarshalDomainSummary),
749
- totalCount: data.total_count
750
- };
751
- };
752
- const unmarshalInboundTransfer = (data) => {
753
- if (!isJSONObject(data)) {
754
- throw new TypeError(
755
- `Unmarshalling the type 'InboundTransfer' failed as data isn't a dictionary.`
756
- );
757
- }
758
- return {
759
- createdAt: unmarshalDate(data.created_at),
760
- domain: data.domain,
761
- id: data.id,
762
- lastUpdatedAt: unmarshalDate(data.last_updated_at),
763
- message: data.message,
764
- projectId: data.project_id,
765
- status: data.status,
766
- taskId: data.task_id
767
- };
475
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
476
+ return {
477
+ domains: unmarshalArrayOfObject(data.domains, unmarshalDomainSummary),
478
+ totalCount: data.total_count
479
+ };
480
+ };
481
+ var unmarshalInboundTransfer = (data) => {
482
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InboundTransfer' failed as data isn't a dictionary.`);
483
+ return {
484
+ createdAt: unmarshalDate(data.created_at),
485
+ domain: data.domain,
486
+ id: data.id,
487
+ lastUpdatedAt: unmarshalDate(data.last_updated_at),
488
+ message: data.message,
489
+ projectId: data.project_id,
490
+ status: data.status,
491
+ taskId: data.task_id
492
+ };
768
493
  };
769
494
  const unmarshalListInboundTransfersResponse = (data) => {
770
- if (!isJSONObject(data)) {
771
- throw new TypeError(
772
- `Unmarshalling the type 'ListInboundTransfersResponse' failed as data isn't a dictionary.`
773
- );
774
- }
775
- return {
776
- inboundTransfers: unmarshalArrayOfObject(data.inbound_transfers, unmarshalInboundTransfer),
777
- totalCount: data.total_count
778
- };
779
- };
780
- const unmarshalRenewableDomain = (data) => {
781
- if (!isJSONObject(data)) {
782
- throw new TypeError(
783
- `Unmarshalling the type 'RenewableDomain' failed as data isn't a dictionary.`
784
- );
785
- }
786
- return {
787
- domain: data.domain,
788
- estimatedDeleteAt: unmarshalDate(data.estimated_delete_at),
789
- expiredAt: unmarshalDate(data.expired_at),
790
- limitRedemptionAt: unmarshalDate(data.limit_redemption_at),
791
- limitRenewAt: unmarshalDate(data.limit_renew_at),
792
- organizationId: data.organization_id,
793
- projectId: data.project_id,
794
- renewableDurationInYears: data.renewable_duration_in_years,
795
- status: data.status,
796
- tld: data.tld ? unmarshalTld(data.tld) : void 0
797
- };
495
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListInboundTransfersResponse' failed as data isn't a dictionary.`);
496
+ return {
497
+ inboundTransfers: unmarshalArrayOfObject(data.inbound_transfers, unmarshalInboundTransfer),
498
+ totalCount: data.total_count
499
+ };
500
+ };
501
+ var unmarshalRenewableDomain = (data) => {
502
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RenewableDomain' failed as data isn't a dictionary.`);
503
+ return {
504
+ domain: data.domain,
505
+ estimatedDeleteAt: unmarshalDate(data.estimated_delete_at),
506
+ expiredAt: unmarshalDate(data.expired_at),
507
+ limitRedemptionAt: unmarshalDate(data.limit_redemption_at),
508
+ limitRenewAt: unmarshalDate(data.limit_renew_at),
509
+ organizationId: data.organization_id,
510
+ projectId: data.project_id,
511
+ renewableDurationInYears: data.renewable_duration_in_years,
512
+ status: data.status,
513
+ tld: data.tld ? unmarshalTld(data.tld) : void 0
514
+ };
798
515
  };
799
516
  const unmarshalListRenewableDomainsResponse = (data) => {
800
- if (!isJSONObject(data)) {
801
- throw new TypeError(
802
- `Unmarshalling the type 'ListRenewableDomainsResponse' failed as data isn't a dictionary.`
803
- );
804
- }
805
- return {
806
- domains: unmarshalArrayOfObject(data.domains, unmarshalRenewableDomain),
807
- totalCount: data.total_count
808
- };
517
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRenewableDomainsResponse' failed as data isn't a dictionary.`);
518
+ return {
519
+ domains: unmarshalArrayOfObject(data.domains, unmarshalRenewableDomain),
520
+ totalCount: data.total_count
521
+ };
809
522
  };
810
523
  const unmarshalListSSLCertificatesResponse = (data) => {
811
- if (!isJSONObject(data)) {
812
- throw new TypeError(
813
- `Unmarshalling the type 'ListSSLCertificatesResponse' failed as data isn't a dictionary.`
814
- );
815
- }
816
- return {
817
- certificates: unmarshalArrayOfObject(data.certificates, unmarshalSSLCertificate),
818
- totalCount: data.total_count
819
- };
524
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSSLCertificatesResponse' failed as data isn't a dictionary.`);
525
+ return {
526
+ certificates: unmarshalArrayOfObject(data.certificates, unmarshalSSLCertificate),
527
+ totalCount: data.total_count
528
+ };
820
529
  };
821
530
  const unmarshalTask = (data) => {
822
- if (!isJSONObject(data)) {
823
- throw new TypeError(
824
- `Unmarshalling the type 'Task' failed as data isn't a dictionary.`
825
- );
826
- }
827
- return {
828
- contactIdentifier: data.contact_identifier,
829
- domain: data.domain,
830
- id: data.id,
831
- message: data.message,
832
- organizationId: data.organization_id,
833
- projectId: data.project_id,
834
- startedAt: unmarshalDate(data.started_at),
835
- status: data.status,
836
- type: data.type,
837
- updatedAt: unmarshalDate(data.updated_at)
838
- };
531
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Task' failed as data isn't a dictionary.`);
532
+ return {
533
+ contactIdentifier: data.contact_identifier,
534
+ domain: data.domain,
535
+ id: data.id,
536
+ message: data.message,
537
+ organizationId: data.organization_id,
538
+ projectId: data.project_id,
539
+ startedAt: unmarshalDate(data.started_at),
540
+ status: data.status,
541
+ type: data.type,
542
+ updatedAt: unmarshalDate(data.updated_at)
543
+ };
839
544
  };
840
545
  const unmarshalListTasksResponse = (data) => {
841
- if (!isJSONObject(data)) {
842
- throw new TypeError(
843
- `Unmarshalling the type 'ListTasksResponse' failed as data isn't a dictionary.`
844
- );
845
- }
846
- return {
847
- tasks: unmarshalArrayOfObject(data.tasks, unmarshalTask),
848
- totalCount: data.total_count
849
- };
546
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTasksResponse' failed as data isn't a dictionary.`);
547
+ return {
548
+ tasks: unmarshalArrayOfObject(data.tasks, unmarshalTask),
549
+ totalCount: data.total_count
550
+ };
850
551
  };
851
552
  const unmarshalListTldsResponse = (data) => {
852
- if (!isJSONObject(data)) {
853
- throw new TypeError(
854
- `Unmarshalling the type 'ListTldsResponse' failed as data isn't a dictionary.`
855
- );
856
- }
857
- return {
858
- tlds: unmarshalArrayOfObject(data.tlds, unmarshalTld),
859
- totalCount: data.total_count
860
- };
553
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTldsResponse' failed as data isn't a dictionary.`);
554
+ return {
555
+ tlds: unmarshalArrayOfObject(data.tlds, unmarshalTld),
556
+ totalCount: data.total_count
557
+ };
861
558
  };
862
559
  const unmarshalOrderResponse = (data) => {
863
- if (!isJSONObject(data)) {
864
- throw new TypeError(
865
- `Unmarshalling the type 'OrderResponse' failed as data isn't a dictionary.`
866
- );
867
- }
868
- return {
869
- createdAt: unmarshalDate(data.created_at),
870
- domains: data.domains,
871
- organizationId: data.organization_id,
872
- projectId: data.project_id,
873
- taskId: data.task_id
874
- };
560
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OrderResponse' failed as data isn't a dictionary.`);
561
+ return {
562
+ createdAt: unmarshalDate(data.created_at),
563
+ domains: data.domains,
564
+ organizationId: data.organization_id,
565
+ projectId: data.project_id,
566
+ taskId: data.task_id
567
+ };
875
568
  };
876
569
  const unmarshalRefreshDNSZoneResponse = (data) => {
877
- if (!isJSONObject(data)) {
878
- throw new TypeError(
879
- `Unmarshalling the type 'RefreshDNSZoneResponse' failed as data isn't a dictionary.`
880
- );
881
- }
882
- return {
883
- dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone)
884
- };
570
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RefreshDNSZoneResponse' failed as data isn't a dictionary.`);
571
+ return { dnsZones: unmarshalArrayOfObject(data.dns_zones, unmarshalDNSZone) };
885
572
  };
886
573
  const unmarshalRegisterExternalDomainResponse = (data) => {
887
- if (!isJSONObject(data)) {
888
- throw new TypeError(
889
- `Unmarshalling the type 'RegisterExternalDomainResponse' failed as data isn't a dictionary.`
890
- );
891
- }
892
- return {
893
- createdAt: unmarshalDate(data.created_at),
894
- domain: data.domain,
895
- organizationId: data.organization_id,
896
- projectId: data.project_id,
897
- validationToken: data.validation_token
898
- };
574
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RegisterExternalDomainResponse' failed as data isn't a dictionary.`);
575
+ return {
576
+ createdAt: unmarshalDate(data.created_at),
577
+ domain: data.domain,
578
+ organizationId: data.organization_id,
579
+ projectId: data.project_id,
580
+ validationToken: data.validation_token
581
+ };
899
582
  };
900
583
  const unmarshalRestoreDNSZoneVersionResponse = (data) => {
901
- if (!isJSONObject(data)) {
902
- throw new TypeError(
903
- `Unmarshalling the type 'RestoreDNSZoneVersionResponse' failed as data isn't a dictionary.`
904
- );
905
- }
906
- return {};
584
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RestoreDNSZoneVersionResponse' failed as data isn't a dictionary.`);
585
+ return {};
907
586
  };
908
587
  const unmarshalRetryInboundTransferResponse = (data) => {
909
- if (!isJSONObject(data)) {
910
- throw new TypeError(
911
- `Unmarshalling the type 'RetryInboundTransferResponse' failed as data isn't a dictionary.`
912
- );
913
- }
914
- return {};
915
- };
916
- const unmarshalAvailableDomain = (data) => {
917
- if (!isJSONObject(data)) {
918
- throw new TypeError(
919
- `Unmarshalling the type 'AvailableDomain' failed as data isn't a dictionary.`
920
- );
921
- }
922
- return {
923
- available: data.available,
924
- domain: data.domain,
925
- tld: data.tld ? unmarshalTld(data.tld) : void 0
926
- };
588
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RetryInboundTransferResponse' failed as data isn't a dictionary.`);
589
+ return {};
590
+ };
591
+ var unmarshalAvailableDomain = (data) => {
592
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AvailableDomain' failed as data isn't a dictionary.`);
593
+ return {
594
+ available: data.available,
595
+ domain: data.domain,
596
+ tld: data.tld ? unmarshalTld(data.tld) : void 0
597
+ };
927
598
  };
928
599
  const unmarshalSearchAvailableDomainsConsoleResponse = (data) => {
929
- if (!isJSONObject(data)) {
930
- throw new TypeError(
931
- `Unmarshalling the type 'SearchAvailableDomainsConsoleResponse' failed as data isn't a dictionary.`
932
- );
933
- }
934
- return {
935
- availableDomains: unmarshalArrayOfObject(data.available_domains, unmarshalAvailableDomain),
936
- exactMatchDomain: data.exact_match_domain ? unmarshalAvailableDomain(data.exact_match_domain) : void 0
937
- };
600
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SearchAvailableDomainsConsoleResponse' failed as data isn't a dictionary.`);
601
+ return {
602
+ availableDomains: unmarshalArrayOfObject(data.available_domains, unmarshalAvailableDomain),
603
+ exactMatchDomain: data.exact_match_domain ? unmarshalAvailableDomain(data.exact_match_domain) : void 0
604
+ };
938
605
  };
939
606
  const unmarshalSearchAvailableDomainsResponse = (data) => {
940
- if (!isJSONObject(data)) {
941
- throw new TypeError(
942
- `Unmarshalling the type 'SearchAvailableDomainsResponse' failed as data isn't a dictionary.`
943
- );
944
- }
945
- return {
946
- availableDomains: unmarshalArrayOfObject(data.available_domains, unmarshalAvailableDomain)
947
- };
607
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SearchAvailableDomainsResponse' failed as data isn't a dictionary.`);
608
+ return { availableDomains: unmarshalArrayOfObject(data.available_domains, unmarshalAvailableDomain) };
948
609
  };
949
610
  const unmarshalUpdateDNSZoneNameserversResponse = (data) => {
950
- if (!isJSONObject(data)) {
951
- throw new TypeError(
952
- `Unmarshalling the type 'UpdateDNSZoneNameserversResponse' failed as data isn't a dictionary.`
953
- );
954
- }
955
- return {
956
- ns: unmarshalArrayOfObject(data.ns, unmarshalNameserver)
957
- };
611
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'UpdateDNSZoneNameserversResponse' failed as data isn't a dictionary.`);
612
+ return { ns: unmarshalArrayOfObject(data.ns, unmarshalNameserver) };
958
613
  };
959
614
  const unmarshalUpdateDNSZoneRecordsResponse = (data) => {
960
- if (!isJSONObject(data)) {
961
- throw new TypeError(
962
- `Unmarshalling the type 'UpdateDNSZoneRecordsResponse' failed as data isn't a dictionary.`
963
- );
964
- }
965
- return {
966
- records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord)
967
- };
615
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'UpdateDNSZoneRecordsResponse' failed as data isn't a dictionary.`);
616
+ return { records: unmarshalArrayOfObject(data.records, unmarshalDomainRecord) };
968
617
  };
969
618
  const marshalCloneDNSZoneRequest = (request, defaults) => ({
970
- dest_dns_zone: request.destDnsZone,
971
- overwrite: request.overwrite,
972
- project_id: request.projectId ?? defaults.defaultProjectId
619
+ dest_dns_zone: request.destDnsZone,
620
+ overwrite: request.overwrite,
621
+ project_id: request.projectId ?? defaults.defaultProjectId
973
622
  });
974
623
  const marshalCreateDNSZoneRequest = (request, defaults) => ({
975
- domain: request.domain,
976
- project_id: request.projectId ?? defaults.defaultProjectId,
977
- subdomain: request.subdomain
624
+ domain: request.domain,
625
+ project_id: request.projectId ?? defaults.defaultProjectId,
626
+ subdomain: request.subdomain
978
627
  });
979
628
  const marshalCreateSSLCertificateRequest = (request, defaults) => ({
980
- alternative_dns_zones: request.alternativeDnsZones,
981
- dns_zone: request.dnsZone
982
- });
983
- const marshalImportProviderDNSZoneRequestOnlineV1 = (request, defaults) => ({
984
- token: request.token
985
- });
986
- const marshalImportProviderDNSZoneRequest = (request, defaults) => ({
987
- ...resolveOneOf([
988
- {
989
- param: "online_v1",
990
- value: request.onlineV1 !== void 0 ? marshalImportProviderDNSZoneRequestOnlineV1(request.onlineV1) : void 0
991
- }
992
- ])
629
+ alternative_dns_zones: request.alternativeDnsZones,
630
+ dns_zone: request.dnsZone
993
631
  });
994
- const marshalImportRawDNSZoneRequestTsigKey = (request, defaults) => ({
995
- algorithm: request.algorithm,
996
- key: request.key,
997
- name: request.name
632
+ var marshalImportProviderDNSZoneRequestOnlineV1 = (request, defaults) => ({ token: request.token });
633
+ const marshalImportProviderDNSZoneRequest = (request, defaults) => ({ ...resolveOneOf([{
634
+ param: "online_v1",
635
+ value: request.onlineV1 !== void 0 ? marshalImportProviderDNSZoneRequestOnlineV1(request.onlineV1, defaults) : void 0
636
+ }]) });
637
+ var marshalImportRawDNSZoneRequestTsigKey = (request, defaults) => ({
638
+ algorithm: request.algorithm,
639
+ key: request.key,
640
+ name: request.name
998
641
  });
999
- const marshalImportRawDNSZoneRequestAXFRSource = (request, defaults) => ({
1000
- name_server: request.nameServer,
1001
- tsig_key: request.tsigKey !== void 0 ? marshalImportRawDNSZoneRequestTsigKey(request.tsigKey) : void 0
1002
- });
1003
- const marshalImportRawDNSZoneRequestBindSource = (request, defaults) => ({
1004
- content: request.content
642
+ var marshalImportRawDNSZoneRequestAXFRSource = (request, defaults) => ({
643
+ name_server: request.nameServer,
644
+ tsig_key: request.tsigKey !== void 0 ? marshalImportRawDNSZoneRequestTsigKey(request.tsigKey, defaults) : void 0
1005
645
  });
646
+ var marshalImportRawDNSZoneRequestBindSource = (request, defaults) => ({ content: request.content });
1006
647
  const marshalImportRawDNSZoneRequest = (request, defaults) => ({
1007
- content: request.content,
1008
- format: request.format,
1009
- project_id: request.projectId ?? defaults.defaultProjectId,
1010
- ...resolveOneOf([
1011
- {
1012
- param: "bind_source",
1013
- value: request.bindSource !== void 0 ? marshalImportRawDNSZoneRequestBindSource(request.bindSource) : void 0
1014
- },
1015
- {
1016
- param: "axfr_source",
1017
- value: request.axfrSource !== void 0 ? marshalImportRawDNSZoneRequestAXFRSource(request.axfrSource) : void 0
1018
- }
1019
- ])
648
+ content: request.content,
649
+ format: request.format,
650
+ project_id: request.projectId ?? defaults.defaultProjectId,
651
+ ...resolveOneOf([{
652
+ param: "bind_source",
653
+ value: request.bindSource !== void 0 ? marshalImportRawDNSZoneRequestBindSource(request.bindSource, defaults) : void 0
654
+ }, {
655
+ param: "axfr_source",
656
+ value: request.axfrSource !== void 0 ? marshalImportRawDNSZoneRequestAXFRSource(request.axfrSource, defaults) : void 0
657
+ }])
1020
658
  });
1021
659
  const marshalRefreshDNSZoneRequest = (request, defaults) => ({
1022
- recreate_dns_zone: request.recreateDnsZone,
1023
- recreate_sub_dns_zone: request.recreateSubDnsZone
1024
- });
1025
- const marshalContactExtensionFRAssociationInfo = (request, defaults) => ({
1026
- publication_jo: request.publicationJo,
1027
- publication_jo_page: request.publicationJoPage
1028
- });
1029
- const marshalContactExtensionFRCodeAuthAfnicInfo = (request, defaults) => ({
1030
- code_auth_afnic: request.codeAuthAfnic
1031
- });
1032
- const marshalContactExtensionFRDunsInfo = (request, defaults) => ({
1033
- duns_id: request.dunsId,
1034
- local_id: request.localId
1035
- });
1036
- const marshalContactExtensionFRIndividualInfo = (request, defaults) => ({
1037
- whois_opt_in: request.whoisOptIn
660
+ recreate_dns_zone: request.recreateDnsZone,
661
+ recreate_sub_dns_zone: request.recreateSubDnsZone
1038
662
  });
1039
- const marshalContactExtensionFRTrademarkInfo = (request, defaults) => ({
1040
- trademark_inpi: request.trademarkInpi
663
+ var marshalContactExtensionFRAssociationInfo = (request, defaults) => ({
664
+ publication_jo: request.publicationJo,
665
+ publication_jo_page: request.publicationJoPage
1041
666
  });
1042
- const marshalContactExtensionEU = (request, defaults) => ({
1043
- european_citizenship: request.europeanCitizenship
667
+ var marshalContactExtensionFRCodeAuthAfnicInfo = (request, defaults) => ({ code_auth_afnic: request.codeAuthAfnic });
668
+ var marshalContactExtensionFRDunsInfo = (request, defaults) => ({
669
+ duns_id: request.dunsId,
670
+ local_id: request.localId
1044
671
  });
1045
- const marshalContactExtensionFR = (request, defaults) => ({
1046
- mode: request.mode,
1047
- ...resolveOneOf([
1048
- {
1049
- param: "individual_info",
1050
- value: request.individualInfo !== void 0 ? marshalContactExtensionFRIndividualInfo(request.individualInfo) : void 0
1051
- },
1052
- {
1053
- param: "duns_info",
1054
- value: request.dunsInfo !== void 0 ? marshalContactExtensionFRDunsInfo(request.dunsInfo) : void 0
1055
- },
1056
- {
1057
- param: "association_info",
1058
- value: request.associationInfo !== void 0 ? marshalContactExtensionFRAssociationInfo(request.associationInfo) : void 0
1059
- },
1060
- {
1061
- param: "trademark_info",
1062
- value: request.trademarkInfo !== void 0 ? marshalContactExtensionFRTrademarkInfo(request.trademarkInfo) : void 0
1063
- },
1064
- {
1065
- param: "code_auth_afnic_info",
1066
- value: request.codeAuthAfnicInfo !== void 0 ? marshalContactExtensionFRCodeAuthAfnicInfo(request.codeAuthAfnicInfo) : void 0
1067
- }
1068
- ])
672
+ var marshalContactExtensionFRIndividualInfo = (request, defaults) => ({ whois_opt_in: request.whoisOptIn });
673
+ var marshalContactExtensionFRTrademarkInfo = (request, defaults) => ({ trademark_inpi: request.trademarkInpi });
674
+ var marshalContactExtensionEU = (request, defaults) => ({ european_citizenship: request.europeanCitizenship });
675
+ var marshalContactExtensionFR = (request, defaults) => ({
676
+ mode: request.mode,
677
+ ...resolveOneOf([
678
+ {
679
+ param: "individual_info",
680
+ value: request.individualInfo !== void 0 ? marshalContactExtensionFRIndividualInfo(request.individualInfo, defaults) : void 0
681
+ },
682
+ {
683
+ param: "duns_info",
684
+ value: request.dunsInfo !== void 0 ? marshalContactExtensionFRDunsInfo(request.dunsInfo, defaults) : void 0
685
+ },
686
+ {
687
+ param: "association_info",
688
+ value: request.associationInfo !== void 0 ? marshalContactExtensionFRAssociationInfo(request.associationInfo, defaults) : void 0
689
+ },
690
+ {
691
+ param: "trademark_info",
692
+ value: request.trademarkInfo !== void 0 ? marshalContactExtensionFRTrademarkInfo(request.trademarkInfo, defaults) : void 0
693
+ },
694
+ {
695
+ param: "code_auth_afnic_info",
696
+ value: request.codeAuthAfnicInfo !== void 0 ? marshalContactExtensionFRCodeAuthAfnicInfo(request.codeAuthAfnicInfo, defaults) : void 0
697
+ }
698
+ ])
1069
699
  });
1070
- const marshalContactExtensionIT = (request, defaults) => ({
1071
- european_citizenship: request.europeanCitizenship,
1072
- pin: request.pin,
1073
- tax_code: request.taxCode
700
+ var marshalContactExtensionIT = (request, defaults) => ({
701
+ european_citizenship: request.europeanCitizenship,
702
+ pin: request.pin,
703
+ tax_code: request.taxCode
1074
704
  });
1075
- const marshalContactExtensionNL = (request, defaults) => ({
1076
- legal_form: request.legalForm,
1077
- legal_form_registration_number: request.legalFormRegistrationNumber
705
+ var marshalContactExtensionNL = (request, defaults) => ({
706
+ legal_form: request.legalForm,
707
+ legal_form_registration_number: request.legalFormRegistrationNumber
1078
708
  });
1079
- const marshalContactQuestion = (request, defaults) => ({
1080
- answer: request.answer,
1081
- question: request.question
709
+ var marshalContactQuestion = (request, defaults) => ({
710
+ answer: request.answer,
711
+ question: request.question
1082
712
  });
1083
- const marshalNewContact = (request, defaults) => ({
1084
- address_line_1: request.addressLine1,
1085
- address_line_2: request.addressLine2,
1086
- city: request.city,
1087
- company_identification_code: request.companyIdentificationCode,
1088
- company_name: request.companyName,
1089
- country: request.country,
1090
- email: request.email,
1091
- email_alt: request.emailAlt,
1092
- extension_eu: request.extensionEu !== void 0 ? marshalContactExtensionEU(request.extensionEu) : void 0,
1093
- extension_fr: request.extensionFr !== void 0 ? marshalContactExtensionFR(request.extensionFr) : void 0,
1094
- extension_it: request.extensionIt !== void 0 ? marshalContactExtensionIT(request.extensionIt) : void 0,
1095
- extension_nl: request.extensionNl !== void 0 ? marshalContactExtensionNL(request.extensionNl) : void 0,
1096
- fax_number: request.faxNumber,
1097
- firstname: request.firstname,
1098
- lang: request.lang,
1099
- lastname: request.lastname,
1100
- legal_form: request.legalForm,
1101
- phone_number: request.phoneNumber,
1102
- questions: request.questions !== void 0 ? request.questions.map((elt) => marshalContactQuestion(elt)) : void 0,
1103
- resale: request.resale,
1104
- state: request.state,
1105
- vat_identification_code: request.vatIdentificationCode,
1106
- whois_opt_in: request.whoisOptIn,
1107
- zip: request.zip
713
+ var marshalNewContact = (request, defaults) => ({
714
+ address_line_1: request.addressLine1,
715
+ address_line_2: request.addressLine2,
716
+ city: request.city,
717
+ company_identification_code: request.companyIdentificationCode,
718
+ company_name: request.companyName,
719
+ country: request.country,
720
+ email: request.email,
721
+ email_alt: request.emailAlt,
722
+ extension_eu: request.extensionEu !== void 0 ? marshalContactExtensionEU(request.extensionEu, defaults) : void 0,
723
+ extension_fr: request.extensionFr !== void 0 ? marshalContactExtensionFR(request.extensionFr, defaults) : void 0,
724
+ extension_it: request.extensionIt !== void 0 ? marshalContactExtensionIT(request.extensionIt, defaults) : void 0,
725
+ extension_nl: request.extensionNl !== void 0 ? marshalContactExtensionNL(request.extensionNl, defaults) : void 0,
726
+ fax_number: request.faxNumber,
727
+ firstname: request.firstname,
728
+ lang: request.lang,
729
+ lastname: request.lastname,
730
+ legal_form: request.legalForm,
731
+ phone_number: request.phoneNumber,
732
+ questions: request.questions.map((elt) => marshalContactQuestion(elt, defaults)),
733
+ resale: request.resale,
734
+ state: request.state,
735
+ vat_identification_code: request.vatIdentificationCode,
736
+ whois_opt_in: request.whoisOptIn,
737
+ zip: request.zip
1108
738
  });
1109
739
  const marshalRegistrarApiBuyDomainsRequest = (request, defaults) => ({
1110
- domains: request.domains,
1111
- duration_in_years: request.durationInYears,
1112
- project_id: request.projectId ?? defaults.defaultProjectId,
1113
- ...resolveOneOf([
1114
- {
1115
- param: "owner_contact_id",
1116
- value: request.ownerContactId
1117
- },
1118
- {
1119
- param: "owner_contact",
1120
- value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact) : void 0
1121
- }
1122
- ]),
1123
- ...resolveOneOf([
1124
- {
1125
- param: "administrative_contact_id",
1126
- value: request.administrativeContactId
1127
- },
1128
- {
1129
- param: "administrative_contact",
1130
- value: request.administrativeContact !== void 0 ? marshalNewContact(request.administrativeContact) : void 0
1131
- }
1132
- ]),
1133
- ...resolveOneOf([
1134
- {
1135
- param: "technical_contact_id",
1136
- value: request.technicalContactId
1137
- },
1138
- {
1139
- param: "technical_contact",
1140
- value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact) : void 0
1141
- }
1142
- ])
740
+ domains: request.domains,
741
+ duration_in_years: request.durationInYears,
742
+ project_id: request.projectId ?? defaults.defaultProjectId,
743
+ ...resolveOneOf([{
744
+ param: "owner_contact_id",
745
+ value: request.ownerContactId
746
+ }, {
747
+ param: "owner_contact",
748
+ value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact, defaults) : void 0
749
+ }]),
750
+ ...resolveOneOf([{
751
+ param: "administrative_contact_id",
752
+ value: request.administrativeContactId
753
+ }, {
754
+ param: "administrative_contact",
755
+ value: request.administrativeContact !== void 0 ? marshalNewContact(request.administrativeContact, defaults) : void 0
756
+ }]),
757
+ ...resolveOneOf([{
758
+ param: "technical_contact_id",
759
+ value: request.technicalContactId
760
+ }, {
761
+ param: "technical_contact",
762
+ value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact, defaults) : void 0
763
+ }])
1143
764
  });
1144
765
  const marshalRegistrarApiCheckContactsCompatibilityRequest = (request, defaults) => ({
1145
- domains: request.domains,
1146
- tlds: request.tlds,
1147
- ...resolveOneOf([
1148
- {
1149
- param: "owner_contact_id",
1150
- value: request.ownerContactId
1151
- },
1152
- {
1153
- param: "owner_contact",
1154
- value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact) : void 0
1155
- }
1156
- ]),
1157
- ...resolveOneOf([
1158
- {
1159
- param: "administrative_contact_id",
1160
- value: request.administrativeContactId
1161
- },
1162
- {
1163
- param: "administrative_contact",
1164
- value: request.administrativeContact !== void 0 ? marshalNewContact(request.administrativeContact) : void 0
1165
- }
1166
- ]),
1167
- ...resolveOneOf([
1168
- {
1169
- param: "technical_contact_id",
1170
- value: request.technicalContactId
1171
- },
1172
- {
1173
- param: "technical_contact",
1174
- value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact) : void 0
1175
- }
1176
- ])
766
+ domains: request.domains,
767
+ tlds: request.tlds,
768
+ ...resolveOneOf([{
769
+ param: "owner_contact_id",
770
+ value: request.ownerContactId
771
+ }, {
772
+ param: "owner_contact",
773
+ value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact, defaults) : void 0
774
+ }]),
775
+ ...resolveOneOf([{
776
+ param: "administrative_contact_id",
777
+ value: request.administrativeContactId
778
+ }, {
779
+ param: "administrative_contact",
780
+ value: request.administrativeContact !== void 0 ? marshalNewContact(request.administrativeContact, defaults) : void 0
781
+ }]),
782
+ ...resolveOneOf([{
783
+ param: "technical_contact_id",
784
+ value: request.technicalContactId
785
+ }, {
786
+ param: "technical_contact",
787
+ value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact, defaults) : void 0
788
+ }])
1177
789
  });
1178
790
  const marshalRegistrarApiCreateDomainHostRequest = (request, defaults) => ({
1179
- ips: request.ips,
1180
- name: request.name
791
+ ips: request.ips,
792
+ name: request.name
1181
793
  });
1182
- const marshalDSRecordPublicKey = (request, defaults) => ({
1183
- key: request.key
1184
- });
1185
- const marshalDSRecordDigest = (request, defaults) => ({
1186
- digest: request.digest,
1187
- public_key: request.publicKey !== void 0 ? marshalDSRecordPublicKey(request.publicKey) : void 0,
1188
- type: request.type
794
+ var marshalDSRecordPublicKey = (request, defaults) => ({ key: request.key });
795
+ var marshalDSRecordDigest = (request, defaults) => ({
796
+ digest: request.digest,
797
+ public_key: request.publicKey !== void 0 ? marshalDSRecordPublicKey(request.publicKey, defaults) : void 0,
798
+ type: request.type
1189
799
  });
1190
800
  const marshalDSRecord = (request, defaults) => ({
1191
- algorithm: request.algorithm,
1192
- key_id: request.keyId,
1193
- ...resolveOneOf([
1194
- {
1195
- param: "digest",
1196
- value: request.digest !== void 0 ? marshalDSRecordDigest(request.digest) : void 0
1197
- },
1198
- {
1199
- param: "public_key",
1200
- value: request.publicKey !== void 0 ? marshalDSRecordPublicKey(request.publicKey) : void 0
1201
- }
1202
- ])
1203
- });
1204
- const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({
1205
- ds_record: request.dsRecord !== void 0 ? marshalDSRecord(request.dsRecord) : void 0
801
+ algorithm: request.algorithm,
802
+ key_id: request.keyId,
803
+ ...resolveOneOf([{
804
+ param: "digest",
805
+ value: request.digest !== void 0 ? marshalDSRecordDigest(request.digest, defaults) : void 0
806
+ }, {
807
+ param: "public_key",
808
+ value: request.publicKey !== void 0 ? marshalDSRecordPublicKey(request.publicKey, defaults) : void 0
809
+ }])
1206
810
  });
811
+ const marshalRegistrarApiEnableDomainDNSSECRequest = (request, defaults) => ({ ds_record: request.dsRecord !== void 0 ? marshalDSRecord(request.dsRecord, defaults) : void 0 });
1207
812
  const marshalRegistrarApiRegisterExternalDomainRequest = (request, defaults) => ({
1208
- domain: request.domain,
1209
- project_id: request.projectId ?? defaults.defaultProjectId
813
+ domain: request.domain,
814
+ project_id: request.projectId ?? defaults.defaultProjectId
1210
815
  });
1211
816
  const marshalRegistrarApiRenewDomainsRequest = (request, defaults) => ({
1212
- domains: request.domains,
1213
- duration_in_years: request.durationInYears,
1214
- force_late_renewal: request.forceLateRenewal
817
+ domains: request.domains,
818
+ duration_in_years: request.durationInYears,
819
+ force_late_renewal: request.forceLateRenewal
1215
820
  });
1216
821
  const marshalRegistrarApiRetryInboundTransferRequest = (request, defaults) => ({
1217
- auth_code: request.authCode,
1218
- domain: request.domain,
1219
- project_id: request.projectId ?? defaults.defaultProjectId
822
+ auth_code: request.authCode,
823
+ domain: request.domain,
824
+ project_id: request.projectId ?? defaults.defaultProjectId
1220
825
  });
1221
826
  const marshalRegistrarApiTradeDomainRequest = (request, defaults) => ({
1222
- project_id: request.projectId ?? defaults.defaultProjectId,
1223
- ...resolveOneOf([
1224
- {
1225
- param: "new_owner_contact_id",
1226
- value: request.newOwnerContactId
1227
- },
1228
- {
1229
- param: "new_owner_contact",
1230
- value: request.newOwnerContact !== void 0 ? marshalNewContact(request.newOwnerContact) : void 0
1231
- }
1232
- ])
827
+ project_id: request.projectId ?? defaults.defaultProjectId,
828
+ ...resolveOneOf([{
829
+ param: "new_owner_contact_id",
830
+ value: request.newOwnerContactId
831
+ }, {
832
+ param: "new_owner_contact",
833
+ value: request.newOwnerContact !== void 0 ? marshalNewContact(request.newOwnerContact, defaults) : void 0
834
+ }])
1233
835
  });
1234
- const marshalTransferInDomainRequestTransferRequest = (request, defaults) => ({
1235
- auth_code: request.authCode,
1236
- domain: request.domain
836
+ var marshalTransferInDomainRequestTransferRequest = (request, defaults) => ({
837
+ auth_code: request.authCode,
838
+ domain: request.domain
1237
839
  });
1238
840
  const marshalRegistrarApiTransferInDomainRequest = (request, defaults) => ({
1239
- domains: request.domains.map((elt) => marshalTransferInDomainRequestTransferRequest(elt)),
1240
- project_id: request.projectId ?? defaults.defaultProjectId,
1241
- ...resolveOneOf([
1242
- {
1243
- param: "owner_contact_id",
1244
- value: request.ownerContactId
1245
- },
1246
- {
1247
- param: "owner_contact",
1248
- value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact) : void 0
1249
- }
1250
- ]),
1251
- ...resolveOneOf([
1252
- {
1253
- param: "administrative_contact_id",
1254
- value: request.administrativeContactId
1255
- },
1256
- {
1257
- param: "administrative_contact",
1258
- value: request.administrativeContact !== void 0 ? marshalNewContact(request.administrativeContact) : void 0
1259
- }
1260
- ]),
1261
- ...resolveOneOf([
1262
- {
1263
- param: "technical_contact_id",
1264
- value: request.technicalContactId
1265
- },
1266
- {
1267
- param: "technical_contact",
1268
- value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact) : void 0
1269
- }
1270
- ])
841
+ domains: request.domains.map((elt) => marshalTransferInDomainRequestTransferRequest(elt, defaults)),
842
+ project_id: request.projectId ?? defaults.defaultProjectId,
843
+ ...resolveOneOf([{
844
+ param: "owner_contact_id",
845
+ value: request.ownerContactId
846
+ }, {
847
+ param: "owner_contact",
848
+ value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact, defaults) : void 0
849
+ }]),
850
+ ...resolveOneOf([{
851
+ param: "administrative_contact_id",
852
+ value: request.administrativeContactId
853
+ }, {
854
+ param: "administrative_contact",
855
+ value: request.administrativeContact !== void 0 ? marshalNewContact(request.administrativeContact, defaults) : void 0
856
+ }]),
857
+ ...resolveOneOf([{
858
+ param: "technical_contact_id",
859
+ value: request.technicalContactId
860
+ }, {
861
+ param: "technical_contact",
862
+ value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact, defaults) : void 0
863
+ }])
1271
864
  });
1272
- const marshalUpdateContactRequestQuestion = (request, defaults) => ({
1273
- answer: request.answer,
1274
- question: request.question
865
+ var marshalUpdateContactRequestQuestion = (request, defaults) => ({
866
+ answer: request.answer,
867
+ question: request.question
1275
868
  });
1276
869
  const marshalRegistrarApiUpdateContactRequest = (request, defaults) => ({
1277
- address_line_1: request.addressLine1,
1278
- address_line_2: request.addressLine2,
1279
- city: request.city,
1280
- company_identification_code: request.companyIdentificationCode,
1281
- country: request.country,
1282
- email: request.email,
1283
- email_alt: request.emailAlt,
1284
- extension_eu: request.extensionEu !== void 0 ? marshalContactExtensionEU(request.extensionEu) : void 0,
1285
- extension_fr: request.extensionFr !== void 0 ? marshalContactExtensionFR(request.extensionFr) : void 0,
1286
- extension_it: request.extensionIt !== void 0 ? marshalContactExtensionIT(request.extensionIt) : void 0,
1287
- extension_nl: request.extensionNl !== void 0 ? marshalContactExtensionNL(request.extensionNl) : void 0,
1288
- fax_number: request.faxNumber,
1289
- lang: request.lang,
1290
- phone_number: request.phoneNumber,
1291
- questions: request.questions !== void 0 ? request.questions.map((elt) => marshalUpdateContactRequestQuestion(elt)) : void 0,
1292
- resale: request.resale,
1293
- state: request.state,
1294
- vat_identification_code: request.vatIdentificationCode,
1295
- whois_opt_in: request.whoisOptIn,
1296
- zip: request.zip
1297
- });
1298
- const marshalRegistrarApiUpdateDomainHostRequest = (request, defaults) => ({
1299
- ips: request.ips
870
+ address_line_1: request.addressLine1,
871
+ address_line_2: request.addressLine2,
872
+ city: request.city,
873
+ company_identification_code: request.companyIdentificationCode,
874
+ country: request.country,
875
+ email: request.email,
876
+ email_alt: request.emailAlt,
877
+ extension_eu: request.extensionEu !== void 0 ? marshalContactExtensionEU(request.extensionEu, defaults) : void 0,
878
+ extension_fr: request.extensionFr !== void 0 ? marshalContactExtensionFR(request.extensionFr, defaults) : void 0,
879
+ extension_it: request.extensionIt !== void 0 ? marshalContactExtensionIT(request.extensionIt, defaults) : void 0,
880
+ extension_nl: request.extensionNl !== void 0 ? marshalContactExtensionNL(request.extensionNl, defaults) : void 0,
881
+ fax_number: request.faxNumber,
882
+ lang: request.lang,
883
+ phone_number: request.phoneNumber,
884
+ questions: request.questions !== void 0 ? request.questions.map((elt) => marshalUpdateContactRequestQuestion(elt, defaults)) : void 0,
885
+ resale: request.resale,
886
+ state: request.state,
887
+ vat_identification_code: request.vatIdentificationCode,
888
+ whois_opt_in: request.whoisOptIn,
889
+ zip: request.zip
1300
890
  });
891
+ const marshalRegistrarApiUpdateDomainHostRequest = (request, defaults) => ({ ips: request.ips });
1301
892
  const marshalRegistrarApiUpdateDomainRequest = (request, defaults) => ({
1302
- ...resolveOneOf([
1303
- {
1304
- param: "technical_contact_id",
1305
- value: request.technicalContactId
1306
- },
1307
- {
1308
- param: "technical_contact",
1309
- value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact) : void 0
1310
- }
1311
- ]),
1312
- ...resolveOneOf([
1313
- {
1314
- param: "owner_contact_id",
1315
- value: request.ownerContactId
1316
- },
1317
- {
1318
- param: "owner_contact",
1319
- value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact) : void 0
1320
- }
1321
- ]),
1322
- ...resolveOneOf([
1323
- {
1324
- param: "administrative_contact_id",
1325
- value: request.administrativeContactId
1326
- },
1327
- {
1328
- param: "administrative_contact",
1329
- value: request.administrativeContact !== void 0 ? marshalNewContact(request.administrativeContact) : void 0
1330
- }
1331
- ])
1332
- });
1333
- const marshalNameserver = (request, defaults) => ({
1334
- ip: request.ip,
1335
- name: request.name
1336
- });
1337
- const marshalUpdateDNSZoneNameserversRequest = (request, defaults) => ({
1338
- ns: request.ns.map((elt) => marshalNameserver(elt))
893
+ ...resolveOneOf([{
894
+ param: "technical_contact_id",
895
+ value: request.technicalContactId
896
+ }, {
897
+ param: "technical_contact",
898
+ value: request.technicalContact !== void 0 ? marshalNewContact(request.technicalContact, defaults) : void 0
899
+ }]),
900
+ ...resolveOneOf([{
901
+ param: "owner_contact_id",
902
+ value: request.ownerContactId
903
+ }, {
904
+ param: "owner_contact",
905
+ value: request.ownerContact !== void 0 ? marshalNewContact(request.ownerContact, defaults) : void 0
906
+ }]),
907
+ ...resolveOneOf([{
908
+ param: "administrative_contact_id",
909
+ value: request.administrativeContactId
910
+ }, {
911
+ param: "administrative_contact",
912
+ value: request.administrativeContact !== void 0 ? marshalNewContact(request.administrativeContact, defaults) : void 0
913
+ }])
1339
914
  });
1340
- const marshalDomainRecordGeoIPConfigMatch = (request, defaults) => ({
1341
- continents: request.continents,
1342
- countries: request.countries,
1343
- data: request.data
915
+ var marshalNameserver = (request, defaults) => ({
916
+ ip: request.ip,
917
+ name: request.name
1344
918
  });
1345
- const marshalDomainRecordViewConfigView = (request, defaults) => ({
1346
- data: request.data,
1347
- subnet: request.subnet
919
+ const marshalUpdateDNSZoneNameserversRequest = (request, defaults) => ({ ns: request.ns.map((elt) => marshalNameserver(elt, defaults)) });
920
+ var marshalDomainRecordGeoIPConfigMatch = (request, defaults) => ({
921
+ continents: request.continents,
922
+ countries: request.countries,
923
+ data: request.data
1348
924
  });
1349
- const marshalDomainRecordWeightedConfigWeightedIP = (request, defaults) => ({
1350
- ip: request.ip,
1351
- weight: request.weight
925
+ var marshalDomainRecordViewConfigView = (request, defaults) => ({
926
+ data: request.data,
927
+ subnet: request.subnet
1352
928
  });
1353
- const marshalDomainRecordGeoIPConfig = (request, defaults) => ({
1354
- default: request.default,
1355
- matches: request.matches.map((elt) => marshalDomainRecordGeoIPConfigMatch(elt))
929
+ var marshalDomainRecordWeightedConfigWeightedIP = (request, defaults) => ({
930
+ ip: request.ip,
931
+ weight: request.weight
1356
932
  });
1357
- const marshalDomainRecordHTTPServiceConfig = (request, defaults) => ({
1358
- ips: request.ips,
1359
- must_contain: request.mustContain,
1360
- strategy: request.strategy,
1361
- url: request.url,
1362
- user_agent: request.userAgent
933
+ var marshalDomainRecordGeoIPConfig = (request, defaults) => ({
934
+ default: request.default,
935
+ matches: request.matches.map((elt) => marshalDomainRecordGeoIPConfigMatch(elt, defaults))
1363
936
  });
1364
- const marshalDomainRecordViewConfig = (request, defaults) => ({
1365
- views: request.views.map((elt) => marshalDomainRecordViewConfigView(elt))
937
+ var marshalDomainRecordHTTPServiceConfig = (request, defaults) => ({
938
+ ips: request.ips,
939
+ must_contain: request.mustContain,
940
+ strategy: request.strategy,
941
+ url: request.url,
942
+ user_agent: request.userAgent
1366
943
  });
1367
- const marshalDomainRecordWeightedConfig = (request, defaults) => ({
1368
- weighted_ips: request.weightedIps.map((elt) => marshalDomainRecordWeightedConfigWeightedIP(elt))
944
+ var marshalDomainRecordViewConfig = (request, defaults) => ({ views: request.views.map((elt) => marshalDomainRecordViewConfigView(elt, defaults)) });
945
+ var marshalDomainRecordWeightedConfig = (request, defaults) => ({ weighted_ips: request.weightedIps.map((elt) => marshalDomainRecordWeightedConfigWeightedIP(elt, defaults)) });
946
+ var marshalDomainRecord = (request, defaults) => ({
947
+ comment: request.comment,
948
+ data: request.data,
949
+ id: request.id,
950
+ name: request.name,
951
+ priority: request.priority,
952
+ ttl: request.ttl,
953
+ type: request.type,
954
+ updated_at: request.updatedAt,
955
+ ...resolveOneOf([
956
+ {
957
+ param: "geo_ip_config",
958
+ value: request.geoIpConfig !== void 0 ? marshalDomainRecordGeoIPConfig(request.geoIpConfig, defaults) : void 0
959
+ },
960
+ {
961
+ param: "http_service_config",
962
+ value: request.httpServiceConfig !== void 0 ? marshalDomainRecordHTTPServiceConfig(request.httpServiceConfig, defaults) : void 0
963
+ },
964
+ {
965
+ param: "weighted_config",
966
+ value: request.weightedConfig !== void 0 ? marshalDomainRecordWeightedConfig(request.weightedConfig, defaults) : void 0
967
+ },
968
+ {
969
+ param: "view_config",
970
+ value: request.viewConfig !== void 0 ? marshalDomainRecordViewConfig(request.viewConfig, defaults) : void 0
971
+ }
972
+ ])
1369
973
  });
1370
- const marshalDomainRecord = (request, defaults) => ({
1371
- comment: request.comment,
1372
- data: request.data,
1373
- id: request.id,
1374
- name: request.name,
1375
- priority: request.priority,
1376
- ttl: request.ttl,
1377
- type: request.type,
1378
- ...resolveOneOf([
1379
- {
1380
- param: "geo_ip_config",
1381
- value: request.geoIpConfig !== void 0 ? marshalDomainRecordGeoIPConfig(request.geoIpConfig) : void 0
1382
- },
1383
- {
1384
- param: "http_service_config",
1385
- value: request.httpServiceConfig !== void 0 ? marshalDomainRecordHTTPServiceConfig(request.httpServiceConfig) : void 0
1386
- },
1387
- {
1388
- param: "weighted_config",
1389
- value: request.weightedConfig !== void 0 ? marshalDomainRecordWeightedConfig(request.weightedConfig) : void 0
1390
- },
1391
- {
1392
- param: "view_config",
1393
- value: request.viewConfig !== void 0 ? marshalDomainRecordViewConfig(request.viewConfig) : void 0
1394
- }
1395
- ])
974
+ var marshalRecordIdentifier = (request, defaults) => ({
975
+ data: request.data,
976
+ name: request.name,
977
+ ttl: request.ttl,
978
+ type: request.type
1396
979
  });
1397
- const marshalRecordIdentifier = (request, defaults) => ({
1398
- data: request.data,
1399
- name: request.name,
1400
- ttl: request.ttl,
1401
- type: request.type
1402
- });
1403
- const marshalRecordChangeAdd = (request, defaults) => ({
1404
- records: request.records.map((elt) => marshalDomainRecord(elt))
1405
- });
1406
- const marshalRecordChangeClear = (request, defaults) => ({});
1407
- const marshalRecordChangeDelete = (request, defaults) => ({
1408
- ...resolveOneOf([
1409
- {
1410
- param: "id",
1411
- value: request.id
1412
- },
1413
- {
1414
- param: "id_fields",
1415
- value: request.idFields !== void 0 ? marshalRecordIdentifier(request.idFields) : void 0
1416
- }
1417
- ])
1418
- });
1419
- const marshalRecordChangeSet = (request, defaults) => ({
1420
- records: request.records.map((elt) => marshalDomainRecord(elt)),
1421
- ...resolveOneOf([
1422
- {
1423
- param: "id",
1424
- value: request.id
1425
- },
1426
- {
1427
- param: "id_fields",
1428
- value: request.idFields !== void 0 ? marshalRecordIdentifier(request.idFields) : void 0
1429
- }
1430
- ])
1431
- });
1432
- const marshalRecordChange = (request, defaults) => ({
1433
- ...resolveOneOf([
1434
- {
1435
- param: "add",
1436
- value: request.add !== void 0 ? marshalRecordChangeAdd(request.add) : void 0
1437
- },
1438
- {
1439
- param: "set",
1440
- value: request.set !== void 0 ? marshalRecordChangeSet(request.set) : void 0
1441
- },
1442
- {
1443
- param: "delete",
1444
- value: request.delete !== void 0 ? marshalRecordChangeDelete(request.delete) : void 0
1445
- },
1446
- {
1447
- param: "clear",
1448
- value: request.clear !== void 0 ? marshalRecordChangeClear(request.clear) : void 0
1449
- }
1450
- ])
980
+ var marshalRecordChangeAdd = (request, defaults) => ({ records: request.records.map((elt) => marshalDomainRecord(elt, defaults)) });
981
+ var marshalRecordChangeClear = (request, defaults) => ({});
982
+ var marshalRecordChangeDelete = (request, defaults) => ({ ...resolveOneOf([{
983
+ param: "id",
984
+ value: request.id
985
+ }, {
986
+ param: "id_fields",
987
+ value: request.idFields !== void 0 ? marshalRecordIdentifier(request.idFields, defaults) : void 0
988
+ }]) });
989
+ var marshalRecordChangeSet = (request, defaults) => ({
990
+ records: request.records.map((elt) => marshalDomainRecord(elt, defaults)),
991
+ ...resolveOneOf([{
992
+ param: "id",
993
+ value: request.id
994
+ }, {
995
+ param: "id_fields",
996
+ value: request.idFields !== void 0 ? marshalRecordIdentifier(request.idFields, defaults) : void 0
997
+ }])
1451
998
  });
999
+ var marshalRecordChange = (request, defaults) => ({ ...resolveOneOf([
1000
+ {
1001
+ param: "add",
1002
+ value: request.add !== void 0 ? marshalRecordChangeAdd(request.add, defaults) : void 0
1003
+ },
1004
+ {
1005
+ param: "set",
1006
+ value: request.set !== void 0 ? marshalRecordChangeSet(request.set, defaults) : void 0
1007
+ },
1008
+ {
1009
+ param: "delete",
1010
+ value: request.delete !== void 0 ? marshalRecordChangeDelete(request.delete, defaults) : void 0
1011
+ },
1012
+ {
1013
+ param: "clear",
1014
+ value: request.clear !== void 0 ? marshalRecordChangeClear(request.clear, defaults) : void 0
1015
+ }
1016
+ ]) });
1452
1017
  const marshalUpdateDNSZoneRecordsRequest = (request, defaults) => ({
1453
- changes: request.changes.map((elt) => marshalRecordChange(elt)),
1454
- disallow_new_zone_creation: request.disallowNewZoneCreation,
1455
- return_all_records: request.returnAllRecords,
1456
- serial: request.serial
1018
+ changes: request.changes.map((elt) => marshalRecordChange(elt, defaults)),
1019
+ disallow_new_zone_creation: request.disallowNewZoneCreation,
1020
+ return_all_records: request.returnAllRecords,
1021
+ serial: request.serial
1457
1022
  });
1458
1023
  const marshalUpdateDNSZoneRequest = (request, defaults) => ({
1459
- new_dns_zone: request.newDnsZone,
1460
- project_id: request.projectId ?? defaults.defaultProjectId
1024
+ new_dns_zone: request.newDnsZone,
1025
+ project_id: request.projectId ?? defaults.defaultProjectId
1461
1026
  });
1462
- export {
1463
- marshalCloneDNSZoneRequest,
1464
- marshalCreateDNSZoneRequest,
1465
- marshalCreateSSLCertificateRequest,
1466
- marshalDSRecord,
1467
- marshalImportProviderDNSZoneRequest,
1468
- marshalImportRawDNSZoneRequest,
1469
- marshalRefreshDNSZoneRequest,
1470
- marshalRegistrarApiBuyDomainsRequest,
1471
- marshalRegistrarApiCheckContactsCompatibilityRequest,
1472
- marshalRegistrarApiCreateDomainHostRequest,
1473
- marshalRegistrarApiEnableDomainDNSSECRequest,
1474
- marshalRegistrarApiRegisterExternalDomainRequest,
1475
- marshalRegistrarApiRenewDomainsRequest,
1476
- marshalRegistrarApiRetryInboundTransferRequest,
1477
- marshalRegistrarApiTradeDomainRequest,
1478
- marshalRegistrarApiTransferInDomainRequest,
1479
- marshalRegistrarApiUpdateContactRequest,
1480
- marshalRegistrarApiUpdateDomainHostRequest,
1481
- marshalRegistrarApiUpdateDomainRequest,
1482
- marshalUpdateDNSZoneNameserversRequest,
1483
- marshalUpdateDNSZoneRecordsRequest,
1484
- marshalUpdateDNSZoneRequest,
1485
- unmarshalCheckContactsCompatibilityResponse,
1486
- unmarshalClearDNSZoneRecordsResponse,
1487
- unmarshalContact,
1488
- unmarshalDNSZone,
1489
- unmarshalDSRecord,
1490
- unmarshalDeleteDNSZoneResponse,
1491
- unmarshalDeleteExternalDomainResponse,
1492
- unmarshalDeleteSSLCertificateResponse,
1493
- unmarshalDomain,
1494
- unmarshalGetDNSZoneTsigKeyResponse,
1495
- unmarshalGetDNSZoneVersionDiffResponse,
1496
- unmarshalGetDomainAuthCodeResponse,
1497
- unmarshalHost,
1498
- unmarshalImportProviderDNSZoneResponse,
1499
- unmarshalImportRawDNSZoneResponse,
1500
- unmarshalListContactsResponse,
1501
- unmarshalListDNSZoneNameserversResponse,
1502
- unmarshalListDNSZoneRecordsResponse,
1503
- unmarshalListDNSZoneVersionRecordsResponse,
1504
- unmarshalListDNSZoneVersionsResponse,
1505
- unmarshalListDNSZonesResponse,
1506
- unmarshalListDomainHostsResponse,
1507
- unmarshalListDomainsResponse,
1508
- unmarshalListInboundTransfersResponse,
1509
- unmarshalListRenewableDomainsResponse,
1510
- unmarshalListSSLCertificatesResponse,
1511
- unmarshalListTasksResponse,
1512
- unmarshalListTldsResponse,
1513
- unmarshalOrderResponse,
1514
- unmarshalRefreshDNSZoneResponse,
1515
- unmarshalRegisterExternalDomainResponse,
1516
- unmarshalRestoreDNSZoneVersionResponse,
1517
- unmarshalRetryInboundTransferResponse,
1518
- unmarshalSSLCertificate,
1519
- unmarshalSearchAvailableDomainsConsoleResponse,
1520
- unmarshalSearchAvailableDomainsResponse,
1521
- unmarshalTask,
1522
- unmarshalUpdateDNSZoneNameserversResponse,
1523
- unmarshalUpdateDNSZoneRecordsResponse
1524
- };
1027
+ export { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalDSRecord, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiCheckContactsCompatibilityRequest, marshalRegistrarApiCreateDomainHostRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiRetryInboundTransferRequest, 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, unmarshalListInboundTransfersResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalListTldsResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalRetryInboundTransferResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsConsoleResponse, unmarshalSearchAvailableDomainsResponse, unmarshalTask, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse };