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