@scaleway/sdk-audit-trail 2.5.0 → 2.6.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,769 +1,487 @@
1
- import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
- const unmarshalExportJobS3 = (data) => {
3
- if (!isJSONObject(data)) {
4
- throw new TypeError(
5
- `Unmarshalling the type 'ExportJobS3' failed as data isn't a dictionary.`
6
- );
7
- }
8
- return {
9
- bucket: data.bucket,
10
- prefix: data.prefix,
11
- projectId: data.project_id,
12
- region: data.region
13
- };
14
- };
15
- const unmarshalExportJobStatus = (data) => {
16
- if (!isJSONObject(data)) {
17
- throw new TypeError(
18
- `Unmarshalling the type 'ExportJobStatus' failed as data isn't a dictionary.`
19
- );
20
- }
21
- return {
22
- code: data.code,
23
- message: data.message
24
- };
1
+ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
+ var unmarshalExportJobS3 = (data) => {
3
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExportJobS3' failed as data isn't a dictionary.`);
4
+ return {
5
+ bucket: data.bucket,
6
+ prefix: data.prefix,
7
+ projectId: data.project_id,
8
+ region: data.region
9
+ };
10
+ };
11
+ var unmarshalExportJobStatus = (data) => {
12
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExportJobStatus' failed as data isn't a dictionary.`);
13
+ return {
14
+ code: data.code,
15
+ message: data.message
16
+ };
25
17
  };
26
18
  const unmarshalExportJob = (data) => {
27
- if (!isJSONObject(data)) {
28
- throw new TypeError(
29
- `Unmarshalling the type 'ExportJob' failed as data isn't a dictionary.`
30
- );
31
- }
32
- return {
33
- createdAt: unmarshalDate(data.created_at),
34
- id: data.id,
35
- lastRunAt: unmarshalDate(data.last_run_at),
36
- lastStatus: data.last_status ? unmarshalExportJobStatus(data.last_status) : void 0,
37
- name: data.name,
38
- organizationId: data.organization_id,
39
- s3: data.s3 ? unmarshalExportJobS3(data.s3) : void 0,
40
- tags: data.tags
41
- };
42
- };
43
- const unmarshalAlertRule = (data) => {
44
- if (!isJSONObject(data)) {
45
- throw new TypeError(
46
- `Unmarshalling the type 'AlertRule' failed as data isn't a dictionary.`
47
- );
48
- }
49
- return {
50
- description: data.description,
51
- id: data.id,
52
- name: data.name,
53
- status: data.status
54
- };
19
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ExportJob' failed as data isn't a dictionary.`);
20
+ return {
21
+ createdAt: unmarshalDate(data.created_at),
22
+ id: data.id,
23
+ lastRunAt: unmarshalDate(data.last_run_at),
24
+ lastStatus: data.last_status ? unmarshalExportJobStatus(data.last_status) : void 0,
25
+ name: data.name,
26
+ organizationId: data.organization_id,
27
+ s3: data.s3 ? unmarshalExportJobS3(data.s3) : void 0,
28
+ tags: data.tags
29
+ };
30
+ };
31
+ var unmarshalAlertRule = (data) => {
32
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AlertRule' failed as data isn't a dictionary.`);
33
+ return {
34
+ description: data.description,
35
+ id: data.id,
36
+ name: data.name,
37
+ status: data.status
38
+ };
55
39
  };
