@scaleway/sdk 0.1.0-beta.9 → 1.0.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 (173) hide show
  1. package/README.md +1 -1
  2. package/dist/api/account/index.js +2 -2
  3. package/dist/api/account/v2/api.gen.js +5 -18
  4. package/dist/api/account/v2/index.gen.js +3 -0
  5. package/dist/api/account/v2/marshalling.gen.js +0 -2
  6. package/dist/api/account/v2alpha1/api.gen.js +3 -13
  7. package/dist/api/account/v2alpha1/marshalling.gen.js +0 -5
  8. package/dist/api/applesilicon/index.js +2 -2
  9. package/dist/api/applesilicon/v1alpha1/api.gen.js +7 -27
  10. package/dist/api/applesilicon/v1alpha1/index.gen.js +4 -0
  11. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -14
  12. package/dist/api/baremetal/v1/api.gen.js +47 -49
  13. package/dist/api/baremetal/v1/api.utils.js +2 -10
  14. package/dist/api/baremetal/v1/content.gen.js +6 -3
  15. package/dist/api/baremetal/v1/index.js +4 -1
  16. package/dist/api/baremetal/v1/marshalling.gen.js +44 -45
  17. package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
  18. package/dist/api/container/index.js +2 -2
  19. package/dist/api/container/v1beta1/api.gen.js +5 -51
  20. package/dist/api/container/v1beta1/content.gen.js +4 -4
  21. package/dist/api/container/v1beta1/{index.js → index.gen.js} +3 -1
  22. package/dist/api/container/v1beta1/marshalling.gen.js +12 -26
  23. package/dist/api/domain/index.js +2 -2
  24. package/dist/api/domain/v2beta1/api.gen.js +55 -85
  25. package/dist/api/domain/v2beta1/content.gen.js +22 -1
  26. package/dist/api/domain/v2beta1/index.gen.js +4 -0
  27. package/dist/api/domain/v2beta1/marshalling.gen.js +47 -165
  28. package/dist/api/flexibleip/index.js +2 -2
  29. package/dist/api/flexibleip/v1alpha1/api.gen.js +5 -22
  30. package/dist/api/flexibleip/v1alpha1/content.gen.js +1 -1
  31. package/dist/api/flexibleip/v1alpha1/index.gen.js +6 -0
  32. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -7
  33. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
  34. package/dist/api/function/index.js +2 -2
  35. package/dist/api/function/v1beta1/api.gen.js +54 -57
  36. package/dist/api/function/v1beta1/content.gen.js +8 -5
  37. package/dist/api/function/v1beta1/index.gen.js +4 -0
  38. package/dist/api/function/v1beta1/marshalling.gen.js +125 -33
  39. package/dist/api/iam/index.js +2 -2
  40. package/dist/api/iam/v1alpha1/api.gen.js +15 -62
  41. package/dist/api/iam/v1alpha1/index.gen.js +5 -0
  42. package/dist/api/iam/v1alpha1/marshalling.gen.js +7 -29
  43. package/dist/api/iam/v1alpha1/validation-rules.gen.js +184 -0
  44. package/dist/api/instance/v1/api.gen.js +38 -118
  45. package/dist/api/instance/v1/api.utils.js +59 -51
  46. package/dist/api/instance/v1/content.gen.js +7 -7
  47. package/dist/api/instance/v1/marshalling.gen.js +46 -168
  48. package/dist/api/instance/v1/marshalling.utils.js +63 -0
  49. package/dist/api/iot/index.js +2 -2
  50. package/dist/api/iot/v1/api.gen.js +5 -56
  51. package/dist/api/iot/v1/index.gen.js +4 -0
  52. package/dist/api/iot/v1/marshalling.gen.js +2 -51
  53. package/dist/api/k8s/index.js +2 -2
  54. package/dist/api/k8s/v1/api.gen.js +17 -43
  55. package/dist/api/k8s/v1/content.gen.js +2 -2
  56. package/dist/api/k8s/v1/index.gen.js +6 -0
  57. package/dist/api/k8s/v1/marshalling.gen.js +18 -36
  58. package/dist/api/k8s/v1/validation-rules.gen.js +92 -0
  59. package/dist/api/lb/v1/api.gen.js +8 -163
  60. package/dist/api/lb/v1/api.utils.js +3 -9
  61. package/dist/api/lb/v1/content.gen.js +3 -3
  62. package/dist/api/lb/v1/marshalling.gen.js +74 -101
  63. package/dist/api/marketplace/index.js +4 -2
  64. package/dist/api/marketplace/v1/api.gen.js +3 -13
  65. package/dist/api/marketplace/v1/index.gen.js +3 -0
  66. package/dist/api/marketplace/v1/marshalling.gen.js +0 -13
  67. package/dist/api/marketplace/v2/api.gen.js +85 -0
  68. package/dist/api/marketplace/v2/index.gen.js +3 -0
  69. package/dist/api/marketplace/v2/marshalling.gen.js +92 -0
  70. package/dist/api/mnq/index.js +2 -2
  71. package/dist/api/mnq/v1alpha1/api.gen.js +7 -25
  72. package/dist/api/mnq/v1alpha1/index.gen.js +3 -0
  73. package/dist/api/mnq/v1alpha1/marshalling.gen.js +7 -46
  74. package/dist/api/rdb/index.js +2 -2
  75. package/dist/api/rdb/v1/api.gen.js +15 -89
  76. package/dist/api/rdb/v1/content.gen.js +10 -4
  77. package/dist/api/rdb/v1/index.gen.js +4 -0
  78. package/dist/api/rdb/v1/marshalling.gen.js +25 -81
  79. package/dist/api/redis/index.js +2 -2
  80. package/dist/api/redis/{v1alpha1 → v1}/api.gen.js +45 -77
  81. package/dist/api/redis/{v1alpha1 → v1}/content.gen.js +1 -1
  82. package/dist/api/redis/v1/index.gen.js +4 -0
  83. package/dist/api/redis/{v1alpha1 → v1}/marshalling.gen.js +42 -59
  84. package/dist/api/registry/index.js +2 -2
  85. package/dist/api/registry/v1/api.gen.js +5 -29
  86. package/dist/api/registry/v1/content.gen.js +2 -2
  87. package/dist/api/registry/v1/{index.js → index.gen.js} +3 -1
  88. package/dist/api/registry/v1/marshalling.gen.js +2 -8
  89. package/dist/api/secret/index.js +2 -0
  90. package/dist/api/secret/v1alpha1/api.gen.js +135 -0
  91. package/dist/api/secret/v1alpha1/index.gen.js +3 -0
  92. package/dist/api/secret/v1alpha1/marshalling.gen.js +82 -0
  93. package/dist/api/tem/index.js +2 -0
  94. package/dist/api/tem/v1alpha1/api.gen.js +109 -0
  95. package/dist/api/tem/v1alpha1/content.gen.js +10 -0
  96. package/dist/api/tem/v1alpha1/index.gen.js +4 -0
  97. package/dist/api/tem/v1alpha1/marshalling.gen.js +132 -0
  98. package/dist/api/test/index.js +2 -2
  99. package/dist/api/test/v1/api.gen.js +6 -20
  100. package/dist/api/test/v1/index.gen.js +4 -0
  101. package/dist/api/test/v1/marshalling.gen.js +2 -5
  102. package/dist/api/vpc/index.js +2 -2
  103. package/dist/api/vpc/v1/api.gen.js +6 -17
  104. package/dist/api/vpc/v1/index.gen.js +3 -0
  105. package/dist/api/vpc/v1/marshalling.gen.js +1 -3
  106. package/dist/api/vpcgw/index.js +2 -2
  107. package/dist/api/vpcgw/v1/api.gen.js +5 -64
  108. package/dist/api/vpcgw/v1/content.gen.js +2 -2
  109. package/dist/api/vpcgw/v1/{index.js → index.gen.js} +3 -1
  110. package/dist/api/vpcgw/v1/marshalling.gen.js +3 -24
  111. package/dist/helpers/json.js +1 -2
  112. package/dist/helpers/marshalling.js +7 -20
  113. package/dist/index.cjs +3864 -2945
  114. package/dist/index.d.ts +7212 -4332
  115. package/dist/index.js +10 -6
  116. package/dist/internal/async/interval-retrier.js +10 -16
  117. package/dist/internal/interceptors/interceptor.js +3 -1
  118. package/dist/internal/interceptors/request.js +1 -3
  119. package/dist/internal/logger/console-logger.js +3 -5
  120. package/dist/internal/logger/index.js +3 -5
  121. package/dist/internal/logger/level-resolver.js +0 -3
  122. package/dist/internal/validations/string-validation.js +8 -10
  123. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js +13 -0
  124. package/dist/scw/api.js +3 -4
  125. package/dist/scw/auth.js +3 -5
  126. package/dist/scw/client-ini-factory.js +32 -15
  127. package/dist/scw/client-ini-profile.js +10 -4
  128. package/dist/scw/client-settings.js +32 -15
  129. package/dist/scw/client.js +5 -6
  130. package/dist/scw/constants.js +1 -1
  131. package/dist/scw/custom-marshalling.js +8 -14
  132. package/dist/scw/errors/error-parser.js +2 -21
  133. package/dist/scw/errors/non-standard/invalid-request-mapper.js +17 -15
  134. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +7 -6
  135. package/dist/scw/errors/scw-error.js +20 -20
  136. package/dist/scw/errors/standard/already-exists-error.js +3 -4
  137. package/dist/scw/errors/standard/denied-authentication-error.js +4 -11
  138. package/dist/scw/errors/standard/invalid-arguments-error.js +1 -10
  139. package/dist/scw/errors/standard/out-of-stock-error.js +0 -3
  140. package/dist/scw/errors/standard/permissions-denied-error.js +1 -4
  141. package/dist/scw/errors/standard/precondition-failed-error.js +4 -8
  142. package/dist/scw/errors/standard/quotas-exceeded-error.js +14 -14
  143. package/dist/scw/errors/standard/resource-expired-error.js +3 -4
  144. package/dist/scw/errors/standard/resource-locked-error.js +3 -4
  145. package/dist/scw/errors/standard/resource-not-found-error.js +3 -4
  146. package/dist/scw/errors/standard/too-many-requests-error.js +3 -16
  147. package/dist/scw/errors/standard/transient-state-error.js +3 -4
  148. package/dist/scw/errors/types.js +0 -3
  149. package/dist/scw/fetch/build-fetcher.js +1 -9
  150. package/dist/scw/fetch/http-dumper.js +4 -7
  151. package/dist/scw/fetch/http-interceptors.js +9 -12
  152. package/dist/scw/fetch/resource-paginator.js +18 -16
  153. package/dist/scw/fetch/response-parser.js +17 -23
  154. package/node_modules/@scaleway/random-name/CHANGELOG.md +42 -63
  155. package/node_modules/@scaleway/random-name/dist/index.js +5 -246
  156. package/node_modules/@scaleway/random-name/package.json +6 -5
  157. package/package.json +4 -5
  158. package/dist/api/account/v2/index.js +0 -1
  159. package/dist/api/applesilicon/v1alpha1/index.js +0 -2
  160. package/dist/api/domain/v2beta1/index.js +0 -2
  161. package/dist/api/flexibleip/v1alpha1/index.js +0 -2
  162. package/dist/api/function/v1beta1/index.js +0 -2
  163. package/dist/api/iam/v1alpha1/index.js +0 -1
  164. package/dist/api/iot/v1/index.js +0 -2
  165. package/dist/api/k8s/v1/index.js +0 -2
  166. package/dist/api/marketplace/v1/index.js +0 -1
  167. package/dist/api/mnq/v1alpha1/index.js +0 -1
  168. package/dist/api/rdb/v1/index.js +0 -2
  169. package/dist/api/redis/v1alpha1/index.js +0 -2
  170. package/dist/api/test/v1/index.js +0 -1
  171. package/dist/api/vpc/v1/index.js +0 -1
  172. package/dist/node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -254
  173. package/node_modules/@scaleway/random-name/dist/index.browser.js +0 -256
