@scaleway/sdk-lb 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
2
  import randomName from "@scaleway/random-name";
3
3
  //#region src/v1/marshalling.gen.ts
4
- var unmarshalIp = (data) => {
4
+ const unmarshalIp = (data) => {
5
5
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`);
6
6
  return {
7
7
  id: data.id,
@@ -15,15 +15,15 @@ var unmarshalIp = (data) => {
15
15
  zone: data.zone
16
16
  };
17
17
  };
18
- var unmarshalSubscriberEmailConfig = (data) => {
18
+ const unmarshalSubscriberEmailConfig = (data) => {
19
19
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SubscriberEmailConfig' failed as data isn't a dictionary.`);
20
20
  return { email: data.email };
21
21
  };
22
- var unmarshalSubscriberWebhookConfig = (data) => {
22
+ const unmarshalSubscriberWebhookConfig = (data) => {
23
23
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SubscriberWebhookConfig' failed as data isn't a dictionary.`);
24
24
  return { uri: data.uri };
25
25
  };
26
- var unmarshalSubscriber = (data) => {
26
+ const unmarshalSubscriber = (data) => {
27
27
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Subscriber' failed as data isn't a dictionary.`);
28
28
  return {
29
29
  emailConfig: data.email_config ? unmarshalSubscriberEmailConfig(data.email_config) : void 0,
@@ -32,7 +32,7 @@ var unmarshalSubscriber = (data) => {
32
32
  webhookConfig: data.webhook_config ? unmarshalSubscriberWebhookConfig(data.webhook_config) : void 0
33
33
  };
34
34
  };
35
- var unmarshalHealthCheckHttpConfig = (data) => {
35
+ const unmarshalHealthCheckHttpConfig = (data) => {
36
36
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HealthCheckHttpConfig' failed as data isn't a dictionary.`);
37
37
  return {
38
38
  code: data.code,
@@ -41,7 +41,7 @@ var unmarshalHealthCheckHttpConfig = (data) => {
41
41
  uri: data.uri
42
42
  };
43
43
  };
44
- var unmarshalHealthCheckHttpsConfig = (data) => {
44
+ const unmarshalHealthCheckHttpsConfig = (data) => {
45
45
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HealthCheckHttpsConfig' failed as data isn't a dictionary.`);
46
46
  return {
47
47
  code: data.code,
@@ -51,27 +51,27 @@ var unmarshalHealthCheckHttpsConfig = (data) => {
51
51
  uri: data.uri
52
52
  };
53
53
  };
54
- var unmarshalHealthCheckLdapConfig = (data) => {
54
+ const unmarshalHealthCheckLdapConfig = (data) => {
55
55
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HealthCheckLdapConfig' failed as data isn't a dictionary.`);
56
56
  return {};
57
57
  };
58
- var unmarshalHealthCheckMysqlConfig = (data) => {
58
+ const unmarshalHealthCheckMysqlConfig = (data) => {
59
59
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HealthCheckMysqlConfig' failed as data isn't a dictionary.`);
60
60
  return { user: data.user };
61
61
  };
62
- var unmarshalHealthCheckPgsqlConfig = (data) => {
62
+ const unmarshalHealthCheckPgsqlConfig = (data) => {
63
63
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HealthCheckPgsqlConfig' failed as data isn't a dictionary.`);
64
64
  return { user: data.user };
65
65
  };
66
- var unmarshalHealthCheckRedisConfig = (data) => {
66
+ const unmarshalHealthCheckRedisConfig = (data) => {
67
67
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HealthCheckRedisConfig' failed as data isn't a dictionary.`);
68
68
  return {};
69
69
  };
70
- var unmarshalHealthCheckTcpConfig = (data) => {
70
+ const unmarshalHealthCheckTcpConfig = (data) => {
71
71
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HealthCheckTcpConfig' failed as data isn't a dictionary.`);
72
72
  return {};
73
73
  };
74
- var unmarshalHealthCheck = (data) => {
74
+ const unmarshalHealthCheck = (data) => {
75
75
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HealthCheck' failed as data isn't a dictionary.`);
76
76
  return {
77
77
  checkDelay: data.check_delay,
@@ -89,7 +89,7 @@ var unmarshalHealthCheck = (data) => {
89
89
  transientCheckDelay: data.transient_check_delay
90
90
  };
91
91
  };
92
- var unmarshalInstance = (data) => {
92
+ const unmarshalInstance = (data) => {
93
93
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
94
94
  return {
95
95
  createdAt: unmarshalDate(data.created_at),
@@ -101,7 +101,7 @@ var unmarshalInstance = (data) => {
101
101
  zone: data.zone
102
102
  };
103
103
  };
104
- var unmarshalLb = (data) => {
104
+ const unmarshalLb = (data) => {
105
105
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Lb' failed as data isn't a dictionary.`);
106
106
  return {
107
107
  backendCount: data.backend_count,
@@ -126,7 +126,7 @@ var unmarshalLb = (data) => {
126
126
  zone: data.zone
127
127
  };
128
128
  };
129
- var unmarshalBackend = (data) => {
129
+ const unmarshalBackend = (data) => {
130
130
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Backend' failed as data isn't a dictionary.`);
131
131
  return {
132
132
  createdAt: unmarshalDate(data.created_at),
@@ -156,7 +156,7 @@ var unmarshalBackend = (data) => {
156
156
  updatedAt: unmarshalDate(data.updated_at)
157
157
  };
158
158
  };
159
- var unmarshalCertificate = (data) => {
159
+ const unmarshalCertificate = (data) => {
160
160
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Certificate' failed as data isn't a dictionary.`);
161
161
  return {
162
162
  commonName: data.common_name,
@@ -174,7 +174,7 @@ var unmarshalCertificate = (data) => {
174
174
  updatedAt: unmarshalDate(data.updated_at)
175
175
  };
176
176
  };
177
- var unmarshalFrontend = (data) => {
177
+ const unmarshalFrontend = (data) => {
178
178
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Frontend' failed as data isn't a dictionary.`);
179
179
  return {
180
180
  backend: data.backend ? unmarshalBackend(data.backend) : void 0,
@@ -192,7 +192,7 @@ var unmarshalFrontend = (data) => {
192
192
  updatedAt: unmarshalDate(data.updated_at)
193
193
  };
194
194
  };
195
- var unmarshalAclActionRedirect = (data) => {
195
+ const unmarshalAclActionRedirect = (data) => {
196
196
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AclActionRedirect' failed as data isn't a dictionary.`);
197
197
  return {
198
198
  code: data.code,
@@ -200,14 +200,14 @@ var unmarshalAclActionRedirect = (data) => {
200
200
  type: data.type
201
201
  };
202
202
  };
203
- var unmarshalAclAction = (data) => {
203
+ const unmarshalAclAction = (data) => {
204
204
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AclAction' failed as data isn't a dictionary.`);
205
205
  return {
206
206
  redirect: data.redirect ? unmarshalAclActionRedirect(data.redirect) : void 0,
207
207
  type: data.type
208
208
  };
209
209
  };
210
- var unmarshalAclMatch = (data) => {
210
+ const unmarshalAclMatch = (data) => {
211
211
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AclMatch' failed as data isn't a dictionary.`);
212
212
  return {
213
213
  httpFilter: data.http_filter,
@@ -218,7 +218,7 @@ var unmarshalAclMatch = (data) => {
218
218
  ipsEdgeServices: data.ips_edge_services
219
219
  };
220
220
  };
221
- var unmarshalAcl = (data) => {
221
+ const unmarshalAcl = (data) => {
222
222
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Acl' failed as data isn't a dictionary.`);
223
223
  return {
224
224
  action: data.action ? unmarshalAclAction(data.action) : void 0,
@@ -232,19 +232,19 @@ var unmarshalAcl = (data) => {
232
232
  updatedAt: unmarshalDate(data.updated_at)
233
233
  };
234
234
  };
235
- var unmarshalPrivateNetworkDHCPConfig = (data) => {
235
+ const unmarshalPrivateNetworkDHCPConfig = (data) => {
236
236
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetworkDHCPConfig' failed as data isn't a dictionary.`);
237
237
  return { ipId: data.ip_id };
238
238
  };
239
- var unmarshalPrivateNetworkIpamConfig = (data) => {
239
+ const unmarshalPrivateNetworkIpamConfig = (data) => {
240
240
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetworkIpamConfig' failed as data isn't a dictionary.`);
241
241
  return {};
242
242
  };
243
- var unmarshalPrivateNetworkStaticConfig = (data) => {
243
+ const unmarshalPrivateNetworkStaticConfig = (data) => {
244
244
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetworkStaticConfig' failed as data isn't a dictionary.`);
245
245
  return { ipAddress: data.ip_address ? data.ip_address : void 0 };
246
246
  };
247
- var unmarshalPrivateNetwork = (data) => {
247
+ const unmarshalPrivateNetwork = (data) => {
248
248
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
249
249
  return {
250
250
  createdAt: unmarshalDate(data.created_at),
@@ -258,7 +258,7 @@ var unmarshalPrivateNetwork = (data) => {
258
258
  updatedAt: unmarshalDate(data.updated_at)
259
259
  };
260
260
  };
261
- var unmarshalRouteMatch = (data) => {
261
+ const unmarshalRouteMatch = (data) => {
262
262
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RouteMatch' failed as data isn't a dictionary.`);
263
263
  return {
264
264
  hostHeader: data.host_header,
@@ -267,7 +267,7 @@ var unmarshalRouteMatch = (data) => {
267
267
  sni: data.sni
268
268
  };
269
269
  };
270
- var unmarshalRoute = (data) => {
270
+ const unmarshalRoute = (data) => {
271
271
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Route' failed as data isn't a dictionary.`);
272
272
  return {
273
273
  backendId: data.backend_id,
@@ -278,7 +278,7 @@ var unmarshalRoute = (data) => {
278
278
  updatedAt: unmarshalDate(data.updated_at)
279
279
  };
280
280
  };
281
- var unmarshalBackendServerStats = (data) => {
281
+ const unmarshalBackendServerStats = (data) => {
282
282
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BackendServerStats' failed as data isn't a dictionary.`);
283
283
  return {
284
284
  backendId: data.backend_id,
@@ -289,60 +289,60 @@ var unmarshalBackendServerStats = (data) => {
289
289
  serverStateChangedAt: unmarshalDate(data.server_state_changed_at)
290
290
  };
291
291
  };
292
- var unmarshalLbStats = (data) => {
292
+ const unmarshalLbStats = (data) => {
293
293
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LbStats' failed as data isn't a dictionary.`);
294
294
  return { backendServersStats: unmarshalArrayOfObject(data.backend_servers_stats, unmarshalBackendServerStats) };
295
295
  };
296
- var unmarshalListAclResponse = (data) => {
296
+ const unmarshalListAclResponse = (data) => {
297
297
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListAclResponse' failed as data isn't a dictionary.`);
298
298
  return {
299
299
  acls: unmarshalArrayOfObject(data.acls, unmarshalAcl),
300
300
  totalCount: data.total_count
301
301
  };
302
302
  };
303
- var unmarshalListBackendStatsResponse = (data) => {
303
+ const unmarshalListBackendStatsResponse = (data) => {
304
304
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBackendStatsResponse' failed as data isn't a dictionary.`);
305
305
  return {
306
306
  backendServersStats: unmarshalArrayOfObject(data.backend_servers_stats, unmarshalBackendServerStats),
307
307
  totalCount: data.total_count
308
308
  };
309
309
  };
310
- var unmarshalListBackendsResponse = (data) => {
310
+ const unmarshalListBackendsResponse = (data) => {
311
311
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBackendsResponse' failed as data isn't a dictionary.`);
312
312
  return {
313
313
  backends: unmarshalArrayOfObject(data.backends, unmarshalBackend),
314
314
  totalCount: data.total_count
315
315
  };
316
316
  };
317
- var unmarshalListCertificatesResponse = (data) => {
317
+ const unmarshalListCertificatesResponse = (data) => {
318
318
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListCertificatesResponse' failed as data isn't a dictionary.`);
319
319
  return {
320
320
  certificates: unmarshalArrayOfObject(data.certificates, unmarshalCertificate),
321
321
  totalCount: data.total_count
322
322
  };
323
323
  };
324
- var unmarshalListFrontendsResponse = (data) => {
324
+ const unmarshalListFrontendsResponse = (data) => {
325
325
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListFrontendsResponse' failed as data isn't a dictionary.`);
326
326
  return {
327
327
  frontends: unmarshalArrayOfObject(data.frontends, unmarshalFrontend),
328
328
  totalCount: data.total_count
329
329
  };
330
330
  };
331
- var unmarshalListIpsResponse = (data) => {
331
+ const unmarshalListIpsResponse = (data) => {
332
332
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`);
333
333
  return {
334
334
  ips: unmarshalArrayOfObject(data.ips, unmarshalIp),
335
335
  totalCount: data.total_count
336
336
  };
337
337
  };
338
- var unmarshalListLbPrivateNetworksResponse = (data) => {
338
+ const unmarshalListLbPrivateNetworksResponse = (data) => {
339
339
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListLbPrivateNetworksResponse' failed as data isn't a dictionary.`);
340
340
  return {
341
341
  privateNetwork: unmarshalArrayOfObject(data.private_network, unmarshalPrivateNetwork),
342
342
  totalCount: data.total_count
343
343
  };
344
344
  };
345
- var unmarshalLbType = (data) => {
345
+ const unmarshalLbType = (data) => {
346
346
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'LbType' failed as data isn't a dictionary.`);
347
347
  return {
348
348
  bandwidth: data.bandwidth,
@@ -354,46 +354,46 @@ var unmarshalLbType = (data) => {
354
354
  zone: data.zone
355
355
  };
356
356
  };
357
- var unmarshalListLbTypesResponse = (data) => {
357
+ const unmarshalListLbTypesResponse = (data) => {
358
358
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListLbTypesResponse' failed as data isn't a dictionary.`);
359
359
  return {
360
360
  lbTypes: unmarshalArrayOfObject(data.lb_types, unmarshalLbType),
361
361
  totalCount: data.total_count
362
362
  };
363
363
  };
364
- var unmarshalListLbsResponse = (data) => {
364
+ const unmarshalListLbsResponse = (data) => {
365
365
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListLbsResponse' failed as data isn't a dictionary.`);
366
366
  return {
367
367
  lbs: unmarshalArrayOfObject(data.lbs, unmarshalLb),
368
368
  totalCount: data.total_count
369
369
  };
370
370
  };
371
- var unmarshalListRoutesResponse = (data) => {
371
+ const unmarshalListRoutesResponse = (data) => {
372
372
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRoutesResponse' failed as data isn't a dictionary.`);
373
373
  return {
374
374
  routes: unmarshalArrayOfObject(data.routes, unmarshalRoute),
375
375
  totalCount: data.total_count
376
376
  };
377
377
  };
378
- var unmarshalListSubscriberResponse = (data) => {
378
+ const unmarshalListSubscriberResponse = (data) => {
379
379
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSubscriberResponse' failed as data isn't a dictionary.`);
380
380
  return {
381
381
  subscribers: unmarshalArrayOfObject(data.subscribers, unmarshalSubscriber),
382
382
  totalCount: data.total_count
383
383
  };
384
384
  };
385
- var unmarshalSetAclsResponse = (data) => {
385
+ const unmarshalSetAclsResponse = (data) => {
386
386
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetAclsResponse' failed as data isn't a dictionary.`);
387
387
  return {
388
388
  acls: unmarshalArrayOfObject(data.acls, unmarshalAcl),
389
389
  totalCount: data.total_count
390
390
  };
391
391
  };
392
- var marshalAddBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
393
- var marshalPrivateNetworkDHCPConfig = (request, defaults) => ({ ip_id: request.ipId });
394
- var marshalPrivateNetworkIpamConfig = (request, defaults) => ({});
395
- var marshalPrivateNetworkStaticConfig = (request, defaults) => ({ ip_address: request.ipAddress });
396
- var marshalAttachPrivateNetworkRequest = (request, defaults) => ({
392
+ const marshalAddBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
393
+ const marshalPrivateNetworkDHCPConfig = (request, defaults) => ({ ip_id: request.ipId });
394
+ const marshalPrivateNetworkIpamConfig = (request, defaults) => ({});
395
+ const marshalPrivateNetworkStaticConfig = (request, defaults) => ({ ip_address: request.ipAddress });
396
+ const marshalAttachPrivateNetworkRequest = (request, defaults) => ({
397
397
  ipam_ids: request.ipamIds,
398
398
  ...resolveOneOf([
399
399
  {
@@ -410,16 +410,16 @@ var marshalAttachPrivateNetworkRequest = (request, defaults) => ({
410
410
  }
411
411
  ])
412
412
  });
413
- var marshalAclActionRedirect = (request, defaults) => ({
413
+ const marshalAclActionRedirect = (request, defaults) => ({
414
414
  code: request.code,
415
415
  target: request.target,
416
416
  type: request.type
417
417
  });
418
- var marshalAclAction = (request, defaults) => ({
418
+ const marshalAclAction = (request, defaults) => ({
419
419
  redirect: request.redirect !== void 0 ? marshalAclActionRedirect(request.redirect, defaults) : void 0,
420
420
  type: request.type
421
421
  });
422
- var marshalAclMatch = (request, defaults) => ({
422
+ const marshalAclMatch = (request, defaults) => ({
423
423
  http_filter: request.httpFilter,
424
424
  http_filter_option: request.httpFilterOption,
425
425
  http_filter_value: request.httpFilterValue,
@@ -427,32 +427,32 @@ var marshalAclMatch = (request, defaults) => ({
427
427
  ip_subnet: request.ipSubnet,
428
428
  ips_edge_services: request.ipsEdgeServices
429
429
  });
430
- var marshalCreateAclRequest = (request, defaults) => ({
430
+ const marshalCreateAclRequest = (request, defaults) => ({
431
431
  action: marshalAclAction(request.action, defaults),
432
432
  description: request.description,
433
433
  index: request.index,
434
434
  match: request.match !== void 0 ? marshalAclMatch(request.match, defaults) : void 0,
435
435
  name: request.name || randomName("acl")
436
436
  });
437
- var marshalHealthCheckHttpConfig = (request, defaults) => ({
437
+ const marshalHealthCheckHttpConfig = (request, defaults) => ({
438
438
  code: request.code,
439
439
  host_header: request.hostHeader,
440
440
  method: request.method,
441
441
  uri: request.uri
442
442
  });
443
- var marshalHealthCheckHttpsConfig = (request, defaults) => ({
443
+ const marshalHealthCheckHttpsConfig = (request, defaults) => ({
444
444
  code: request.code,
445
445
  host_header: request.hostHeader,
446
446
  method: request.method,
447
447
  sni: request.sni,
448
448
  uri: request.uri
449
449
  });
450
- var marshalHealthCheckLdapConfig = (request, defaults) => ({});
451
- var marshalHealthCheckMysqlConfig = (request, defaults) => ({ user: request.user });
452
- var marshalHealthCheckPgsqlConfig = (request, defaults) => ({ user: request.user });
453
- var marshalHealthCheckRedisConfig = (request, defaults) => ({});
454
- var marshalHealthCheckTcpConfig = (request, defaults) => ({});
455
- var marshalHealthCheck = (request, defaults) => ({
450
+ const marshalHealthCheckLdapConfig = (request, defaults) => ({});
451
+ const marshalHealthCheckMysqlConfig = (request, defaults) => ({ user: request.user });
452
+ const marshalHealthCheckPgsqlConfig = (request, defaults) => ({ user: request.user });
453
+ const marshalHealthCheckRedisConfig = (request, defaults) => ({});
454
+ const marshalHealthCheckTcpConfig = (request, defaults) => ({});
455
+ const marshalHealthCheck = (request, defaults) => ({
456
456
  check_delay: request.checkDelay,
457
457
  check_max_retries: request.checkMaxRetries,
458
458
  check_send_proxy: request.checkSendProxy,
@@ -490,7 +490,7 @@ var marshalHealthCheck = (request, defaults) => ({
490
490
  }
491
491
  ])
492
492
  });
493
- var marshalCreateBackendRequest = (request, defaults) => ({
493
+ const marshalCreateBackendRequest = (request, defaults) => ({
494
494
  failover_host: request.failoverHost,
495
495
  forward_port: request.forwardPort,
496
496
  forward_port_algorithm: request.forwardPortAlgorithm,
@@ -513,12 +513,12 @@ var marshalCreateBackendRequest = (request, defaults) => ({
513
513
  timeout_server: request.timeoutServer,
514
514
  timeout_tunnel: request.timeoutTunnel
515
515
  });
516
- var marshalCreateCertificateRequestCustomCertificate = (request, defaults) => ({ certificate_chain: request.certificateChain });
517
- var marshalCreateCertificateRequestLetsencryptConfig = (request, defaults) => ({
516
+ const marshalCreateCertificateRequestCustomCertificate = (request, defaults) => ({ certificate_chain: request.certificateChain });
517
+ const marshalCreateCertificateRequestLetsencryptConfig = (request, defaults) => ({
518
518
  common_name: request.commonName,
519
519
  subject_alternative_name: request.subjectAlternativeName
520
520
  });
521
- var marshalCreateCertificateRequest = (request, defaults) => ({
521
+ const marshalCreateCertificateRequest = (request, defaults) => ({
522
522
  name: request.name || randomName("certificate"),
523
523
  ...resolveOneOf([{
524
524
  param: "letsencrypt",
@@ -528,7 +528,7 @@ var marshalCreateCertificateRequest = (request, defaults) => ({
528
528
  value: request.customCertificate !== void 0 ? marshalCreateCertificateRequestCustomCertificate(request.customCertificate, defaults) : void 0
529
529
  }])
530
530
  });
531
- var marshalCreateFrontendRequest = (request, defaults) => ({
531
+ const marshalCreateFrontendRequest = (request, defaults) => ({
532
532
  backend_id: request.backendId,
533
533
  certificate_id: request.certificateId,
534
534
  certificate_ids: request.certificateIds,
@@ -539,7 +539,7 @@ var marshalCreateFrontendRequest = (request, defaults) => ({
539
539
  name: request.name || randomName("lbf"),
540
540
  timeout_client: request.timeoutClient
541
541
  });
542
- var marshalCreateIpRequest = (request, defaults) => ({
542
+ const marshalCreateIpRequest = (request, defaults) => ({
543
543
  is_ipv6: request.isIpv6,
544
544
  reverse: request.reverse,
545
545
  tags: request.tags,
@@ -553,7 +553,7 @@ var marshalCreateIpRequest = (request, defaults) => ({
553
553
  value: request.organizationId
554
554
  }])
555
555
  });
556
- var marshalCreateLbRequest = (request, defaults) => ({
556
+ const marshalCreateLbRequest = (request, defaults) => ({
557
557
  assign_flexible_ip: request.assignFlexibleIp,
558
558
  assign_flexible_ipv6: request.assignFlexibleIpv6,
559
559
  description: request.description,
@@ -573,7 +573,7 @@ var marshalCreateLbRequest = (request, defaults) => ({
573
573
  value: request.organizationId
574
574
  }])
575
575
  });
576
- var marshalRouteMatch = (request, defaults) => ({
576
+ const marshalRouteMatch = (request, defaults) => ({
577
577
  match_subdomains: request.matchSubdomains,
578
578
  ...resolveOneOf([
579
579
  {
@@ -590,14 +590,14 @@ var marshalRouteMatch = (request, defaults) => ({
590
590
  }
591
591
  ])
592
592
  });
593
- var marshalCreateRouteRequest = (request, defaults) => ({
593
+ const marshalCreateRouteRequest = (request, defaults) => ({
594
594
  backend_id: request.backendId,
595
595
  frontend_id: request.frontendId,
596
596
  match: request.match !== void 0 ? marshalRouteMatch(request.match, defaults) : void 0
597
597
  });
598
- var marshalSubscriberEmailConfig = (request, defaults) => ({ email: request.email });
599
- var marshalSubscriberWebhookConfig = (request, defaults) => ({ uri: request.uri });
600
- var marshalCreateSubscriberRequest = (request, defaults) => ({
598
+ const marshalSubscriberEmailConfig = (request, defaults) => ({ email: request.email });
599
+ const marshalSubscriberWebhookConfig = (request, defaults) => ({ uri: request.uri });
600
+ const marshalCreateSubscriberRequest = (request, defaults) => ({
601
601
  name: request.name,
602
602
  ...resolveOneOf([{
603
603
  default: defaults.defaultProjectId,
@@ -616,18 +616,18 @@ var marshalCreateSubscriberRequest = (request, defaults) => ({
616
616
  value: request.webhookConfig !== void 0 ? marshalSubscriberWebhookConfig(request.webhookConfig, defaults) : void 0
617
617
  }])
618
618
  });
619
- var marshalMigrateLbRequest = (request, defaults) => ({ type: request.type });
620
- var marshalRemoveBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
621
- var marshalSetBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
622
- var marshalSubscribeToLbRequest = (request, defaults) => ({ subscriber_id: request.subscriberId });
623
- var marshalUpdateAclRequest = (request, defaults) => ({
619
+ const marshalMigrateLbRequest = (request, defaults) => ({ type: request.type });
620
+ const marshalRemoveBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
621
+ const marshalSetBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
622
+ const marshalSubscribeToLbRequest = (request, defaults) => ({ subscriber_id: request.subscriberId });
623
+ const marshalUpdateAclRequest = (request, defaults) => ({
624
624
  action: marshalAclAction(request.action, defaults),
625
625
  description: request.description,
626
626
  index: request.index,
627
627
  match: request.match !== void 0 ? marshalAclMatch(request.match, defaults) : void 0,
628
628
  name: request.name
629
629
  });
630
- var marshalUpdateBackendRequest = (request, defaults) => ({
630
+ const marshalUpdateBackendRequest = (request, defaults) => ({
631
631
  failover_host: request.failoverHost,
632
632
  forward_port: request.forwardPort,
633
633
  forward_port_algorithm: request.forwardPortAlgorithm,
@@ -648,8 +648,8 @@ var marshalUpdateBackendRequest = (request, defaults) => ({
648
648
  timeout_server: request.timeoutServer,
649
649
  timeout_tunnel: request.timeoutTunnel
650
650
  });
651
- var marshalUpdateCertificateRequest = (request, defaults) => ({ name: request.name });
652
- var marshalUpdateFrontendRequest = (request, defaults) => ({
651
+ const marshalUpdateCertificateRequest = (request, defaults) => ({ name: request.name });
652
+ const marshalUpdateFrontendRequest = (request, defaults) => ({
653
653
  backend_id: request.backendId,
654
654
  certificate_id: request.certificateId,
655
655
  certificate_ids: request.certificateIds,
@@ -660,7 +660,7 @@ var marshalUpdateFrontendRequest = (request, defaults) => ({
660
660
  name: request.name,
661
661
  timeout_client: request.timeoutClient
662
662
  });
663
- var marshalUpdateHealthCheckRequest = (request, defaults) => ({
663
+ const marshalUpdateHealthCheckRequest = (request, defaults) => ({
664
664
  check_delay: request.checkDelay,
665
665
  check_max_retries: request.checkMaxRetries,
666
666
  check_send_proxy: request.checkSendProxy,
@@ -698,22 +698,22 @@ var marshalUpdateHealthCheckRequest = (request, defaults) => ({
698
698
  }
699
699
  ])
700
700
  });
701
- var marshalUpdateIpRequest = (request, defaults) => ({
701
+ const marshalUpdateIpRequest = (request, defaults) => ({
702
702
  lb_id: request.lbId,
703
703
  reverse: request.reverse,
704
704
  tags: request.tags
705
705
  });
706
- var marshalUpdateLbRequest = (request, defaults) => ({
706
+ const marshalUpdateLbRequest = (request, defaults) => ({
707
707
  description: request.description,
708
708
  name: request.name,
709
709
  ssl_compatibility_level: request.sslCompatibilityLevel,
710
710
  tags: request.tags
711
711
  });
712
- var marshalUpdateRouteRequest = (request, defaults) => ({
712
+ const marshalUpdateRouteRequest = (request, defaults) => ({
713
713
  backend_id: request.backendId,
714
714
  match: request.match !== void 0 ? marshalRouteMatch(request.match, defaults) : void 0
715
715
  });
716
- var marshalUpdateSubscriberRequest = (request, defaults) => ({
716
+ const marshalUpdateSubscriberRequest = (request, defaults) => ({
717
717
  name: request.name,
718
718
  ...resolveOneOf([{
719
719
  param: "email_config",
@@ -723,8 +723,8 @@ var marshalUpdateSubscriberRequest = (request, defaults) => ({
723
723
  value: request.webhookConfig !== void 0 ? marshalSubscriberWebhookConfig(request.webhookConfig, defaults) : void 0
724
724
  }])
725
725
  });
726
- var marshalZonedApiAddBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
727
- var marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({
726
+ const marshalZonedApiAddBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
727
+ const marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({
728
728
  ipam_ids: request.ipamIds,
729
729
  private_network_id: request.privateNetworkId,
730
730
  ...resolveOneOf([
@@ -742,14 +742,14 @@ var marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({
742
742
  }
743
743
  ])
744
744
  });
745
- var marshalZonedApiCreateAclRequest = (request, defaults) => ({
745
+ const marshalZonedApiCreateAclRequest = (request, defaults) => ({
746
746
  action: marshalAclAction(request.action, defaults),
747
747
  description: request.description,
748
748
  index: request.index,
749
749
  match: request.match !== void 0 ? marshalAclMatch(request.match, defaults) : void 0,
750
750
  name: request.name || randomName("acl")
751
751
  });
752
- var marshalZonedApiCreateBackendRequest = (request, defaults) => ({
752
+ const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
753
753
  failover_host: request.failoverHost,
754
754
  forward_port: request.forwardPort,
755
755
  forward_port_algorithm: request.forwardPortAlgorithm,
@@ -772,7 +772,7 @@ var marshalZonedApiCreateBackendRequest = (request, defaults) => ({
772
772
  timeout_server: request.timeoutServer,
773
773
  timeout_tunnel: request.timeoutTunnel
774
774
  });
775
- var marshalZonedApiCreateCertificateRequest = (request, defaults) => ({
775
+ const marshalZonedApiCreateCertificateRequest = (request, defaults) => ({
776
776
  name: request.name || randomName("certificate"),
777
777
  ...resolveOneOf([{
778
778
  param: "letsencrypt",
@@ -782,7 +782,7 @@ var marshalZonedApiCreateCertificateRequest = (request, defaults) => ({
782
782
  value: request.customCertificate !== void 0 ? marshalCreateCertificateRequestCustomCertificate(request.customCertificate, defaults) : void 0
783
783
  }])
784
784
  });
785
- var marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
785
+ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
786
786
  backend_id: request.backendId,
787
787
  certificate_id: request.certificateId,
788
788
  certificate_ids: request.certificateIds,
@@ -793,7 +793,7 @@ var marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
793
793
  name: request.name || randomName("lbf"),
794
794
  timeout_client: request.timeoutClient
795
795
  });
796
- var marshalZonedApiCreateIpRequest = (request, defaults) => ({
796
+ const marshalZonedApiCreateIpRequest = (request, defaults) => ({
797
797
  is_ipv6: request.isIpv6,
798
798
  reverse: request.reverse,
799
799
  tags: request.tags,
@@ -807,7 +807,7 @@ var marshalZonedApiCreateIpRequest = (request, defaults) => ({
807
807
  value: request.organizationId
808
808
  }])
809
809
  });
810
- var marshalZonedApiCreateLbRequest = (request, defaults) => ({
810
+ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
811
811
  assign_flexible_ip: request.assignFlexibleIp,
812
812
  assign_flexible_ipv6: request.assignFlexibleIpv6,
813
813
  description: request.description,
@@ -827,12 +827,12 @@ var marshalZonedApiCreateLbRequest = (request, defaults) => ({
827
827
  value: request.organizationId
828
828
  }])
829
829
  });
830
- var marshalZonedApiCreateRouteRequest = (request, defaults) => ({
830
+ const marshalZonedApiCreateRouteRequest = (request, defaults) => ({
831
831
  backend_id: request.backendId,
832
832
  frontend_id: request.frontendId,
833
833
  match: request.match !== void 0 ? marshalRouteMatch(request.match, defaults) : void 0
834
834
  });
835
- var marshalZonedApiCreateSubscriberRequest = (request, defaults) => ({
835
+ const marshalZonedApiCreateSubscriberRequest = (request, defaults) => ({
836
836
  name: request.name,
837
837
  ...resolveOneOf([{
838
838
  default: defaults.defaultProjectId,
@@ -851,27 +851,27 @@ var marshalZonedApiCreateSubscriberRequest = (request, defaults) => ({
851
851
  value: request.webhookConfig !== void 0 ? marshalSubscriberWebhookConfig(request.webhookConfig, defaults) : void 0
852
852
  }])
853
853
  });
854
- var marshalZonedApiDetachPrivateNetworkRequest = (request, defaults) => ({ private_network_id: request.privateNetworkId });
855
- var marshalZonedApiMigrateLbRequest = (request, defaults) => ({ type: request.type });
856
- var marshalZonedApiRemoveBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
857
- var marshalAclSpec = (request, defaults) => ({
854
+ const marshalZonedApiDetachPrivateNetworkRequest = (request, defaults) => ({ private_network_id: request.privateNetworkId });
855
+ const marshalZonedApiMigrateLbRequest = (request, defaults) => ({ type: request.type });
856
+ const marshalZonedApiRemoveBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
857
+ const marshalAclSpec = (request, defaults) => ({
858
858
  action: marshalAclAction(request.action, defaults),
859
859
  description: request.description,
860
860
  index: request.index,
861
861
  match: request.match !== void 0 ? marshalAclMatch(request.match, defaults) : void 0,
862
862
  name: request.name
863
863
  });
864
- var marshalZonedApiSetAclsRequest = (request, defaults) => ({ acls: request.acls.map((elt) => marshalAclSpec(elt, defaults)) });
865
- var marshalZonedApiSetBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
866
- var marshalZonedApiSubscribeToLbRequest = (request, defaults) => ({ subscriber_id: request.subscriberId });
867
- var marshalZonedApiUpdateAclRequest = (request, defaults) => ({
864
+ const marshalZonedApiSetAclsRequest = (request, defaults) => ({ acls: request.acls.map((elt) => marshalAclSpec(elt, defaults)) });
865
+ const marshalZonedApiSetBackendServersRequest = (request, defaults) => ({ server_ip: request.serverIp });
866
+ const marshalZonedApiSubscribeToLbRequest = (request, defaults) => ({ subscriber_id: request.subscriberId });
867
+ const marshalZonedApiUpdateAclRequest = (request, defaults) => ({
868
868
  action: marshalAclAction(request.action, defaults),
869
869
  description: request.description,
870
870
  index: request.index,
871
871
  match: request.match !== void 0 ? marshalAclMatch(request.match, defaults) : void 0,
872
872
  name: request.name
873
873
  });
874
- var marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
874
+ const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
875
875
  failover_host: request.failoverHost,
876
876
  forward_port: request.forwardPort,
877
877
  forward_port_algorithm: request.forwardPortAlgorithm,
@@ -892,8 +892,8 @@ var marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
892
892
  timeout_server: request.timeoutServer,
893
893
  timeout_tunnel: request.timeoutTunnel
894
894
  });
895
- var marshalZonedApiUpdateCertificateRequest = (request, defaults) => ({ name: request.name });
896
- var marshalZonedApiUpdateFrontendRequest = (request, defaults) => ({
895
+ const marshalZonedApiUpdateCertificateRequest = (request, defaults) => ({ name: request.name });
896
+ const marshalZonedApiUpdateFrontendRequest = (request, defaults) => ({
897
897
  backend_id: request.backendId,
898
898
  certificate_id: request.certificateId,
899
899
  certificate_ids: request.certificateIds,
@@ -904,7 +904,7 @@ var marshalZonedApiUpdateFrontendRequest = (request, defaults) => ({
904
904
  name: request.name,
905
905
  timeout_client: request.timeoutClient
906
906
  });
907
- var marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
907
+ const marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
908
908
  check_delay: request.checkDelay,
909
909
  check_max_retries: request.checkMaxRetries,
910
910
  check_send_proxy: request.checkSendProxy,
@@ -942,22 +942,22 @@ var marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
942
942
  }
943
943
  ])
944
944
  });
945
- var marshalZonedApiUpdateIpRequest = (request, defaults) => ({
945
+ const marshalZonedApiUpdateIpRequest = (request, defaults) => ({
946
946
  lb_id: request.lbId,
947
947
  reverse: request.reverse,
948
948
  tags: request.tags
949
949
  });
950
- var marshalZonedApiUpdateLbRequest = (request, defaults) => ({
950
+ const marshalZonedApiUpdateLbRequest = (request, defaults) => ({
951
951
  description: request.description,
952
952
  name: request.name,
953
953
  ssl_compatibility_level: request.sslCompatibilityLevel,
954
954
  tags: request.tags
955
955
  });
956
- var marshalZonedApiUpdateRouteRequest = (request, defaults) => ({
956
+ const marshalZonedApiUpdateRouteRequest = (request, defaults) => ({
957
957
  backend_id: request.backendId,
958
958
  match: request.match !== void 0 ? marshalRouteMatch(request.match, defaults) : void 0
959
959
  });
960
- var marshalZonedApiUpdateSubscriberRequest = (request, defaults) => ({
960
+ const marshalZonedApiUpdateSubscriberRequest = (request, defaults) => ({
961
961
  name: request.name,
962
962
  ...resolveOneOf([{
963
963
  param: "email_config",