56
40
  const unmarshalDisableAlertRulesResponse = (data) => {
57
- if (!isJSONObject(data)) {
58
- throw new TypeError(
59
- `Unmarshalling the type 'DisableAlertRulesResponse' failed as data isn't a dictionary.`
60
- );
61
- }
62
- return {
63
- alertRules: unmarshalArrayOfObject(data.alert_rules, unmarshalAlertRule)
64
- };
41
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DisableAlertRulesResponse' failed as data isn't a dictionary.`);
42
+ return { alertRules: unmarshalArrayOfObject(data.alert_rules, unmarshalAlertRule) };
65
43
  };
66
44
  const unmarshalEnableAlertRulesResponse = (data) => {
67
- if (!isJSONObject(data)) {
68
- throw new TypeError(
69
- `Unmarshalling the type 'EnableAlertRulesResponse' failed as data isn't a dictionary.`
70
- );
71
- }
72
- return {
73
- alertRules: unmarshalArrayOfObject(data.alert_rules, unmarshalAlertRule)
74
- };
45
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EnableAlertRulesResponse' failed as data isn't a dictionary.`);
46
+ return { alertRules: unmarshalArrayOfObject(data.alert_rules, unmarshalAlertRule) };
75
47
  };
76
48
  const unmarshalListAlertRulesResponse = (data) => {
77
- if (!isJSONObject(data)) {
78
- throw new TypeError(
79
- `Unmarshalling the type 'ListAlertRulesResponse' failed as data isn't a dictionary.`
80
- );
81
- }
82
- return {
83
- alertRules: unmarshalArrayOfObject(data.alert_rules, unmarshalAlertRule),
84
- totalCount: data.total_count
85
- };
86
- };
87
- const unmarshalAccountContractSignatureInfoAccountContractInfo = (data) => {
88
- if (!isJSONObject(data)) {
89
- throw new TypeError(
90
- `Unmarshalling the type 'AccountContractSignatureInfoAccountContractInfo' failed as data isn't a dictionary.`
91
- );
92
- }
93
- return {
94
- createdAt: unmarshalDate(data.created_at),
95
- id: data.id,
96
- name: data.name,
97
- type: data.type,
98
- updatedAt: unmarshalDate(data.updated_at),
99
- version: data.version
100
- };
101
- };
102
- const unmarshalAccountContractSignatureInfo = (data) => {
103
- if (!isJSONObject(data)) {
104
- throw new TypeError(
105
- `Unmarshalling the type 'AccountContractSignatureInfo' failed as data isn't a dictionary.`
106
- );
107
- }
108
- return {
109
- contract: data.contract ? unmarshalAccountContractSignatureInfoAccountContractInfo(data.contract) : void 0,
110
- expiresAt: unmarshalDate(data.expires_at),
111
- signedAt: unmarshalDate(data.signed_at),
112
- signedByAccountRootUserId: data.signed_by_account_root_user_id
113
- };
114
- };
115
- const unmarshalAccountOrganizationInfo = (data) => {
116
- if (!isJSONObject(data)) {
117
- throw new TypeError(
118
- `Unmarshalling the type 'AccountOrganizationInfo' failed as data isn't a dictionary.`
119
- );
120
- }
121
- return {};
122
- };
123
- const unmarshalAccountProjectInfo = (data) => {
124
- if (!isJSONObject(data)) {
125
- throw new TypeError(
126
- `Unmarshalling the type 'AccountProjectInfo' failed as data isn't a dictionary.`
127
- );
128
- }
129
- return {
130
- description: data.description
131
- };
132
- };
133
- const unmarshalAccountUserInfo = (data) => {
134
- if (!isJSONObject(data)) {
135
- throw new TypeError(
136
- `Unmarshalling the type 'AccountUserInfo' failed as data isn't a dictionary.`
137
- );
138
- }
139
- return {
140
- email: data.email,
141
- phoneNumber: data.phone_number
142
- };
143
- };
144
- const unmarshalAppleSiliconServerInfo = (data) => {
145
- if (!isJSONObject(data)) {
146
- throw new TypeError(
147
- `Unmarshalling the type 'AppleSiliconServerInfo' failed as data isn't a dictionary.`
148
- );
149
- }
150
- return {
151
- id: data.id,
152
- name: data.name
153
- };
154
- };
155
- const unmarshalAuditTrailExportJobInfo = (data) => {
156
- if (!isJSONObject(data)) {
157
- throw new TypeError(
158
- `Unmarshalling the type 'AuditTrailExportJobInfo' failed as data isn't a dictionary.`
159
- );
160
- }
161
- return {};
162
- };
163
- const unmarshalBaremetalServerInfo = (data) => {
164
- if (!isJSONObject(data)) {
165
- throw new TypeError(
166
- `Unmarshalling the type 'BaremetalServerInfo' failed as data isn't a dictionary.`
167
- );
168
- }
169
- return {
170
- description: data.description,
171
- tags: data.tags
172
- };
173
- };
174
- const unmarshalBaremetalSettingInfo = (data) => {
175
- if (!isJSONObject(data)) {
176
- throw new TypeError(
177
- `Unmarshalling the type 'BaremetalSettingInfo' failed as data isn't a dictionary.`
178
- );
179
- }
180
- return {
181
- type: data.type
182
- };
183
- };
184
- const unmarshalEdgeServicesBackendStageInfo = (data) => {
185
- if (!isJSONObject(data)) {
186
- throw new TypeError(
187
- `Unmarshalling the type 'EdgeServicesBackendStageInfo' failed as data isn't a dictionary.`
188
- );
189
- }
190
- return {
191
- pipelineId: data.pipeline_id
192
- };
193
- };
194
- const unmarshalEdgeServicesCacheStageInfo = (data) => {
195
- if (!isJSONObject(data)) {
196
- throw new TypeError(
197
- `Unmarshalling the type 'EdgeServicesCacheStageInfo' failed as data isn't a dictionary.`
198
- );
199
- }
200
- return {
201
- pipelineId: data.pipeline_id
202
- };
203
- };
204
- const unmarshalEdgeServicesDNSStageInfo = (data) => {
205
- if (!isJSONObject(data)) {
206
- throw new TypeError(
207
- `Unmarshalling the type 'EdgeServicesDNSStageInfo' failed as data isn't a dictionary.`
208
- );
209
- }
210
- return {
211
- pipelineId: data.pipeline_id
212
- };
213
- };
214
- const unmarshalEdgeServicesPipelineInfo = (data) => {
215
- if (!isJSONObject(data)) {
216
- throw new TypeError(
217
- `Unmarshalling the type 'EdgeServicesPipelineInfo' failed as data isn't a dictionary.`
218
- );
219
- }
220
- return {
221
- name: data.name
222
- };
223
- };
224
- const unmarshalEdgeServicesPlanInfo = (data) => {
225
- if (!isJSONObject(data)) {
226
- throw new TypeError(
227
- `Unmarshalling the type 'EdgeServicesPlanInfo' failed as data isn't a dictionary.`
228
- );
229
- }
230
- return {};
231
- };
232
- const unmarshalEdgeServicesRouteRulesInfo = (data) => {
233
- if (!isJSONObject(data)) {
234
- throw new TypeError(
235
- `Unmarshalling the type 'EdgeServicesRouteRulesInfo' failed as data isn't a dictionary.`
236
- );
237
- }
238
- return {
239
- routeStageId: data.route_stage_id
240
- };
241
- };
242
- const unmarshalEdgeServicesRouteStageInfo = (data) => {
243
- if (!isJSONObject(data)) {
244
- throw new TypeError(
245
- `Unmarshalling the type 'EdgeServicesRouteStageInfo' failed as data isn't a dictionary.`
246
- );
247
- }
248
- return {
249
- pipelineId: data.pipeline_id
250
- };
251
- };
252
- const unmarshalEdgeServicesTLSStageInfo = (data) => {
253
- if (!isJSONObject(data)) {
254
- throw new TypeError(
255
- `Unmarshalling the type 'EdgeServicesTLSStageInfo' failed as data isn't a dictionary.`
256
- );
257
- }
258
- return {
259
- pipelineId: data.pipeline_id
260
- };
261
- };
262
- const unmarshalEdgeServicesWAFStageInfo = (data) => {
263
- if (!isJSONObject(data)) {
264
- throw new TypeError(
265
- `Unmarshalling the type 'EdgeServicesWAFStageInfo' failed as data isn't a dictionary.`
266
- );
267
- }
268
- return {
269
- pipelineId: data.pipeline_id
270
- };
271
- };
272
- const unmarshalInstanceServerInfo = (data) => {
273
- if (!isJSONObject(data)) {
274
- throw new TypeError(
275
- `Unmarshalling the type 'InstanceServerInfo' failed as data isn't a dictionary.`
276
- );
277
- }
278
- return {
279
- name: data.name
280
- };
281
- };
282
- const unmarshalIpamIpInfo = (data) => {
283
- if (!isJSONObject(data)) {
284
- throw new TypeError(
285
- `Unmarshalling the type 'IpamIpInfo' failed as data isn't a dictionary.`
286
- );
287
- }
288
- return {
289
- address: data.address
290
- };
291
- };
292
- const unmarshalKeyManagerKeyInfo = (data) => {
293
- if (!isJSONObject(data)) {
294
- throw new TypeError(
295
- `Unmarshalling the type 'KeyManagerKeyInfo' failed as data isn't a dictionary.`
296
- );
297
- }
298
- return {};
299
- };
300
- const unmarshalKubernetesACLInfo = (data) => {
301
- if (!isJSONObject(data)) {
302
- throw new TypeError(
303
- `Unmarshalling the type 'KubernetesACLInfo' failed as data isn't a dictionary.`
304
- );
305
- }
306
- return {};
307
- };
308
- const unmarshalKubernetesClusterInfo = (data) => {
309
- if (!isJSONObject(data)) {
310
- throw new TypeError(
311
- `Unmarshalling the type 'KubernetesClusterInfo' failed as data isn't a dictionary.`
312
- );
313
- }
314
- return {};
315
- };
316
- const unmarshalKubernetesNodeInfo = (data) => {
317
- if (!isJSONObject(data)) {
318
- throw new TypeError(
319
- `Unmarshalling the type 'KubernetesNodeInfo' failed as data isn't a dictionary.`
320
- );
321
- }
322
- return {
323
- id: data.id,
324
- name: data.name
325
- };
326
- };
327
- const unmarshalKubernetesPoolInfo = (data) => {
328
- if (!isJSONObject(data)) {
329
- throw new TypeError(
330
- `Unmarshalling the type 'KubernetesPoolInfo' failed as data isn't a dictionary.`
331
- );
332
- }
333
- return {
334
- id: data.id,
335
- name: data.name
336
- };
337
- };
338
- const unmarshalLoadBalancerAclInfo = (data) => {
339
- if (!isJSONObject(data)) {
340
- throw new TypeError(
341
- `Unmarshalling the type 'LoadBalancerAclInfo' failed as data isn't a dictionary.`
342
- );
343
- }
344
- return {
345
- frontendId: data.frontend_id
346
- };
347
- };
348
- const unmarshalLoadBalancerBackendInfo = (data) => {
349
- if (!isJSONObject(data)) {
350
- throw new TypeError(
351
- `Unmarshalling the type 'LoadBalancerBackendInfo' failed as data isn't a dictionary.`
352
- );
353
- }
354
- return {
355
- lbId: data.lb_id,
356
- name: data.name
357
- };
358
- };
359
- const unmarshalLoadBalancerCertificateInfo = (data) => {
360
- if (!isJSONObject(data)) {
361
- throw new TypeError(
362
- `Unmarshalling the type 'LoadBalancerCertificateInfo' failed as data isn't a dictionary.`
363
- );
364
- }
365
- return {
366
- lbId: data.lb_id,
367
- name: data.name
368
- };
369
- };
370
- const unmarshalLoadBalancerFrontendInfo = (data) => {
371
- if (!isJSONObject(data)) {
372
- throw new TypeError(
373
- `Unmarshalling the type 'LoadBalancerFrontendInfo' failed as data isn't a dictionary.`
374
- );
375
- }
376
- return {
377
- lbId: data.lb_id,
378
- name: data.name
379
- };
380
- };
381
- const unmarshalLoadBalancerIpInfo = (data) => {
382
- if (!isJSONObject(data)) {
383
- throw new TypeError(
384
- `Unmarshalling the type 'LoadBalancerIpInfo' failed as data isn't a dictionary.`
385
- );
386
- }
387
- return {
388
- ipAddress: data.ip_address,
389
- lbId: data.lb_id
390
- };
391
- };
392
- const unmarshalLoadBalancerLbInfo = (data) => {
393
- if (!isJSONObject(data)) {
394
- throw new TypeError(
395
- `Unmarshalling the type 'LoadBalancerLbInfo' failed as data isn't a dictionary.`
396
- );
397
- }
398
- return {
399
- name: data.name
400
- };
401
- };
402
- const unmarshalLoadBalancerRouteInfo = (data) => {
403
- if (!isJSONObject(data)) {
404
- throw new TypeError(
405
- `Unmarshalling the type 'LoadBalancerRouteInfo' failed as data isn't a dictionary.`
406
- );
407
- }
408
- return {
409
- backendId: data.backend_id,
410
- frontendId: data.frontend_id
411
- };
412
- };
413
- const unmarshalSecretManagerSecretInfo = (data) => {
414
- if (!isJSONObject(data)) {
415
- throw new TypeError(
416
- `Unmarshalling the type 'SecretManagerSecretInfo' failed as data isn't a dictionary.`
417
- );
418
- }
419
- return {
420
- keyId: data.key_id,
421
- path: data.path
422
- };
423
- };
424
- const unmarshalSecretManagerSecretVersionInfo = (data) => {
425
- if (!isJSONObject(data)) {
426
- throw new TypeError(
427
- `Unmarshalling the type 'SecretManagerSecretVersionInfo' failed as data isn't a dictionary.`
428
- );
429
- }
430
- return {
431
- revision: data.revision
432
- };
433
- };
434
- const unmarshalVpcGwGatewayInfo = (data) => {
435
- if (!isJSONObject(data)) {
436
- throw new TypeError(
437
- `Unmarshalling the type 'VpcGwGatewayInfo' failed as data isn't a dictionary.`
438
- );
439
- }
440
- return {
441
- gatewayTypeId: data.gateway_type_id,
442
- publicIpId: data.public_ip_id,
443
- vpcId: data.vpc_id
444
- };
445
- };
446
- const unmarshalVpcGwGatewayNetworkInfo = (data) => {
447
- if (!isJSONObject(data)) {
448
- throw new TypeError(
449
- `Unmarshalling the type 'VpcGwGatewayNetworkInfo' failed as data isn't a dictionary.`
450
- );
451
- }
452
- return {
453
- address: data.address,
454
- gatewayId: data.gateway_id,
455
- pnId: data.pn_id
456
- };
457
- };
458
- const unmarshalVpcPrivateNetworkInfo = (data) => {
459
- if (!isJSONObject(data)) {
460
- throw new TypeError(
461
- `Unmarshalling the type 'VpcPrivateNetworkInfo' failed as data isn't a dictionary.`
462
- );
463
- }
464
- return {
465
- pushDefaultRoute: data.push_default_route,
466
- vpcId: data.vpc_id
467
- };
468
- };
469
- const unmarshalVpcRouteInfo = (data) => {
470
- if (!isJSONObject(data)) {
471
- throw new TypeError(
472
- `Unmarshalling the type 'VpcRouteInfo' failed as data isn't a dictionary.`
473
- );
474
- }
475
- return {
476
- destination: data.destination,
477
- nexthopPrivateNetworkKey: data.nexthop_private_network_key,
478
- nexthopResourceKey: data.nexthop_resource_key,
479
- vpcId: data.vpc_id
480
- };
481
- };
482
- const unmarshalVpcSubnetInfo = (data) => {
483
- if (!isJSONObject(data)) {
484
- throw new TypeError(
485
- `Unmarshalling the type 'VpcSubnetInfo' failed as data isn't a dictionary.`
486
- );
487
- }
488
- return {
489
- subnetCidr: data.subnet_cidr,
490
- vpcId: data.vpc_id
491
- };
49
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListAlertRulesResponse' failed as data isn't a dictionary.`);
50
+ return {
51
+ alertRules: unmarshalArrayOfObject(data.alert_rules, unmarshalAlertRule),
52
+ totalCount: data.total_count
53
+ };
54
+ };
55
+ var unmarshalAccountContractSignatureInfoAccountContractInfo = (data) => {
56
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AccountContractSignatureInfoAccountContractInfo' failed as data isn't a dictionary.`);
57
+ return {
58
+ createdAt: unmarshalDate(data.created_at),
59
+ id: data.id,
60
+ name: data.name,
61
+ type: data.type,
62
+ updatedAt: unmarshalDate(data.updated_at),
63
+ version: data.version
64
+ };
65
+ };
66
+ var unmarshalAccountContractSignatureInfo = (data) => {
67
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AccountContractSignatureInfo' failed as data isn't a dictionary.`);
68
+ return {
69
+ contract: data.contract ? unmarshalAccountContractSignatureInfoAccountContractInfo(data.contract) : void 0,
70
+ expiresAt: unmarshalDate(data.expires_at),
71
+ signedAt: unmarshalDate(data.signed_at),
72
+ signedByAccountRootUserId: data.signed_by_account_root_user_id
73
+ };
74
+ };
75
+ var unmarshalAccountOrganizationInfo = (data) => {
76
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AccountOrganizationInfo' failed as data isn't a dictionary.`);
77
+ return {};
78
+ };
79
+ var unmarshalAccountProjectInfo = (data) => {
80
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AccountProjectInfo' failed as data isn't a dictionary.`);
81
+ return { description: data.description };
82
+ };
83
+ var unmarshalAccountUserInfo = (data) => {
84
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AccountUserInfo' failed as data isn't a dictionary.`);
85
+ return {
86
+ email: data.email,
87
+ phoneNumber: data.phone_number
88
+ };
89
+ };
90
+ var unmarshalAppleSiliconRunnerInfo = (data) => {
91
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AppleSiliconRunnerInfo' failed as data isn't a dictionary.`);
92
+ return {
93
+ id: data.id,
94
+ name: data.name
95
+ };
96
+ };
97
+ var unmarshalAppleSiliconServerInfo = (data) => {
98
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AppleSiliconServerInfo' failed as data isn't a dictionary.`);
99
+ return {
100
+ id: data.id,
101
+ name: data.name
102
+ };
103
+ };
104
+ var unmarshalAuditTrailExportJobInfo = (data) => {
105
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AuditTrailExportJobInfo' failed as data isn't a dictionary.`);
106
+ return {};
107
+ };
108
+ var unmarshalBaremetalServerInfo = (data) => {
109
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BaremetalServerInfo' failed as data isn't a dictionary.`);
110
+ return {
111
+ description: data.description,
112
+ tags: data.tags
113
+ };
114
+ };
115
+ var unmarshalBaremetalSettingInfo = (data) => {
116
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BaremetalSettingInfo' failed as data isn't a dictionary.`);
117
+ return { type: data.type };
118
+ };
119
+ var unmarshalEdgeServicesBackendStageInfo = (data) => {
120
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesBackendStageInfo' failed as data isn't a dictionary.`);
121
+ return { pipelineId: data.pipeline_id };
122
+ };
123
+ var unmarshalEdgeServicesCacheStageInfo = (data) => {
124
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesCacheStageInfo' failed as data isn't a dictionary.`);
125
+ return { pipelineId: data.pipeline_id };
126
+ };
127
+ var unmarshalEdgeServicesDNSStageInfo = (data) => {
128
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesDNSStageInfo' failed as data isn't a dictionary.`);
129
+ return { pipelineId: data.pipeline_id };
130
+ };
131
+ var unmarshalEdgeServicesPipelineInfo = (data) => {
132
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesPipelineInfo' failed as data isn't a dictionary.`);
133
+ return { name: data.name };
134
+ };
135
+ var unmarshalEdgeServicesPlanInfo = (data) => {
136
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesPlanInfo' failed as data isn't a dictionary.`);
137
+ return {};
138
+ };
139
+ var unmarshalEdgeServicesRouteRulesInfo = (data) => {
140
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesRouteRulesInfo' failed as data isn't a dictionary.`);
141
+ return { routeStageId: data.route_stage_id };
142
+ };
143
+ var unmarshalEdgeServicesRouteStageInfo = (data) => {
144
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesRouteStageInfo' failed as data isn't a dictionary.`);
145
+ return { pipelineId: data.pipeline_id };
146
+ };
147
+ var unmarshalEdgeServicesTLSStageInfo = (data) => {
148
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesTLSStageInfo' failed as data isn't a dictionary.`);
149
+ return { pipelineId: data.pipeline_id };
150
+ };
151
+ var unmarshalEdgeServicesWAFStageInfo = (data) => {
152
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EdgeServicesWAFStageInfo' failed as data isn't a dictionary.`);
153
+ return { pipelineId: data.pipeline_id };
154
+ };
155
+ var unmarshalInstanceServerInfo = (data) => {
156
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'InstanceServerInfo' failed as data isn't a dictionary.`);
157
+ return { name: data.name };
158
+ };
159
+ var unmarshalIpamIpInfo = (data) => {
160
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IpamIpInfo' failed as data isn't a dictionary.`);
161
+ return { address: data.address };
162
+ };
163
+ var unmarshalKeyManagerKeyInfo = (data) => {
164
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KeyManagerKeyInfo' failed as data isn't a dictionary.`);
165
+ return {};
166
+ };
167
+ var unmarshalKubernetesACLInfo = (data) => {
168
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KubernetesACLInfo' failed as data isn't a dictionary.`);
169
+ return {};
170
+ };
171
+ var unmarshalKubernetesClusterInfo = (data) => {
172
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KubernetesClusterInfo' failed as data isn't a dictionary.`);
173
+ return {};
174
+ };
175
+ var unmarshalKubernetesNodeInfo = (data) => {
176
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KubernetesNodeInfo' failed as data isn't a dictionary.`);
177
+ return {
178
+ id: data.id,
179
+ name: data.name
180
+ };
181
+ };
182
+ var unmarshalKubernetesPoolInfo = (data) => {
183
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'KubernetesPoolInfo' failed as data isn't a dictionary.`);
184
+ return {
185
+ id: data.id,
186
+ name: data.name
187
+ };
188
+ };
189
+ var unmarshalLoadBalancerAclInfo = (data) => {
190
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LoadBalancerAclInfo' failed as data isn't a dictionary.`);
191
+ return { frontendId: data.frontend_id };
192
+ };
193
+ var unmarshalLoadBalancerBackendInfo = (data) => {
194
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LoadBalancerBackendInfo' failed as data isn't a dictionary.`);
195
+ return {
196
+ lbId: data.lb_id,
197
+ name: data.name
198
+ };
199
+ };
200
+ var unmarshalLoadBalancerCertificateInfo = (data) => {
201
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LoadBalancerCertificateInfo' failed as data isn't a dictionary.`);
202
+ return {
203
+ lbId: data.lb_id,
204
+ name: data.name
205
+ };
206
+ };
207
+ var unmarshalLoadBalancerFrontendInfo = (data) => {
208
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LoadBalancerFrontendInfo' failed as data isn't a dictionary.`);
209
+ return {
210
+ lbId: data.lb_id,
211
+ name: data.name
212
+ };
213
+ };
214
+ var unmarshalLoadBalancerIpInfo = (data) => {
215
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LoadBalancerIpInfo' failed as data isn't a dictionary.`);
216
+ return {
217
+ ipAddress: data.ip_address,
218
+ lbId: data.lb_id
219
+ };
220
+ };
221
+ var unmarshalLoadBalancerLbInfo = (data) => {
222
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LoadBalancerLbInfo' failed as data isn't a dictionary.`);
223
+ return { name: data.name };
224
+ };
225
+ var unmarshalLoadBalancerRouteInfo = (data) => {
226
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LoadBalancerRouteInfo' failed as data isn't a dictionary.`);
227
+ return {
228
+ backendId: data.backend_id,
229
+ frontendId: data.frontend_id
230
+ };
231
+ };
232
+ var unmarshalSecretManagerSecretInfo = (data) => {
233
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SecretManagerSecretInfo' failed as data isn't a dictionary.`);
234
+ return {
235
+ keyId: data.key_id,
236
+ path: data.path
237
+ };
238
+ };
239
+ var unmarshalSecretManagerSecretVersionInfo = (data) => {
240
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SecretManagerSecretVersionInfo' failed as data isn't a dictionary.`);
241
+ return { revision: data.revision };
242
+ };
243
+ var unmarshalVpcGwGatewayInfo = (data) => {
244
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VpcGwGatewayInfo' failed as data isn't a dictionary.`);
245
+ return {
246
+ gatewayTypeId: data.gateway_type_id,
247
+ publicIpId: data.public_ip_id,
248
+ vpcId: data.vpc_id
249
+ };
250
+ };
251
+ var unmarshalVpcGwGatewayNetworkInfo = (data) => {
252
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VpcGwGatewayNetworkInfo' failed as data isn't a dictionary.`);
253
+ return {
254
+ address: data.address,
255
+ gatewayId: data.gateway_id,
256
+ pnId: data.pn_id
257
+ };
258
+ };
259
+ var unmarshalVpcPrivateNetworkInfo = (data) => {
260
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VpcPrivateNetworkInfo' failed as data isn't a dictionary.`);
261
+ return {
262
+ pushDefaultRoute: data.push_default_route,
263
+ vpcId: data.vpc_id
264
+ };
265
+ };
266
+ var unmarshalVpcRouteInfo = (data) => {
267
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VpcRouteInfo' failed as data isn't a dictionary.`);
268
+ return {
269
+ destination: data.destination,
270
+ nexthopPrivateNetworkKey: data.nexthop_private_network_key,
271
+ nexthopResourceKey: data.nexthop_resource_key,
272
+ vpcId: data.vpc_id
273
+ };
274
+ };
275
+ var unmarshalVpcSubnetInfo = (data) => {
276
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VpcSubnetInfo' failed as data isn't a dictionary.`);
277
+ return {
278
+ subnetCidr: data.subnet_cidr,
279
+ vpcId: data.vpc_id
280
+ };
492
281
  };