@@ -1,102 +1,85 @@
1
- import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
1
+ import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.1/node_modules/@scaleway/random-name/dist/index.js';
2
2
  import { isJSONObject } from '../../../helpers/json.js';
3
3
  import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
4
4
 
5
5
  // This file was automatically generated. DO NOT EDIT.
6
-
7
6
  const unmarshalSubscriberEmailConfig = data => {
8
7
  if (!isJSONObject(data)) {
9
8
  throw new TypeError(`Unmarshalling the type 'SubscriberEmailConfig' failed as data isn't a dictionary.`);
10
9
  }
11
-
12
10
  return {
13
11
  email: data.email
14
12
  };
15
13
  };
16
-
17
14
  const unmarshalSubscriberWebhookConfig = data => {
18
15
  if (!isJSONObject(data)) {
19
16
  throw new TypeError(`Unmarshalling the type 'SubscriberWebhookConfig' failed as data isn't a dictionary.`);
20
17
  }
21
-
22
18
  return {
23
19
  uri: data.uri
24
20
  };
25
21
  };
26
-
27
22
  const unmarshalHealthCheckHttpConfig = data => {
28
23
  if (!isJSONObject(data)) {
29
24
  throw new TypeError(`Unmarshalling the type 'HealthCheckHttpConfig' failed as data isn't a dictionary.`);
30
25
  }
31
-
32
26
  return {
33
27
  code: data.code,
28
+ hostHeader: data.host_header,
34
29
  method: data.method,
35
30
  uri: data.uri
36
31
  };
37
32
  };
