@scaleway/sdk-audit-trail 2.4.1 → 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 +40 -1
- package/dist/v1alpha1/api.gen.js +139 -147
- package/dist/v1alpha1/content.gen.d.ts +3 -0
- package/dist/v1alpha1/content.gen.js +3 -0
- package/dist/v1alpha1/index.gen.d.ts +2 -1
- package/dist/v1alpha1/index.gen.js +27 -15
- package/dist/v1alpha1/marshalling.gen.d.ts +9 -1
- package/dist/v1alpha1/marshalling.gen.js +468 -677
- package/dist/v1alpha1/types.gen.d.ts +219 -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,696 +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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
return {
|
|
290
|
-
id: data.id,
|
|
291
|
-
name: data.name
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
const unmarshalLoadBalancerAclInfo = (data) => {
|
|
295
|
-
if (!isJSONObject(data)) {
|
|
296
|
-
throw new TypeError(
|
|
297
|
-
`Unmarshalling the type 'LoadBalancerAclInfo' failed as data isn't a dictionary.`
|
|
298
|
-
);
|
|
299
|
-
}
|
|
300
|
-
return {
|
|
301
|
-
frontendId: data.frontend_id
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
const unmarshalLoadBalancerBackendInfo = (data) => {
|
|
305
|
-
if (!isJSONObject(data)) {
|
|
306
|
-
throw new TypeError(
|
|
307
|
-
`Unmarshalling the type 'LoadBalancerBackendInfo' failed as data isn't a dictionary.`
|
|
308
|
-
);
|
|
309
|
-
}
|
|
310
|
-
return {
|
|
311
|
-
lbId: data.lb_id,
|
|
312
|
-
name: data.name
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
const unmarshalLoadBalancerCertificateInfo = (data) => {
|
|
316
|
-
if (!isJSONObject(data)) {
|
|
317
|
-
throw new TypeError(
|
|
318
|
-
`Unmarshalling the type 'LoadBalancerCertificateInfo' failed as data isn't a dictionary.`
|
|
319
|
-
);
|
|
320
|
-
}
|
|
321
|
-
return {
|
|
322
|
-
lbId: data.lb_id,
|
|
323
|
-
name: data.name
|
|
324
|
-
};
|
|
325
|
-
};
|
|
326
|
-
const unmarshalLoadBalancerFrontendInfo = (data) => {
|
|
327
|
-
if (!isJSONObject(data)) {
|
|
328
|
-
throw new TypeError(
|
|
329
|
-
`Unmarshalling the type 'LoadBalancerFrontendInfo' failed as data isn't a dictionary.`
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
return {
|
|
333
|
-
lbId: data.lb_id,
|
|
334
|
-
name: data.name
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
const unmarshalLoadBalancerIpInfo = (data) => {
|
|
338
|
-
if (!isJSONObject(data)) {
|
|
339
|
-
throw new TypeError(
|
|
340
|
-
`Unmarshalling the type 'LoadBalancerIpInfo' failed as data isn't a dictionary.`
|
|
341
|
-
);
|
|
342
|
-
}
|
|
343
|
-
return {
|
|
344
|
-
ipAddress: data.ip_address,
|
|
345
|
-
lbId: data.lb_id
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
|
-
const unmarshalLoadBalancerLbInfo = (data) => {
|
|
349
|
-
if (!isJSONObject(data)) {
|
|
350
|
-
throw new TypeError(
|
|
351
|
-
`Unmarshalling the type 'LoadBalancerLbInfo' failed as data isn't a dictionary.`
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
|
-
return {
|
|
355
|
-
name: data.name
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
|
-
const unmarshalLoadBalancerRouteInfo = (data) => {
|
|
359
|
-
if (!isJSONObject(data)) {
|
|
360
|
-
throw new TypeError(
|
|
361
|
-
`Unmarshalling the type 'LoadBalancerRouteInfo' failed as data isn't a dictionary.`
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
return {
|
|
365
|
-
backendId: data.backend_id,
|
|
366
|
-
frontendId: data.frontend_id
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
const unmarshalSecretManagerSecretInfo = (data) => {
|
|
370
|
-
if (!isJSONObject(data)) {
|
|
371
|
-
throw new TypeError(
|
|
372
|
-
`Unmarshalling the type 'SecretManagerSecretInfo' failed as data isn't a dictionary.`
|
|
373
|
-
);
|
|
374
|
-
}
|
|
375
|
-
return {
|
|
376
|
-
keyId: data.key_id,
|
|
377
|
-
path: data.path
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
|
-
const unmarshalSecretManagerSecretVersionInfo = (data) => {
|
|
381
|
-
if (!isJSONObject(data)) {
|
|
382
|
-
throw new TypeError(
|
|
383
|
-
`Unmarshalling the type 'SecretManagerSecretVersionInfo' failed as data isn't a dictionary.`
|
|
384
|
-
);
|
|
385
|
-
}
|
|
386
|
-
return {
|
|
387
|
-
revision: data.revision
|
|
388
|
-
};
|
|
389
|
-
};
|
|
390
|
-
const unmarshalVpcGwGatewayInfo = (data) => {
|
|
391
|
-
if (!isJSONObject(data)) {
|
|
392
|
-
throw new TypeError(
|
|
393
|
-
`Unmarshalling the type 'VpcGwGatewayInfo' failed as data isn't a dictionary.`
|
|
394
|
-
);
|
|
395
|
-
}
|
|
396
|
-
return {
|
|
397
|
-
gatewayTypeId: data.gateway_type_id,
|
|
398
|
-
publicIpId: data.public_ip_id,
|
|
399
|
-
vpcId: data.vpc_id
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
const unmarshalVpcGwGatewayNetworkInfo = (data) => {
|
|
403
|
-
if (!isJSONObject(data)) {
|
|
404
|
-
throw new TypeError(
|
|
405
|
-
`Unmarshalling the type 'VpcGwGatewayNetworkInfo' failed as data isn't a dictionary.`
|
|
406
|
-
);
|
|
407
|
-
}
|
|
408
|
-
return {
|
|
409
|
-
address: data.address,
|
|
410
|
-
gatewayId: data.gateway_id,
|
|
411
|
-
pnId: data.pn_id
|
|
412
|
-
};
|
|
413
|
-
};
|
|
414
|
-
const unmarshalVpcPrivateNetworkInfo = (data) => {
|
|
415
|
-
if (!isJSONObject(data)) {
|
|
416
|
-
throw new TypeError(
|
|
417
|
-
`Unmarshalling the type 'VpcPrivateNetworkInfo' failed as data isn't a dictionary.`
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
return {
|
|
421
|
-
pushDefaultRoute: data.push_default_route,
|
|
422
|
-
vpcId: data.vpc_id
|
|
423
|
-
};
|
|
424
|
-
};
|
|
425
|
-
const unmarshalVpcRouteInfo = (data) => {
|
|
426
|
-
if (!isJSONObject(data)) {
|
|
427
|
-
throw new TypeError(
|
|
428
|
-
`Unmarshalling the type 'VpcRouteInfo' failed as data isn't a dictionary.`
|
|
429
|
-
);
|
|
430
|
-
}
|
|
431
|
-
return {
|
|
432
|
-
destination: data.destination,
|
|
433
|
-
nexthopPrivateNetworkKey: data.nexthop_private_network_key,
|
|
434
|
-
nexthopResourceKey: data.nexthop_resource_key,
|
|
435
|
-
vpcId: data.vpc_id
|
|
436
|
-
};
|
|
437
|
-
};
|
|
438
|
-
const unmarshalVpcSubnetInfo = (data) => {
|
|
439
|
-
if (!isJSONObject(data)) {
|
|
440
|
-
throw new TypeError(
|
|
441
|
-
`Unmarshalling the type 'VpcSubnetInfo' failed as data isn't a dictionary.`
|
|
442
|
-
);
|
|
443
|
-
}
|
|
444
|
-
return {
|
|
445
|
-
subnetCidr: data.subnet_cidr,
|
|
446
|
-
vpcId: data.vpc_id
|
|
447
|
-
};
|
|
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
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const unmarshalDisableAlertRulesResponse = (data) => {
|
|
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) };
|
|
43
|
+
};
|
|
44
|
+
const unmarshalEnableAlertRulesResponse = (data) => {
|
|
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) };
|
|
47
|
+
};
|
|
48
|
+
const unmarshalListAlertRulesResponse = (data) => {
|
|
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
|
+
};
|
|
448
281
|
};
|
|
449
282
|
const unmarshalResource = (data) => {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
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
|
-
origin: data.origin,
|
|
519
|
-
recordedAt: unmarshalDate(data.recorded_at),
|
|
520
|
-
resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
|
|
521
|
-
result: data.result,
|
|
522
|
-
sourceIp: data.source_ip,
|
|
523
|
-
userAgent: data.user_agent
|
|
524
|
-
};
|
|
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
|
+
};
|
|
525
351
|
};
|
|
526
352
|
const unmarshalListAuthenticationEventsResponse = (data) => {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
};
|
|
537
|
-
const unmarshalEventPrincipal = (data) => {
|
|
538
|
-
if (!isJSONObject(data)) {
|
|
539
|
-
throw new TypeError(
|
|
540
|
-
`Unmarshalling the type 'EventPrincipal' failed as data isn't a dictionary.`
|
|
541
|
-
);
|
|
542
|
-
}
|
|
543
|
-
return {
|
|
544
|
-
id: data.id
|
|
545
|
-
};
|
|
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 };
|
|
546
362
|
};
|
|
547
363
|
const unmarshalEvent = (data) => {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
};
|
|
590
|
-
const unmarshalListCombinedEventsResponseCombinedEvent = (data) => {
|
|
591
|
-
if (!isJSONObject(data)) {
|
|
592
|
-
throw new TypeError(
|
|
593
|
-
`Unmarshalling the type 'ListCombinedEventsResponseCombinedEvent' failed as data isn't a dictionary.`
|
|
594
|
-
);
|
|
595
|
-
}
|
|
596
|
-
return {
|
|
597
|
-
api: data.api ? unmarshalEvent(data.api) : void 0,
|
|
598
|
-
auth: data.auth ? unmarshalAuthenticationEvent(data.auth) : void 0,
|
|
599
|
-
system: data.system ? unmarshalSystemEvent(data.system) : void 0
|
|
600
|
-
};
|
|
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
|
+
};
|
|
601
405
|
};
|
|
602
406
|
const unmarshalListCombinedEventsResponse = (data) => {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
return {
|
|
609
|
-
events: unmarshalArrayOfObject(data.events, unmarshalListCombinedEventsResponseCombinedEvent),
|
|
610
|
-
nextPageToken: data.next_page_token
|
|
611
|
-
};
|
|
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
|
+
};
|
|
612
412
|
};
|
|
613
413
|
const unmarshalListEventsResponse = (data) => {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
return {
|
|
620
|
-
events: unmarshalArrayOfObject(data.events, unmarshalEvent),
|
|
621
|
-
nextPageToken: data.next_page_token
|
|
622
|
-
};
|
|
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
|
+
};
|
|
623
419
|
};
|
|
624
420
|
const unmarshalListExportJobsResponse = (data) => {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
};
|
|
646
|
-
const unmarshalProduct = (data) => {
|
|
647
|
-
if (!isJSONObject(data)) {
|
|
648
|
-
throw new TypeError(
|
|
649
|
-
`Unmarshalling the type 'Product' failed as data isn't a dictionary.`
|
|
650
|
-
);
|
|
651
|
-
}
|
|
652
|
-
return {
|
|
653
|
-
name: data.name,
|
|
654
|
-
services: unmarshalArrayOfObject(data.services, unmarshalProductService),
|
|
655
|
-
title: data.title
|
|
656
|
-
};
|
|
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
|
+
};
|
|
657
441
|
};
|
|
658
442
|
const unmarshalListProductsResponse = (data) => {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
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
|
+
};
|
|
455
|
+
};
|
|
456
|
+
const unmarshalSetEnabledAlertRulesResponse = (data) => {
|
|
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
|
|
674
465
|
});
|
|
675
466
|
const marshalCreateExportJobRequest = (request, defaults) => ({
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}
|
|
684
|
-
])
|
|
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
|
+
}])
|
|
685
474
|
});
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
475
|
+
const marshalDisableAlertRulesRequest = (request, defaults) => ({
|
|
476
|
+
alert_rule_ids: request.alertRuleIds,
|
|
477
|
+
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
478
|
+
});
|
|
479
|
+
const marshalEnableAlertRulesRequest = (request, defaults) => ({
|
|
480
|
+
alert_rule_ids: request.alertRuleIds,
|
|
481
|
+
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
482
|
+
});
|
|
483
|
+
const marshalSetEnabledAlertRulesRequest = (request, defaults) => ({
|
|
484
|
+
enabled_alert_rule_ids: request.enabledAlertRuleIds,
|
|
485
|
+
organization_id: request.organizationId ?? defaults.defaultOrganizationId
|
|
486
|
+
});
|
|
487
|
+
export { marshalCreateExportJobRequest, marshalDisableAlertRulesRequest, marshalEnableAlertRulesRequest, marshalSetEnabledAlertRulesRequest, unmarshalDisableAlertRulesResponse, unmarshalEnableAlertRulesResponse, unmarshalEvent, unmarshalExportJob, unmarshalListAlertRulesResponse, unmarshalListAuthenticationEventsResponse, unmarshalListCombinedEventsResponse, unmarshalListEventsResponse, unmarshalListExportJobsResponse, unmarshalListProductsResponse, unmarshalListSystemEventsResponse, unmarshalResource, unmarshalSetEnabledAlertRulesResponse };
|