493
282
  const unmarshalResource = (data) => {
494
- if (!isJSONObject(data)) {
495
- throw new TypeError(
496
- `Unmarshalling the type 'Resource' failed as data isn't a dictionary.`
497
- );
498
- }
499
- return {
500
- accountContractSignatureInfo: data.account_contract_signature_info ? unmarshalAccountContractSignatureInfo(data.account_contract_signature_info) : void 0,
501
- accountOrganizationInfo: data.account_organization_info ? unmarshalAccountOrganizationInfo(data.account_organization_info) : void 0,
502
- accountProjectInfo: data.account_project_info ? unmarshalAccountProjectInfo(data.account_project_info) : void 0,
503
- accountUserInfo: data.account_user_info ? unmarshalAccountUserInfo(data.account_user_info) : void 0,
504
- appleSiliconServerInfo: data.apple_silicon_server_info ? unmarshalAppleSiliconServerInfo(data.apple_silicon_server_info) : void 0,
505
- auditTrailExportJobInfo: data.audit_trail_export_job_info ? unmarshalAuditTrailExportJobInfo(data.audit_trail_export_job_info) : void 0,
506
- baremetalServerInfo: data.baremetal_server_info ? unmarshalBaremetalServerInfo(data.baremetal_server_info) : void 0,
507
- baremetalSettingInfo: data.baremetal_setting_info ? unmarshalBaremetalSettingInfo(data.baremetal_setting_info) : void 0,
508
- createdAt: unmarshalDate(data.created_at),
509
- deletedAt: unmarshalDate(data.deleted_at),
510
- edgeServicesBackendStageInfo: data.edge_services_backend_stage_info ? unmarshalEdgeServicesBackendStageInfo(data.edge_services_backend_stage_info) : void 0,
511
- edgeServicesCacheStageInfo: data.edge_services_cache_stage_info ? unmarshalEdgeServicesCacheStageInfo(data.edge_services_cache_stage_info) : void 0,
512
- edgeServicesDnsStageInfo: data.edge_services_dns_stage_info ? unmarshalEdgeServicesDNSStageInfo(data.edge_services_dns_stage_info) : void 0,
513
- edgeServicesPipelineInfo: data.edge_services_pipeline_info ? unmarshalEdgeServicesPipelineInfo(data.edge_services_pipeline_info) : void 0,
514
- edgeServicesPlanInfo: data.edge_services_plan_info ? unmarshalEdgeServicesPlanInfo(data.edge_services_plan_info) : void 0,
515
- edgeServicesRouteRulesInfo: data.edge_services_route_rules_info ? unmarshalEdgeServicesRouteRulesInfo(data.edge_services_route_rules_info) : void 0,
516
- edgeServicesRouteStageInfo: data.edge_services_route_stage_info ? unmarshalEdgeServicesRouteStageInfo(data.edge_services_route_stage_info) : void 0,
517
- edgeServicesTlsStageInfo: data.edge_services_tls_stage_info ? unmarshalEdgeServicesTLSStageInfo(data.edge_services_tls_stage_info) : void 0,
518
- edgeServicesWafStageInfo: data.edge_services_waf_stage_info ? unmarshalEdgeServicesWAFStageInfo(data.edge_services_waf_stage_info) : void 0,
519
- id: data.id,
520
- instanceServerInfo: data.instance_server_info ? unmarshalInstanceServerInfo(data.instance_server_info) : void 0,
521
- ipamIpInfo: data.ipam_ip_info ? unmarshalIpamIpInfo(data.ipam_ip_info) : void 0,
522
- keyManagerKeyInfo: data.key_manager_key_info ? unmarshalKeyManagerKeyInfo(data.key_manager_key_info) : void 0,
523
- keymKeyInfo: data.keym_key_info ? unmarshalKeyManagerKeyInfo(data.keym_key_info) : void 0,
524
- kubeAclInfo: data.kube_acl_info ? unmarshalKubernetesACLInfo(data.kube_acl_info) : void 0,
525
- kubeClusterInfo: data.kube_cluster_info ? unmarshalKubernetesClusterInfo(data.kube_cluster_info) : void 0,
526
- kubeNodeInfo: data.kube_node_info ? unmarshalKubernetesNodeInfo(data.kube_node_info) : void 0,
527
- kubePoolInfo: data.kube_pool_info ? unmarshalKubernetesPoolInfo(data.kube_pool_info) : void 0,
528
- loadBalancerAclInfo: data.load_balancer_acl_info ? unmarshalLoadBalancerAclInfo(data.load_balancer_acl_info) : void 0,
529
- loadBalancerBackendInfo: data.load_balancer_backend_info ? unmarshalLoadBalancerBackendInfo(data.load_balancer_backend_info) : void 0,
530
- loadBalancerCertificateInfo: data.load_balancer_certificate_info ? unmarshalLoadBalancerCertificateInfo(data.load_balancer_certificate_info) : void 0,
531
- loadBalancerFrontendInfo: data.load_balancer_frontend_info ? unmarshalLoadBalancerFrontendInfo(data.load_balancer_frontend_info) : void 0,
532
- loadBalancerIpInfo: data.load_balancer_ip_info ? unmarshalLoadBalancerIpInfo(data.load_balancer_ip_info) : void 0,
533
- loadBalancerLbInfo: data.load_balancer_lb_info ? unmarshalLoadBalancerLbInfo(data.load_balancer_lb_info) : void 0,
534
- loadBalancerRouteInfo: data.load_balancer_route_info ? unmarshalLoadBalancerRouteInfo(data.load_balancer_route_info) : void 0,
535
- name: data.name,
536
- secmSecretInfo: data.secm_secret_info ? unmarshalSecretManagerSecretInfo(data.secm_secret_info) : void 0,
537
- secmSecretVersionInfo: data.secm_secret_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secm_secret_version_info) : void 0,
538
- secretManagerSecretInfo: data.secret_manager_secret_info ? unmarshalSecretManagerSecretInfo(data.secret_manager_secret_info) : void 0,
539
- secretManagerVersionInfo: data.secret_manager_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secret_manager_version_info) : void 0,
540
- type: data.type,
541
- updatedAt: unmarshalDate(data.updated_at),
542
- vpcGwGatewayInfo: data.vpc_gw_gateway_info ? unmarshalVpcGwGatewayInfo(data.vpc_gw_gateway_info) : void 0,
543
- vpcGwGatewayNetworkInfo: data.vpc_gw_gateway_network_info ? unmarshalVpcGwGatewayNetworkInfo(data.vpc_gw_gateway_network_info) : void 0,
544
- vpcPrivateNetworkInfo: data.vpc_private_network_info ? unmarshalVpcPrivateNetworkInfo(data.vpc_private_network_info) : void 0,
545
- vpcRouteInfo: data.vpc_route_info ? unmarshalVpcRouteInfo(data.vpc_route_info) : void 0,
546
- vpcSubnetInfo: data.vpc_subnet_info ? unmarshalVpcSubnetInfo(data.vpc_subnet_info) : void 0
547
- };
548
- };
549
- const unmarshalAuthenticationEvent = (data) => {
550
- if (!isJSONObject(data)) {
551
- throw new TypeError(
552
- `Unmarshalling the type 'AuthenticationEvent' failed as data isn't a dictionary.`
553
- );
554
- }
555
- return {
556
- countryCode: data.country_code ? data.country_code : void 0,
557
- failureReason: data.failure_reason ? data.failure_reason : void 0,
558
- id: data.id,
559
- method: data.method,
560
- mfaType: data.mfa_type ? data.mfa_type : void 0,
561
- organizationId: data.organization_id,
562
- origin: data.origin,
563
- recordedAt: unmarshalDate(data.recorded_at),
564
- resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
565
- result: data.result,
566
- sourceIp: data.source_ip,
567
- userAgent: data.user_agent
568
- };
283
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Resource' failed as data isn't a dictionary.`);
284
+ return {
285
+ accountContractSignatureInfo: data.account_contract_signature_info ? unmarshalAccountContractSignatureInfo(data.account_contract_signature_info) : void 0,
286
+ accountOrganizationInfo: data.account_organization_info ? unmarshalAccountOrganizationInfo(data.account_organization_info) : void 0,
287
+ accountProjectInfo: data.account_project_info ? unmarshalAccountProjectInfo(data.account_project_info) : void 0,
288
+ accountUserInfo: data.account_user_info ? unmarshalAccountUserInfo(data.account_user_info) : void 0,
289
+ appleSiliconRunnerInfo: data.apple_silicon_runner_info ? unmarshalAppleSiliconRunnerInfo(data.apple_silicon_runner_info) : void 0,
290
+ appleSiliconServerInfo: data.apple_silicon_server_info ? unmarshalAppleSiliconServerInfo(data.apple_silicon_server_info) : void 0,
291
+ auditTrailExportJobInfo: data.audit_trail_export_job_info ? unmarshalAuditTrailExportJobInfo(data.audit_trail_export_job_info) : void 0,
292
+ baremetalServerInfo: data.baremetal_server_info ? unmarshalBaremetalServerInfo(data.baremetal_server_info) : void 0,
293
+ baremetalSettingInfo: data.baremetal_setting_info ? unmarshalBaremetalSettingInfo(data.baremetal_setting_info) : void 0,
294
+ createdAt: unmarshalDate(data.created_at),
295
+ deletedAt: unmarshalDate(data.deleted_at),
296
+ edgeServicesBackendStageInfo: data.edge_services_backend_stage_info ? unmarshalEdgeServicesBackendStageInfo(data.edge_services_backend_stage_info) : void 0,
297
+ edgeServicesCacheStageInfo: data.edge_services_cache_stage_info ? unmarshalEdgeServicesCacheStageInfo(data.edge_services_cache_stage_info) : void 0,
298
+ edgeServicesDnsStageInfo: data.edge_services_dns_stage_info ? unmarshalEdgeServicesDNSStageInfo(data.edge_services_dns_stage_info) : void 0,
299
+ edgeServicesPipelineInfo: data.edge_services_pipeline_info ? unmarshalEdgeServicesPipelineInfo(data.edge_services_pipeline_info) : void 0,
300
+ edgeServicesPlanInfo: data.edge_services_plan_info ? unmarshalEdgeServicesPlanInfo(data.edge_services_plan_info) : void 0,
301
+ edgeServicesRouteRulesInfo: data.edge_services_route_rules_info ? unmarshalEdgeServicesRouteRulesInfo(data.edge_services_route_rules_info) : void 0,
302
+ edgeServicesRouteStageInfo: data.edge_services_route_stage_info ? unmarshalEdgeServicesRouteStageInfo(data.edge_services_route_stage_info) : void 0,
303
+ edgeServicesTlsStageInfo: data.edge_services_tls_stage_info ? unmarshalEdgeServicesTLSStageInfo(data.edge_services_tls_stage_info) : void 0,
304
+ edgeServicesWafStageInfo: data.edge_services_waf_stage_info ? unmarshalEdgeServicesWAFStageInfo(data.edge_services_waf_stage_info) : void 0,
305
+ id: data.id,
306
+ instanceServerInfo: data.instance_server_info ? unmarshalInstanceServerInfo(data.instance_server_info) : void 0,
307
+ ipamIpInfo: data.ipam_ip_info ? unmarshalIpamIpInfo(data.ipam_ip_info) : void 0,
308
+ keyManagerKeyInfo: data.key_manager_key_info ? unmarshalKeyManagerKeyInfo(data.key_manager_key_info) : void 0,
309
+ keymKeyInfo: data.keym_key_info ? unmarshalKeyManagerKeyInfo(data.keym_key_info) : void 0,
310
+ kubeAclInfo: data.kube_acl_info ? unmarshalKubernetesACLInfo(data.kube_acl_info) : void 0,
311
+ kubeClusterInfo: data.kube_cluster_info ? unmarshalKubernetesClusterInfo(data.kube_cluster_info) : void 0,
312
+ kubeNodeInfo: data.kube_node_info ? unmarshalKubernetesNodeInfo(data.kube_node_info) : void 0,
313
+ kubePoolInfo: data.kube_pool_info ? unmarshalKubernetesPoolInfo(data.kube_pool_info) : void 0,
314
+ loadBalancerAclInfo: data.load_balancer_acl_info ? unmarshalLoadBalancerAclInfo(data.load_balancer_acl_info) : void 0,
315
+ loadBalancerBackendInfo: data.load_balancer_backend_info ? unmarshalLoadBalancerBackendInfo(data.load_balancer_backend_info) : void 0,
316
+ loadBalancerCertificateInfo: data.load_balancer_certificate_info ? unmarshalLoadBalancerCertificateInfo(data.load_balancer_certificate_info) : void 0,
317
+ loadBalancerFrontendInfo: data.load_balancer_frontend_info ? unmarshalLoadBalancerFrontendInfo(data.load_balancer_frontend_info) : void 0,
318
+ loadBalancerIpInfo: data.load_balancer_ip_info ? unmarshalLoadBalancerIpInfo(data.load_balancer_ip_info) : void 0,
319
+ loadBalancerLbInfo: data.load_balancer_lb_info ? unmarshalLoadBalancerLbInfo(data.load_balancer_lb_info) : void 0,
320
+ loadBalancerRouteInfo: data.load_balancer_route_info ? unmarshalLoadBalancerRouteInfo(data.load_balancer_route_info) : void 0,
321
+ name: data.name,
322
+ secmSecretInfo: data.secm_secret_info ? unmarshalSecretManagerSecretInfo(data.secm_secret_info) : void 0,
323
+ secmSecretVersionInfo: data.secm_secret_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secm_secret_version_info) : void 0,
324
+ secretManagerSecretInfo: data.secret_manager_secret_info ? unmarshalSecretManagerSecretInfo(data.secret_manager_secret_info) : void 0,
325
+ secretManagerVersionInfo: data.secret_manager_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secret_manager_version_info) : void 0,
326
+ type: data.type,
327
+ updatedAt: unmarshalDate(data.updated_at),
328
+ vpcGwGatewayInfo: data.vpc_gw_gateway_info ? unmarshalVpcGwGatewayInfo(data.vpc_gw_gateway_info) : void 0,
329
+ vpcGwGatewayNetworkInfo: data.vpc_gw_gateway_network_info ? unmarshalVpcGwGatewayNetworkInfo(data.vpc_gw_gateway_network_info) : void 0,
330
+ vpcPrivateNetworkInfo: data.vpc_private_network_info ? unmarshalVpcPrivateNetworkInfo(data.vpc_private_network_info) : void 0,
331
+ vpcRouteInfo: data.vpc_route_info ? unmarshalVpcRouteInfo(data.vpc_route_info) : void 0,
332
+ vpcSubnetInfo: data.vpc_subnet_info ? unmarshalVpcSubnetInfo(data.vpc_subnet_info) : void 0
333
+ };
334
+ };
335
+ var unmarshalAuthenticationEvent = (data) => {
336
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AuthenticationEvent' failed as data isn't a dictionary.`);
337
+ return {
338
+ countryCode: data.country_code ? data.country_code : void 0,
339
+ failureReason: data.failure_reason ? data.failure_reason : void 0,
340
+ id: data.id,
341
+ method: data.method,
342
+ mfaType: data.mfa_type ? data.mfa_type : void 0,
343
+ organizationId: data.organization_id,
344
+ origin: data.origin,
345
+ recordedAt: unmarshalDate(data.recorded_at),
346
+ resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
347
+ result: data.result,
348
+ sourceIp: data.source_ip,
349
+ userAgent: data.user_agent
350
+ };
569
351
  };
