@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.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1alpha1/api.gen.d.ts +8 -1
- package/dist/v1alpha1/api.gen.js +139 -218
- package/dist/v1alpha1/content.gen.js +3 -7
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +26 -23
- package/dist/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/v1alpha1/marshalling.gen.js +454 -736
- package/dist/v1alpha1/types.gen.d.ts +114 -43
- package/dist/v1alpha1/validation-rules.gen.d.ts +6 -0
- package/dist/v1alpha1/validation-rules.gen.js +52 -59
- package/package.json +4 -4
|
@@ -1,769 +1,487 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
58
|
-
|
|
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
|
-
|
|
68
|
-
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
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
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
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
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
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
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
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
|
-
|
|
648
|
-
|
|
649
|
-
|
|
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
|
-
|
|
659
|
-
|
|
660
|
-
|
|
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
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
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
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
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
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
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
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
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
|
-
|
|
742
|
-
|
|
476
|
+
alert_rule_ids: request.alertRuleIds,
|
|
477
|
+
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
743
478
|
});
|
|
744
479
|
const marshalEnableAlertRulesRequest = (request, defaults) => ({
|
|
745
|
-
|
|
746
|
-
|
|
480
|
+
alert_rule_ids: request.alertRuleIds,
|
|
481
|
+
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
747
482
|
});
|
|
748
483
|
const marshalSetEnabledAlertRulesRequest = (request, defaults) => ({
|
|
749
|
-
|
|
750
|
-
|
|
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 };
|