38
-
39
33
  const unmarshalHealthCheckHttpsConfig = data => {
40
34
  if (!isJSONObject(data)) {
41
35
  throw new TypeError(`Unmarshalling the type 'HealthCheckHttpsConfig' failed as data isn't a dictionary.`);
42
36
  }
43
-
44
37
  return {
45
38
  code: data.code,
39
+ hostHeader: data.host_header,
46
40
  method: data.method,
41
+ sni: data.sni,
47
42
  uri: data.uri
48
43
  };
49
44
  };
50
-
51
45
  const unmarshalHealthCheckLdapConfig = data => {
52
46
  if (!isJSONObject(data)) {
53
47
  throw new TypeError(`Unmarshalling the type 'HealthCheckLdapConfig' failed as data isn't a dictionary.`);
54
48
  }
55
-
56
49
  return {};
57
50
  };
58
-
59
51
  const unmarshalHealthCheckMysqlConfig = data => {
60
52
  if (!isJSONObject(data)) {
61
53
  throw new TypeError(`Unmarshalling the type 'HealthCheckMysqlConfig' failed as data isn't a dictionary.`);
62
54
  }
63
-
64
55
  return {
65
56
  user: data.user
66
57
  };
67
58
  };
68
-
69
59
  const unmarshalHealthCheckPgsqlConfig = data => {
70
60
  if (!isJSONObject(data)) {
71
61
  throw new TypeError(`Unmarshalling the type 'HealthCheckPgsqlConfig' failed as data isn't a dictionary.`);
72
62
  }
73
-
74
63
  return {
75
64
  user: data.user
76
65
  };
77
66
  };
78
-
79
67
  const unmarshalHealthCheckRedisConfig = data => {
80
68
  if (!isJSONObject(data)) {
81
69
  throw new TypeError(`Unmarshalling the type 'HealthCheckRedisConfig' failed as data isn't a dictionary.`);
82
70
  }
83
-
84
71
  return {};
85
72
  };
86
-
87
73
  const unmarshalHealthCheckTcpConfig = data => {
88
74
  if (!isJSONObject(data)) {
89
75
  throw new TypeError(`Unmarshalling the type 'HealthCheckTcpConfig' failed as data isn't a dictionary.`);
90
76
  }
91
-
92
77
  return {};
93
78
  };
