@scaleway/sdk-lb 1.0.1

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.
@@ -0,0 +1,1304 @@
1
+ import randomName from "@scaleway/random-name";
2
+ import { resolveOneOf, isJSONObject, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
3
+ const unmarshalIp = (data) => {
4
+ if (!isJSONObject(data)) {
5
+ throw new TypeError(
6
+ `Unmarshalling the type 'Ip' failed as data isn't a dictionary.`
7
+ );
8
+ }
9
+ return {
10
+ id: data.id,
11
+ ipAddress: data.ip_address,
12
+ lbId: data.lb_id,
13
+ organizationId: data.organization_id,
14
+ projectId: data.project_id,
15
+ region: data.region,
16
+ reverse: data.reverse,
17
+ tags: data.tags,
18
+ zone: data.zone
19
+ };
20
+ };
21
+ const unmarshalSubscriberEmailConfig = (data) => {
22
+ if (!isJSONObject(data)) {
23
+ throw new TypeError(
24
+ `Unmarshalling the type 'SubscriberEmailConfig' failed as data isn't a dictionary.`
25
+ );
26
+ }
27
+ return {
28
+ email: data.email
29
+ };
30
+ };
31
+ const unmarshalSubscriberWebhookConfig = (data) => {
32
+ if (!isJSONObject(data)) {
33
+ throw new TypeError(
34
+ `Unmarshalling the type 'SubscriberWebhookConfig' failed as data isn't a dictionary.`
35
+ );
36
+ }
37
+ return {
38
+ uri: data.uri
39
+ };
40
+ };
41
+ const unmarshalSubscriber = (data) => {
42
+ if (!isJSONObject(data)) {
43
+ throw new TypeError(
44
+ `Unmarshalling the type 'Subscriber' failed as data isn't a dictionary.`
45
+ );
46
+ }
47
+ return {
48
+ emailConfig: data.email_config ? unmarshalSubscriberEmailConfig(data.email_config) : void 0,
49
+ id: data.id,
50
+ name: data.name,
51
+ webhookConfig: data.webhook_config ? unmarshalSubscriberWebhookConfig(data.webhook_config) : void 0
52
+ };
53
+ };
54
+ const unmarshalHealthCheckHttpConfig = (data) => {
55
+ if (!isJSONObject(data)) {
56
+ throw new TypeError(
57
+ `Unmarshalling the type 'HealthCheckHttpConfig' failed as data isn't a dictionary.`
58
+ );
59
+ }
60
+ return {
61
+ code: data.code,
62
+ hostHeader: data.host_header,
63
+ method: data.method,
64
+ uri: data.uri
65
+ };
66
+ };
67
+ const unmarshalHealthCheckHttpsConfig = (data) => {
68
+ if (!isJSONObject(data)) {
69
+ throw new TypeError(
70
+ `Unmarshalling the type 'HealthCheckHttpsConfig' failed as data isn't a dictionary.`
71
+ );
72
+ }
73
+ return {
74
+ code: data.code,
75
+ hostHeader: data.host_header,
76
+ method: data.method,
77
+ sni: data.sni,
78
+ uri: data.uri
79
+ };
80
+ };
81
+ const unmarshalHealthCheckLdapConfig = (data) => {
82
+ if (!isJSONObject(data)) {
83
+ throw new TypeError(
84
+ `Unmarshalling the type 'HealthCheckLdapConfig' failed as data isn't a dictionary.`
85
+ );
86
+ }
87
+ return {};
88
+ };
89
+ const unmarshalHealthCheckMysqlConfig = (data) => {
90
+ if (!isJSONObject(data)) {
91
+ throw new TypeError(
92
+ `Unmarshalling the type 'HealthCheckMysqlConfig' failed as data isn't a dictionary.`
93
+ );
94
+ }
95
+ return {
96
+ user: data.user
97
+ };
98
+ };
99
+ const unmarshalHealthCheckPgsqlConfig = (data) => {
100
+ if (!isJSONObject(data)) {
101
+ throw new TypeError(
102
+ `Unmarshalling the type 'HealthCheckPgsqlConfig' failed as data isn't a dictionary.`
103
+ );
104
+ }
105
+ return {
106
+ user: data.user
107
+ };
108
+ };
109
+ const unmarshalHealthCheckRedisConfig = (data) => {
110
+ if (!isJSONObject(data)) {
111
+ throw new TypeError(
112
+ `Unmarshalling the type 'HealthCheckRedisConfig' failed as data isn't a dictionary.`
113
+ );
114
+ }
115
+ return {};
116
+ };
117
+ const unmarshalHealthCheckTcpConfig = (data) => {
118
+ if (!isJSONObject(data)) {
119
+ throw new TypeError(
120
+ `Unmarshalling the type 'HealthCheckTcpConfig' failed as data isn't a dictionary.`
121
+ );
122
+ }
123
+ return {};
124
+ };
125
+ const unmarshalHealthCheck = (data) => {
126
+ if (!isJSONObject(data)) {
127
+ throw new TypeError(
128
+ `Unmarshalling the type 'HealthCheck' failed as data isn't a dictionary.`
129
+ );
130
+ }
131
+ return {
132
+ checkDelay: data.check_delay,
133
+ checkMaxRetries: data.check_max_retries,
134
+ checkSendProxy: data.check_send_proxy,
135
+ checkTimeout: data.check_timeout,
136
+ httpConfig: data.http_config ? unmarshalHealthCheckHttpConfig(data.http_config) : void 0,
137
+ httpsConfig: data.https_config ? unmarshalHealthCheckHttpsConfig(data.https_config) : void 0,
138
+ ldapConfig: data.ldap_config ? unmarshalHealthCheckLdapConfig(data.ldap_config) : void 0,
139
+ mysqlConfig: data.mysql_config ? unmarshalHealthCheckMysqlConfig(data.mysql_config) : void 0,
140
+ pgsqlConfig: data.pgsql_config ? unmarshalHealthCheckPgsqlConfig(data.pgsql_config) : void 0,
141
+ port: data.port,
142
+ redisConfig: data.redis_config ? unmarshalHealthCheckRedisConfig(data.redis_config) : void 0,
143
+ tcpConfig: data.tcp_config ? unmarshalHealthCheckTcpConfig(data.tcp_config) : void 0,
144
+ transientCheckDelay: data.transient_check_delay
145
+ };
146
+ };
147
+ const unmarshalInstance = (data) => {
148
+ if (!isJSONObject(data)) {
149
+ throw new TypeError(
150
+ `Unmarshalling the type 'Instance' failed as data isn't a dictionary.`
151
+ );
152
+ }
153
+ return {
154
+ createdAt: unmarshalDate(data.created_at),
155
+ id: data.id,
156
+ ipAddress: data.ip_address,
157
+ region: data.region,
158
+ status: data.status,
159
+ updatedAt: unmarshalDate(data.updated_at),
160
+ zone: data.zone
161
+ };
162
+ };
163
+ const unmarshalLb = (data) => {
164
+ if (!isJSONObject(data)) {
165
+ throw new TypeError(
166
+ `Unmarshalling the type 'Lb' failed as data isn't a dictionary.`
167
+ );
168
+ }
169
+ return {
170
+ backendCount: data.backend_count,
171
+ createdAt: unmarshalDate(data.created_at),
172
+ description: data.description,
173
+ frontendCount: data.frontend_count,
174
+ id: data.id,
175
+ instances: unmarshalArrayOfObject(data.instances, unmarshalInstance),
176
+ ip: unmarshalArrayOfObject(data.ip, unmarshalIp),
177
+ name: data.name,
178
+ organizationId: data.organization_id,
179
+ privateNetworkCount: data.private_network_count,
180
+ projectId: data.project_id,
181
+ region: data.region,
182
+ routeCount: data.route_count,
183
+ sslCompatibilityLevel: data.ssl_compatibility_level,
184
+ status: data.status,
185
+ subscriber: data.subscriber ? unmarshalSubscriber(data.subscriber) : void 0,
186
+ tags: data.tags,
187
+ type: data.type,
188
+ updatedAt: unmarshalDate(data.updated_at),
189
+ zone: data.zone
190
+ };
191
+ };
192
+ const unmarshalBackend = (data) => {
193
+ if (!isJSONObject(data)) {
194
+ throw new TypeError(
195
+ `Unmarshalling the type 'Backend' failed as data isn't a dictionary.`
196
+ );
197
+ }
198
+ return {
199
+ createdAt: unmarshalDate(data.created_at),
200
+ failoverHost: data.failover_host,
201
+ forwardPort: data.forward_port,
202
+ forwardPortAlgorithm: data.forward_port_algorithm,
203
+ forwardProtocol: data.forward_protocol,
204
+ healthCheck: data.health_check ? unmarshalHealthCheck(data.health_check) : void 0,
205
+ id: data.id,
206
+ ignoreSslServerVerify: data.ignore_ssl_server_verify,
207
+ lb: data.lb ? unmarshalLb(data.lb) : void 0,
208
+ maxConnections: data.max_connections,
209
+ maxRetries: data.max_retries,
210
+ name: data.name,
211
+ onMarkedDownAction: data.on_marked_down_action,
212
+ pool: data.pool,
213
+ proxyProtocol: data.proxy_protocol,
214
+ redispatchAttemptCount: data.redispatch_attempt_count,
215
+ sendProxyV2: data.send_proxy_v2,
216
+ sslBridging: data.ssl_bridging,
217
+ stickySessions: data.sticky_sessions,
218
+ stickySessionsCookieName: data.sticky_sessions_cookie_name,
219
+ timeoutConnect: data.timeout_connect,
220
+ timeoutQueue: data.timeout_queue,
221
+ timeoutServer: data.timeout_server,
222
+ timeoutTunnel: data.timeout_tunnel,
223
+ updatedAt: unmarshalDate(data.updated_at)
224
+ };
225
+ };
226
+ const unmarshalCertificate = (data) => {
227
+ if (!isJSONObject(data)) {
228
+ throw new TypeError(
229
+ `Unmarshalling the type 'Certificate' failed as data isn't a dictionary.`
230
+ );
231
+ }
232
+ return {
233
+ commonName: data.common_name,
234
+ createdAt: unmarshalDate(data.created_at),
235
+ fingerprint: data.fingerprint,
236
+ id: data.id,
237
+ lb: data.lb ? unmarshalLb(data.lb) : void 0,
238
+ name: data.name,
239
+ notValidAfter: unmarshalDate(data.not_valid_after),
240
+ notValidBefore: unmarshalDate(data.not_valid_before),
241
+ status: data.status,
242
+ statusDetails: data.status_details,
243
+ subjectAlternativeName: data.subject_alternative_name,
244
+ type: data.type,
245
+ updatedAt: unmarshalDate(data.updated_at)
246
+ };
247
+ };
248
+ const unmarshalFrontend = (data) => {
249
+ if (!isJSONObject(data)) {
250
+ throw new TypeError(
251
+ `Unmarshalling the type 'Frontend' failed as data isn't a dictionary.`
252
+ );
253
+ }
254
+ return {
255
+ backend: data.backend ? unmarshalBackend(data.backend) : void 0,
256
+ certificate: data.certificate ? unmarshalCertificate(data.certificate) : void 0,
257
+ certificateIds: data.certificate_ids,
258
+ connectionRateLimit: data.connection_rate_limit,
259
+ createdAt: unmarshalDate(data.created_at),
260
+ enableHttp3: data.enable_http3,
261
+ id: data.id,
262
+ inboundPort: data.inbound_port,
263
+ lb: data.lb ? unmarshalLb(data.lb) : void 0,
264
+ name: data.name,
265
+ timeoutClient: data.timeout_client,
266
+ updatedAt: unmarshalDate(data.updated_at)
267
+ };
268
+ };
269
+ const unmarshalAclActionRedirect = (data) => {
270
+ if (!isJSONObject(data)) {
271
+ throw new TypeError(
272
+ `Unmarshalling the type 'AclActionRedirect' failed as data isn't a dictionary.`
273
+ );
274
+ }
275
+ return {
276
+ code: data.code,
277
+ target: data.target,
278
+ type: data.type
279
+ };
280
+ };
281
+ const unmarshalAclAction = (data) => {
282
+ if (!isJSONObject(data)) {
283
+ throw new TypeError(
284
+ `Unmarshalling the type 'AclAction' failed as data isn't a dictionary.`
285
+ );
286
+ }
287
+ return {
288
+ redirect: data.redirect ? unmarshalAclActionRedirect(data.redirect) : void 0,
289
+ type: data.type
290
+ };
291
+ };
292
+ const unmarshalAclMatch = (data) => {
293
+ if (!isJSONObject(data)) {
294
+ throw new TypeError(
295
+ `Unmarshalling the type 'AclMatch' failed as data isn't a dictionary.`
296
+ );
297
+ }
298
+ return {
299
+ httpFilter: data.http_filter,
300
+ httpFilterOption: data.http_filter_option,
301
+ httpFilterValue: data.http_filter_value,
302
+ invert: data.invert,
303
+ ipSubnet: data.ip_subnet,
304
+ ipsEdgeServices: data.ips_edge_services
305
+ };
306
+ };
307
+ const unmarshalAcl = (data) => {
308
+ if (!isJSONObject(data)) {
309
+ throw new TypeError(
310
+ `Unmarshalling the type 'Acl' failed as data isn't a dictionary.`
311
+ );
312
+ }
313
+ return {
314
+ action: data.action ? unmarshalAclAction(data.action) : void 0,
315
+ createdAt: unmarshalDate(data.created_at),
316
+ description: data.description,
317
+ frontend: data.frontend ? unmarshalFrontend(data.frontend) : void 0,
318
+ id: data.id,
319
+ index: data.index,
320
+ match: data.match ? unmarshalAclMatch(data.match) : void 0,
321
+ name: data.name,
322
+ updatedAt: unmarshalDate(data.updated_at)
323
+ };
324
+ };
325
+ const unmarshalPrivateNetworkDHCPConfig = (data) => {
326
+ if (!isJSONObject(data)) {
327
+ throw new TypeError(
328
+ `Unmarshalling the type 'PrivateNetworkDHCPConfig' failed as data isn't a dictionary.`
329
+ );
330
+ }
331
+ return {
332
+ ipId: data.ip_id
333
+ };
334
+ };
335
+ const unmarshalPrivateNetworkIpamConfig = (data) => {
336
+ if (!isJSONObject(data)) {
337
+ throw new TypeError(
338
+ `Unmarshalling the type 'PrivateNetworkIpamConfig' failed as data isn't a dictionary.`
339
+ );
340
+ }
341
+ return {};
342
+ };
343
+ const unmarshalPrivateNetworkStaticConfig = (data) => {
344
+ if (!isJSONObject(data)) {
345
+ throw new TypeError(
346
+ `Unmarshalling the type 'PrivateNetworkStaticConfig' failed as data isn't a dictionary.`
347
+ );
348
+ }
349
+ return {
350
+ ipAddress: data.ip_address ? data.ip_address : void 0
351
+ };
352
+ };
353
+ const unmarshalPrivateNetwork = (data) => {
354
+ if (!isJSONObject(data)) {
355
+ throw new TypeError(
356
+ `Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`
357
+ );
358
+ }
359
+ return {
360
+ createdAt: unmarshalDate(data.created_at),
361
+ dhcpConfig: data.dhcp_config ? unmarshalPrivateNetworkDHCPConfig(data.dhcp_config) : void 0,
362
+ ipamConfig: data.ipam_config ? unmarshalPrivateNetworkIpamConfig(data.ipam_config) : void 0,
363
+ ipamIds: data.ipam_ids,
364
+ lb: data.lb ? unmarshalLb(data.lb) : void 0,
365
+ privateNetworkId: data.private_network_id,
366
+ staticConfig: data.static_config ? unmarshalPrivateNetworkStaticConfig(data.static_config) : void 0,
367
+ status: data.status,
368
+ updatedAt: unmarshalDate(data.updated_at)
369
+ };
370
+ };
371
+ const unmarshalRouteMatch = (data) => {
372
+ if (!isJSONObject(data)) {
373
+ throw new TypeError(
374
+ `Unmarshalling the type 'RouteMatch' failed as data isn't a dictionary.`
375
+ );
376
+ }
377
+ return {
378
+ hostHeader: data.host_header,
379
+ matchSubdomains: data.match_subdomains,
380
+ sni: data.sni
381
+ };
382
+ };
383
+ const unmarshalRoute = (data) => {
384
+ if (!isJSONObject(data)) {
385
+ throw new TypeError(
386
+ `Unmarshalling the type 'Route' failed as data isn't a dictionary.`
387
+ );
388
+ }
389
+ return {
390
+ backendId: data.backend_id,
391
+ createdAt: unmarshalDate(data.created_at),
392
+ frontendId: data.frontend_id,
393
+ id: data.id,
394
+ match: data.match ? unmarshalRouteMatch(data.match) : void 0,
395
+ updatedAt: unmarshalDate(data.updated_at)
396
+ };
397
+ };
398
+ const unmarshalBackendServerStats = (data) => {
399
+ if (!isJSONObject(data)) {
400
+ throw new TypeError(
401
+ `Unmarshalling the type 'BackendServerStats' failed as data isn't a dictionary.`
402
+ );
403
+ }
404
+ return {
405
+ backendId: data.backend_id,
406
+ instanceId: data.instance_id,
407
+ ip: data.ip,
408
+ lastHealthCheckStatus: data.last_health_check_status,
409
+ serverState: data.server_state,
410
+ serverStateChangedAt: unmarshalDate(data.server_state_changed_at)
411
+ };
412
+ };
413
+ const unmarshalLbStats = (data) => {
414
+ if (!isJSONObject(data)) {
415
+ throw new TypeError(
416
+ `Unmarshalling the type 'LbStats' failed as data isn't a dictionary.`
417
+ );
418
+ }
419
+ return {
420
+ backendServersStats: unmarshalArrayOfObject(
421
+ data.backend_servers_stats,
422
+ unmarshalBackendServerStats
423
+ )
424
+ };
425
+ };
426
+ const unmarshalListAclResponse = (data) => {
427
+ if (!isJSONObject(data)) {
428
+ throw new TypeError(
429
+ `Unmarshalling the type 'ListAclResponse' failed as data isn't a dictionary.`
430
+ );
431
+ }
432
+ return {
433
+ acls: unmarshalArrayOfObject(data.acls, unmarshalAcl),
434
+ totalCount: data.total_count
435
+ };
436
+ };
437
+ const unmarshalListBackendStatsResponse = (data) => {
438
+ if (!isJSONObject(data)) {
439
+ throw new TypeError(
440
+ `Unmarshalling the type 'ListBackendStatsResponse' failed as data isn't a dictionary.`
441
+ );
442
+ }
443
+ return {
444
+ backendServersStats: unmarshalArrayOfObject(
445
+ data.backend_servers_stats,
446
+ unmarshalBackendServerStats
447
+ ),
448
+ totalCount: data.total_count
449
+ };
450
+ };
451
+ const unmarshalListBackendsResponse = (data) => {
452
+ if (!isJSONObject(data)) {
453
+ throw new TypeError(
454
+ `Unmarshalling the type 'ListBackendsResponse' failed as data isn't a dictionary.`
455
+ );
456
+ }
457
+ return {
458
+ backends: unmarshalArrayOfObject(data.backends, unmarshalBackend),
459
+ totalCount: data.total_count
460
+ };
461
+ };
462
+ const unmarshalListCertificatesResponse = (data) => {
463
+ if (!isJSONObject(data)) {
464
+ throw new TypeError(
465
+ `Unmarshalling the type 'ListCertificatesResponse' failed as data isn't a dictionary.`
466
+ );
467
+ }
468
+ return {
469
+ certificates: unmarshalArrayOfObject(
470
+ data.certificates,
471
+ unmarshalCertificate
472
+ ),
473
+ totalCount: data.total_count
474
+ };
475
+ };
476
+ const unmarshalListFrontendsResponse = (data) => {
477
+ if (!isJSONObject(data)) {
478
+ throw new TypeError(
479
+ `Unmarshalling the type 'ListFrontendsResponse' failed as data isn't a dictionary.`
480
+ );
481
+ }
482
+ return {
483
+ frontends: unmarshalArrayOfObject(data.frontends, unmarshalFrontend),
484
+ totalCount: data.total_count
485
+ };
486
+ };
487
+ const unmarshalListIpsResponse = (data) => {
488
+ if (!isJSONObject(data)) {
489
+ throw new TypeError(
490
+ `Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`
491
+ );
492
+ }
493
+ return {
494
+ ips: unmarshalArrayOfObject(data.ips, unmarshalIp),
495
+ totalCount: data.total_count
496
+ };
497
+ };
498
+ const unmarshalListLbPrivateNetworksResponse = (data) => {
499
+ if (!isJSONObject(data)) {
500
+ throw new TypeError(
501
+ `Unmarshalling the type 'ListLbPrivateNetworksResponse' failed as data isn't a dictionary.`
502
+ );
503
+ }
504
+ return {
505
+ privateNetwork: unmarshalArrayOfObject(
506
+ data.private_network,
507
+ unmarshalPrivateNetwork
508
+ ),
509
+ totalCount: data.total_count
510
+ };
511
+ };
512
+ const unmarshalLbType = (data) => {
513
+ if (!isJSONObject(data)) {
514
+ throw new TypeError(
515
+ `Unmarshalling the type 'LbType' failed as data isn't a dictionary.`
516
+ );
517
+ }
518
+ return {
519
+ description: data.description,
520
+ name: data.name,
521
+ region: data.region,
522
+ stockStatus: data.stock_status,
523
+ zone: data.zone
524
+ };
525
+ };
526
+ const unmarshalListLbTypesResponse = (data) => {
527
+ if (!isJSONObject(data)) {
528
+ throw new TypeError(
529
+ `Unmarshalling the type 'ListLbTypesResponse' failed as data isn't a dictionary.`
530
+ );
531
+ }
532
+ return {
533
+ lbTypes: unmarshalArrayOfObject(data.lb_types, unmarshalLbType),
534
+ totalCount: data.total_count
535
+ };
536
+ };
537
+ const unmarshalListLbsResponse = (data) => {
538
+ if (!isJSONObject(data)) {
539
+ throw new TypeError(
540
+ `Unmarshalling the type 'ListLbsResponse' failed as data isn't a dictionary.`
541
+ );
542
+ }
543
+ return {
544
+ lbs: unmarshalArrayOfObject(data.lbs, unmarshalLb),
545
+ totalCount: data.total_count
546
+ };
547
+ };
548
+ const unmarshalListRoutesResponse = (data) => {
549
+ if (!isJSONObject(data)) {
550
+ throw new TypeError(
551
+ `Unmarshalling the type 'ListRoutesResponse' failed as data isn't a dictionary.`
552
+ );
553
+ }
554
+ return {
555
+ routes: unmarshalArrayOfObject(data.routes, unmarshalRoute),
556
+ totalCount: data.total_count
557
+ };
558
+ };
559
+ const unmarshalListSubscriberResponse = (data) => {
560
+ if (!isJSONObject(data)) {
561
+ throw new TypeError(
562
+ `Unmarshalling the type 'ListSubscriberResponse' failed as data isn't a dictionary.`
563
+ );
564
+ }
565
+ return {
566
+ subscribers: unmarshalArrayOfObject(data.subscribers, unmarshalSubscriber),
567
+ totalCount: data.total_count
568
+ };
569
+ };
570
+ const unmarshalSetAclsResponse = (data) => {
571
+ if (!isJSONObject(data)) {
572
+ throw new TypeError(
573
+ `Unmarshalling the type 'SetAclsResponse' failed as data isn't a dictionary.`
574
+ );
575
+ }
576
+ return {
577
+ acls: unmarshalArrayOfObject(data.acls, unmarshalAcl),
578
+ totalCount: data.total_count
579
+ };
580
+ };
581
+ const marshalAddBackendServersRequest = (request, defaults) => ({
582
+ server_ip: request.serverIp
583
+ });
584
+ const marshalPrivateNetworkDHCPConfig = (request, defaults) => ({
585
+ ip_id: request.ipId
586
+ });
587
+ const marshalPrivateNetworkIpamConfig = (request, defaults) => ({});
588
+ const marshalPrivateNetworkStaticConfig = (request, defaults) => ({
589
+ ip_address: request.ipAddress
590
+ });
591
+ const marshalAttachPrivateNetworkRequest = (request, defaults) => ({
592
+ ipam_ids: request.ipamIds,
593
+ ...resolveOneOf([
594
+ {
595
+ param: "static_config",
596
+ value: request.staticConfig !== void 0 ? marshalPrivateNetworkStaticConfig(request.staticConfig) : void 0
597
+ },
598
+ {
599
+ param: "dhcp_config",
600
+ value: request.dhcpConfig !== void 0 ? marshalPrivateNetworkDHCPConfig(request.dhcpConfig) : void 0
601
+ },
602
+ {
603
+ param: "ipam_config",
604
+ value: request.ipamConfig !== void 0 ? marshalPrivateNetworkIpamConfig(request.ipamConfig) : void 0
605
+ }
606
+ ])
607
+ });
608
+ const marshalAclActionRedirect = (request, defaults) => ({
609
+ code: request.code,
610
+ target: request.target,
611
+ type: request.type
612
+ });
613
+ const marshalAclAction = (request, defaults) => ({
614
+ redirect: request.redirect !== void 0 ? marshalAclActionRedirect(request.redirect) : void 0,
615
+ type: request.type
616
+ });
617
+ const marshalAclMatch = (request, defaults) => ({
618
+ http_filter: request.httpFilter,
619
+ http_filter_option: request.httpFilterOption,
620
+ http_filter_value: request.httpFilterValue,
621
+ invert: request.invert,
622
+ ip_subnet: request.ipSubnet,
623
+ ips_edge_services: request.ipsEdgeServices
624
+ });
625
+ const marshalCreateAclRequest = (request, defaults) => ({
626
+ action: marshalAclAction(request.action),
627
+ description: request.description,
628
+ index: request.index,
629
+ match: request.match !== void 0 ? marshalAclMatch(request.match) : void 0,
630
+ name: request.name || randomName("acl")
631
+ });
632
+ const marshalHealthCheckHttpConfig = (request, defaults) => ({
633
+ code: request.code,
634
+ host_header: request.hostHeader,
635
+ method: request.method,
636
+ uri: request.uri
637
+ });
638
+ const marshalHealthCheckHttpsConfig = (request, defaults) => ({
639
+ code: request.code,
640
+ host_header: request.hostHeader,
641
+ method: request.method,
642
+ sni: request.sni,
643
+ uri: request.uri
644
+ });
645
+ const marshalHealthCheckLdapConfig = (request, defaults) => ({});
646
+ const marshalHealthCheckMysqlConfig = (request, defaults) => ({
647
+ user: request.user
648
+ });
649
+ const marshalHealthCheckPgsqlConfig = (request, defaults) => ({
650
+ user: request.user
651
+ });
652
+ const marshalHealthCheckRedisConfig = (request, defaults) => ({});
653
+ const marshalHealthCheckTcpConfig = (request, defaults) => ({});
654
+ const marshalHealthCheck = (request, defaults) => ({
655
+ check_delay: request.checkDelay,
656
+ check_max_retries: request.checkMaxRetries,
657
+ check_send_proxy: request.checkSendProxy,
658
+ check_timeout: request.checkTimeout,
659
+ port: request.port,
660
+ transient_check_delay: request.transientCheckDelay,
661
+ ...resolveOneOf([
662
+ {
663
+ param: "tcp_config",
664
+ value: request.tcpConfig !== void 0 ? marshalHealthCheckTcpConfig(request.tcpConfig) : void 0
665
+ },
666
+ {
667
+ param: "mysql_config",
668
+ value: request.mysqlConfig !== void 0 ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : void 0
669
+ },
670
+ {
671
+ param: "pgsql_config",
672
+ value: request.pgsqlConfig !== void 0 ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : void 0
673
+ },
674
+ {
675
+ param: "ldap_config",
676
+ value: request.ldapConfig !== void 0 ? marshalHealthCheckLdapConfig(request.ldapConfig) : void 0
677
+ },
678
+ {
679
+ param: "redis_config",
680
+ value: request.redisConfig !== void 0 ? marshalHealthCheckRedisConfig(request.redisConfig) : void 0
681
+ },
682
+ {
683
+ param: "http_config",
684
+ value: request.httpConfig !== void 0 ? marshalHealthCheckHttpConfig(request.httpConfig) : void 0
685
+ },
686
+ {
687
+ param: "https_config",
688
+ value: request.httpsConfig !== void 0 ? marshalHealthCheckHttpsConfig(request.httpsConfig) : void 0
689
+ }
690
+ ])
691
+ });
692
+ const marshalCreateBackendRequest = (request, defaults) => ({
693
+ failover_host: request.failoverHost,
694
+ forward_port: request.forwardPort,
695
+ forward_port_algorithm: request.forwardPortAlgorithm,
696
+ forward_protocol: request.forwardProtocol,
697
+ health_check: marshalHealthCheck(request.healthCheck),
698
+ ignore_ssl_server_verify: request.ignoreSslServerVerify,
699
+ max_connections: request.maxConnections,
700
+ max_retries: request.maxRetries,
701
+ name: request.name || randomName("lbb"),
702
+ on_marked_down_action: request.onMarkedDownAction,
703
+ proxy_protocol: request.proxyProtocol,
704
+ redispatch_attempt_count: request.redispatchAttemptCount,
705
+ send_proxy_v2: request.sendProxyV2,
706
+ server_ip: request.serverIp,
707
+ ssl_bridging: request.sslBridging,
708
+ sticky_sessions: request.stickySessions,
709
+ sticky_sessions_cookie_name: request.stickySessionsCookieName,
710
+ timeout_connect: request.timeoutConnect,
711
+ timeout_queue: request.timeoutQueue,
712
+ timeout_server: request.timeoutServer,
713
+ timeout_tunnel: request.timeoutTunnel
714
+ });
715
+ const marshalCreateCertificateRequestCustomCertificate = (request, defaults) => ({
716
+ certificate_chain: request.certificateChain
717
+ });
718
+ const marshalCreateCertificateRequestLetsencryptConfig = (request, defaults) => ({
719
+ common_name: request.commonName,
720
+ subject_alternative_name: request.subjectAlternativeName
721
+ });
722
+ const marshalCreateCertificateRequest = (request, defaults) => ({
723
+ name: request.name || randomName("certificate"),
724
+ ...resolveOneOf([
725
+ {
726
+ param: "letsencrypt",
727
+ value: request.letsencrypt !== void 0 ? marshalCreateCertificateRequestLetsencryptConfig(
728
+ request.letsencrypt
729
+ ) : void 0
730
+ },
731
+ {
732
+ param: "custom_certificate",
733
+ value: request.customCertificate !== void 0 ? marshalCreateCertificateRequestCustomCertificate(
734
+ request.customCertificate
735
+ ) : void 0
736
+ }
737
+ ])
738
+ });
739
+ const marshalCreateFrontendRequest = (request, defaults) => ({
740
+ backend_id: request.backendId,
741
+ certificate_id: request.certificateId,
742
+ certificate_ids: request.certificateIds,
743
+ connection_rate_limit: request.connectionRateLimit,
744
+ enable_http3: request.enableHttp3,
745
+ inbound_port: request.inboundPort,
746
+ name: request.name || randomName("lbf"),
747
+ timeout_client: request.timeoutClient
748
+ });
749
+ const marshalCreateIpRequest = (request, defaults) => ({
750
+ is_ipv6: request.isIpv6,
751
+ reverse: request.reverse,
752
+ tags: request.tags,
753
+ ...resolveOneOf([
754
+ {
755
+ default: defaults.defaultProjectId,
756
+ param: "project_id",
757
+ value: request.projectId
758
+ },
759
+ {
760
+ default: defaults.defaultOrganizationId,
761
+ param: "organization_id",
762
+ value: request.organizationId
763
+ }
764
+ ])
765
+ });
766
+ const marshalCreateLbRequest = (request, defaults) => ({
767
+ assign_flexible_ip: request.assignFlexibleIp,
768
+ assign_flexible_ipv6: request.assignFlexibleIpv6,
769
+ description: request.description,
770
+ ip_id: request.ipId,
771
+ ip_ids: request.ipIds,
772
+ name: request.name || randomName("lb"),
773
+ ssl_compatibility_level: request.sslCompatibilityLevel,
774
+ tags: request.tags,
775
+ type: request.type,
776
+ ...resolveOneOf([
777
+ {
778
+ default: defaults.defaultProjectId,
779
+ param: "project_id",
780
+ value: request.projectId
781
+ },
782
+ {
783
+ default: defaults.defaultOrganizationId,
784
+ param: "organization_id",
785
+ value: request.organizationId
786
+ }
787
+ ])
788
+ });
789
+ const marshalRouteMatch = (request, defaults) => ({
790
+ match_subdomains: request.matchSubdomains,
791
+ ...resolveOneOf([
792
+ { param: "sni", value: request.sni },
793
+ { param: "host_header", value: request.hostHeader }
794
+ ])
795
+ });
796
+ const marshalCreateRouteRequest = (request, defaults) => ({
797
+ backend_id: request.backendId,
798
+ frontend_id: request.frontendId,
799
+ match: request.match !== void 0 ? marshalRouteMatch(request.match) : void 0
800
+ });
801
+ const marshalSubscriberEmailConfig = (request, defaults) => ({
802
+ email: request.email
803
+ });
804
+ const marshalSubscriberWebhookConfig = (request, defaults) => ({
805
+ uri: request.uri
806
+ });
807
+ const marshalCreateSubscriberRequest = (request, defaults) => ({
808
+ name: request.name,
809
+ ...resolveOneOf([
810
+ {
811
+ default: defaults.defaultProjectId,
812
+ param: "project_id",
813
+ value: request.projectId
814
+ },
815
+ {
816
+ default: defaults.defaultOrganizationId,
817
+ param: "organization_id",
818
+ value: request.organizationId
819
+ }
820
+ ]),
821
+ ...resolveOneOf([
822
+ {
823
+ param: "email_config",
824
+ value: request.emailConfig !== void 0 ? marshalSubscriberEmailConfig(request.emailConfig) : void 0
825
+ },
826
+ {
827
+ param: "webhook_config",
828
+ value: request.webhookConfig !== void 0 ? marshalSubscriberWebhookConfig(request.webhookConfig) : void 0
829
+ }
830
+ ])
831
+ });
832
+ const marshalMigrateLbRequest = (request, defaults) => ({
833
+ type: request.type
834
+ });
835
+ const marshalRemoveBackendServersRequest = (request, defaults) => ({
836
+ server_ip: request.serverIp
837
+ });
838
+ const marshalSetBackendServersRequest = (request, defaults) => ({
839
+ server_ip: request.serverIp
840
+ });
841
+ const marshalSubscribeToLbRequest = (request, defaults) => ({
842
+ subscriber_id: request.subscriberId
843
+ });
844
+ const marshalUpdateAclRequest = (request, defaults) => ({
845
+ action: marshalAclAction(request.action),
846
+ description: request.description,
847
+ index: request.index,
848
+ match: request.match !== void 0 ? marshalAclMatch(request.match) : void 0,
849
+ name: request.name
850
+ });
851
+ const marshalUpdateBackendRequest = (request, defaults) => ({
852
+ failover_host: request.failoverHost,
853
+ forward_port: request.forwardPort,
854
+ forward_port_algorithm: request.forwardPortAlgorithm,
855
+ forward_protocol: request.forwardProtocol,
856
+ ignore_ssl_server_verify: request.ignoreSslServerVerify,
857
+ max_connections: request.maxConnections,
858
+ max_retries: request.maxRetries,
859
+ name: request.name,
860
+ on_marked_down_action: request.onMarkedDownAction,
861
+ proxy_protocol: request.proxyProtocol,
862
+ redispatch_attempt_count: request.redispatchAttemptCount,
863
+ send_proxy_v2: request.sendProxyV2,
864
+ ssl_bridging: request.sslBridging,
865
+ sticky_sessions: request.stickySessions,
866
+ sticky_sessions_cookie_name: request.stickySessionsCookieName,
867
+ timeout_connect: request.timeoutConnect,
868
+ timeout_queue: request.timeoutQueue,
869
+ timeout_server: request.timeoutServer,
870
+ timeout_tunnel: request.timeoutTunnel
871
+ });
872
+ const marshalUpdateCertificateRequest = (request, defaults) => ({
873
+ name: request.name
874
+ });
875
+ const marshalUpdateFrontendRequest = (request, defaults) => ({
876
+ backend_id: request.backendId,
877
+ certificate_id: request.certificateId,
878
+ certificate_ids: request.certificateIds,
879
+ connection_rate_limit: request.connectionRateLimit,
880
+ enable_http3: request.enableHttp3,
881
+ inbound_port: request.inboundPort,
882
+ name: request.name,
883
+ timeout_client: request.timeoutClient
884
+ });
885
+ const marshalUpdateHealthCheckRequest = (request, defaults) => ({
886
+ check_delay: request.checkDelay,
887
+ check_max_retries: request.checkMaxRetries,
888
+ check_send_proxy: request.checkSendProxy,
889
+ check_timeout: request.checkTimeout,
890
+ port: request.port,
891
+ transient_check_delay: request.transientCheckDelay,
892
+ ...resolveOneOf([
893
+ {
894
+ param: "tcp_config",
895
+ value: request.tcpConfig !== void 0 ? marshalHealthCheckTcpConfig(request.tcpConfig) : void 0
896
+ },
897
+ {
898
+ param: "mysql_config",
899
+ value: request.mysqlConfig !== void 0 ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : void 0
900
+ },
901
+ {
902
+ param: "pgsql_config",
903
+ value: request.pgsqlConfig !== void 0 ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : void 0
904
+ },
905
+ {
906
+ param: "ldap_config",
907
+ value: request.ldapConfig !== void 0 ? marshalHealthCheckLdapConfig(request.ldapConfig) : void 0
908
+ },
909
+ {
910
+ param: "redis_config",
911
+ value: request.redisConfig !== void 0 ? marshalHealthCheckRedisConfig(request.redisConfig) : void 0
912
+ },
913
+ {
914
+ param: "http_config",
915
+ value: request.httpConfig !== void 0 ? marshalHealthCheckHttpConfig(request.httpConfig) : void 0
916
+ },
917
+ {
918
+ param: "https_config",
919
+ value: request.httpsConfig !== void 0 ? marshalHealthCheckHttpsConfig(request.httpsConfig) : void 0
920
+ }
921
+ ])
922
+ });
923
+ const marshalUpdateIpRequest = (request, defaults) => ({
924
+ lb_id: request.lbId,
925
+ reverse: request.reverse,
926
+ tags: request.tags
927
+ });
928
+ const marshalUpdateLbRequest = (request, defaults) => ({
929
+ description: request.description,
930
+ name: request.name,
931
+ ssl_compatibility_level: request.sslCompatibilityLevel,
932
+ tags: request.tags
933
+ });
934
+ const marshalUpdateRouteRequest = (request, defaults) => ({
935
+ backend_id: request.backendId,
936
+ match: request.match !== void 0 ? marshalRouteMatch(request.match) : void 0
937
+ });
938
+ const marshalUpdateSubscriberRequest = (request, defaults) => ({
939
+ name: request.name,
940
+ ...resolveOneOf([
941
+ {
942
+ param: "email_config",
943
+ value: request.emailConfig !== void 0 ? marshalSubscriberEmailConfig(request.emailConfig) : void 0
944
+ },
945
+ {
946
+ param: "webhook_config",
947
+ value: request.webhookConfig !== void 0 ? marshalSubscriberWebhookConfig(request.webhookConfig) : void 0
948
+ }
949
+ ])
950
+ });
951
+ const marshalZonedApiAddBackendServersRequest = (request, defaults) => ({
952
+ server_ip: request.serverIp
953
+ });
954
+ const marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({
955
+ ipam_ids: request.ipamIds,
956
+ private_network_id: request.privateNetworkId,
957
+ ...resolveOneOf([
958
+ {
959
+ param: "static_config",
960
+ value: request.staticConfig !== void 0 ? marshalPrivateNetworkStaticConfig(request.staticConfig) : void 0
961
+ },
962
+ {
963
+ param: "dhcp_config",
964
+ value: request.dhcpConfig !== void 0 ? marshalPrivateNetworkDHCPConfig(request.dhcpConfig) : void 0
965
+ },
966
+ {
967
+ param: "ipam_config",
968
+ value: request.ipamConfig !== void 0 ? marshalPrivateNetworkIpamConfig(request.ipamConfig) : void 0
969
+ }
970
+ ])
971
+ });
972
+ const marshalZonedApiCreateAclRequest = (request, defaults) => ({
973
+ action: marshalAclAction(request.action),
974
+ description: request.description,
975
+ index: request.index,
976
+ match: request.match !== void 0 ? marshalAclMatch(request.match) : void 0,
977
+ name: request.name || randomName("acl")
978
+ });
979
+ const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
980
+ failover_host: request.failoverHost,
981
+ forward_port: request.forwardPort,
982
+ forward_port_algorithm: request.forwardPortAlgorithm,
983
+ forward_protocol: request.forwardProtocol,
984
+ health_check: marshalHealthCheck(request.healthCheck),
985
+ ignore_ssl_server_verify: request.ignoreSslServerVerify,
986
+ max_connections: request.maxConnections,
987
+ max_retries: request.maxRetries,
988
+ name: request.name || randomName("lbb"),
989
+ on_marked_down_action: request.onMarkedDownAction,
990
+ proxy_protocol: request.proxyProtocol,
991
+ redispatch_attempt_count: request.redispatchAttemptCount,
992
+ send_proxy_v2: request.sendProxyV2,
993
+ server_ip: request.serverIp,
994
+ ssl_bridging: request.sslBridging,
995
+ sticky_sessions: request.stickySessions,
996
+ sticky_sessions_cookie_name: request.stickySessionsCookieName,
997
+ timeout_connect: request.timeoutConnect,
998
+ timeout_queue: request.timeoutQueue,
999
+ timeout_server: request.timeoutServer,
1000
+ timeout_tunnel: request.timeoutTunnel
1001
+ });
1002
+ const marshalZonedApiCreateCertificateRequest = (request, defaults) => ({
1003
+ name: request.name || randomName("certificate"),
1004
+ ...resolveOneOf([
1005
+ {
1006
+ param: "letsencrypt",
1007
+ value: request.letsencrypt !== void 0 ? marshalCreateCertificateRequestLetsencryptConfig(
1008
+ request.letsencrypt
1009
+ ) : void 0
1010
+ },
1011
+ {
1012
+ param: "custom_certificate",
1013
+ value: request.customCertificate !== void 0 ? marshalCreateCertificateRequestCustomCertificate(
1014
+ request.customCertificate
1015
+ ) : void 0
1016
+ }
1017
+ ])
1018
+ });
1019
+ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
1020
+ backend_id: request.backendId,
1021
+ certificate_id: request.certificateId,
1022
+ certificate_ids: request.certificateIds,
1023
+ connection_rate_limit: request.connectionRateLimit,
1024
+ enable_http3: request.enableHttp3,
1025
+ inbound_port: request.inboundPort,
1026
+ name: request.name || randomName("lbf"),
1027
+ timeout_client: request.timeoutClient
1028
+ });
1029
+ const marshalZonedApiCreateIpRequest = (request, defaults) => ({
1030
+ is_ipv6: request.isIpv6,
1031
+ reverse: request.reverse,
1032
+ tags: request.tags,
1033
+ ...resolveOneOf([
1034
+ {
1035
+ default: defaults.defaultProjectId,
1036
+ param: "project_id",
1037
+ value: request.projectId
1038
+ },
1039
+ {
1040
+ default: defaults.defaultOrganizationId,
1041
+ param: "organization_id",
1042
+ value: request.organizationId
1043
+ }
1044
+ ])
1045
+ });
1046
+ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
1047
+ assign_flexible_ip: request.assignFlexibleIp,
1048
+ assign_flexible_ipv6: request.assignFlexibleIpv6,
1049
+ description: request.description,
1050
+ ip_id: request.ipId,
1051
+ ip_ids: request.ipIds,
1052
+ name: request.name || randomName("lb"),
1053
+ ssl_compatibility_level: request.sslCompatibilityLevel,
1054
+ tags: request.tags,
1055
+ type: request.type,
1056
+ ...resolveOneOf([
1057
+ {
1058
+ default: defaults.defaultProjectId,
1059
+ param: "project_id",
1060
+ value: request.projectId
1061
+ },
1062
+ {
1063
+ default: defaults.defaultOrganizationId,
1064
+ param: "organization_id",
1065
+ value: request.organizationId
1066
+ }
1067
+ ])
1068
+ });
1069
+ const marshalZonedApiCreateRouteRequest = (request, defaults) => ({
1070
+ backend_id: request.backendId,
1071
+ frontend_id: request.frontendId,
1072
+ match: request.match !== void 0 ? marshalRouteMatch(request.match) : void 0
1073
+ });
1074
+ const marshalZonedApiCreateSubscriberRequest = (request, defaults) => ({
1075
+ name: request.name,
1076
+ ...resolveOneOf([
1077
+ {
1078
+ default: defaults.defaultProjectId,
1079
+ param: "project_id",
1080
+ value: request.projectId
1081
+ },
1082
+ {
1083
+ default: defaults.defaultOrganizationId,
1084
+ param: "organization_id",
1085
+ value: request.organizationId
1086
+ }
1087
+ ]),
1088
+ ...resolveOneOf([
1089
+ {
1090
+ param: "email_config",
1091
+ value: request.emailConfig !== void 0 ? marshalSubscriberEmailConfig(request.emailConfig) : void 0
1092
+ },
1093
+ {
1094
+ param: "webhook_config",
1095
+ value: request.webhookConfig !== void 0 ? marshalSubscriberWebhookConfig(request.webhookConfig) : void 0
1096
+ }
1097
+ ])
1098
+ });
1099
+ const marshalZonedApiDetachPrivateNetworkRequest = (request, defaults) => ({
1100
+ private_network_id: request.privateNetworkId
1101
+ });
1102
+ const marshalZonedApiMigrateLbRequest = (request, defaults) => ({
1103
+ type: request.type
1104
+ });
1105
+ const marshalZonedApiRemoveBackendServersRequest = (request, defaults) => ({
1106
+ server_ip: request.serverIp
1107
+ });
1108
+ const marshalAclSpec = (request, defaults) => ({
1109
+ action: marshalAclAction(request.action),
1110
+ description: request.description,
1111
+ index: request.index,
1112
+ match: request.match !== void 0 ? marshalAclMatch(request.match) : void 0,
1113
+ name: request.name
1114
+ });
1115
+ const marshalZonedApiSetAclsRequest = (request, defaults) => ({
1116
+ acls: request.acls.map((elt) => marshalAclSpec(elt))
1117
+ });
1118
+ const marshalZonedApiSetBackendServersRequest = (request, defaults) => ({
1119
+ server_ip: request.serverIp
1120
+ });
1121
+ const marshalZonedApiSubscribeToLbRequest = (request, defaults) => ({
1122
+ subscriber_id: request.subscriberId
1123
+ });
1124
+ const marshalZonedApiUpdateAclRequest = (request, defaults) => ({
1125
+ action: marshalAclAction(request.action),
1126
+ description: request.description,
1127
+ index: request.index,
1128
+ match: request.match !== void 0 ? marshalAclMatch(request.match) : void 0,
1129
+ name: request.name
1130
+ });
1131
+ const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
1132
+ failover_host: request.failoverHost,
1133
+ forward_port: request.forwardPort,
1134
+ forward_port_algorithm: request.forwardPortAlgorithm,
1135
+ forward_protocol: request.forwardProtocol,
1136
+ ignore_ssl_server_verify: request.ignoreSslServerVerify,
1137
+ max_connections: request.maxConnections,
1138
+ max_retries: request.maxRetries,
1139
+ name: request.name,
1140
+ on_marked_down_action: request.onMarkedDownAction,
1141
+ proxy_protocol: request.proxyProtocol,
1142
+ redispatch_attempt_count: request.redispatchAttemptCount,
1143
+ send_proxy_v2: request.sendProxyV2,
1144
+ ssl_bridging: request.sslBridging,
1145
+ sticky_sessions: request.stickySessions,
1146
+ sticky_sessions_cookie_name: request.stickySessionsCookieName,
1147
+ timeout_connect: request.timeoutConnect,
1148
+ timeout_queue: request.timeoutQueue,
1149
+ timeout_server: request.timeoutServer,
1150
+ timeout_tunnel: request.timeoutTunnel
1151
+ });
1152
+ const marshalZonedApiUpdateCertificateRequest = (request, defaults) => ({
1153
+ name: request.name
1154
+ });
1155
+ const marshalZonedApiUpdateFrontendRequest = (request, defaults) => ({
1156
+ backend_id: request.backendId,
1157
+ certificate_id: request.certificateId,
1158
+ certificate_ids: request.certificateIds,
1159
+ connection_rate_limit: request.connectionRateLimit,
1160
+ enable_http3: request.enableHttp3,
1161
+ inbound_port: request.inboundPort,
1162
+ name: request.name,
1163
+ timeout_client: request.timeoutClient
1164
+ });
1165
+ const marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
1166
+ check_delay: request.checkDelay,
1167
+ check_max_retries: request.checkMaxRetries,
1168
+ check_send_proxy: request.checkSendProxy,
1169
+ check_timeout: request.checkTimeout,
1170
+ port: request.port,
1171
+ transient_check_delay: request.transientCheckDelay,
1172
+ ...resolveOneOf([
1173
+ {
1174
+ param: "tcp_config",
1175
+ value: request.tcpConfig !== void 0 ? marshalHealthCheckTcpConfig(request.tcpConfig) : void 0
1176
+ },
1177
+ {
1178
+ param: "mysql_config",
1179
+ value: request.mysqlConfig !== void 0 ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : void 0
1180
+ },
1181
+ {
1182
+ param: "pgsql_config",
1183
+ value: request.pgsqlConfig !== void 0 ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : void 0
1184
+ },
1185
+ {
1186
+ param: "ldap_config",
1187
+ value: request.ldapConfig !== void 0 ? marshalHealthCheckLdapConfig(request.ldapConfig) : void 0
1188
+ },
1189
+ {
1190
+ param: "redis_config",
1191
+ value: request.redisConfig !== void 0 ? marshalHealthCheckRedisConfig(request.redisConfig) : void 0
1192
+ },
1193
+ {
1194
+ param: "http_config",
1195
+ value: request.httpConfig !== void 0 ? marshalHealthCheckHttpConfig(request.httpConfig) : void 0
1196
+ },
1197
+ {
1198
+ param: "https_config",
1199
+ value: request.httpsConfig !== void 0 ? marshalHealthCheckHttpsConfig(request.httpsConfig) : void 0
1200
+ }
1201
+ ])
1202
+ });
1203
+ const marshalZonedApiUpdateIpRequest = (request, defaults) => ({
1204
+ lb_id: request.lbId,
1205
+ reverse: request.reverse,
1206
+ tags: request.tags
1207
+ });
1208
+ const marshalZonedApiUpdateLbRequest = (request, defaults) => ({
1209
+ description: request.description,
1210
+ name: request.name,
1211
+ ssl_compatibility_level: request.sslCompatibilityLevel,
1212
+ tags: request.tags
1213
+ });
1214
+ const marshalZonedApiUpdateRouteRequest = (request, defaults) => ({
1215
+ backend_id: request.backendId,
1216
+ match: request.match !== void 0 ? marshalRouteMatch(request.match) : void 0
1217
+ });
1218
+ const marshalZonedApiUpdateSubscriberRequest = (request, defaults) => ({
1219
+ name: request.name,
1220
+ ...resolveOneOf([
1221
+ {
1222
+ param: "email_config",
1223
+ value: request.emailConfig !== void 0 ? marshalSubscriberEmailConfig(request.emailConfig) : void 0
1224
+ },
1225
+ {
1226
+ param: "webhook_config",
1227
+ value: request.webhookConfig !== void 0 ? marshalSubscriberWebhookConfig(request.webhookConfig) : void 0
1228
+ }
1229
+ ])
1230
+ });
1231
+ export {
1232
+ marshalAddBackendServersRequest,
1233
+ marshalAttachPrivateNetworkRequest,
1234
+ marshalCreateAclRequest,
1235
+ marshalCreateBackendRequest,
1236
+ marshalCreateCertificateRequest,
1237
+ marshalCreateFrontendRequest,
1238
+ marshalCreateIpRequest,
1239
+ marshalCreateLbRequest,
1240
+ marshalCreateRouteRequest,
1241
+ marshalCreateSubscriberRequest,
1242
+ marshalMigrateLbRequest,
1243
+ marshalRemoveBackendServersRequest,
1244
+ marshalSetBackendServersRequest,
1245
+ marshalSubscribeToLbRequest,
1246
+ marshalUpdateAclRequest,
1247
+ marshalUpdateBackendRequest,
1248
+ marshalUpdateCertificateRequest,
1249
+ marshalUpdateFrontendRequest,
1250
+ marshalUpdateHealthCheckRequest,
1251
+ marshalUpdateIpRequest,
1252
+ marshalUpdateLbRequest,
1253
+ marshalUpdateRouteRequest,
1254
+ marshalUpdateSubscriberRequest,
1255
+ marshalZonedApiAddBackendServersRequest,
1256
+ marshalZonedApiAttachPrivateNetworkRequest,
1257
+ marshalZonedApiCreateAclRequest,
1258
+ marshalZonedApiCreateBackendRequest,
1259
+ marshalZonedApiCreateCertificateRequest,
1260
+ marshalZonedApiCreateFrontendRequest,
1261
+ marshalZonedApiCreateIpRequest,
1262
+ marshalZonedApiCreateLbRequest,
1263
+ marshalZonedApiCreateRouteRequest,
1264
+ marshalZonedApiCreateSubscriberRequest,
1265
+ marshalZonedApiDetachPrivateNetworkRequest,
1266
+ marshalZonedApiMigrateLbRequest,
1267
+ marshalZonedApiRemoveBackendServersRequest,
1268
+ marshalZonedApiSetAclsRequest,
1269
+ marshalZonedApiSetBackendServersRequest,
1270
+ marshalZonedApiSubscribeToLbRequest,
1271
+ marshalZonedApiUpdateAclRequest,
1272
+ marshalZonedApiUpdateBackendRequest,
1273
+ marshalZonedApiUpdateCertificateRequest,
1274
+ marshalZonedApiUpdateFrontendRequest,
1275
+ marshalZonedApiUpdateHealthCheckRequest,
1276
+ marshalZonedApiUpdateIpRequest,
1277
+ marshalZonedApiUpdateLbRequest,
1278
+ marshalZonedApiUpdateRouteRequest,
1279
+ marshalZonedApiUpdateSubscriberRequest,
1280
+ unmarshalAcl,
1281
+ unmarshalBackend,
1282
+ unmarshalBackendServerStats,
1283
+ unmarshalCertificate,
1284
+ unmarshalFrontend,
1285
+ unmarshalHealthCheck,
1286
+ unmarshalIp,
1287
+ unmarshalLb,
1288
+ unmarshalLbStats,
1289
+ unmarshalListAclResponse,
1290
+ unmarshalListBackendStatsResponse,
1291
+ unmarshalListBackendsResponse,
1292
+ unmarshalListCertificatesResponse,
1293
+ unmarshalListFrontendsResponse,
1294
+ unmarshalListIpsResponse,
1295
+ unmarshalListLbPrivateNetworksResponse,
1296
+ unmarshalListLbTypesResponse,
1297
+ unmarshalListLbsResponse,
1298
+ unmarshalListRoutesResponse,
1299
+ unmarshalListSubscriberResponse,
1300
+ unmarshalPrivateNetwork,
1301
+ unmarshalRoute,
1302
+ unmarshalSetAclsResponse,
1303
+ unmarshalSubscriber
1304
+ };