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