94
-
95
79
  const unmarshalInstance = data => {
96
80
  if (!isJSONObject(data)) {
97
81
  throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
98
82
  }
99
-
100
83
  return {
101
84
  createdAt: unmarshalDate(data.created_at),
102
85
  id: data.id,
@@ -107,12 +90,10 @@ const unmarshalInstance = data => {
107
90
  zone: data.zone
108
91
  };
109
92
  };
110
-
111
93
  const unmarshalIp = data => {
112
94
  if (!isJSONObject(data)) {
113
95
  throw new TypeError(`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`);
114
96
  }
115
-
116
97
  return {
117
98
  id: data.id,
118
99
  ipAddress: data.ip_address,
@@ -128,7 +109,6 @@ const unmarshalSubscriber = data => {
128
109
  if (!isJSONObject(data)) {
129
110
  throw new TypeError(`Unmarshalling the type 'Subscriber' failed as data isn't a dictionary.`);
130
111
  }
131
-
132
112
  return {
133
113
  emailConfig: data.email_config ? unmarshalSubscriberEmailConfig(data.email_config) : undefined,
134
114
  id: data.id,
@@ -140,7 +120,6 @@ const unmarshalHealthCheck = data => {
140
120
  if (!isJSONObject(data)) {
141
121
  throw new TypeError(`Unmarshalling the type 'HealthCheck' failed as data isn't a dictionary.`);
142
122
  }
143
-
144
123
  return {
145
124
  checkDelay: data.check_delay,
146
125
  checkMaxRetries: data.check_max_retries,
@@ -160,7 +139,6 @@ const unmarshalLb = data => {
160
139
  if (!isJSONObject(data)) {
161
140
  throw new TypeError(`Unmarshalling the type 'Lb' failed as data isn't a dictionary.`);
162
141
  }
163
-
164
142
  return {
165
143
  backendCount: data.backend_count,
166
144
  createdAt: unmarshalDate(data.created_at),
@@ -184,11 +162,20 @@ const unmarshalLb = data => {
184
162
  zone: data.zone
185
163
  };
186
164
  };
165
+ const unmarshalAclActionRedirect = data => {
166
+ if (!isJSONObject(data)) {
167
+ throw new TypeError(`Unmarshalling the type 'AclActionRedirect' failed as data isn't a dictionary.`);
168
+ }
169
+ return {
170
+ code: data.code,
171
+ target: data.target,
172
+ type: data.type
173
+ };
174
+ };
187
175
  const unmarshalBackend = data => {
188
176
  if (!isJSONObject(data)) {
189
177
  throw new TypeError(`Unmarshalling the type 'Backend' failed as data isn't a dictionary.`);
190
178
  }
191
-
192
179
  return {
193
180
  createdAt: unmarshalDate(data.created_at),
194
181
  failoverHost: data.failover_host,
@@ -197,12 +184,14 @@ const unmarshalBackend = data => {
197
184
  forwardProtocol: data.forward_protocol,
198
185
  healthCheck: data.health_check ? unmarshalHealthCheck(data.health_check) : undefined,
199
186
  id: data.id,
187
+ ignoreSslServerVerify: data.ignore_ssl_server_verify,
200
188
  lb: data.lb ? unmarshalLb(data.lb) : undefined,
201
189
  name: data.name,
202
190
  onMarkedDownAction: data.on_marked_down_action,
203
191
  pool: data.pool,
204
192
  proxyProtocol: data.proxy_protocol,
205
193
  sendProxyV2: data.send_proxy_v2,
194
+ sslBridging: data.ssl_bridging,
206
195
  stickySessions: data.sticky_sessions,
207
196
  stickySessionsCookieName: data.sticky_sessions_cookie_name,
208
197
  timeoutConnect: data.timeout_connect,
@@ -215,7 +204,6 @@ const unmarshalCertificate = data => {
215
204
  if (!isJSONObject(data)) {
216
205
  throw new TypeError(`Unmarshalling the type 'Certificate' failed as data isn't a dictionary.`);
217
206
  }
218
-
219
207
  return {
220
208
  commonName: data.common_name,
221
209
  createdAt: unmarshalDate(data.created_at),
@@ -232,22 +220,19 @@ const unmarshalCertificate = data => {
232
220
  updatedAt: unmarshalDate(data.updated_at)
233
221
  };
234
222
  };
235
-
236
223
  const unmarshalAclAction = data => {
237
224
  if (!isJSONObject(data)) {
238
225
  throw new TypeError(`Unmarshalling the type 'AclAction' failed as data isn't a dictionary.`);
239
226
  }
240
-
241
227
  return {
228
+ redirect: data.redirect ? unmarshalAclActionRedirect(data.redirect) : undefined,
242
229
  type: data.type
243
230
  };
244
231
  };
245
-
246
232
  const unmarshalAclMatch = data => {
247
233
  if (!isJSONObject(data)) {
248
234
  throw new TypeError(`Unmarshalling the type 'AclMatch' failed as data isn't a dictionary.`);
249
235
  }
250
-
251
236
  return {
252
237
  httpFilter: data.http_filter,
253
238
  httpFilterOption: data.http_filter_option,
@@ -256,17 +241,16 @@ const unmarshalAclMatch = data => {
256
241
  ipSubnet: data.ip_subnet
257
242
  };
258
243
  };
259
-
260
244
  const unmarshalFrontend = data => {
261
245
  if (!isJSONObject(data)) {
262
246
  throw new TypeError(`Unmarshalling the type 'Frontend' failed as data isn't a dictionary.`);
263
247
  }
264
-
265
248
  return {
266
249
  backend: data.backend ? unmarshalBackend(data.backend) : undefined,
267
250
  certificate: data.certificate ? unmarshalCertificate(data.certificate) : undefined,
268
251
  certificateIds: data.certificate_ids,
269
252
  createdAt: unmarshalDate(data.created_at),
253
+ enableHttp3: data.enable_http3,
270
254
  id: data.id,
271
255
  inboundPort: data.inbound_port,
272
256
  lb: data.lb ? unmarshalLb(data.lb) : undefined,
@@ -275,43 +259,37 @@ const unmarshalFrontend = data => {
275
259
  updatedAt: unmarshalDate(data.updated_at)
276
260
  };
277
261
  };
278
-
279
262
  const unmarshalPrivateNetworkDHCPConfig = data => {
280
263
  if (!isJSONObject(data)) {
281
264
  throw new TypeError(`Unmarshalling the type 'PrivateNetworkDHCPConfig' failed as data isn't a dictionary.`);
282
265
  }
283
-
284
266
  return {};
285
267
  };
286
-
287
268
  const unmarshalPrivateNetworkStaticConfig = data => {
288
269
  if (!isJSONObject(data)) {
289
270
  throw new TypeError(`Unmarshalling the type 'PrivateNetworkStaticConfig' failed as data isn't a dictionary.`);
290
271
  }
291
-
292
272
  return {
293
273
  ipAddress: data.ip_address
294
274
  };
295
275
  };
296
-
297
276
  const unmarshalRouteMatch = data => {
298
277
  if (!isJSONObject(data)) {
299
278
  throw new TypeError(`Unmarshalling the type 'RouteMatch' failed as data isn't a dictionary.`);
300
279
  }
301
-
302
280
  return {
281
+ hostHeader: data.host_header,
303
282
  sni: data.sni
304
283
  };
305
284
  };
306
-
307
285
  const unmarshalAcl = data => {
308
286
  if (!isJSONObject(data)) {
309
287
  throw new TypeError(`Unmarshalling the type 'Acl' failed as data isn't a dictionary.`);
310
288
  }
311
-
312
289
  return {
313
290
  action: data.action ? unmarshalAclAction(data.action) : undefined,
314
291
  createdAt: unmarshalDate(data.created_at),
292
+ description: data.description,
315
293
  frontend: data.frontend ? unmarshalFrontend(data.frontend) : undefined,
316
294
  id: data.id,
317
295
  index: data.index,
@@ -320,12 +298,10 @@ const unmarshalAcl = data => {
320
298
  updatedAt: unmarshalDate(data.updated_at)
321
299
  };
322
300
  };
323
-
324
301
  const unmarshalBackendServerStats = data => {
325
302
  if (!isJSONObject(data)) {
326
303
  throw new TypeError(`Unmarshalling the type 'BackendServerStats' failed as data isn't a dictionary.`);
327
304
  }
328
-
329
305
  return {
330
306
  backendId: data.backend_id,
331
307
  instanceId: data.instance_id,
@@ -335,12 +311,10 @@ const unmarshalBackendServerStats = data => {
335
311
  serverStateChangedAt: unmarshalDate(data.server_state_changed_at)
336
312
  };
337
313
  };
338
-
339
314
  const unmarshalLbType = data => {
340
315
  if (!isJSONObject(data)) {
341
316
  throw new TypeError(`Unmarshalling the type 'LbType' failed as data isn't a dictionary.`);
342
317
  }
343
-
344
318
  return {
345
319
  description: data.description,
346
320
  name: data.name,
@@ -349,12 +323,10 @@ const unmarshalLbType = data => {
349
323
  zone: data.zone
350
324
  };
351
325
  };
352
-
353
326
  const unmarshalPrivateNetwork = data => {
354
327
  if (!isJSONObject(data)) {
355
328
  throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
356
329
  }
357
-
358
330
  return {
359
331
  createdAt: unmarshalDate(data.created_at),
360
332
  dhcpConfig: data.dhcp_config ? unmarshalPrivateNetworkDHCPConfig(data.dhcp_config) : undefined,
@@ -369,7 +341,6 @@ const unmarshalRoute = data => {
369
341
  if (!isJSONObject(data)) {
370
342
  throw new TypeError(`Unmarshalling the type 'Route' failed as data isn't a dictionary.`);
371
343
  }
372
-
373
344
  return {
374
345
  backendId: data.backend_id,
375
346
  createdAt: unmarshalDate(data.created_at),
@@ -383,7 +354,6 @@ const unmarshalLbStats = data => {
383
354
  if (!isJSONObject(data)) {
384
355
  throw new TypeError(`Unmarshalling the type 'LbStats' failed as data isn't a dictionary.`);
385
356
  }
386
-
387
357
  return {
388
358
  backendServersStats: unmarshalArrayOfObject(data.backend_servers_stats, unmarshalBackendServerStats)
389
359
  };
@@ -392,7 +362,6 @@ const unmarshalListAclResponse = data => {
392
362
  if (!isJSONObject(data)) {
393
363
  throw new TypeError(`Unmarshalling the type 'ListAclResponse' failed as data isn't a dictionary.`);
394
364
  }
395
-
396
365
  return {
397
366
  acls: unmarshalArrayOfObject(data.acls, unmarshalAcl),
398
367
  totalCount: data.total_count
@@ -402,7 +371,6 @@ const unmarshalListBackendStatsResponse = data => {
402
371
  if (!isJSONObject(data)) {
403
372
  throw new TypeError(`Unmarshalling the type 'ListBackendStatsResponse' failed as data isn't a dictionary.`);
404
373
  }
405
-
406
374
  return {
407
375
  backendServersStats: unmarshalArrayOfObject(data.backend_servers_stats, unmarshalBackendServerStats),
408
376
  totalCount: data.total_count
@@ -412,7 +380,6 @@ const unmarshalListBackendsResponse = data => {
412
380
  if (!isJSONObject(data)) {
413
381
  throw new TypeError(`Unmarshalling the type 'ListBackendsResponse' failed as data isn't a dictionary.`);
414
382
  }
415
-
416
383
  return {
417
384
  backends: unmarshalArrayOfObject(data.backends, unmarshalBackend),
418
385
  totalCount: data.total_count
@@ -422,7 +389,6 @@ const unmarshalListCertificatesResponse = data => {
422
389
  if (!isJSONObject(data)) {
423
390
  throw new TypeError(`Unmarshalling the type 'ListCertificatesResponse' failed as data isn't a dictionary.`);
424
391
  }
425
-
426
392
  return {
427
393
  certificates: unmarshalArrayOfObject(data.certificates, unmarshalCertificate),
428
394
  totalCount: data.total_count
@@ -432,7 +398,6 @@ const unmarshalListFrontendsResponse = data => {
432
398
  if (!isJSONObject(data)) {
433
399
  throw new TypeError(`Unmarshalling the type 'ListFrontendsResponse' failed as data isn't a dictionary.`);
434
400
  }
435
-
436
401
  return {
437
402
  frontends: unmarshalArrayOfObject(data.frontends, unmarshalFrontend),
438
403
  totalCount: data.total_count
@@ -442,7 +407,6 @@ const unmarshalListIpsResponse = data => {
442
407
  if (!isJSONObject(data)) {
443
408
  throw new TypeError(`Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`);
444
409
  }
445
-
446
410
  return {
447
411
  ips: unmarshalArrayOfObject(data.ips, unmarshalIp),
448
412
  totalCount: data.total_count
@@ -452,7 +416,6 @@ const unmarshalListLbPrivateNetworksResponse = data => {
452
416
  if (!isJSONObject(data)) {
453
417
  throw new TypeError(`Unmarshalling the type 'ListLbPrivateNetworksResponse' failed as data isn't a dictionary.`);
454
418
  }
455
-
456
419
  return {
457
420
  privateNetwork: unmarshalArrayOfObject(data.private_network, unmarshalPrivateNetwork),
458
421
  totalCount: data.total_count
@@ -462,7 +425,6 @@ const unmarshalListLbTypesResponse = data => {
462
425
  if (!isJSONObject(data)) {
463
426
  throw new TypeError(`Unmarshalling the type 'ListLbTypesResponse' failed as data isn't a dictionary.`);
464
427
  }
465
-
466
428
  return {
467
429
  lbTypes: unmarshalArrayOfObject(data.lb_types, unmarshalLbType),
468
430
  totalCount: data.total_count
@@ -472,7 +434,6 @@ const unmarshalListLbsResponse = data => {
472
434
  if (!isJSONObject(data)) {
473
435
  throw new TypeError(`Unmarshalling the type 'ListLbsResponse' failed as data isn't a dictionary.`);
474
436
  }
475
-
476
437
  return {
477
438
  lbs: unmarshalArrayOfObject(data.lbs, unmarshalLb),
478
439
  totalCount: data.total_count
@@ -482,7 +443,6 @@ const unmarshalListRoutesResponse = data => {
482
443
  if (!isJSONObject(data)) {
483
444
  throw new TypeError(`Unmarshalling the type 'ListRoutesResponse' failed as data isn't a dictionary.`);
484
445
  }
485
-
486
446
  return {
487
447
  routes: unmarshalArrayOfObject(data.routes, unmarshalRoute),
488
448
  totalCount: data.total_count
@@ -492,7 +452,6 @@ const unmarshalListSubscriberResponse = data => {
492
452
  if (!isJSONObject(data)) {
493
453
  throw new TypeError(`Unmarshalling the type 'ListSubscriberResponse' failed as data isn't a dictionary.`);
494
454
  }
495
-
496
455
  return {
497
456
  subscribers: unmarshalArrayOfObject(data.subscribers, unmarshalSubscriber),
498
457
  totalCount: data.total_count
@@ -502,17 +461,20 @@ const unmarshalSetAclsResponse = data => {
502
461
  if (!isJSONObject(data)) {
503
462
  throw new TypeError(`Unmarshalling the type 'SetAclsResponse' failed as data isn't a dictionary.`);
504
463
  }
505
-
506
464
  return {
507
465
  acls: unmarshalArrayOfObject(data.acls, unmarshalAcl),
508
466
  totalCount: data.total_count
509
467
  };
510
468
  };
511
-
469
+ const marshalAclActionRedirect = (request, defaults) => ({
470
+ code: request.code,
471
+ target: request.target,
472
+ type: request.type
473
+ });
512
474
  const marshalAclAction = (request, defaults) => ({
475
+ redirect: request.redirect ? marshalAclActionRedirect(request.redirect) : undefined,
513
476
  type: request.type
514
477
  });
515
-
516
478
  const marshalAclMatch = (request, defaults) => ({
517
479
  http_filter: request.httpFilter,
518
480
  http_filter_option: request.httpFilterOption,
@@ -520,49 +482,42 @@ const marshalAclMatch = (request, defaults) => ({
520
482
  invert: request.invert,
521
483
  ip_subnet: request.ipSubnet
522
484
  });
523
-
524
485
  const marshalHealthCheckHttpConfig = (request, defaults) => ({
525
486
  code: request.code,
487
+ host_header: request.hostHeader,
526
488
  method: request.method,
527
489
  uri: request.uri
528
490
  });
529
-
530
491
  const marshalHealthCheckHttpsConfig = (request, defaults) => ({
531
492
  code: request.code,
493
+ host_header: request.hostHeader,
532
494
  method: request.method,
495
+ sni: request.sni,
533
496
  uri: request.uri
534
497
  });
535
-
536
498
  const marshalHealthCheckLdapConfig = (request, defaults) => ({});
537
-
538
499
  const marshalHealthCheckMysqlConfig = (request, defaults) => ({
539
500
  user: request.user
540
501
  });
541
-
542
502
  const marshalHealthCheckPgsqlConfig = (request, defaults) => ({
543
503
  user: request.user
544
504
  });
545
-
546
505
  const marshalHealthCheckRedisConfig = (request, defaults) => ({});
547
-
548
506
  const marshalHealthCheckTcpConfig = (request, defaults) => ({});
549
-
550
507
  const marshalAclSpec = (request, defaults) => ({
551
508
  action: marshalAclAction(request.action),
509
+ description: request.description,
552
510
  index: request.index,
553
- match: marshalAclMatch(request.match),
511
+ match: request.match ? marshalAclMatch(request.match) : undefined,
554
512
  name: request.name
555
513
  });
556
-
557
514
  const marshalCreateCertificateRequestCustomCertificate = (request, defaults) => ({
558
515
  certificate_chain: request.certificateChain
559
516
  });
560
-
561
517
  const marshalCreateCertificateRequestLetsencryptConfig = (request, defaults) => ({
562
518
  common_name: request.commonName,
563
519
  subject_alternative_name: request.subjectAlternativeName
564
520
  });
565
-
566
521
  const marshalHealthCheck = (request, defaults) => ({
567
522
  check_delay: request.checkDelay,
568
523
  check_max_retries: request.checkMaxRetries,
@@ -592,29 +547,30 @@ const marshalHealthCheck = (request, defaults) => ({
592
547
  value: request.httpsConfig ? marshalHealthCheckHttpsConfig(request.httpsConfig) : undefined
593
548
  }])
594
549
  });
595
-
596
550
  const marshalPrivateNetworkDHCPConfig = (request, defaults) => ({});
597
-
598
551
  const marshalPrivateNetworkStaticConfig = (request, defaults) => ({
599
552
  ip_address: request.ipAddress
600
553
  });
601
-
602
554
  const marshalRouteMatch = (request, defaults) => ({
603
- sni: request.sni
555
+ ...resolveOneOf([{
556
+ param: 'sni',
557
+ value: request.sni
558
+ }, {
559
+ param: 'host_header',
560
+ value: request.hostHeader
561
+ }])
604
562
  });
605
-
606
563
  const marshalSubscriberEmailConfig = (request, defaults) => ({
607
564
  email: request.email
608
565
  });
609
-
610
566
  const marshalSubscriberWebhookConfig = (request, defaults) => ({
611
567
  uri: request.uri
612
568
  });
613
-
614
569
  const marshalAddBackendServersRequest = (request, defaults) => ({
615
570
  server_ip: request.serverIp
616
571
  });
617
- const marshalAttachPrivateNetworkRequest = (request, defaults) => ({ ...resolveOneOf([{
572
+ const marshalAttachPrivateNetworkRequest = (request, defaults) => ({
573
+ ...resolveOneOf([{
618
574
  param: 'static_config',
619
575
  value: request.staticConfig ? marshalPrivateNetworkStaticConfig(request.staticConfig) : undefined
620
576
  }, {
@@ -624,8 +580,9 @@ const marshalAttachPrivateNetworkRequest = (request, defaults) => ({ ...resolveO
624
580
  });
625
581
  const marshalCreateAclRequest = (request, defaults) => ({
626
582
  action: marshalAclAction(request.action),
583
+ description: request.description,
627
584
  index: request.index,
628
- match: marshalAclMatch(request.match),
585
+ match: request.match ? marshalAclMatch(request.match) : undefined,
629
586
  name: request.name || randomName('acl')
630
587
  });
631
588
  const marshalCreateBackendRequest = (request, defaults) => ({
@@ -634,11 +591,13 @@ const marshalCreateBackendRequest = (request, defaults) => ({
634
591
  forward_port_algorithm: request.forwardPortAlgorithm,
635
592
  forward_protocol: request.forwardProtocol,
636
593
  health_check: marshalHealthCheck(request.healthCheck),
594
+ ignore_ssl_server_verify: request.ignoreSslServerVerify,
637
595
  name: request.name || randomName('lbb'),
638
- on_marked_down_action: request.onMarkedDownAction,
639
- proxy_protocol: request.proxyProtocol,
596
+ on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
597
+ proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
640
598
  send_proxy_v2: request.sendProxyV2,
641
599
  server_ip: request.serverIp,
600
+ ssl_bridging: request.sslBridging,
642
601
  sticky_sessions: request.stickySessions,
643
602
  sticky_sessions_cookie_name: request.stickySessionsCookieName,
644
603
  timeout_connect: request.timeoutConnect,
@@ -659,6 +618,7 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
659
618
  backend_id: request.backendId,
660
619
  certificate_id: request.certificateId,
661
620
  certificate_ids: request.certificateIds,
621
+ enable_http3: request.enableHttp3,
662
622
  inbound_port: request.inboundPort,
663
623
  name: request.name || randomName('lbf'),
664
624
  timeout_client: request.timeoutClient
@@ -679,7 +639,7 @@ const marshalCreateLbRequest = (request, defaults) => ({
679
639
  description: request.description,
680
640
  ip_id: request.ipId,
681
641
  name: request.name || randomName('lb'),
682
- ssl_compatibility_level: request.sslCompatibilityLevel,
642
+ ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
683
643
  tags: request.tags,
684
644
  type: request.type,
685
645
  ...resolveOneOf([{
@@ -730,8 +690,9 @@ const marshalSubscribeToLbRequest = (request, defaults) => ({
730
690
  });
731
691
  const marshalUpdateAclRequest = (request, defaults) => ({
732
692
  action: marshalAclAction(request.action),
693
+ description: request.description,
733
694
  index: request.index,
734
- match: marshalAclMatch(request.match),
695
+ match: request.match ? marshalAclMatch(request.match) : undefined,
735
696
  name: request.name
736
697
  });
737
698
  const marshalUpdateBackendRequest = (request, defaults) => ({
@@ -739,10 +700,12 @@ const marshalUpdateBackendRequest = (request, defaults) => ({
739
700
  forward_port: request.forwardPort,
740
701
  forward_port_algorithm: request.forwardPortAlgorithm,
741
702
  forward_protocol: request.forwardProtocol,
703
+ ignore_ssl_server_verify: request.ignoreSslServerVerify,
742
704
  name: request.name,
743
- on_marked_down_action: request.onMarkedDownAction,
744
- proxy_protocol: request.proxyProtocol,
705
+ on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
706
+ proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
745
707
  send_proxy_v2: request.sendProxyV2,
708
+ ssl_bridging: request.sslBridging,
746
709
  sticky_sessions: request.stickySessions,
747
710
  sticky_sessions_cookie_name: request.stickySessionsCookieName,
748
711
  timeout_connect: request.timeoutConnect,
@@ -756,6 +719,7 @@ const marshalUpdateFrontendRequest = (request, defaults) => ({
756
719
  backend_id: request.backendId,
757
720
  certificate_id: request.certificateId,
758
721
  certificate_ids: request.certificateIds,
722
+ enable_http3: request.enableHttp3,
759
723
  inbound_port: request.inboundPort,
760
724
  name: request.name,
761
725
  timeout_client: request.timeoutClient
@@ -795,7 +759,7 @@ const marshalUpdateIpRequest = (request, defaults) => ({
795
759
  const marshalUpdateLbRequest = (request, defaults) => ({
796
760
  description: request.description,
797
761
  name: request.name,
798
- ssl_compatibility_level: request.sslCompatibilityLevel,
762
+ ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
799
763
  tags: request.tags
800
764
  });
801
765
  const marshalUpdateRouteRequest = (request, defaults) => ({
@@ -815,7 +779,8 @@ const marshalUpdateSubscriberRequest = (request, defaults) => ({
815
779
  const marshalZonedApiAddBackendServersRequest = (request, defaults) => ({
816
780
  server_ip: request.serverIp
817
781
  });
818
- const marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({ ...resolveOneOf([{
782
+ const marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({
783
+ ...resolveOneOf([{
819
784
  param: 'static_config',
820
785
  value: request.staticConfig ? marshalPrivateNetworkStaticConfig(request.staticConfig) : undefined
821
786
  }, {
@@ -825,8 +790,9 @@ const marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({ ...
825
790
  });
826
791
  const marshalZonedApiCreateAclRequest = (request, defaults) => ({
827
792
  action: marshalAclAction(request.action),
793
+ description: request.description,
828
794
  index: request.index,
829
- match: marshalAclMatch(request.match),
795
+ match: request.match ? marshalAclMatch(request.match) : undefined,
830
796
  name: request.name || randomName('acl')
831
797
  });
832
798
  const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
@@ -835,11 +801,13 @@ const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
835
801
  forward_port_algorithm: request.forwardPortAlgorithm,
836
802
  forward_protocol: request.forwardProtocol,
837
803
  health_check: marshalHealthCheck(request.healthCheck),
804
+ ignore_ssl_server_verify: request.ignoreSslServerVerify,
838
805
  name: request.name || randomName('lbb'),
839
- on_marked_down_action: request.onMarkedDownAction,
840
- proxy_protocol: request.proxyProtocol,
806
+ on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
807
+ proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
841
808
  send_proxy_v2: request.sendProxyV2,
842
809
  server_ip: request.serverIp,
810
+ ssl_bridging: request.sslBridging,
843
811
  sticky_sessions: request.stickySessions,
844
812
  sticky_sessions_cookie_name: request.stickySessionsCookieName,
845
813
  timeout_connect: request.timeoutConnect,
@@ -860,6 +828,7 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
860
828
  backend_id: request.backendId,
861
829
  certificate_id: request.certificateId,
862
830
  certificate_ids: request.certificateIds,
831
+ enable_http3: request.enableHttp3,
863
832
  inbound_port: request.inboundPort,
864
833
  name: request.name || randomName('lbf'),
865
834
  timeout_client: request.timeoutClient
@@ -880,7 +849,7 @@ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
880
849
  description: request.description,
881
850
  ip_id: request.ipId,
882
851
  name: request.name || randomName('lb'),
883
- ssl_compatibility_level: request.sslCompatibilityLevel,
852
+ ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
884
853
  tags: request.tags,
885
854
  type: request.type,
886
855
  ...resolveOneOf([{
@@ -934,8 +903,9 @@ const marshalZonedApiSubscribeToLbRequest = (request, defaults) => ({
934
903
  });
935
904
  const marshalZonedApiUpdateAclRequest = (request, defaults) => ({
936
905
  action: marshalAclAction(request.action),
906
+ description: request.description,
937
907
  index: request.index,
938
- match: marshalAclMatch(request.match),
908
+ match: request.match ? marshalAclMatch(request.match) : undefined,
939
909
  name: request.name
940
910
  });
941
911
  const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
@@ -943,10 +913,12 @@ const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
943
913
  forward_port: request.forwardPort,
944
914
  forward_port_algorithm: request.forwardPortAlgorithm,
945
915
  forward_protocol: request.forwardProtocol,
916
+ ignore_ssl_server_verify: request.ignoreSslServerVerify,
946
917
  name: request.name,
947
- on_marked_down_action: request.onMarkedDownAction,
948
- proxy_protocol: request.proxyProtocol,
918
+ on_marked_down_action: request.onMarkedDownAction ?? 'on_marked_down_action_none',
919
+ proxy_protocol: request.proxyProtocol ?? 'proxy_protocol_unknown',
949
920
  send_proxy_v2: request.sendProxyV2,
921
+ ssl_bridging: request.sslBridging,
950
922
  sticky_sessions: request.stickySessions,
951
923
  sticky_sessions_cookie_name: request.stickySessionsCookieName,
952
924
  timeout_connect: request.timeoutConnect,
@@ -960,6 +932,7 @@ const marshalZonedApiUpdateFrontendRequest = (request, defaults) => ({
960
932
  backend_id: request.backendId,
961
933
  certificate_id: request.certificateId,
962
934
  certificate_ids: request.certificateIds,
935
+ enable_http3: request.enableHttp3,
963
936
  inbound_port: request.inboundPort,
964
937
  name: request.name,
965
938
  timeout_client: request.timeoutClient
@@ -999,7 +972,7 @@ const marshalZonedApiUpdateIpRequest = (request, defaults) => ({
999
972
  const marshalZonedApiUpdateLbRequest = (request, defaults) => ({
1000
973
  description: request.description,
1001
974
  name: request.name,
1002
- ssl_compatibility_level: request.sslCompatibilityLevel,
975
+ ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
1003
976
  tags: request.tags
1004
977
  });
1005
978
  const marshalZonedApiUpdateRouteRequest = (request, defaults) => ({