@scaleway/sdk 1.34.0 → 2.0.0-alpha.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.
Files changed (61) hide show
  1. package/dist/api/account/v2/api.gen.js +1 -1
  2. package/dist/api/account/v3/api.gen.js +1 -1
  3. package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
  4. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
  5. package/dist/api/baremetal/v1/api.gen.js +6 -6
  6. package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
  7. package/dist/api/billing/v2alpha1/api.gen.js +3 -3
  8. package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
  9. package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
  10. package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
  11. package/dist/api/container/v1beta1/api.gen.js +11 -11
  12. package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
  13. package/dist/api/document_db/v1beta1/api.gen.js +6 -6
  14. package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
  15. package/dist/api/domain/v2beta1/api.gen.js +45 -38
  16. package/dist/api/domain/v2beta1/index.gen.js +2 -0
  17. package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
  18. package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
  19. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
  20. package/dist/api/function/v1beta1/api.gen.js +11 -11
  21. package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
  22. package/dist/api/iam/v1alpha1/api.gen.js +64 -32
  23. package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
  24. package/dist/api/instance/v1/api.gen.js +1 -1
  25. package/dist/api/instance/v1/marshalling.gen.js +397 -602
  26. package/dist/api/iot/v1/api.gen.js +35 -27
  27. package/dist/api/iot/v1/marshalling.gen.js +111 -162
  28. package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
  29. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
  30. package/dist/api/k8s/v1/api.gen.js +3 -3
  31. package/dist/api/k8s/v1/marshalling.gen.js +109 -194
  32. package/dist/api/lb/v1/api.gen.js +583 -552
  33. package/dist/api/lb/v1/marshalling.gen.js +245 -361
  34. package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
  35. package/dist/api/marketplace/v2/api.gen.js +6 -6
  36. package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
  37. package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
  38. package/dist/api/rdb/v1/api.gen.js +7 -7
  39. package/dist/api/rdb/v1/marshalling.gen.js +184 -240
  40. package/dist/api/redis/v1/api.gen.js +1 -1
  41. package/dist/api/redis/v1/marshalling.gen.js +73 -97
  42. package/dist/api/registry/v1/api.gen.js +3 -3
  43. package/dist/api/registry/v1/marshalling.gen.js +5 -7
  44. package/dist/api/secret/v1alpha1/api.gen.js +2 -2
  45. package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
  46. package/dist/api/tem/v1alpha1/api.gen.js +1 -1
  47. package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
  48. package/dist/api/test/v1/api.gen.js +8 -25
  49. package/dist/api/test/v1/marshalling.gen.js +5 -7
  50. package/dist/api/vpc/v1/api.gen.js +1 -1
  51. package/dist/api/vpc/v2/api.gen.js +2 -2
  52. package/dist/api/vpc/v2/marshalling.gen.js +3 -5
  53. package/dist/api/vpcgw/v1/api.gen.js +6 -6
  54. package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
  55. package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
  56. package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
  57. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
  58. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
  59. package/dist/index.cjs +3127 -3989
  60. package/dist/index.d.ts +9658 -12221
  61. package/package.json +2 -2
@@ -4,12 +4,19 @@ import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../he
4
4
 
5
5
  // This file was automatically generated. DO NOT EDIT.
6
6
  // If you have any remark or suggestion do not hesitate to open an issue.