570
352
  const unmarshalListAuthenticationEventsResponse = (data) => {
571
- if (!isJSONObject(data)) {
572
- throw new TypeError(
573
- `Unmarshalling the type 'ListAuthenticationEventsResponse' failed as data isn't a dictionary.`
574
- );
575
- }
576
- return {
577
- events: unmarshalArrayOfObject(data.events, unmarshalAuthenticationEvent),
578
- nextPageToken: data.next_page_token
579
- };
580
- };
581
- const unmarshalEventPrincipal = (data) => {
582
- if (!isJSONObject(data)) {
583
- throw new TypeError(
584
- `Unmarshalling the type 'EventPrincipal' failed as data isn't a dictionary.`
585
- );
586
- }
587
- return {
588
- id: data.id
589
- };
353
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListAuthenticationEventsResponse' failed as data isn't a dictionary.`);
354
+ return {
355
+ events: unmarshalArrayOfObject(data.events, unmarshalAuthenticationEvent),
356
+ nextPageToken: data.next_page_token
357
+ };
358
+ };
359
+ var unmarshalEventPrincipal = (data) => {
360
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'EventPrincipal' failed as data isn't a dictionary.`);
361
+ return { id: data.id };
590
362
  };
591
363
  const unmarshalEvent = (data) => {
592
- if (!isJSONObject(data)) {
593
- throw new TypeError(
594
- `Unmarshalling the type 'Event' failed as data isn't a dictionary.`
595
- );
596
- }
597
- return {
598
- id: data.id,
599
- locality: data.locality,
600
- methodName: data.method_name,
601
- organizationId: data.organization_id,
602
- principal: data.principal ? unmarshalEventPrincipal(data.principal) : void 0,
603
- productName: data.product_name,
604
- projectId: data.project_id,
605
- recordedAt: unmarshalDate(data.recorded_at),
606
- requestBody: data.request_body,
607
- requestId: data.request_id,
608
- resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
609
- serviceName: data.service_name,
610
- sourceIp: data.source_ip,
611
- statusCode: data.status_code,
612
- userAgent: data.user_agent
613
- };
614
- };
615
- const unmarshalSystemEvent = (data) => {
616
- if (!isJSONObject(data)) {
617
- throw new TypeError(
618
- `Unmarshalling the type 'SystemEvent' failed as data isn't a dictionary.`
619
- );
620
- }
621
- return {
622
- id: data.id,
623
- kind: data.kind,
624
- locality: data.locality,
625
- organizationId: data.organization_id,
626
- productName: data.product_name,
627
- projectId: data.project_id,
628
- recordedAt: unmarshalDate(data.recorded_at),
629
- resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
630
- source: data.source,
631
- systemName: data.system_name
632
- };
633
- };
634
- const unmarshalListCombinedEventsResponseCombinedEvent = (data) => {
635
- if (!isJSONObject(data)) {
636
- throw new TypeError(
637
- `Unmarshalling the type 'ListCombinedEventsResponseCombinedEvent' failed as data isn't a dictionary.`
638
- );
639
- }
640
- return {
641
- api: data.api ? unmarshalEvent(data.api) : void 0,
642
- auth: data.auth ? unmarshalAuthenticationEvent(data.auth) : void 0,
643
- system: data.system ? unmarshalSystemEvent(data.system) : void 0
644
- };
364
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Event' failed as data isn't a dictionary.`);
365
+ return {
366
+ id: data.id,
367
+ locality: data.locality,
368
+ methodName: data.method_name,
369
+ organizationId: data.organization_id,
370
+ principal: data.principal ? unmarshalEventPrincipal(data.principal) : void 0,
371
+ productName: data.product_name,
372
+ projectId: data.project_id,
373
+ recordedAt: unmarshalDate(data.recorded_at),
374
+ requestBody: data.request_body,
375
+ requestId: data.request_id,
376
+ resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
377
+ serviceName: data.service_name,
378
+ sourceIp: data.source_ip,
379
+ statusCode: data.status_code,
380
+ userAgent: data.user_agent
381
+ };
382
+ };
383
+ var unmarshalSystemEvent = (data) => {
384
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SystemEvent' failed as data isn't a dictionary.`);
385
+ return {
386
+ id: data.id,
387
+ kind: data.kind,
388
+ locality: data.locality,
389
+ organizationId: data.organization_id,
390
+ productName: data.product_name,
391
+ projectId: data.project_id,
392
+ recordedAt: unmarshalDate(data.recorded_at),
393
+ resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
394
+ source: data.source,
395
+ systemName: data.system_name
396
+ };
397
+ };
398
+ var unmarshalListCombinedEventsResponseCombinedEvent = (data) => {
399
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListCombinedEventsResponseCombinedEvent' failed as data isn't a dictionary.`);
400
+ return {
401
+ api: data.api ? unmarshalEvent(data.api) : void 0,
402
+ auth: data.auth ? unmarshalAuthenticationEvent(data.auth) : void 0,
403
+ system: data.system ? unmarshalSystemEvent(data.system) : void 0
404
+ };
645
405
  };
646
406
  const unmarshalListCombinedEventsResponse = (data) => {
647
- if (!isJSONObject(data)) {
648
- throw new TypeError(
649
- `Unmarshalling the type 'ListCombinedEventsResponse' failed as data isn't a dictionary.`
650
- );
651
- }
652
- return {
653
- events: unmarshalArrayOfObject(data.events, unmarshalListCombinedEventsResponseCombinedEvent),
654
- nextPageToken: data.next_page_token
655
- };
407
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListCombinedEventsResponse' failed as data isn't a dictionary.`);
408
+ return {
409
+ events: unmarshalArrayOfObject(data.events, unmarshalListCombinedEventsResponseCombinedEvent),
410
+ nextPageToken: data.next_page_token
411
+ };
656
412
  };
657
413
  const unmarshalListEventsResponse = (data) => {
658
- if (!isJSONObject(data)) {
659
- throw new TypeError(
660
- `Unmarshalling the type 'ListEventsResponse' failed as data isn't a dictionary.`
661
- );
662
- }
663
- return {
664
- events: unmarshalArrayOfObject(data.events, unmarshalEvent),
665
- nextPageToken: data.next_page_token
666
- };
414
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListEventsResponse' failed as data isn't a dictionary.`);
415
+ return {
416
+ events: unmarshalArrayOfObject(data.events, unmarshalEvent),
417
+ nextPageToken: data.next_page_token
418
+ };
667
419
  };
668
420
  const unmarshalListExportJobsResponse = (data) => {
669
- if (!isJSONObject(data)) {
670
- throw new TypeError(
671
- `Unmarshalling the type 'ListExportJobsResponse' failed as data isn't a dictionary.`
672
- );
673
- }
674
- return {
675
- exportJobs: unmarshalArrayOfObject(data.export_jobs, unmarshalExportJob),
676
- totalCount: data.total_count
677
- };
678
- };
679
- const unmarshalProductService = (data) => {
680
- if (!isJSONObject(data)) {
681
- throw new TypeError(
682
- `Unmarshalling the type 'ProductService' failed as data isn't a dictionary.`
683
- );
684
- }
685
- return {
686
- methods: data.methods,
687
- name: data.name
688
- };
689
- };
690
- const unmarshalProduct = (data) => {
691
- if (!isJSONObject(data)) {
692
- throw new TypeError(
693
- `Unmarshalling the type 'Product' failed as data isn't a dictionary.`
694
- );
695
- }
696
- return {
697
- name: data.name,
698
- services: unmarshalArrayOfObject(data.services, unmarshalProductService),
699
- title: data.title
700
- };
421
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListExportJobsResponse' failed as data isn't a dictionary.`);
422
+ return {
423
+ exportJobs: unmarshalArrayOfObject(data.export_jobs, unmarshalExportJob),
424
+ totalCount: data.total_count
425
+ };
426
+ };
427
+ var unmarshalProductService = (data) => {
428
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ProductService' failed as data isn't a dictionary.`);
429
+ return {
430
+ methods: data.methods,
431
+ name: data.name
432
+ };
433
+ };
434
+ var unmarshalProduct = (data) => {
435
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Product' failed as data isn't a dictionary.`);
436
+ return {
437
+ name: data.name,
438
+ services: unmarshalArrayOfObject(data.services, unmarshalProductService),
439
+ title: data.title
440
+ };
701
441
  };
702
442
  const unmarshalListProductsResponse = (data) => {
703
- if (!isJSONObject(data)) {
704
- throw new TypeError(
705
- `Unmarshalling the type 'ListProductsResponse' failed as data isn't a dictionary.`
706
- );
707
- }
708
- return {
709
- products: unmarshalArrayOfObject(data.products, unmarshalProduct),
710
- totalCount: data.total_count
711
- };
443
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProductsResponse' failed as data isn't a dictionary.`);
444
+ return {
445
+ products: unmarshalArrayOfObject(data.products, unmarshalProduct),
446
+ totalCount: data.total_count
447
+ };
448
+ };
449
+ const unmarshalListSystemEventsResponse = (data) => {
450
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSystemEventsResponse' failed as data isn't a dictionary.`);
451
+ return {
452
+ events: unmarshalArrayOfObject(data.events, unmarshalSystemEvent),
453
+ nextPageToken: data.next_page_token
454
+ };
712
455
  };
