@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.
@@ -1,696 +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 unmarshalAccountContractSignatureInfoAccountContractInfo = (data) => {
44
- if (!isJSONObject(data)) {
45
- throw new TypeError(
46
- `Unmarshalling the type 'AccountContractSignatureInfoAccountContractInfo' failed as data isn't a dictionary.`
47
- );
48
- }
49
- return {
50
- createdAt: unmarshalDate(data.created_at),
51
- id: data.id,
52
- name: data.name,
53
- type: data.type,
54
- updatedAt: unmarshalDate(data.updated_at),
55
- version: data.version
56
- };
57
- };
58
- const unmarshalAccountContractSignatureInfo = (data) => {
59
- if (!isJSONObject(data)) {
60
- throw new TypeError(
61
- `Unmarshalling the type 'AccountContractSignatureInfo' failed as data isn't a dictionary.`
62
- );
63
- }
64
- return {
65
- contract: data.contract ? unmarshalAccountContractSignatureInfoAccountContractInfo(data.contract) : void 0,
66
- expiresAt: unmarshalDate(data.expires_at),
67
- signedAt: unmarshalDate(data.signed_at),
68
- signedByAccountRootUserId: data.signed_by_account_root_user_id
69
- };
70
- };
71
- const unmarshalAccountOrganizationInfo = (data) => {
72
- if (!isJSONObject(data)) {
73
- throw new TypeError(
74
- `Unmarshalling the type 'AccountOrganizationInfo' failed as data isn't a dictionary.`
75
- );
76
- }
77
- return {};
78
- };
79
- const unmarshalAccountProjectInfo = (data) => {
80
- if (!isJSONObject(data)) {
81
- throw new TypeError(
82
- `Unmarshalling the type 'AccountProjectInfo' failed as data isn't a dictionary.`
83
- );
84
- }
85
- return {
86
- description: data.description
87
- };
88
- };
89
- const unmarshalAccountUserInfo = (data) => {
90
- if (!isJSONObject(data)) {
91
- throw new TypeError(
92
- `Unmarshalling the type 'AccountUserInfo' failed as data isn't a dictionary.`
93
- );
94
- }
95
- return {
96
- email: data.email,
97
- phoneNumber: data.phone_number
98
- };
99
- };
100
- const unmarshalAppleSiliconServerInfo = (data) => {
101
- if (!isJSONObject(data)) {
102
- throw new TypeError(
103
- `Unmarshalling the type 'AppleSiliconServerInfo' failed as data isn't a dictionary.`
104
- );
105
- }
106
- return {
107
- id: data.id,
108
- name: data.name
109
- };
110
- };
111
- const unmarshalAuditTrailExportJobInfo = (data) => {
112
- if (!isJSONObject(data)) {
113
- throw new TypeError(
114
- `Unmarshalling the type 'AuditTrailExportJobInfo' failed as data isn't a dictionary.`
115
- );
116
- }
117
- return {};
118
- };
119
- const unmarshalBaremetalServerInfo = (data) => {
120
- if (!isJSONObject(data)) {
121
- throw new TypeError(
122
- `Unmarshalling the type 'BaremetalServerInfo' failed as data isn't a dictionary.`
123
- );
124
- }
125
- return {
126
- description: data.description,
127
- tags: data.tags
128
- };
129
- };
130
- const unmarshalBaremetalSettingInfo = (data) => {
131
- if (!isJSONObject(data)) {
132
- throw new TypeError(
133
- `Unmarshalling the type 'BaremetalSettingInfo' failed as data isn't a dictionary.`
134
- );
135
- }
136
- return {
137
- type: data.type
138
- };
139
- };
140
- const unmarshalEdgeServicesBackendStageInfo = (data) => {
141
- if (!isJSONObject(data)) {
142
- throw new TypeError(
143
- `Unmarshalling the type 'EdgeServicesBackendStageInfo' failed as data isn't a dictionary.`
144
- );
145
- }
146
- return {
147
- pipelineId: data.pipeline_id
148
- };
149
- };
150
- const unmarshalEdgeServicesCacheStageInfo = (data) => {
151
- if (!isJSONObject(data)) {
152
- throw new TypeError(
153
- `Unmarshalling the type 'EdgeServicesCacheStageInfo' failed as data isn't a dictionary.`
154
- );
155
- }
156
- return {
157
- pipelineId: data.pipeline_id
158
- };
159
- };
160
- const unmarshalEdgeServicesDNSStageInfo = (data) => {
161
- if (!isJSONObject(data)) {
162
- throw new TypeError(
163
- `Unmarshalling the type 'EdgeServicesDNSStageInfo' failed as data isn't a dictionary.`
164
- );
165
- }
166
- return {
167
- pipelineId: data.pipeline_id
168
- };
169
- };
170
- const unmarshalEdgeServicesPipelineInfo = (data) => {
171
- if (!isJSONObject(data)) {
172
- throw new TypeError(
173
- `Unmarshalling the type 'EdgeServicesPipelineInfo' failed as data isn't a dictionary.`
174
- );
175
- }
176
- return {
177
- name: data.name
178
- };
179
- };
180
- const unmarshalEdgeServicesPlanInfo = (data) => {
181
- if (!isJSONObject(data)) {
182
- throw new TypeError(
183
- `Unmarshalling the type 'EdgeServicesPlanInfo' failed as data isn't a dictionary.`
184
- );
185
- }
186
- return {};
187
- };
188
- const unmarshalEdgeServicesRouteRulesInfo = (data) => {
189
- if (!isJSONObject(data)) {
190
- throw new TypeError(
191
- `Unmarshalling the type 'EdgeServicesRouteRulesInfo' failed as data isn't a dictionary.`
192
- );
193
- }
194
- return {
195
- routeStageId: data.route_stage_id
196
- };
197
- };
198
- const unmarshalEdgeServicesRouteStageInfo = (data) => {
199
- if (!isJSONObject(data)) {
200
- throw new TypeError(
201
- `Unmarshalling the type 'EdgeServicesRouteStageInfo' failed as data isn't a dictionary.`
202
- );
203
- }
204
- return {
205
- pipelineId: data.pipeline_id
206
- };
207
- };
208
- const unmarshalEdgeServicesTLSStageInfo = (data) => {
209
- if (!isJSONObject(data)) {
210
- throw new TypeError(
211
- `Unmarshalling the type 'EdgeServicesTLSStageInfo' failed as data isn't a dictionary.`
212
- );
213
- }
214
- return {
215
- pipelineId: data.pipeline_id
216
- };
217
- };
218
- const unmarshalEdgeServicesWAFStageInfo = (data) => {
219
- if (!isJSONObject(data)) {
220
- throw new TypeError(
221
- `Unmarshalling the type 'EdgeServicesWAFStageInfo' failed as data isn't a dictionary.`
222
- );
223
- }
224
- return {
225
- pipelineId: data.pipeline_id
226
- };
227
- };
228
- const unmarshalInstanceServerInfo = (data) => {
229
- if (!isJSONObject(data)) {
230
- throw new TypeError(
231
- `Unmarshalling the type 'InstanceServerInfo' failed as data isn't a dictionary.`
232
- );
233
- }
234
- return {
235
- name: data.name
236
- };
237
- };
238
- const unmarshalIpamIpInfo = (data) => {
239
- if (!isJSONObject(data)) {
240
- throw new TypeError(
241
- `Unmarshalling the type 'IpamIpInfo' failed as data isn't a dictionary.`
242
- );
243
- }
244
- return {
245
- address: data.address
246
- };
247
- };
248
- const unmarshalKeyManagerKeyInfo = (data) => {
249
- if (!isJSONObject(data)) {
250
- throw new TypeError(
251
- `Unmarshalling the type 'KeyManagerKeyInfo' failed as data isn't a dictionary.`
252
- );
253
- }
254
- return {};
255
- };
256
- const unmarshalKubernetesACLInfo = (data) => {
257
- if (!isJSONObject(data)) {
258
- throw new TypeError(
259
- `Unmarshalling the type 'KubernetesACLInfo' failed as data isn't a dictionary.`
260
- );
261
- }
262
- return {};
263
- };
264
- const unmarshalKubernetesClusterInfo = (data) => {
265
- if (!isJSONObject(data)) {
266
- throw new TypeError(
267
- `Unmarshalling the type 'KubernetesClusterInfo' failed as data isn't a dictionary.`
268
- );
269
- }
270
- return {};
271
- };
272
- const unmarshalKubernetesNodeInfo = (data) => {
273
- if (!isJSONObject(data)) {
274
- throw new TypeError(
275
- `Unmarshalling the type 'KubernetesNodeInfo' failed as data isn't a dictionary.`
276
- );
277
- }
278
- return {
279
- id: data.id,
280
- name: data.name
281
- };
282
- };
283
- const unmarshalKubernetesPoolInfo = (data) => {
284
- if (!isJSONObject(data)) {
285
- throw new TypeError(
286
- `Unmarshalling the type 'KubernetesPoolInfo' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
451
- throw new TypeError(
452
- `Unmarshalling the type 'Resource' failed as data isn't a dictionary.`
453
- );
454
- }
455
- return {
456
- accountContractSignatureInfo: data.account_contract_signature_info ? unmarshalAccountContractSignatureInfo(data.account_contract_signature_info) : void 0,
457
- accountOrganizationInfo: data.account_organization_info ? unmarshalAccountOrganizationInfo(data.account_organization_info) : void 0,
458
- accountProjectInfo: data.account_project_info ? unmarshalAccountProjectInfo(data.account_project_info) : void 0,
459
- accountUserInfo: data.account_user_info ? unmarshalAccountUserInfo(data.account_user_info) : void 0,
460
- appleSiliconServerInfo: data.apple_silicon_server_info ? unmarshalAppleSiliconServerInfo(data.apple_silicon_server_info) : void 0,
461
- auditTrailExportJobInfo: data.audit_trail_export_job_info ? unmarshalAuditTrailExportJobInfo(data.audit_trail_export_job_info) : void 0,
462
- baremetalServerInfo: data.baremetal_server_info ? unmarshalBaremetalServerInfo(data.baremetal_server_info) : void 0,
463
- baremetalSettingInfo: data.baremetal_setting_info ? unmarshalBaremetalSettingInfo(data.baremetal_setting_info) : void 0,
464
- createdAt: unmarshalDate(data.created_at),
465
- deletedAt: unmarshalDate(data.deleted_at),
466
- edgeServicesBackendStageInfo: data.edge_services_backend_stage_info ? unmarshalEdgeServicesBackendStageInfo(data.edge_services_backend_stage_info) : void 0,
467
- edgeServicesCacheStageInfo: data.edge_services_cache_stage_info ? unmarshalEdgeServicesCacheStageInfo(data.edge_services_cache_stage_info) : void 0,
468
- edgeServicesDnsStageInfo: data.edge_services_dns_stage_info ? unmarshalEdgeServicesDNSStageInfo(data.edge_services_dns_stage_info) : void 0,
469
- edgeServicesPipelineInfo: data.edge_services_pipeline_info ? unmarshalEdgeServicesPipelineInfo(data.edge_services_pipeline_info) : void 0,
470
- edgeServicesPlanInfo: data.edge_services_plan_info ? unmarshalEdgeServicesPlanInfo(data.edge_services_plan_info) : void 0,
471
- edgeServicesRouteRulesInfo: data.edge_services_route_rules_info ? unmarshalEdgeServicesRouteRulesInfo(data.edge_services_route_rules_info) : void 0,
472
- edgeServicesRouteStageInfo: data.edge_services_route_stage_info ? unmarshalEdgeServicesRouteStageInfo(data.edge_services_route_stage_info) : void 0,
473
- edgeServicesTlsStageInfo: data.edge_services_tls_stage_info ? unmarshalEdgeServicesTLSStageInfo(data.edge_services_tls_stage_info) : void 0,
474
- edgeServicesWafStageInfo: data.edge_services_waf_stage_info ? unmarshalEdgeServicesWAFStageInfo(data.edge_services_waf_stage_info) : void 0,
475
- id: data.id,
476
- instanceServerInfo: data.instance_server_info ? unmarshalInstanceServerInfo(data.instance_server_info) : void 0,
477
- ipamIpInfo: data.ipam_ip_info ? unmarshalIpamIpInfo(data.ipam_ip_info) : void 0,
478
- keyManagerKeyInfo: data.key_manager_key_info ? unmarshalKeyManagerKeyInfo(data.key_manager_key_info) : void 0,
479
- keymKeyInfo: data.keym_key_info ? unmarshalKeyManagerKeyInfo(data.keym_key_info) : void 0,
480
- kubeAclInfo: data.kube_acl_info ? unmarshalKubernetesACLInfo(data.kube_acl_info) : void 0,
481
- kubeClusterInfo: data.kube_cluster_info ? unmarshalKubernetesClusterInfo(data.kube_cluster_info) : void 0,
482
- kubeNodeInfo: data.kube_node_info ? unmarshalKubernetesNodeInfo(data.kube_node_info) : void 0,
483
- kubePoolInfo: data.kube_pool_info ? unmarshalKubernetesPoolInfo(data.kube_pool_info) : void 0,
484
- loadBalancerAclInfo: data.load_balancer_acl_info ? unmarshalLoadBalancerAclInfo(data.load_balancer_acl_info) : void 0,
485
- loadBalancerBackendInfo: data.load_balancer_backend_info ? unmarshalLoadBalancerBackendInfo(data.load_balancer_backend_info) : void 0,
486
- loadBalancerCertificateInfo: data.load_balancer_certificate_info ? unmarshalLoadBalancerCertificateInfo(data.load_balancer_certificate_info) : void 0,
487
- loadBalancerFrontendInfo: data.load_balancer_frontend_info ? unmarshalLoadBalancerFrontendInfo(data.load_balancer_frontend_info) : void 0,
488
- loadBalancerIpInfo: data.load_balancer_ip_info ? unmarshalLoadBalancerIpInfo(data.load_balancer_ip_info) : void 0,
489
- loadBalancerLbInfo: data.load_balancer_lb_info ? unmarshalLoadBalancerLbInfo(data.load_balancer_lb_info) : void 0,
490
- loadBalancerRouteInfo: data.load_balancer_route_info ? unmarshalLoadBalancerRouteInfo(data.load_balancer_route_info) : void 0,
491
- name: data.name,
492
- secmSecretInfo: data.secm_secret_info ? unmarshalSecretManagerSecretInfo(data.secm_secret_info) : void 0,
493
- secmSecretVersionInfo: data.secm_secret_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secm_secret_version_info) : void 0,
494
- secretManagerSecretInfo: data.secret_manager_secret_info ? unmarshalSecretManagerSecretInfo(data.secret_manager_secret_info) : void 0,
495
- secretManagerVersionInfo: data.secret_manager_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secret_manager_version_info) : void 0,
496
- type: data.type,
497
- updatedAt: unmarshalDate(data.updated_at),
498
- vpcGwGatewayInfo: data.vpc_gw_gateway_info ? unmarshalVpcGwGatewayInfo(data.vpc_gw_gateway_info) : void 0,
499
- vpcGwGatewayNetworkInfo: data.vpc_gw_gateway_network_info ? unmarshalVpcGwGatewayNetworkInfo(data.vpc_gw_gateway_network_info) : void 0,
500
- vpcPrivateNetworkInfo: data.vpc_private_network_info ? unmarshalVpcPrivateNetworkInfo(data.vpc_private_network_info) : void 0,
501
- vpcRouteInfo: data.vpc_route_info ? unmarshalVpcRouteInfo(data.vpc_route_info) : void 0,
502
- vpcSubnetInfo: data.vpc_subnet_info ? unmarshalVpcSubnetInfo(data.vpc_subnet_info) : void 0
503
- };
504
- };
505
- const unmarshalAuthenticationEvent = (data) => {
506
- if (!isJSONObject(data)) {
507
- throw new TypeError(
508
- `Unmarshalling the type 'AuthenticationEvent' failed as data isn't a dictionary.`
509
- );
510
- }
511
- return {
512
- countryCode: data.country_code ? data.country_code : void 0,
513
- failureReason: data.failure_reason ? data.failure_reason : void 0,
514
- id: data.id,
515
- method: data.method,
516
- mfaType: data.mfa_type ? data.mfa_type : void 0,
517
- organizationId: data.organization_id,
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
- if (!isJSONObject(data)) {
528
- throw new TypeError(
529
- `Unmarshalling the type 'ListAuthenticationEventsResponse' failed as data isn't a dictionary.`
530
- );
531
- }
532
- return {
533
- events: unmarshalArrayOfObject(data.events, unmarshalAuthenticationEvent),
534
- nextPageToken: data.next_page_token
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
- if (!isJSONObject(data)) {
549
- throw new TypeError(
550
- `Unmarshalling the type 'Event' failed as data isn't a dictionary.`
551
- );
552
- }
553
- return {
554
- id: data.id,
555
- locality: data.locality,
556
- methodName: data.method_name,
557
- organizationId: data.organization_id,
558
- principal: data.principal ? unmarshalEventPrincipal(data.principal) : void 0,
559
- productName: data.product_name,
560
- projectId: data.project_id,
561
- recordedAt: unmarshalDate(data.recorded_at),
562
- requestBody: data.request_body,
563
- requestId: data.request_id,
564
- resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
565
- serviceName: data.service_name,
566
- sourceIp: data.source_ip,
567
- statusCode: data.status_code,
568
- userAgent: data.user_agent
569
- };
570
- };
571
- const unmarshalSystemEvent = (data) => {
572
- if (!isJSONObject(data)) {
573
- throw new TypeError(
574
- `Unmarshalling the type 'SystemEvent' failed as data isn't a dictionary.`
575
- );
576
- }
577
- return {
578
- id: data.id,
579
- kind: data.kind,
580
- locality: data.locality,
581
- organizationId: data.organization_id,
582
- productName: data.product_name,
583
- projectId: data.project_id,
584
- recordedAt: unmarshalDate(data.recorded_at),
585
- resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
586
- source: data.source,
587
- systemName: data.system_name
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
- if (!isJSONObject(data)) {
604
- throw new TypeError(
605
- `Unmarshalling the type 'ListCombinedEventsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
615
- throw new TypeError(
616
- `Unmarshalling the type 'ListEventsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
626
- throw new TypeError(
627
- `Unmarshalling the type 'ListExportJobsResponse' failed as data isn't a dictionary.`
628
- );
629
- }
630
- return {
631
- exportJobs: unmarshalArrayOfObject(data.export_jobs, unmarshalExportJob),
632
- totalCount: data.total_count
633
- };
634
- };
635
- const unmarshalProductService = (data) => {
636
- if (!isJSONObject(data)) {
637
- throw new TypeError(
638
- `Unmarshalling the type 'ProductService' failed as data isn't a dictionary.`
639
- );
640
- }
641
- return {
642
- methods: data.methods,
643
- name: data.name
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
- if (!isJSONObject(data)) {
660
- throw new TypeError(
661
- `Unmarshalling the type 'ListProductsResponse' failed as data isn't a dictionary.`
662
- );
663
- }
664
- return {
665
- products: unmarshalArrayOfObject(data.products, unmarshalProduct),
666
- totalCount: data.total_count
667
- };
668
- };
669
- const marshalExportJobS3 = (request, defaults) => ({
670
- bucket: request.bucket,
671
- prefix: request.prefix,
672
- project_id: request.projectId,
673
- region: request.region
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
- name: request.name,
677
- organization_id: request.organizationId ?? defaults.defaultOrganizationId,
678
- tags: request.tags,
679
- ...resolveOneOf([
680
- {
681
- param: "s3",
682
- value: request.s3 !== void 0 ? marshalExportJobS3(request.s3) : void 0
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
- export {
687
- marshalCreateExportJobRequest,
688
- unmarshalEvent,
689
- unmarshalExportJob,
690
- unmarshalListAuthenticationEventsResponse,
691
- unmarshalListCombinedEventsResponse,
692
- unmarshalListEventsResponse,
693
- unmarshalListExportJobsResponse,
694
- unmarshalListProductsResponse,
695
- unmarshalResource
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 };