7
- const unmarshalSubscriberEmailConfig = data => {
7
+ const unmarshalIp = data => {
8
8
  if (!isJSONObject(data)) {
9
- throw new TypeError(`Unmarshalling the type 'SubscriberEmailConfig' failed as data isn't a dictionary.`);
9
+ throw new TypeError(`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`);
10
10
  }
11
11
  return {
12
- email: data.email
12
+ id: data.id,
13
+ ipAddress: data.ip_address,
14
+ lbId: data.lb_id ? data.lb_id : undefined,
15
+ organizationId: data.organization_id,
16
+ projectId: data.project_id,
17
+ region: data.region ? data.region : undefined,
18
+ reverse: data.reverse,
19
+ zone: data.zone
13
20
  };
14
21
  };
15
22
  const unmarshalSubscriberWebhookConfig = data => {
@@ -20,15 +27,23 @@ const unmarshalSubscriberWebhookConfig = data => {
20
27
  uri: data.uri
21
28
  };
22
29
  };
23
- const unmarshalHealthCheckHttpConfig = data => {
30
+ const unmarshalSubscriberEmailConfig = data => {
24
31
  if (!isJSONObject(data)) {
25
- throw new TypeError(`Unmarshalling the type 'HealthCheckHttpConfig' failed as data isn't a dictionary.`);
32
+ throw new TypeError(`Unmarshalling the type 'SubscriberEmailConfig' failed as data isn't a dictionary.`);
26
33
  }
27
34
  return {
28
- code: data.code,
29
- hostHeader: data.host_header,
30
- method: data.method,
31
- uri: data.uri
35
+ email: data.email
36
+ };
37
+ };
38
+ const unmarshalSubscriber = data => {
39
+ if (!isJSONObject(data)) {
40
+ throw new TypeError(`Unmarshalling the type 'Subscriber' failed as data isn't a dictionary.`);
41
+ }
42
+ return {
43
+ emailConfig: data.email_config ? unmarshalSubscriberEmailConfig(data.email_config) : undefined,
44
+ id: data.id,
45
+ name: data.name,
46
+ webhookConfig: data.webhook_config ? unmarshalSubscriberWebhookConfig(data.webhook_config) : undefined
32
47
  };
33
48
  };
34
49
  const unmarshalHealthCheckHttpsConfig = data => {
@@ -36,33 +51,22 @@ const unmarshalHealthCheckHttpsConfig = data => {
36
51
  throw new TypeError(`Unmarshalling the type 'HealthCheckHttpsConfig' failed as data isn't a dictionary.`);
37
52
  }
38
53
  return {
39
- code: data.code,
54
+ code: data.code ? data.code : undefined,
40
55
  hostHeader: data.host_header,
41
56
  method: data.method,
42
57
  sni: data.sni,
43
58
  uri: data.uri
44
59
  };
45
60
  };
46
- const unmarshalHealthCheckLdapConfig = data => {
47
- if (!isJSONObject(data)) {
48
- throw new TypeError(`Unmarshalling the type 'HealthCheckLdapConfig' failed as data isn't a dictionary.`);
49
- }
50
- return {};
51
- };
52
- const unmarshalHealthCheckMysqlConfig = data => {
53
- if (!isJSONObject(data)) {
54
- throw new TypeError(`Unmarshalling the type 'HealthCheckMysqlConfig' failed as data isn't a dictionary.`);
55
- }
56
- return {
57
- user: data.user
58
- };
59
- };
60
- const unmarshalHealthCheckPgsqlConfig = data => {
61
+ const unmarshalHealthCheckHttpConfig = data => {
61
62
  if (!isJSONObject(data)) {
62
- throw new TypeError(`Unmarshalling the type 'HealthCheckPgsqlConfig' failed as data isn't a dictionary.`);
63
+ throw new TypeError(`Unmarshalling the type 'HealthCheckHttpConfig' failed as data isn't a dictionary.`);
63
64
  }
64
65
  return {
65
- user: data.user
66
+ code: data.code ? data.code : undefined,
67
+ hostHeader: data.host_header,
68
+ method: data.method,
69
+ uri: data.uri
66
70
  };
67
71
  };
68
72
  const unmarshalHealthCheckRedisConfig = data => {
@@ -71,61 +75,43 @@ const unmarshalHealthCheckRedisConfig = data => {
71
75
  }
72
76
  return {};
73
77
  };
74
- const unmarshalHealthCheckTcpConfig = data => {
78
+ const unmarshalHealthCheckLdapConfig = data => {
75
79
  if (!isJSONObject(data)) {
76
- throw new TypeError(`Unmarshalling the type 'HealthCheckTcpConfig' failed as data isn't a dictionary.`);
80
+ throw new TypeError(`Unmarshalling the type 'HealthCheckLdapConfig' failed as data isn't a dictionary.`);
77
81
  }
78
82
  return {};
79
83
  };
80
- const unmarshalInstance = data => {
84
+ const unmarshalHealthCheckPgsqlConfig = data => {
81
85
  if (!isJSONObject(data)) {
82
- throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
86
+ throw new TypeError(`Unmarshalling the type 'HealthCheckPgsqlConfig' failed as data isn't a dictionary.`);
83
87
  }
84
88
  return {
85
- createdAt: unmarshalDate(data.created_at),
86
- id: data.id,
87
- ipAddress: data.ip_address,
88
- region: data.region,
89
- status: data.status,
90
- updatedAt: unmarshalDate(data.updated_at),
91
- zone: data.zone
89
+ user: data.user
92
90
  };
93
91
  };
94
- const unmarshalIp = data => {
92
+ const unmarshalHealthCheckMysqlConfig = data => {
95
93
  if (!isJSONObject(data)) {
96
- throw new TypeError(`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`);
94
+ throw new TypeError(`Unmarshalling the type 'HealthCheckMysqlConfig' failed as data isn't a dictionary.`);
97
95
  }
98
96
  return {
99
- id: data.id,
100
- ipAddress: data.ip_address,
101
- lbId: data.lb_id,
102
- organizationId: data.organization_id,
103
- projectId: data.project_id,
104
- region: data.region,
105
- reverse: data.reverse,
106
- zone: data.zone
97
+ user: data.user
107
98
  };
108
99
  };
109
- const unmarshalSubscriber = data => {
100
+ const unmarshalHealthCheckTcpConfig = data => {
110
101
  if (!isJSONObject(data)) {
111
- throw new TypeError(`Unmarshalling the type 'Subscriber' failed as data isn't a dictionary.`);
102
+ throw new TypeError(`Unmarshalling the type 'HealthCheckTcpConfig' failed as data isn't a dictionary.`);
112
103
  }
113
- return {
114
- emailConfig: data.email_config ? unmarshalSubscriberEmailConfig(data.email_config) : undefined,
115
- id: data.id,
116
- name: data.name,
117
- webhookConfig: data.webhook_config ? unmarshalSubscriberWebhookConfig(data.webhook_config) : undefined
118
- };
104
+ return {};
119
105
  };
120
106
  const unmarshalHealthCheck = data => {
121
107
  if (!isJSONObject(data)) {
122
108
  throw new TypeError(`Unmarshalling the type 'HealthCheck' failed as data isn't a dictionary.`);
123
109
  }
124
110
  return {
125
- checkDelay: data.check_delay,
111
+ checkDelay: data.check_delay ? data.check_delay : undefined,
126
112
  checkMaxRetries: data.check_max_retries,
127
113
  checkSendProxy: data.check_send_proxy,
128
- checkTimeout: data.check_timeout,
114
+ checkTimeout: data.check_timeout ? data.check_timeout : undefined,
129
115
  httpConfig: data.http_config ? unmarshalHealthCheckHttpConfig(data.http_config) : undefined,
130
116
  httpsConfig: data.https_config ? unmarshalHealthCheckHttpsConfig(data.https_config) : undefined,
131
117
  ldapConfig: data.ldap_config ? unmarshalHealthCheckLdapConfig(data.ldap_config) : undefined,
@@ -134,7 +120,21 @@ const unmarshalHealthCheck = data => {
134
120
  port: data.port,
135
121
  redisConfig: data.redis_config ? unmarshalHealthCheckRedisConfig(data.redis_config) : undefined,
136
122
  tcpConfig: data.tcp_config ? unmarshalHealthCheckTcpConfig(data.tcp_config) : undefined,
137
- transientCheckDelay: data.transient_check_delay
123
+ transientCheckDelay: data.transient_check_delay ? data.transient_check_delay : undefined
124
+ };
125
+ };
126
+ const unmarshalInstance = data => {
127
+ if (!isJSONObject(data)) {
128
+ throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
129
+ }
130
+ return {
131
+ createdAt: unmarshalDate(data.created_at),
132
+ id: data.id,
133
+ ipAddress: data.ip_address,
134
+ region: data.region ? data.region : undefined,
135
+ status: data.status,
136
+ updatedAt: unmarshalDate(data.updated_at),
137
+ zone: data.zone
138
138
  };
139
139
  };
140
140
  const unmarshalLb = data => {
@@ -153,56 +153,46 @@ const unmarshalLb = data => {
153
153
  organizationId: data.organization_id,
154
154
  privateNetworkCount: data.private_network_count,
155
155
  projectId: data.project_id,
156
- region: data.region,
156
+ region: data.region ? data.region : undefined,
157
157
  routeCount: data.route_count,
158
158
  sslCompatibilityLevel: data.ssl_compatibility_level,
159
159
  status: data.status,
160
- subscriber: data.subscriber ? unmarshalSubscriber(data.subscriber) : undefined,
160
+ subscriber: unmarshalSubscriber(data.subscriber),
161
161
  tags: data.tags,
162
162
  type: data.type,
163
163
  updatedAt: unmarshalDate(data.updated_at),
164
164
  zone: data.zone
165
165
  };
166
166
  };
167
- const unmarshalAclActionRedirect = data => {
168
- if (!isJSONObject(data)) {
169
- throw new TypeError(`Unmarshalling the type 'AclActionRedirect' failed as data isn't a dictionary.`);
170
- }
171
- return {
172
- code: data.code,
173
- target: data.target,
174
- type: data.type
175
- };
176
- };
177
167
  const unmarshalBackend = data => {
178
168
  if (!isJSONObject(data)) {
179
169
  throw new TypeError(`Unmarshalling the type 'Backend' failed as data isn't a dictionary.`);
180
170
  }
181
171
  return {
182
172
  createdAt: unmarshalDate(data.created_at),
183
- failoverHost: data.failover_host,
173
+ failoverHost: data.failover_host ? data.failover_host : undefined,
184
174
  forwardPort: data.forward_port,
185
175
  forwardPortAlgorithm: data.forward_port_algorithm,
186
176
  forwardProtocol: data.forward_protocol,
187
- healthCheck: data.health_check ? unmarshalHealthCheck(data.health_check) : undefined,
177
+ healthCheck: unmarshalHealthCheck(data.health_check),
188
178
  id: data.id,
189
- ignoreSslServerVerify: data.ignore_ssl_server_verify,
190
- lb: data.lb ? unmarshalLb(data.lb) : undefined,
191
- maxConnections: data.max_connections,
192
- maxRetries: data.max_retries,
179
+ ignoreSslServerVerify: data.ignore_ssl_server_verify ? data.ignore_ssl_server_verify : undefined,
180
+ lb: unmarshalLb(data.lb),
181
+ maxConnections: data.max_connections ? data.max_connections : undefined,
182
+ maxRetries: data.max_retries ? data.max_retries : undefined,
193
183
  name: data.name,
194
184
  onMarkedDownAction: data.on_marked_down_action,
195
185
  pool: data.pool,
196
186
  proxyProtocol: data.proxy_protocol,
197
- redispatchAttemptCount: data.redispatch_attempt_count,
198
- sendProxyV2: data.send_proxy_v2,
199
- sslBridging: data.ssl_bridging,
187
+ redispatchAttemptCount: data.redispatch_attempt_count ? data.redispatch_attempt_count : undefined,
188
+ sendProxyV2: data.send_proxy_v2 ? data.send_proxy_v2 : undefined,
189
+ sslBridging: data.ssl_bridging ? data.ssl_bridging : undefined,
200
190
  stickySessions: data.sticky_sessions,
201
191
  stickySessionsCookieName: data.sticky_sessions_cookie_name,
202
- timeoutConnect: data.timeout_connect,
203
- timeoutQueue: data.timeout_queue,
204
- timeoutServer: data.timeout_server,
205
- timeoutTunnel: data.timeout_tunnel,
192
+ timeoutConnect: data.timeout_connect ? data.timeout_connect : undefined,
193
+ timeoutQueue: data.timeout_queue ? data.timeout_queue : undefined,
194
+ timeoutServer: data.timeout_server ? data.timeout_server : undefined,
195
+ timeoutTunnel: data.timeout_tunnel ? data.timeout_tunnel : undefined,
206
196
  updatedAt: unmarshalDate(data.updated_at)
207
197
  };
208
198
  };
@@ -215,85 +205,64 @@ const unmarshalCertificate = data => {
215
205
  createdAt: unmarshalDate(data.created_at),
216
206
  fingerprint: data.fingerprint,
217
207
  id: data.id,
218
- lb: data.lb ? unmarshalLb(data.lb) : undefined,
208
+ lb: unmarshalLb(data.lb),
219
209
  name: data.name,
220
210
  notValidAfter: unmarshalDate(data.not_valid_after),
221
211
  notValidBefore: unmarshalDate(data.not_valid_before),
222
212
  status: data.status,
223
- statusDetails: data.status_details,
213
+ statusDetails: data.status_details ? data.status_details : undefined,
224
214
  subjectAlternativeName: data.subject_alternative_name,
225
215
  type: data.type,
226
216
  updatedAt: unmarshalDate(data.updated_at)
227
217
  };
228
218
  };
229
- const unmarshalAclAction = data => {
230
- if (!isJSONObject(data)) {
231
- throw new TypeError(`Unmarshalling the type 'AclAction' failed as data isn't a dictionary.`);
232
- }
233
- return {
234
- redirect: data.redirect ? unmarshalAclActionRedirect(data.redirect) : undefined,
235
- type: data.type
236
- };
237
- };
238
- const unmarshalAclMatch = data => {
239
- if (!isJSONObject(data)) {
240
- throw new TypeError(`Unmarshalling the type 'AclMatch' failed as data isn't a dictionary.`);
241
- }
242
- return {
243
- httpFilter: data.http_filter,
244
- httpFilterOption: data.http_filter_option,
245
- httpFilterValue: data.http_filter_value,
246
- invert: data.invert,
247
- ipSubnet: data.ip_subnet
248
- };
249
- };
250
219
  const unmarshalFrontend = data => {
251
220
  if (!isJSONObject(data)) {
252
221
  throw new TypeError(`Unmarshalling the type 'Frontend' failed as data isn't a dictionary.`);
253
222
  }
254
223
  return {
255
- backend: data.backend ? unmarshalBackend(data.backend) : undefined,
224
+ backend: unmarshalBackend(data.backend),
256
225
  certificate: data.certificate ? unmarshalCertificate(data.certificate) : undefined,
257
226
  certificateIds: data.certificate_ids,
258
227
  createdAt: unmarshalDate(data.created_at),
259
228
  enableHttp3: data.enable_http3,
260
229
  id: data.id,
261
230
  inboundPort: data.inbound_port,
262
- lb: data.lb ? unmarshalLb(data.lb) : undefined,
231
+ lb: unmarshalLb(data.lb),
263
232
  name: data.name,
264
- timeoutClient: data.timeout_client,
233
+ timeoutClient: data.timeout_client ? data.timeout_client : undefined,
265
234
  updatedAt: unmarshalDate(data.updated_at)
266
235
  };
267
236
  };
268
- const unmarshalPrivateNetworkDHCPConfig = data => {
237
+ const unmarshalAclActionRedirect = data => {
269
238
  if (!isJSONObject(data)) {
270
- throw new TypeError(`Unmarshalling the type 'PrivateNetworkDHCPConfig' failed as data isn't a dictionary.`);
239
+ throw new TypeError(`Unmarshalling the type 'AclActionRedirect' failed as data isn't a dictionary.`);
271
240
  }
272
241
  return {
273
- ipId: data.ip_id
242
+ code: data.code ? data.code : undefined,
243
+ target: data.target,
244
+ type: data.type
274
245
  };
275
246
  };
276
- const unmarshalPrivateNetworkIpamConfig = data => {
277
- if (!isJSONObject(data)) {
278
- throw new TypeError(`Unmarshalling the type 'PrivateNetworkIpamConfig' failed as data isn't a dictionary.`);
279
- }
280
- return {};
281
- };
282
- const unmarshalPrivateNetworkStaticConfig = data => {
247
+ const unmarshalAclAction = data => {
283
248
  if (!isJSONObject(data)) {
284
- throw new TypeError(`Unmarshalling the type 'PrivateNetworkStaticConfig' failed as data isn't a dictionary.`);
249
+ throw new TypeError(`Unmarshalling the type 'AclAction' failed as data isn't a dictionary.`);
285
250
  }
286
251
  return {
287
- ipAddress: data.ip_address
252
+ redirect: unmarshalAclActionRedirect(data.redirect),
253
+ type: data.type
288
254
  };
289
255
  };
290
- const unmarshalRouteMatch = data => {
256
+ const unmarshalAclMatch = data => {
291
257
  if (!isJSONObject(data)) {
292
- throw new TypeError(`Unmarshalling the type 'RouteMatch' failed as data isn't a dictionary.`);
258
+ throw new TypeError(`Unmarshalling the type 'AclMatch' failed as data isn't a dictionary.`);
293
259
  }
294
260
  return {
295
- hostHeader: data.host_header,
296
- sni: data.sni
261
+ httpFilter: data.http_filter,
262
+ httpFilterOption: data.http_filter_option ? data.http_filter_option : undefined,
263
+ httpFilterValue: data.http_filter_value,
264
+ invert: data.invert,
265
+ ipSubnet: data.ip_subnet
297
266
  };
298
267
  };
299
268
  const unmarshalAcl = data => {
@@ -301,40 +270,37 @@ const unmarshalAcl = data => {
301
270
  throw new TypeError(`Unmarshalling the type 'Acl' failed as data isn't a dictionary.`);
302
271
  }
303
272
  return {
304
- action: data.action ? unmarshalAclAction(data.action) : undefined,
273
+ action: unmarshalAclAction(data.action),
305
274
  createdAt: unmarshalDate(data.created_at),
306
275
  description: data.description,
307
- frontend: data.frontend ? unmarshalFrontend(data.frontend) : undefined,
276
+ frontend: unmarshalFrontend(data.frontend),
308
277
  id: data.id,
309
278
  index: data.index,
310
- match: data.match ? unmarshalAclMatch(data.match) : undefined,
279
+ match: unmarshalAclMatch(data.match),
311
280
  name: data.name,
312
281
  updatedAt: unmarshalDate(data.updated_at)
313
282
  };
314
283
  };
315
- const unmarshalBackendServerStats = data => {
284
+ const unmarshalPrivateNetworkIpamConfig = data => {
316
285
  if (!isJSONObject(data)) {
317
- throw new TypeError(`Unmarshalling the type 'BackendServerStats' failed as data isn't a dictionary.`);
286
+ throw new TypeError(`Unmarshalling the type 'PrivateNetworkIpamConfig' failed as data isn't a dictionary.`);
287
+ }
288
+ return {};
289
+ };
290
+ const unmarshalPrivateNetworkDHCPConfig = data => {
291
+ if (!isJSONObject(data)) {
292
+ throw new TypeError(`Unmarshalling the type 'PrivateNetworkDHCPConfig' failed as data isn't a dictionary.`);
318
293
  }
319
294
  return {
320
- backendId: data.backend_id,
321
- instanceId: data.instance_id,
322
- ip: data.ip,
323
- lastHealthCheckStatus: data.last_health_check_status,
324
- serverState: data.server_state,
325
- serverStateChangedAt: unmarshalDate(data.server_state_changed_at)
295
+ ipId: data.ip_id ? data.ip_id : undefined
326
296
  };
327
297
  };
328
- const unmarshalLbType = data => {
298
+ const unmarshalPrivateNetworkStaticConfig = data => {
329
299
  if (!isJSONObject(data)) {
330
- throw new TypeError(`Unmarshalling the type 'LbType' failed as data isn't a dictionary.`);
300
+ throw new TypeError(`Unmarshalling the type 'PrivateNetworkStaticConfig' failed as data isn't a dictionary.`);
331
301
  }
332
302
  return {
333
- description: data.description,
334
- name: data.name,
335
- region: data.region,
336
- stockStatus: data.stock_status,
337
- zone: data.zone
303
+ ipAddress: data.ip_address ? data.ip_address : undefined
338
304
  };
339
305
  };
340
306
  const unmarshalPrivateNetwork = data => {
@@ -346,13 +312,22 @@ const unmarshalPrivateNetwork = data => {
346
312
  dhcpConfig: data.dhcp_config ? unmarshalPrivateNetworkDHCPConfig(data.dhcp_config) : undefined,
347
313
  ipamConfig: data.ipam_config ? unmarshalPrivateNetworkIpamConfig(data.ipam_config) : undefined,
348
314
  ipamIds: data.ipam_ids,
349
- lb: data.lb ? unmarshalLb(data.lb) : undefined,
315
+ lb: unmarshalLb(data.lb),
350
316
  privateNetworkId: data.private_network_id,
351
317
  staticConfig: data.static_config ? unmarshalPrivateNetworkStaticConfig(data.static_config) : undefined,
352
318
  status: data.status,
353
319
  updatedAt: unmarshalDate(data.updated_at)
354
320
  };
355
321
  };
322
+ const unmarshalRouteMatch = data => {
323
+ if (!isJSONObject(data)) {
324
+ throw new TypeError(`Unmarshalling the type 'RouteMatch' failed as data isn't a dictionary.`);
325
+ }
326
+ return {
327
+ hostHeader: data.host_header ? data.host_header : undefined,
328
+ sni: data.sni ? data.sni : undefined
329
+ };
330
+ };
356
331
  const unmarshalRoute = data => {
357
332
  if (!isJSONObject(data)) {
358
333
  throw new TypeError(`Unmarshalling the type 'Route' failed as data isn't a dictionary.`);
@@ -362,10 +337,23 @@ const unmarshalRoute = data => {
362
337
  createdAt: unmarshalDate(data.created_at),
363
338
  frontendId: data.frontend_id,
364
339
  id: data.id,
365
- match: data.match ? unmarshalRouteMatch(data.match) : undefined,
340
+ match: unmarshalRouteMatch(data.match),
366
341
  updatedAt: unmarshalDate(data.updated_at)
367
342
  };
368
343
  };
344
+ const unmarshalBackendServerStats = data => {
345
+ if (!isJSONObject(data)) {
346
+ throw new TypeError(`Unmarshalling the type 'BackendServerStats' failed as data isn't a dictionary.`);
347
+ }
348
+ return {
349
+ backendId: data.backend_id,
350
+ instanceId: data.instance_id,
351
+ ip: data.ip,
352
+ lastHealthCheckStatus: data.last_health_check_status,
353
+ serverState: data.server_state,
354
+ serverStateChangedAt: unmarshalDate(data.server_state_changed_at)
355
+ };
356
+ };
369
357
  const unmarshalLbStats = data => {
370
358
  if (!isJSONObject(data)) {
371
359
  throw new TypeError(`Unmarshalling the type 'LbStats' failed as data isn't a dictionary.`);
@@ -437,6 +425,18 @@ const unmarshalListLbPrivateNetworksResponse = data => {
437
425
  totalCount: data.total_count
438
426
  };
439
427
  };
428
+ const unmarshalLbType = data => {
429
+ if (!isJSONObject(data)) {
430
+ throw new TypeError(`Unmarshalling the type 'LbType' failed as data isn't a dictionary.`);
431
+ }
432
+ return {
433
+ description: data.description,
434
+ name: data.name,
435
+ region: data.region ? data.region : undefined,
436
+ stockStatus: data.stock_status,
437
+ zone: data.zone
438
+ };
439
+ };
440
440
  const unmarshalListLbTypesResponse = data => {
441
441
  if (!isJSONObject(data)) {
442
442
  throw new TypeError(`Unmarshalling the type 'ListLbTypesResponse' failed as data isn't a dictionary.`);
@@ -482,130 +482,26 @@ const unmarshalSetAclsResponse = data => {
482
482
  totalCount: data.total_count
483
483
  };
484
484
  };
485
- const marshalAclActionRedirect = (request, defaults) => ({
486
- code: request.code,
487
- target: request.target,
488
- type: request.type
489
- });
490
- const marshalAclAction = (request, defaults) => ({
491
- redirect: request.redirect ? marshalAclActionRedirect(request.redirect) : undefined,
492
- type: request.type
493
- });
494
- const marshalAclMatch = (request, defaults) => ({
495
- http_filter: request.httpFilter,
496
- http_filter_option: request.httpFilterOption,
497
- http_filter_value: request.httpFilterValue,
498
- invert: request.invert,
499
- ip_subnet: request.ipSubnet
500
- });
501
- const marshalHealthCheckHttpConfig = (request, defaults) => ({
502
- code: request.code,
503
- host_header: request.hostHeader,
504
- method: request.method,
505
- uri: request.uri
506
- });
507
- const marshalHealthCheckHttpsConfig = (request, defaults) => ({
508
- code: request.code,
509
- host_header: request.hostHeader,
510
- method: request.method,
511
- sni: request.sni,
512
- uri: request.uri
513
- });
514
- const marshalHealthCheckLdapConfig = (request, defaults) => ({});
515
- const marshalHealthCheckMysqlConfig = (request, defaults) => ({
516
- user: request.user
517
- });
518
- const marshalHealthCheckPgsqlConfig = (request, defaults) => ({
519
- user: request.user
520
- });
521
- const marshalHealthCheckRedisConfig = (request, defaults) => ({});
522
- const marshalHealthCheckTcpConfig = (request, defaults) => ({});
523
- const marshalAclSpec = (request, defaults) => ({
524
- action: marshalAclAction(request.action),
525
- description: request.description,
526
- index: request.index,
527
- match: request.match ? marshalAclMatch(request.match) : undefined,
528
- name: request.name
529
- });
530
- const marshalCreateCertificateRequestCustomCertificate = (request, defaults) => ({
531
- certificate_chain: request.certificateChain
532
- });
533
- const marshalCreateCertificateRequestLetsencryptConfig = (request, defaults) => ({
534
- common_name: request.commonName,
535
- subject_alternative_name: request.subjectAlternativeName
536
- });
537
- const marshalHealthCheck = (request, defaults) => ({
538
- check_delay: request.checkDelay,
539
- check_max_retries: request.checkMaxRetries,
540
- check_send_proxy: request.checkSendProxy,
541
- check_timeout: request.checkTimeout,
542
- port: request.port,
543
- transient_check_delay: request.transientCheckDelay,
544
- ...resolveOneOf([{
545
- param: 'tcp_config',
546
- value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
547
- }, {
548
- param: 'mysql_config',
549
- value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
550
- }, {
551
- param: 'pgsql_config',
552
- value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
553
- }, {
554
- param: 'ldap_config',
555
- value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
556
- }, {
557
- param: 'redis_config',
558
- value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
559
- }, {
560
- param: 'http_config',
561
- value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
562
- }, {
563
- param: 'https_config',
564
- value: request.httpsConfig ? marshalHealthCheckHttpsConfig(request.httpsConfig) : undefined
565
- }])
566
- });
567
- const marshalPrivateNetworkDHCPConfig = (request, defaults) => ({
568
- ip_id: request.ipId
569
- });
570
- const marshalPrivateNetworkIpamConfig = (request, defaults) => ({});
571
- const marshalPrivateNetworkStaticConfig = (request, defaults) => ({
572
- ip_address: request.ipAddress
573
- });
574
- const marshalRouteMatch = (request, defaults) => ({
575
- ...resolveOneOf([{
576
- param: 'sni',
577
- value: request.sni
578
- }, {
579
- param: 'host_header',
580
- value: request.hostHeader
581
- }])
582
- });
583
- const marshalSubscriberEmailConfig = (request, defaults) => ({
584
- email: request.email
585
- });
586
- const marshalSubscriberWebhookConfig = (request, defaults) => ({
587
- uri: request.uri
588
- });
589
485
  const marshalAddBackendServersRequest = (request, defaults) => ({
590
486
  server_ip: request.serverIp
591
487
  });
592
488
  const marshalAttachPrivateNetworkRequest = (request, defaults) => ({
593
489
  ...resolveOneOf([{
594
- param: 'static_config',
595
- value: request.staticConfig ? marshalPrivateNetworkStaticConfig(request.staticConfig) : undefined
596
- }, {
597
490
  param: 'dhcp_config',
598
- value: request.dhcpConfig ? marshalPrivateNetworkDHCPConfig(request.dhcpConfig) : undefined
491
+ value: request.dhcpConfig
599
492
  }, {
600
493
  param: 'ipam_config',
601
- value: request.ipamConfig ? marshalPrivateNetworkIpamConfig(request.ipamConfig) : undefined
494
+ value: request.ipamConfig
495
+ }, {
496
+ param: 'static_config',
497
+ value: request.staticConfig
602
498
  }])
603
499
  });
604
500
  const marshalCreateAclRequest = (request, defaults) => ({
605
- action: marshalAclAction(request.action),
501
+ action: request.action,
606
502
  description: request.description,
607
503
  index: request.index,
608
- match: request.match ? marshalAclMatch(request.match) : undefined,
504
+ match: request.match,
609
505
  name: request.name || randomName('acl')
610
506
  });
611
507
  const marshalCreateBackendRequest = (request, defaults) => ({
@@ -613,13 +509,13 @@ const marshalCreateBackendRequest = (request, defaults) => ({
613
509
  forward_port: request.forwardPort,
614
510
  forward_port_algorithm: request.forwardPortAlgorithm,
615
511
  forward_protocol: request.forwardProtocol,
616
- health_check: marshalHealthCheck(request.healthCheck),
512
+ health_check: request.healthCheck,
617
513
  ignore_ssl_server_verify: request.ignoreSslServerVerify,
618
514
  max_connections: request.maxConnections,
619
515
  max_retries: request.maxRetries,
620
516
  name: request.name || randomName('lbb'),
621
- on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
622
- proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
517
+ on_marked_down_action: request.onMarkedDownAction,
518
+ proxy_protocol: request.proxyProtocol,
623
519
  redispatch_attempt_count: request.redispatchAttemptCount,
624
520
  send_proxy_v2: request.sendProxyV2,
625
521
  server_ip: request.serverIp,
@@ -634,12 +530,12 @@ const marshalCreateBackendRequest = (request, defaults) => ({
634
530
  const marshalCreateCertificateRequest = (request, defaults) => ({
635
531
  name: request.name || randomName('certificate'),
636
532
  ...resolveOneOf([{
637
- param: 'letsencrypt',
638
- value: request.letsencrypt ? marshalCreateCertificateRequestLetsencryptConfig(request.letsencrypt) : undefined
639
- }, {
640
533
  param: 'custom_certificate',
641
- value: request.customCertificate ? marshalCreateCertificateRequestCustomCertificate(request.customCertificate) : undefined
642
- }], true)
534
+ value: request.customCertificate
535
+ }, {
536
+ param: 'letsencrypt',
537
+ value: request.letsencrypt
538
+ }])
643
539
  });
644
540
  const marshalCreateFrontendRequest = (request, defaults) => ({
645
541
  backend_id: request.backendId,
@@ -653,13 +549,11 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
653
549
  const marshalCreateIpRequest = (request, defaults) => ({
654
550
  reverse: request.reverse,
655
551
  ...resolveOneOf([{
656
- default: defaults.defaultProjectId,
657
- param: 'project_id',
658
- value: request.projectId
659
- }, {
660
- default: defaults.defaultOrganizationId,
661
552
  param: 'organization_id',
662
553
  value: request.organizationId
554
+ }, {
555
+ param: 'project_id',
556
+ value: request.projectId
663
557
  }])
664
558
  });
665
559
  const marshalCreateLbRequest = (request, defaults) => ({
@@ -667,41 +561,37 @@ const marshalCreateLbRequest = (request, defaults) => ({
667
561
  description: request.description,
668
562
  ip_id: request.ipId,
669
563
  name: request.name || randomName('lb'),
670
- ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
564
+ ssl_compatibility_level: request.sslCompatibilityLevel,
671
565
  tags: request.tags,
672
566
  type: request.type,
673
567
  ...resolveOneOf([{
674
- default: defaults.defaultProjectId,
675
- param: 'project_id',
676
- value: request.projectId
677
- }, {
678
- default: defaults.defaultOrganizationId,
679
568
  param: 'organization_id',
680
569
  value: request.organizationId
570
+ }, {
571
+ param: 'project_id',
572
+ value: request.projectId
681
573
  }])
682
574
  });
683
575
  const marshalCreateRouteRequest = (request, defaults) => ({
684
576
  backend_id: request.backendId,
685
577
  frontend_id: request.frontendId,
686
- match: request.match ? marshalRouteMatch(request.match) : undefined
578
+ match: request.match
687
579
  });
688
580
  const marshalCreateSubscriberRequest = (request, defaults) => ({
689
581
  name: request.name,
690
582
  ...resolveOneOf([{
691
- default: defaults.defaultProjectId,
692
- param: 'project_id',
693
- value: request.projectId
694
- }, {
695
- default: defaults.defaultOrganizationId,
696
583
  param: 'organization_id',
697
584
  value: request.organizationId
585
+ }, {
586
+ param: 'project_id',
587
+ value: request.projectId
698
588
  }]),
699
589
  ...resolveOneOf([{
700
590
  param: 'email_config',
701
- value: request.emailConfig ? marshalSubscriberEmailConfig(request.emailConfig) : undefined
591
+ value: request.emailConfig
702
592
  }, {
703
593
  param: 'webhook_config',
704
- value: request.webhookConfig ? marshalSubscriberWebhookConfig(request.webhookConfig) : undefined
594
+ value: request.webhookConfig
705
595
  }])
706
596
  });
707
597
  const marshalMigrateLbRequest = (request, defaults) => ({
@@ -717,10 +607,10 @@ const marshalSubscribeToLbRequest = (request, defaults) => ({
717
607
  subscriber_id: request.subscriberId
718
608
  });
719
609
  const marshalUpdateAclRequest = (request, defaults) => ({
720
- action: marshalAclAction(request.action),
610
+ action: request.action,
721
611
  description: request.description,
722
612
  index: request.index,
723
- match: request.match ? marshalAclMatch(request.match) : undefined,
613
+ match: request.match,
724
614
  name: request.name
725
615
  });
726
616
  const marshalUpdateBackendRequest = (request, defaults) => ({
@@ -732,8 +622,8 @@ const marshalUpdateBackendRequest = (request, defaults) => ({
732
622
  max_connections: request.maxConnections,
733
623
  max_retries: request.maxRetries,
734
624
  name: request.name,
735
- on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
736
- proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
625
+ on_marked_down_action: request.onMarkedDownAction,
626
+ proxy_protocol: request.proxyProtocol,
737
627
  redispatch_attempt_count: request.redispatchAttemptCount,
738
628
  send_proxy_v2: request.sendProxyV2,
739
629
  ssl_bridging: request.sslBridging,
@@ -764,26 +654,26 @@ const marshalUpdateHealthCheckRequest = (request, defaults) => ({
764
654
  port: request.port,
765
655
  transient_check_delay: request.transientCheckDelay,
766
656
  ...resolveOneOf([{
767
- param: 'tcp_config',
768
- value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
657
+ param: 'http_config',
658
+ value: request.httpConfig
659
+ }, {
660
+ param: 'https_config',
661
+ value: request.httpsConfig
662
+ }, {
663
+ param: 'ldap_config',
664
+ value: request.ldapConfig
769
665
  }, {
770
666
  param: 'mysql_config',
771
- value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
667
+ value: request.mysqlConfig
772
668
  }, {
773
669
  param: 'pgsql_config',
774
- value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
775
- }, {
776
- param: 'ldap_config',
777
- value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
670
+ value: request.pgsqlConfig
778
671
  }, {
779
672
  param: 'redis_config',
780
- value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
781
- }, {
782
- param: 'http_config',
783
- value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
673
+ value: request.redisConfig
784
674
  }, {
785
- param: 'https_config',
786
- value: request.httpsConfig ? marshalHealthCheckHttpsConfig(request.httpsConfig) : undefined
675
+ param: 'tcp_config',
676
+ value: request.tcpConfig
787
677
  }])
788
678
  });
789
679
  const marshalUpdateIpRequest = (request, defaults) => ({
@@ -792,21 +682,21 @@ const marshalUpdateIpRequest = (request, defaults) => ({
792
682
  const marshalUpdateLbRequest = (request, defaults) => ({
793
683
  description: request.description,
794
684
  name: request.name,
795
- ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
685
+ ssl_compatibility_level: request.sslCompatibilityLevel,
796
686
  tags: request.tags
797
687
  });
798
688
  const marshalUpdateRouteRequest = (request, defaults) => ({
799
689
  backend_id: request.backendId,
800
- match: request.match ? marshalRouteMatch(request.match) : undefined
690
+ match: request.match
801
691
  });
802
692
  const marshalUpdateSubscriberRequest = (request, defaults) => ({
803
693
  name: request.name,
804
694
  ...resolveOneOf([{
805
695
  param: 'email_config',
806
- value: request.emailConfig ? marshalSubscriberEmailConfig(request.emailConfig) : undefined
696
+ value: request.emailConfig
807
697
  }, {
808
698
  param: 'webhook_config',
809
- value: request.webhookConfig ? marshalSubscriberWebhookConfig(request.webhookConfig) : undefined
699
+ value: request.webhookConfig
810
700
  }])
811
701
  });
812
702
  const marshalZonedApiAddBackendServersRequest = (request, defaults) => ({
@@ -814,21 +704,21 @@ const marshalZonedApiAddBackendServersRequest = (request, defaults) => ({
814
704
  });
815
705
  const marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({
816
706
  ...resolveOneOf([{
817
- param: 'static_config',
818
- value: request.staticConfig ? marshalPrivateNetworkStaticConfig(request.staticConfig) : undefined
819
- }, {
820
707
  param: 'dhcp_config',
821
- value: request.dhcpConfig ? marshalPrivateNetworkDHCPConfig(request.dhcpConfig) : undefined
708
+ value: request.dhcpConfig
822
709
  }, {
823
710
  param: 'ipam_config',
824
- value: request.ipamConfig ? marshalPrivateNetworkIpamConfig(request.ipamConfig) : undefined
711
+ value: request.ipamConfig
712
+ }, {
713
+ param: 'static_config',
714
+ value: request.staticConfig
825
715
  }])
826
716
  });
827
717
  const marshalZonedApiCreateAclRequest = (request, defaults) => ({
828
- action: marshalAclAction(request.action),
718
+ action: request.action,
829
719
  description: request.description,
830
720
  index: request.index,
831
- match: request.match ? marshalAclMatch(request.match) : undefined,
721
+ match: request.match,
832
722
  name: request.name || randomName('acl')
833
723
  });
834
724
  const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
@@ -836,13 +726,13 @@ const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
836
726
  forward_port: request.forwardPort,
837
727
  forward_port_algorithm: request.forwardPortAlgorithm,
838
728
  forward_protocol: request.forwardProtocol,
839
- health_check: marshalHealthCheck(request.healthCheck),
729
+ health_check: request.healthCheck,
840
730
  ignore_ssl_server_verify: request.ignoreSslServerVerify,
841
731
  max_connections: request.maxConnections,
842
732
  max_retries: request.maxRetries,
843
733
  name: request.name || randomName('lbb'),
844
- on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
845
- proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
734
+ on_marked_down_action: request.onMarkedDownAction,
735
+ proxy_protocol: request.proxyProtocol,
846
736
  redispatch_attempt_count: request.redispatchAttemptCount,
847
737
  send_proxy_v2: request.sendProxyV2,
848
738
  server_ip: request.serverIp,
@@ -857,12 +747,12 @@ const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
857
747
  const marshalZonedApiCreateCertificateRequest = (request, defaults) => ({
858
748
  name: request.name || randomName('certificate'),
859
749
  ...resolveOneOf([{
860
- param: 'letsencrypt',
861
- value: request.letsencrypt ? marshalCreateCertificateRequestLetsencryptConfig(request.letsencrypt) : undefined
862
- }, {
863
750
  param: 'custom_certificate',
864
- value: request.customCertificate ? marshalCreateCertificateRequestCustomCertificate(request.customCertificate) : undefined
865
- }], true)
751
+ value: request.customCertificate
752
+ }, {
753
+ param: 'letsencrypt',
754
+ value: request.letsencrypt
755
+ }])
866
756
  });
867
757
  const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
868
758
  backend_id: request.backendId,
@@ -876,13 +766,11 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
876
766
  const marshalZonedApiCreateIpRequest = (request, defaults) => ({
877
767
  reverse: request.reverse,
878
768
  ...resolveOneOf([{
879
- default: defaults.defaultProjectId,
880
- param: 'project_id',
881
- value: request.projectId
882
- }, {
883
- default: defaults.defaultOrganizationId,
884
769
  param: 'organization_id',
885
770
  value: request.organizationId
771
+ }, {
772
+ param: 'project_id',
773
+ value: request.projectId
886
774
  }])
887
775
  });
888
776
  const marshalZonedApiCreateLbRequest = (request, defaults) => ({
@@ -890,41 +778,37 @@ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
890
778
  description: request.description,
891
779
  ip_id: request.ipId,
892
780
  name: request.name || randomName('lb'),
893
- ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
781
+ ssl_compatibility_level: request.sslCompatibilityLevel,
894
782
  tags: request.tags,
895
783
  type: request.type,
896
784
  ...resolveOneOf([{
897
- default: defaults.defaultProjectId,
898
- param: 'project_id',
899
- value: request.projectId
900
- }, {
901
- default: defaults.defaultOrganizationId,
902
785
  param: 'organization_id',
903
786
  value: request.organizationId
787
+ }, {
788
+ param: 'project_id',
789
+ value: request.projectId
904
790
  }])
905
791
  });
906
792
  const marshalZonedApiCreateRouteRequest = (request, defaults) => ({
907
793
  backend_id: request.backendId,
908
794
  frontend_id: request.frontendId,
909
- match: request.match ? marshalRouteMatch(request.match) : undefined
795
+ match: request.match
910
796
  });
911
797
  const marshalZonedApiCreateSubscriberRequest = (request, defaults) => ({
912
798
  name: request.name,
913
799
  ...resolveOneOf([{
914
- default: defaults.defaultProjectId,
915
- param: 'project_id',
916
- value: request.projectId
917
- }, {
918
- default: defaults.defaultOrganizationId,
919
800
  param: 'organization_id',
920
801
  value: request.organizationId
802
+ }, {
803
+ param: 'project_id',
804
+ value: request.projectId
921
805
  }]),
922
806
  ...resolveOneOf([{
923
807
  param: 'email_config',
924
- value: request.emailConfig ? marshalSubscriberEmailConfig(request.emailConfig) : undefined
808
+ value: request.emailConfig
925
809
  }, {
926
810
  param: 'webhook_config',
927
- value: request.webhookConfig ? marshalSubscriberWebhookConfig(request.webhookConfig) : undefined
811
+ value: request.webhookConfig
928
812
  }])
929
813
  });
930
814
  const marshalZonedApiMigrateLbRequest = (request, defaults) => ({
@@ -934,7 +818,7 @@ const marshalZonedApiRemoveBackendServersRequest = (request, defaults) => ({
934
818
  server_ip: request.serverIp
935
819
  });
936
820
  const marshalZonedApiSetAclsRequest = (request, defaults) => ({
937
- acls: request.acls.map(elt => marshalAclSpec(elt))
821
+ acls: request.acls
938
822
  });
939
823
  const marshalZonedApiSetBackendServersRequest = (request, defaults) => ({
940
824
  server_ip: request.serverIp
@@ -943,10 +827,10 @@ const marshalZonedApiSubscribeToLbRequest = (request, defaults) => ({
943
827
  subscriber_id: request.subscriberId
944
828
  });
945
829
  const marshalZonedApiUpdateAclRequest = (request, defaults) => ({
946
- action: marshalAclAction(request.action),
830
+ action: request.action,
947
831
  description: request.description,
948
832
  index: request.index,
949
- match: request.match ? marshalAclMatch(request.match) : undefined,
833
+ match: request.match,
950
834
  name: request.name
951
835
  });
952
836
  const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
@@ -958,8 +842,8 @@ const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
958
842
  max_connections: request.maxConnections,
959
843
  max_retries: request.maxRetries,
960
844
  name: request.name,
961
- on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
962
- proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
845
+ on_marked_down_action: request.onMarkedDownAction,
846
+ proxy_protocol: request.proxyProtocol,
963
847
  redispatch_attempt_count: request.redispatchAttemptCount,
964
848
  send_proxy_v2: request.sendProxyV2,
965
849
  ssl_bridging: request.sslBridging,
@@ -990,26 +874,26 @@ const marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
990
874
  port: request.port,
991
875
  transient_check_delay: request.transientCheckDelay,
992
876
  ...resolveOneOf([{
993
- param: 'tcp_config',
994
- value: request.tcpConfig ? marshalHealthCheckTcpConfig(request.tcpConfig) : undefined
877
+ param: 'http_config',
878
+ value: request.httpConfig
879
+ }, {
880
+ param: 'https_config',
881
+ value: request.httpsConfig
882
+ }, {
883
+ param: 'ldap_config',
884
+ value: request.ldapConfig
995
885
  }, {
996
886
  param: 'mysql_config',
997
- value: request.mysqlConfig ? marshalHealthCheckMysqlConfig(request.mysqlConfig) : undefined
887
+ value: request.mysqlConfig
998
888
  }, {
999
889
  param: 'pgsql_config',
1000
- value: request.pgsqlConfig ? marshalHealthCheckPgsqlConfig(request.pgsqlConfig) : undefined
1001
- }, {
1002
- param: 'ldap_config',
1003
- value: request.ldapConfig ? marshalHealthCheckLdapConfig(request.ldapConfig) : undefined
890
+ value: request.pgsqlConfig
1004
891
  }, {
1005
892
  param: 'redis_config',
1006
- value: request.redisConfig ? marshalHealthCheckRedisConfig(request.redisConfig) : undefined
1007
- }, {
1008
- param: 'http_config',
1009
- value: request.httpConfig ? marshalHealthCheckHttpConfig(request.httpConfig) : undefined
893
+ value: request.redisConfig
1010
894
  }, {
1011
- param: 'https_config',
1012
- value: request.httpsConfig ? marshalHealthCheckHttpsConfig(request.httpsConfig) : undefined
895
+ param: 'tcp_config',
896
+ value: request.tcpConfig
1013
897
  }])
1014
898
  });
1015
899
  const marshalZonedApiUpdateIpRequest = (request, defaults) => ({
@@ -1018,21 +902,21 @@ const marshalZonedApiUpdateIpRequest = (request, defaults) => ({
1018
902
  const marshalZonedApiUpdateLbRequest = (request, defaults) => ({
1019
903
  description: request.description,
1020
904
  name: request.name,
1021
- ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
905
+ ssl_compatibility_level: request.sslCompatibilityLevel,
1022
906
  tags: request.tags
1023
907
  });
1024
908
  const marshalZonedApiUpdateRouteRequest = (request, defaults) => ({
1025
909
  backend_id: request.backendId,
1026
- match: request.match ? marshalRouteMatch(request.match) : undefined
910
+ match: request.match
1027
911
  });
1028
912
  const marshalZonedApiUpdateSubscriberRequest = (request, defaults) => ({
1029
913
  name: request.name,
1030
914
  ...resolveOneOf([{
1031
915
  param: 'email_config',
1032
- value: request.emailConfig ? marshalSubscriberEmailConfig(request.emailConfig) : undefined
916
+ value: request.emailConfig
1033
917
  }, {
1034
918
  param: 'webhook_config',
1035
- value: request.webhookConfig ? marshalSubscriberWebhookConfig(request.webhookConfig) : undefined
919
+ value: request.webhookConfig
1036
920
  }])
1037
921
  });
1038
922