713
456
  const unmarshalSetEnabledAlertRulesResponse = (data) => {
714
- if (!isJSONObject(data)) {
715
- throw new TypeError(
716
- `Unmarshalling the type 'SetEnabledAlertRulesResponse' failed as data isn't a dictionary.`
717
- );
718
- }
719
- return {
720
- alertRules: unmarshalArrayOfObject(data.alert_rules, unmarshalAlertRule)
721
- };
722
- };
723
- const marshalExportJobS3 = (request, defaults) => ({
724
- bucket: request.bucket,
725
- prefix: request.prefix,
726
- project_id: request.projectId,
727
- region: request.region
457
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetEnabledAlertRulesResponse' failed as data isn't a dictionary.`);
458
+ return { alertRules: unmarshalArrayOfObject(data.alert_rules, unmarshalAlertRule) };
459
+ };
460
+ var marshalExportJobS3 = (request, defaults) => ({
461
+ bucket: request.bucket,
462
+ prefix: request.prefix,
463
+ project_id: request.projectId,
464
+ region: request.region
728
465
  });
729
466
  const marshalCreateExportJobRequest = (request, defaults) => ({
730
- name: request.name,
731
- organization_id: request.organizationId ?? defaults.defaultOrganizationId,
732
- tags: request.tags,
733
- ...resolveOneOf([
734
- {
735
- param: "s3",
736
- value: request.s3 !== void 0 ? marshalExportJobS3(request.s3) : void 0
737
- }
738
- ])
467
+ name: request.name,
468
+ organization_id: request.organizationId ?? defaults.defaultOrganizationId,
469
+ tags: request.tags,
470
+ ...resolveOneOf([{
471
+ param: "s3",
472
+ value: request.s3 !== void 0 ? marshalExportJobS3(request.s3, defaults) : void 0
473
+ }])
739
474
  });
740
475
  const marshalDisableAlertRulesRequest = (request, defaults) => ({
741
- alert_rule_ids: request.alertRuleIds,
742
- organization_id: request.organizationId ?? defaults.defaultOrganizationId
476
+ alert_rule_ids: request.alertRuleIds,
477
+ organization_id: request.organizationId ?? defaults.defaultOrganizationId
743
478
  });
744
479
  const marshalEnableAlertRulesRequest = (request, defaults) => ({
745
- alert_rule_ids: request.alertRuleIds,
746
- organization_id: request.organizationId ?? defaults.defaultOrganizationId
480
+ alert_rule_ids: request.alertRuleIds,
481
+ organization_id: request.organizationId ?? defaults.defaultOrganizationId
747
482
  });
748
483
  const marshalSetEnabledAlertRulesRequest = (request, defaults) => ({
749
- enabled_alert_rule_ids: request.enabledAlertRuleIds,
750
- organization_id: request.organizationId ?? defaults.defaultOrganizationId
484
+ enabled_alert_rule_ids: request.enabledAlertRuleIds,
485
+ organization_id: request.organizationId ?? defaults.defaultOrganizationId
751
486
  });
752
- export {
753
- marshalCreateExportJobRequest,
754
- marshalDisableAlertRulesRequest,
755
- marshalEnableAlertRulesRequest,
756
- marshalSetEnabledAlertRulesRequest,
757
- unmarshalDisableAlertRulesResponse,
758
- unmarshalEnableAlertRulesResponse,
759
- unmarshalEvent,
760
- unmarshalExportJob,
761
- unmarshalListAlertRulesResponse,
762
- unmarshalListAuthenticationEventsResponse,
763
- unmarshalListCombinedEventsResponse,
764
- unmarshalListEventsResponse,
765
- unmarshalListExportJobsResponse,
766
- unmarshalListProductsResponse,
767
- unmarshalResource,
768
- unmarshalSetEnabledAlertRulesResponse
769
- };
487
+ export { marshalCreateExportJobRequest, marshalDisableAlertRulesRequest, marshalEnableAlertRulesRequest, marshalSetEnabledAlertRulesRequest, unmarshalDisableAlertRulesResponse, unmarshalEnableAlertRulesResponse, unmarshalEvent, unmarshalExportJob, unmarshalListAlertRulesResponse, unmarshalListAuthenticationEventsResponse, unmarshalListCombinedEventsResponse, unmarshalListEventsResponse, unmarshalListExportJobsResponse, unmarshalListProductsResponse, unmarshalListSystemEventsResponse, unmarshalResource, unmarshalSetEnabledAlertRulesResponse };