@scaleway/sdk-domain 2.2.1 → 2.3.0

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