@scaleway/sdk 3.0.0-alpha.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/index.gen.d.ts +362 -0
  2. package/dist/index.gen.js +323 -0
  3. package/package.json +71 -25
  4. package/README.md +0 -46
  5. package/dist/api/account/index.js +0 -4
  6. package/dist/api/account/v2/api.gen.js +0 -147
  7. package/dist/api/account/v2/index.gen.js +0 -4
  8. package/dist/api/account/v2/marshalling.gen.js +0 -39
  9. package/dist/api/account/v3/api.gen.js +0 -129
  10. package/dist/api/account/v3/index.gen.js +0 -6
  11. package/dist/api/account/v3/marshalling.gen.js +0 -39
  12. package/dist/api/account/v3/validation-rules.gen.js +0 -39
  13. package/dist/api/applesilicon/index.js +0 -2
  14. package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
  15. package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
  16. package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
  17. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
  18. package/dist/api/baremetal/index.js +0 -2
  19. package/dist/api/baremetal/v1/api.gen.js +0 -523
  20. package/dist/api/baremetal/v1/api.utils.js +0 -27
  21. package/dist/api/baremetal/v1/content.gen.js +0 -13
  22. package/dist/api/baremetal/v1/index.js +0 -5
  23. package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
  24. package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
  25. package/dist/api/billing/index.js +0 -2
  26. package/dist/api/billing/v2alpha1/api.gen.js +0 -80
  27. package/dist/api/billing/v2alpha1/index.gen.js +0 -4
  28. package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
  29. package/dist/api/block/index.js +0 -2
  30. package/dist/api/block/v1alpha1/api.gen.js +0 -245
  31. package/dist/api/block/v1alpha1/content.gen.js +0 -13
  32. package/dist/api/block/v1alpha1/index.gen.js +0 -7
  33. package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
  34. package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
  35. package/dist/api/cockpit/index.js +0 -2
  36. package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
  37. package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
  38. package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
  39. package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
  40. package/dist/api/container/index.js +0 -2
  41. package/dist/api/container/v1beta1/api.gen.js +0 -549
  42. package/dist/api/container/v1beta1/content.gen.js +0 -22
  43. package/dist/api/container/v1beta1/index.gen.js +0 -5
  44. package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
  45. package/dist/api/document_db/index.js +0 -2
  46. package/dist/api/document_db/v1beta1/api.gen.js +0 -830
  47. package/dist/api/document_db/v1beta1/content.gen.js +0 -19
  48. package/dist/api/document_db/v1beta1/index.gen.js +0 -7
  49. package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
  50. package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
  51. package/dist/api/domain/index.js +0 -2
  52. package/dist/api/domain/v2beta1/api.gen.js +0 -875
  53. package/dist/api/domain/v2beta1/content.gen.js +0 -28
  54. package/dist/api/domain/v2beta1/index.gen.js +0 -7
  55. package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
  56. package/dist/api/flexibleip/index.js +0 -2
  57. package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
  58. package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
  59. package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
  60. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
  61. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
  62. package/dist/api/function/index.js +0 -2
  63. package/dist/api/function/v1beta1/api.gen.js +0 -560
  64. package/dist/api/function/v1beta1/content.gen.js +0 -22
  65. package/dist/api/function/v1beta1/index.gen.js +0 -5
  66. package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
  67. package/dist/api/iam/index.js +0 -2
  68. package/dist/api/iam/v1alpha1/api.gen.js +0 -799
  69. package/dist/api/iam/v1alpha1/index.gen.js +0 -6
  70. package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
  71. package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
  72. package/dist/api/instance/index.js +0 -2
  73. package/dist/api/instance/v1/api.gen.js +0 -1003
  74. package/dist/api/instance/v1/api.utils.js +0 -369
  75. package/dist/api/instance/v1/content.gen.js +0 -31
  76. package/dist/api/instance/v1/index.js +0 -2
  77. package/dist/api/instance/v1/marshalling.gen.js +0 -1206
  78. package/dist/api/instance/v1/marshalling.utils.js +0 -63
  79. package/dist/api/iot/index.js +0 -2
  80. package/dist/api/iot/v1/api.gen.js +0 -581
  81. package/dist/api/iot/v1/content.gen.js +0 -7
  82. package/dist/api/iot/v1/index.gen.js +0 -5
  83. package/dist/api/iot/v1/marshalling.gen.js +0 -388
  84. package/dist/api/ipfs/index.js +0 -2
  85. package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
  86. package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
  87. package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
  88. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
  89. package/dist/api/k8s/index.js +0 -2
  90. package/dist/api/k8s/v1/api.gen.js +0 -454
  91. package/dist/api/k8s/v1/api.utils.js +0 -13
  92. package/dist/api/k8s/v1/content.gen.js +0 -13
  93. package/dist/api/k8s/v1/index.js +0 -4
  94. package/dist/api/k8s/v1/marshalling.gen.js +0 -333
  95. package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
  96. package/dist/api/lb/index.js +0 -2
  97. package/dist/api/lb/v1/api.gen.js +0 -1669
  98. package/dist/api/lb/v1/api.utils.js +0 -81
  99. package/dist/api/lb/v1/content.gen.js +0 -16
  100. package/dist/api/lb/v1/index.js +0 -2
  101. package/dist/api/lb/v1/marshalling.gen.js +0 -923
  102. package/dist/api/marketplace/index.js +0 -4
  103. package/dist/api/marketplace/v1/api.gen.js +0 -60
  104. package/dist/api/marketplace/v1/index.gen.js +0 -4
  105. package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
  106. package/dist/api/marketplace/v2/api.gen.js +0 -162
  107. package/dist/api/marketplace/v2/index.gen.js +0 -4
  108. package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
  109. package/dist/api/mnq/index.js +0 -2
  110. package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
  111. package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
  112. package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
  113. package/dist/api/rdb/index.js +0 -2
  114. package/dist/api/rdb/v1/api.gen.js +0 -972
  115. package/dist/api/rdb/v1/content.gen.js +0 -22
  116. package/dist/api/rdb/v1/index.gen.js +0 -7
  117. package/dist/api/rdb/v1/marshalling.gen.js +0 -636
  118. package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
  119. package/dist/api/redis/index.js +0 -2
  120. package/dist/api/redis/v1/api.gen.js +0 -389
  121. package/dist/api/redis/v1/content.gen.js +0 -7
  122. package/dist/api/redis/v1/index.gen.js +0 -5
  123. package/dist/api/redis/v1/marshalling.gen.js +0 -259
  124. package/dist/api/registry/index.js +0 -2
  125. package/dist/api/registry/v1/api.gen.js +0 -252
  126. package/dist/api/registry/v1/content.gen.js +0 -13
  127. package/dist/api/registry/v1/index.gen.js +0 -5
  128. package/dist/api/registry/v1/marshalling.gen.js +0 -106
  129. package/dist/api/secret/index.js +0 -2
  130. package/dist/api/secret/v1alpha1/api.gen.js +0 -415
  131. package/dist/api/secret/v1alpha1/index.gen.js +0 -4
  132. package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
  133. package/dist/api/tem/index.js +0 -2
  134. package/dist/api/tem/v1alpha1/api.gen.js +0 -229
  135. package/dist/api/tem/v1alpha1/content.gen.js +0 -10
  136. package/dist/api/tem/v1alpha1/index.gen.js +0 -5
  137. package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
  138. package/dist/api/test/index.js +0 -2
  139. package/dist/api/test/v1/api.gen.js +0 -152
  140. package/dist/api/test/v1/content.gen.js +0 -7
  141. package/dist/api/test/v1/index.gen.js +0 -5
  142. package/dist/api/test/v1/marshalling.gen.js +0 -79
  143. package/dist/api/vpc/index.js +0 -4
  144. package/dist/api/vpc/v1/api.gen.js +0 -110
  145. package/dist/api/vpc/v1/index.gen.js +0 -4
  146. package/dist/api/vpc/v1/marshalling.gen.js +0 -44
  147. package/dist/api/vpc/v2/api.gen.js +0 -276
  148. package/dist/api/vpc/v2/index.gen.js +0 -4
  149. package/dist/api/vpc/v2/marshalling.gen.js +0 -135
  150. package/dist/api/vpcgw/index.js +0 -2
  151. package/dist/api/vpcgw/v1/api.gen.js +0 -669
  152. package/dist/api/vpcgw/v1/content.gen.js +0 -10
  153. package/dist/api/vpcgw/v1/index.gen.js +0 -5
  154. package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
  155. package/dist/api/webhosting/index.js +0 -2
  156. package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
  157. package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
  158. package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
  159. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
  160. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
  161. package/dist/helpers/is-browser.js +0 -5
  162. package/dist/helpers/is-response.js +0 -10
  163. package/dist/helpers/json.js +0 -11
  164. package/dist/helpers/marshalling.js +0 -130
  165. package/dist/index.cjs +0 -24364
  166. package/dist/index.d.ts +0 -27584
  167. package/dist/index.js +0 -69
  168. package/dist/internal/async/interval-retrier.js +0 -105
  169. package/dist/internal/async/sleep.js +0 -13
  170. package/dist/internal/interceptors/composer.js +0 -46
  171. package/dist/internal/interceptors/helpers.js +0 -32
  172. package/dist/internal/logger/console-logger.js +0 -38
  173. package/dist/internal/logger/index.js +0 -41
  174. package/dist/internal/logger/level-resolver.js +0 -13
  175. package/dist/internal/validations/string-validation.js +0 -38
  176. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
  177. package/dist/scw/api.js +0 -12
  178. package/dist/scw/auth.js +0 -68
  179. package/dist/scw/client-ini-factory.js +0 -174
  180. package/dist/scw/client-ini-profile.js +0 -54
  181. package/dist/scw/client-settings.js +0 -78
  182. package/dist/scw/client.js +0 -98
  183. package/dist/scw/constants.js +0 -4
  184. package/dist/scw/custom-marshalling.js +0 -131
  185. package/dist/scw/errors/error-parser.js +0 -107
  186. package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
  187. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
  188. package/dist/scw/errors/scw-error.js +0 -66
  189. package/dist/scw/errors/standard/already-exists-error.js +0 -26
  190. package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
  191. package/dist/scw/errors/standard/index.js +0 -13
  192. package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
  193. package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
  194. package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
  195. package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
  196. package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
  197. package/dist/scw/errors/standard/resource-expired-error.js +0 -26
  198. package/dist/scw/errors/standard/resource-locked-error.js +0 -25
  199. package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
  200. package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
  201. package/dist/scw/errors/standard/transient-state-error.js +0 -26
  202. package/dist/scw/errors/types.js +0 -23
  203. package/dist/scw/fetch/build-fetcher.js +0 -72
  204. package/dist/scw/fetch/http-dumper.js +0 -54
  205. package/dist/scw/fetch/http-interceptors.js +0 -99
  206. package/dist/scw/fetch/resource-paginator.js +0 -84
  207. package/dist/scw/fetch/response-parser.js +0 -72
  208. package/node_modules/@scaleway/random-name/.npmignore +0 -4
  209. package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
  210. package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
  211. package/node_modules/@scaleway/random-name/README.md +0 -26
  212. package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
  213. package/node_modules/@scaleway/random-name/dist/index.js +0 -13
  214. package/node_modules/@scaleway/random-name/package.json +0 -23
@@ -1,923 +0,0 @@
1
- import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
2
- import { isJSONObject } from '../../../helpers/json.js';
3
- import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
4
-
5
- // This file was automatically generated. DO NOT EDIT.
6
- // If you have any remark or suggestion do not hesitate to open an issue.
7
- const unmarshalIp = data => {
8
- if (!isJSONObject(data)) {
9
- throw new TypeError(`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`);
10
- }
11
- return {
12
- id: data.id,
13
- ipAddress: data.ip_address,
14
- lbId: data.lb_id ? data.lb_id : undefined,
15
- organizationId: data.organization_id,
16
- projectId: data.project_id,
17
- region: data.region ? data.region : undefined,
18
- reverse: data.reverse,
19
- zone: data.zone
20
- };
21
- };
22
- const unmarshalSubscriberWebhookConfig = data => {
23
- if (!isJSONObject(data)) {
24
- throw new TypeError(`Unmarshalling the type 'SubscriberWebhookConfig' failed as data isn't a dictionary.`);
25
- }
26
- return {
27
- uri: data.uri
28
- };
29
- };
30
- const unmarshalSubscriberEmailConfig = data => {
31
- if (!isJSONObject(data)) {
32
- throw new TypeError(`Unmarshalling the type 'SubscriberEmailConfig' failed as data isn't a dictionary.`);
33
- }
34
- return {
35
- email: data.email
36
- };
37
- };
38
- const unmarshalSubscriber = data => {
39
- if (!isJSONObject(data)) {
40
- throw new TypeError(`Unmarshalling the type 'Subscriber' failed as data isn't a dictionary.`);
41
- }
42
- return {
43
- emailConfig: data.email_config ? unmarshalSubscriberEmailConfig(data.email_config) : undefined,
44
- id: data.id,
45
- name: data.name,
46
- webhookConfig: data.webhook_config ? unmarshalSubscriberWebhookConfig(data.webhook_config) : undefined
47
- };
48
- };
49
- const unmarshalHealthCheckHttpsConfig = data => {
50
- if (!isJSONObject(data)) {
51
- throw new TypeError(`Unmarshalling the type 'HealthCheckHttpsConfig' failed as data isn't a dictionary.`);
52
- }
53
- return {
54
- code: data.code ? data.code : undefined,
55
- hostHeader: data.host_header,
56
- method: data.method,
57
- sni: data.sni,
58
- uri: data.uri
59
- };
60
- };
61
- const unmarshalHealthCheckHttpConfig = data => {
62
- if (!isJSONObject(data)) {
63
- throw new TypeError(`Unmarshalling the type 'HealthCheckHttpConfig' failed as data isn't a dictionary.`);
64
- }
65
- return {
66
- code: data.code ? data.code : undefined,
67
- hostHeader: data.host_header,
68
- method: data.method,
69
- uri: data.uri
70
- };
71
- };
72
- const unmarshalHealthCheckRedisConfig = data => {
73
- if (!isJSONObject(data)) {
74
- throw new TypeError(`Unmarshalling the type 'HealthCheckRedisConfig' failed as data isn't a dictionary.`);
75
- }
76
- return {};
77
- };
78
- const unmarshalHealthCheckLdapConfig = data => {
79
- if (!isJSONObject(data)) {
80
- throw new TypeError(`Unmarshalling the type 'HealthCheckLdapConfig' failed as data isn't a dictionary.`);
81
- }
82
- return {};
83
- };
84
- const unmarshalHealthCheckPgsqlConfig = data => {
85
- if (!isJSONObject(data)) {
86
- throw new TypeError(`Unmarshalling the type 'HealthCheckPgsqlConfig' failed as data isn't a dictionary.`);
87
- }
88
- return {
89
- user: data.user
90
- };
91
- };
92
- const unmarshalHealthCheckMysqlConfig = data => {
93
- if (!isJSONObject(data)) {
94
- throw new TypeError(`Unmarshalling the type 'HealthCheckMysqlConfig' failed as data isn't a dictionary.`);
95
- }
96
- return {
97
- user: data.user
98
- };
99
- };
100
- const unmarshalHealthCheckTcpConfig = data => {
101
- if (!isJSONObject(data)) {
102
- throw new TypeError(`Unmarshalling the type 'HealthCheckTcpConfig' failed as data isn't a dictionary.`);
103
- }
104
- return {};
105
- };
106
- const unmarshalHealthCheck = data => {
107
- if (!isJSONObject(data)) {
108
- throw new TypeError(`Unmarshalling the type 'HealthCheck' failed as data isn't a dictionary.`);
109
- }
110
- return {
111
- checkDelay: data.check_delay ? data.check_delay : undefined,
112
- checkMaxRetries: data.check_max_retries,
113
- checkSendProxy: data.check_send_proxy,
114
- checkTimeout: data.check_timeout ? data.check_timeout : undefined,
115
- httpConfig: data.http_config ? unmarshalHealthCheckHttpConfig(data.http_config) : undefined,
116
- httpsConfig: data.https_config ? unmarshalHealthCheckHttpsConfig(data.https_config) : undefined,
117
- ldapConfig: data.ldap_config ? unmarshalHealthCheckLdapConfig(data.ldap_config) : undefined,
118
- mysqlConfig: data.mysql_config ? unmarshalHealthCheckMysqlConfig(data.mysql_config) : undefined,
119
- pgsqlConfig: data.pgsql_config ? unmarshalHealthCheckPgsqlConfig(data.pgsql_config) : undefined,
120
- port: data.port,
121
- redisConfig: data.redis_config ? unmarshalHealthCheckRedisConfig(data.redis_config) : undefined,
122
- tcpConfig: data.tcp_config ? unmarshalHealthCheckTcpConfig(data.tcp_config) : undefined,
123
- transientCheckDelay: data.transient_check_delay ? data.transient_check_delay : undefined
124
- };
125
- };
126
- const unmarshalInstance = data => {
127
- if (!isJSONObject(data)) {
128
- throw new TypeError(`Unmarshalling the type 'Instance' failed as data isn't a dictionary.`);
129
- }
130
- return {
131
- createdAt: unmarshalDate(data.created_at),
132
- id: data.id,
133
- ipAddress: data.ip_address,
134
- region: data.region ? data.region : undefined,
135
- status: data.status,
136
- updatedAt: unmarshalDate(data.updated_at),
137
- zone: data.zone
138
- };
139
- };
140
- const unmarshalLb = data => {
141
- if (!isJSONObject(data)) {
142
- throw new TypeError(`Unmarshalling the type 'Lb' failed as data isn't a dictionary.`);
143
- }
144
- return {
145
- backendCount: data.backend_count,
146
- createdAt: unmarshalDate(data.created_at),
147
- description: data.description,
148
- frontendCount: data.frontend_count,
149
- id: data.id,
150
- instances: unmarshalArrayOfObject(data.instances, unmarshalInstance),
151
- ip: unmarshalArrayOfObject(data.ip, unmarshalIp),
152
- name: data.name,
153
- organizationId: data.organization_id,
154
- privateNetworkCount: data.private_network_count,
155
- projectId: data.project_id,
156
- region: data.region ? data.region : undefined,
157
- routeCount: data.route_count,
158
- sslCompatibilityLevel: data.ssl_compatibility_level,
159
- status: data.status,
160
- subscriber: unmarshalSubscriber(data.subscriber),
161
- tags: data.tags,
162
- type: data.type,
163
- updatedAt: unmarshalDate(data.updated_at),
164
- zone: data.zone
165
- };
166
- };
167
- const unmarshalBackend = data => {
168
- if (!isJSONObject(data)) {
169
- throw new TypeError(`Unmarshalling the type 'Backend' failed as data isn't a dictionary.`);
170
- }
171
- return {
172
- createdAt: unmarshalDate(data.created_at),
173
- failoverHost: data.failover_host ? data.failover_host : undefined,
174
- forwardPort: data.forward_port,
175
- forwardPortAlgorithm: data.forward_port_algorithm,
176
- forwardProtocol: data.forward_protocol,
177
- healthCheck: unmarshalHealthCheck(data.health_check),
178
- id: data.id,
179
- ignoreSslServerVerify: data.ignore_ssl_server_verify ? data.ignore_ssl_server_verify : undefined,
180
- lb: unmarshalLb(data.lb),
181
- maxConnections: data.max_connections ? data.max_connections : undefined,
182
- maxRetries: data.max_retries ? data.max_retries : undefined,
183
- name: data.name,
184
- onMarkedDownAction: data.on_marked_down_action,
185
- pool: data.pool,
186
- proxyProtocol: data.proxy_protocol,
187
- redispatchAttemptCount: data.redispatch_attempt_count ? data.redispatch_attempt_count : undefined,
188
- sendProxyV2: data.send_proxy_v2 ? data.send_proxy_v2 : undefined,
189
- sslBridging: data.ssl_bridging ? data.ssl_bridging : undefined,
190
- stickySessions: data.sticky_sessions,
191
- stickySessionsCookieName: data.sticky_sessions_cookie_name,
192
- timeoutConnect: data.timeout_connect ? data.timeout_connect : undefined,
193
- timeoutQueue: data.timeout_queue ? data.timeout_queue : undefined,
194
- timeoutServer: data.timeout_server ? data.timeout_server : undefined,
195
- timeoutTunnel: data.timeout_tunnel ? data.timeout_tunnel : undefined,
196
- updatedAt: unmarshalDate(data.updated_at)
197
- };
198
- };
199
- const unmarshalCertificate = data => {
200
- if (!isJSONObject(data)) {
201
- throw new TypeError(`Unmarshalling the type 'Certificate' failed as data isn't a dictionary.`);
202
- }
203
- return {
204
- commonName: data.common_name,
205
- createdAt: unmarshalDate(data.created_at),
206
- fingerprint: data.fingerprint,
207
- id: data.id,
208
- lb: unmarshalLb(data.lb),
209
- name: data.name,
210
- notValidAfter: unmarshalDate(data.not_valid_after),
211
- notValidBefore: unmarshalDate(data.not_valid_before),
212
- status: data.status,
213
- statusDetails: data.status_details ? data.status_details : undefined,
214
- subjectAlternativeName: data.subject_alternative_name,
215
- type: data.type,
216
- updatedAt: unmarshalDate(data.updated_at)
217
- };
218
- };
219
- const unmarshalFrontend = data => {
220
- if (!isJSONObject(data)) {
221
- throw new TypeError(`Unmarshalling the type 'Frontend' failed as data isn't a dictionary.`);
222
- }
223
- return {
224
- backend: unmarshalBackend(data.backend),
225
- certificate: data.certificate ? unmarshalCertificate(data.certificate) : undefined,
226
- certificateIds: data.certificate_ids,
227
- createdAt: unmarshalDate(data.created_at),
228
- enableHttp3: data.enable_http3,
229
- id: data.id,
230
- inboundPort: data.inbound_port,
231
- lb: unmarshalLb(data.lb),
232
- name: data.name,
233
- timeoutClient: data.timeout_client ? data.timeout_client : undefined,
234
- updatedAt: unmarshalDate(data.updated_at)
235
- };
236
- };
237
- const unmarshalAclActionRedirect = data => {
238
- if (!isJSONObject(data)) {
239
- throw new TypeError(`Unmarshalling the type 'AclActionRedirect' failed as data isn't a dictionary.`);
240
- }
241
- return {
242
- code: data.code ? data.code : undefined,
243
- target: data.target,
244
- type: data.type
245
- };
246
- };
247
- const unmarshalAclAction = data => {
248
- if (!isJSONObject(data)) {
249
- throw new TypeError(`Unmarshalling the type 'AclAction' failed as data isn't a dictionary.`);
250
- }
251
- return {
252
- redirect: unmarshalAclActionRedirect(data.redirect),
253
- type: data.type
254
- };
255
- };
256
- const unmarshalAclMatch = data => {
257
- if (!isJSONObject(data)) {
258
- throw new TypeError(`Unmarshalling the type 'AclMatch' failed as data isn't a dictionary.`);
259
- }
260
- return {
261
- httpFilter: data.http_filter,
262
- httpFilterOption: data.http_filter_option ? data.http_filter_option : undefined,
263
- httpFilterValue: data.http_filter_value,
264
- invert: data.invert,
265
- ipSubnet: data.ip_subnet
266
- };
267
- };
268
- const unmarshalAcl = data => {
269
- if (!isJSONObject(data)) {
270
- throw new TypeError(`Unmarshalling the type 'Acl' failed as data isn't a dictionary.`);
271
- }
272
- return {
273
- action: unmarshalAclAction(data.action),
274
- createdAt: unmarshalDate(data.created_at),
275
- description: data.description,
276
- frontend: unmarshalFrontend(data.frontend),
277
- id: data.id,
278
- index: data.index,
279
- match: unmarshalAclMatch(data.match),
280
- name: data.name,
281
- updatedAt: unmarshalDate(data.updated_at)
282
- };
283
- };
284
- const unmarshalPrivateNetworkIpamConfig = data => {
285
- if (!isJSONObject(data)) {
286
- throw new TypeError(`Unmarshalling the type 'PrivateNetworkIpamConfig' failed as data isn't a dictionary.`);
287
- }
288
- return {};
289
- };
290
- const unmarshalPrivateNetworkDHCPConfig = data => {
291
- if (!isJSONObject(data)) {
292
- throw new TypeError(`Unmarshalling the type 'PrivateNetworkDHCPConfig' failed as data isn't a dictionary.`);
293
- }
294
- return {
295
- ipId: data.ip_id ? data.ip_id : undefined
296
- };
297
- };
298
- const unmarshalPrivateNetworkStaticConfig = data => {
299
- if (!isJSONObject(data)) {
300
- throw new TypeError(`Unmarshalling the type 'PrivateNetworkStaticConfig' failed as data isn't a dictionary.`);
301
- }
302
- return {
303
- ipAddress: data.ip_address ? data.ip_address : undefined
304
- };
305
- };
306
- const unmarshalPrivateNetwork = data => {
307
- if (!isJSONObject(data)) {
308
- throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
309
- }
310
- return {
311
- createdAt: unmarshalDate(data.created_at),
312
- dhcpConfig: data.dhcp_config ? unmarshalPrivateNetworkDHCPConfig(data.dhcp_config) : undefined,
313
- ipamConfig: data.ipam_config ? unmarshalPrivateNetworkIpamConfig(data.ipam_config) : undefined,
314
- ipamIds: data.ipam_ids,
315
- lb: unmarshalLb(data.lb),
316
- privateNetworkId: data.private_network_id,
317
- staticConfig: data.static_config ? unmarshalPrivateNetworkStaticConfig(data.static_config) : undefined,
318
- status: data.status,
319
- updatedAt: unmarshalDate(data.updated_at)
320
- };
321
- };
322
- const unmarshalRouteMatch = data => {
323
- if (!isJSONObject(data)) {
324
- throw new TypeError(`Unmarshalling the type 'RouteMatch' failed as data isn't a dictionary.`);
325
- }
326
- return {
327
- hostHeader: data.host_header ? data.host_header : undefined,
328
- sni: data.sni ? data.sni : undefined
329
- };
330
- };
331
- const unmarshalRoute = data => {
332
- if (!isJSONObject(data)) {
333
- throw new TypeError(`Unmarshalling the type 'Route' failed as data isn't a dictionary.`);
334
- }
335
- return {
336
- backendId: data.backend_id,
337
- createdAt: unmarshalDate(data.created_at),
338
- frontendId: data.frontend_id,
339
- id: data.id,
340
- match: unmarshalRouteMatch(data.match),
341
- updatedAt: unmarshalDate(data.updated_at)
342
- };
343
- };
344
- const unmarshalBackendServerStats = data => {
345
- if (!isJSONObject(data)) {
346
- throw new TypeError(`Unmarshalling the type 'BackendServerStats' failed as data isn't a dictionary.`);
347
- }
348
- return {
349
- backendId: data.backend_id,
350
- instanceId: data.instance_id,
351
- ip: data.ip,
352
- lastHealthCheckStatus: data.last_health_check_status,
353
- serverState: data.server_state,
354
- serverStateChangedAt: unmarshalDate(data.server_state_changed_at)
355
- };
356
- };
357
- const unmarshalLbStats = data => {
358
- if (!isJSONObject(data)) {
359
- throw new TypeError(`Unmarshalling the type 'LbStats' failed as data isn't a dictionary.`);
360
- }
361
- return {
362
- backendServersStats: unmarshalArrayOfObject(data.backend_servers_stats, unmarshalBackendServerStats)
363
- };
364
- };
365
- const unmarshalListAclResponse = data => {
366
- if (!isJSONObject(data)) {
367
- throw new TypeError(`Unmarshalling the type 'ListAclResponse' failed as data isn't a dictionary.`);
368
- }
369
- return {
370
- acls: unmarshalArrayOfObject(data.acls, unmarshalAcl),
371
- totalCount: data.total_count
372
- };
373
- };
374
- const unmarshalListBackendStatsResponse = data => {
375
- if (!isJSONObject(data)) {
376
- throw new TypeError(`Unmarshalling the type 'ListBackendStatsResponse' failed as data isn't a dictionary.`);
377
- }
378
- return {
379
- backendServersStats: unmarshalArrayOfObject(data.backend_servers_stats, unmarshalBackendServerStats),
380
- totalCount: data.total_count
381
- };
382
- };
383
- const unmarshalListBackendsResponse = data => {
384
- if (!isJSONObject(data)) {
385
- throw new TypeError(`Unmarshalling the type 'ListBackendsResponse' failed as data isn't a dictionary.`);
386
- }
387
- return {
388
- backends: unmarshalArrayOfObject(data.backends, unmarshalBackend),
389
- totalCount: data.total_count
390
- };
391
- };
392
- const unmarshalListCertificatesResponse = data => {
393
- if (!isJSONObject(data)) {
394
- throw new TypeError(`Unmarshalling the type 'ListCertificatesResponse' failed as data isn't a dictionary.`);
395
- }
396
- return {
397
- certificates: unmarshalArrayOfObject(data.certificates, unmarshalCertificate),
398
- totalCount: data.total_count
399
- };
400
- };
401
- const unmarshalListFrontendsResponse = data => {
402
- if (!isJSONObject(data)) {
403
- throw new TypeError(`Unmarshalling the type 'ListFrontendsResponse' failed as data isn't a dictionary.`);
404
- }
405
- return {
406
- frontends: unmarshalArrayOfObject(data.frontends, unmarshalFrontend),
407
- totalCount: data.total_count
408
- };
409
- };
410
- const unmarshalListIpsResponse = data => {
411
- if (!isJSONObject(data)) {
412
- throw new TypeError(`Unmarshalling the type 'ListIpsResponse' failed as data isn't a dictionary.`);
413
- }
414
- return {
415
- ips: unmarshalArrayOfObject(data.ips, unmarshalIp),
416
- totalCount: data.total_count
417
- };
418
- };
419
- const unmarshalListLbPrivateNetworksResponse = data => {
420
- if (!isJSONObject(data)) {
421
- throw new TypeError(`Unmarshalling the type 'ListLbPrivateNetworksResponse' failed as data isn't a dictionary.`);
422
- }
423
- return {
424
- privateNetwork: unmarshalArrayOfObject(data.private_network, unmarshalPrivateNetwork),
425
- totalCount: data.total_count
426
- };
427
- };
428
- const unmarshalLbType = data => {
429
- if (!isJSONObject(data)) {
430
- throw new TypeError(`Unmarshalling the type 'LbType' failed as data isn't a dictionary.`);
431
- }
432
- return {
433
- description: data.description,
434
- name: data.name,
435
- region: data.region ? data.region : undefined,
436
- stockStatus: data.stock_status,
437
- zone: data.zone
438
- };
439
- };
440
- const unmarshalListLbTypesResponse = data => {
441
- if (!isJSONObject(data)) {
442
- throw new TypeError(`Unmarshalling the type 'ListLbTypesResponse' failed as data isn't a dictionary.`);
443
- }
444
- return {
445
- lbTypes: unmarshalArrayOfObject(data.lb_types, unmarshalLbType),
446
- totalCount: data.total_count
447
- };
448
- };
449
- const unmarshalListLbsResponse = data => {
450
- if (!isJSONObject(data)) {
451
- throw new TypeError(`Unmarshalling the type 'ListLbsResponse' failed as data isn't a dictionary.`);
452
- }
453
- return {
454
- lbs: unmarshalArrayOfObject(data.lbs, unmarshalLb),
455
- totalCount: data.total_count
456
- };
457
- };
458
- const unmarshalListRoutesResponse = data => {
459
- if (!isJSONObject(data)) {
460
- throw new TypeError(`Unmarshalling the type 'ListRoutesResponse' failed as data isn't a dictionary.`);
461
- }
462
- return {
463
- routes: unmarshalArrayOfObject(data.routes, unmarshalRoute),
464
- totalCount: data.total_count
465
- };
466
- };
467
- const unmarshalListSubscriberResponse = data => {
468
- if (!isJSONObject(data)) {
469
- throw new TypeError(`Unmarshalling the type 'ListSubscriberResponse' failed as data isn't a dictionary.`);
470
- }
471
- return {
472
- subscribers: unmarshalArrayOfObject(data.subscribers, unmarshalSubscriber),
473
- totalCount: data.total_count
474
- };
475
- };
476
- const unmarshalSetAclsResponse = data => {
477
- if (!isJSONObject(data)) {
478
- throw new TypeError(`Unmarshalling the type 'SetAclsResponse' failed as data isn't a dictionary.`);
479
- }
480
- return {
481
- acls: unmarshalArrayOfObject(data.acls, unmarshalAcl),
482
- totalCount: data.total_count
483
- };
484
- };
485
- const marshalAddBackendServersRequest = (request, defaults) => ({
486
- server_ip: request.serverIp
487
- });
488
- const marshalAttachPrivateNetworkRequest = (request, defaults) => ({
489
- ...resolveOneOf([{
490
- param: 'dhcp_config',
491
- value: request.dhcpConfig
492
- }, {
493
- param: 'ipam_config',
494
- value: request.ipamConfig
495
- }, {
496
- param: 'static_config',
497
- value: request.staticConfig
498
- }])
499
- });
500
- const marshalCreateAclRequest = (request, defaults) => ({
501
- action: request.action,
502
- description: request.description,
503
- index: request.index,
504
- match: request.match,
505
- name: request.name || randomName('acl')
506
- });
507
- const marshalCreateBackendRequest = (request, defaults) => ({
508
- failover_host: request.failoverHost,
509
- forward_port: request.forwardPort,
510
- forward_port_algorithm: request.forwardPortAlgorithm,
511
- forward_protocol: request.forwardProtocol,
512
- health_check: request.healthCheck,
513
- ignore_ssl_server_verify: request.ignoreSslServerVerify,
514
- max_connections: request.maxConnections,
515
- max_retries: request.maxRetries,
516
- name: request.name || randomName('lbb'),
517
- on_marked_down_action: request.onMarkedDownAction,
518
- proxy_protocol: request.proxyProtocol,
519
- redispatch_attempt_count: request.redispatchAttemptCount,
520
- send_proxy_v2: request.sendProxyV2,
521
- server_ip: request.serverIp,
522
- ssl_bridging: request.sslBridging,
523
- sticky_sessions: request.stickySessions,
524
- sticky_sessions_cookie_name: request.stickySessionsCookieName,
525
- timeout_connect: request.timeoutConnect,
526
- timeout_queue: request.timeoutQueue,
527
- timeout_server: request.timeoutServer,
528
- timeout_tunnel: request.timeoutTunnel
529
- });
530
- const marshalCreateCertificateRequest = (request, defaults) => ({
531
- name: request.name || randomName('certificate'),
532
- ...resolveOneOf([{
533
- param: 'custom_certificate',
534
- value: request.customCertificate
535
- }, {
536
- param: 'letsencrypt',
537
- value: request.letsencrypt
538
- }])
539
- });
540
- const marshalCreateFrontendRequest = (request, defaults) => ({
541
- backend_id: request.backendId,
542
- certificate_id: request.certificateId,
543
- certificate_ids: request.certificateIds,
544
- enable_http3: request.enableHttp3,
545
- inbound_port: request.inboundPort,
546
- name: request.name || randomName('lbf'),
547
- timeout_client: request.timeoutClient
548
- });
549
- const marshalCreateIpRequest = (request, defaults) => ({
550
- reverse: request.reverse,
551
- ...resolveOneOf([{
552
- param: 'organization_id',
553
- value: request.organizationId
554
- }, {
555
- param: 'project_id',
556
- value: request.projectId
557
- }])
558
- });
559
- const marshalCreateLbRequest = (request, defaults) => ({
560
- assign_flexible_ip: request.assignFlexibleIp,
561
- description: request.description,
562
- ip_id: request.ipId,
563
- name: request.name || randomName('lb'),
564
- ssl_compatibility_level: request.sslCompatibilityLevel,
565
- tags: request.tags,
566
- type: request.type,
567
- ...resolveOneOf([{
568
- param: 'organization_id',
569
- value: request.organizationId
570
- }, {
571
- param: 'project_id',
572
- value: request.projectId
573
- }])
574
- });
575
- const marshalCreateRouteRequest = (request, defaults) => ({
576
- backend_id: request.backendId,
577
- frontend_id: request.frontendId,
578
- match: request.match
579
- });
580
- const marshalCreateSubscriberRequest = (request, defaults) => ({
581
- name: request.name,
582
- ...resolveOneOf([{
583
- param: 'organization_id',
584
- value: request.organizationId
585
- }, {
586
- param: 'project_id',
587
- value: request.projectId
588
- }]),
589
- ...resolveOneOf([{
590
- param: 'email_config',
591
- value: request.emailConfig
592
- }, {
593
- param: 'webhook_config',
594
- value: request.webhookConfig
595
- }])
596
- });
597
- const marshalMigrateLbRequest = (request, defaults) => ({
598
- type: request.type
599
- });
600
- const marshalRemoveBackendServersRequest = (request, defaults) => ({
601
- server_ip: request.serverIp
602
- });
603
- const marshalSetBackendServersRequest = (request, defaults) => ({
604
- server_ip: request.serverIp
605
- });
606
- const marshalSubscribeToLbRequest = (request, defaults) => ({
607
- subscriber_id: request.subscriberId
608
- });
609
- const marshalUpdateAclRequest = (request, defaults) => ({
610
- action: request.action,
611
- description: request.description,
612
- index: request.index,
613
- match: request.match,
614
- name: request.name
615
- });
616
- const marshalUpdateBackendRequest = (request, defaults) => ({
617
- failover_host: request.failoverHost,
618
- forward_port: request.forwardPort,
619
- forward_port_algorithm: request.forwardPortAlgorithm,
620
- forward_protocol: request.forwardProtocol,
621
- ignore_ssl_server_verify: request.ignoreSslServerVerify,
622
- max_connections: request.maxConnections,
623
- max_retries: request.maxRetries,
624
- name: request.name,
625
- on_marked_down_action: request.onMarkedDownAction,
626
- proxy_protocol: request.proxyProtocol,
627
- redispatch_attempt_count: request.redispatchAttemptCount,
628
- send_proxy_v2: request.sendProxyV2,
629
- ssl_bridging: request.sslBridging,
630
- sticky_sessions: request.stickySessions,
631
- sticky_sessions_cookie_name: request.stickySessionsCookieName,
632
- timeout_connect: request.timeoutConnect,
633
- timeout_queue: request.timeoutQueue,
634
- timeout_server: request.timeoutServer,
635
- timeout_tunnel: request.timeoutTunnel
636
- });
637
- const marshalUpdateCertificateRequest = (request, defaults) => ({
638
- name: request.name
639
- });
640
- const marshalUpdateFrontendRequest = (request, defaults) => ({
641
- backend_id: request.backendId,
642
- certificate_id: request.certificateId,
643
- certificate_ids: request.certificateIds,
644
- enable_http3: request.enableHttp3,
645
- inbound_port: request.inboundPort,
646
- name: request.name,
647
- timeout_client: request.timeoutClient
648
- });
649
- const marshalUpdateHealthCheckRequest = (request, defaults) => ({
650
- check_delay: request.checkDelay,
651
- check_max_retries: request.checkMaxRetries,
652
- check_send_proxy: request.checkSendProxy,
653
- check_timeout: request.checkTimeout,
654
- port: request.port,
655
- transient_check_delay: request.transientCheckDelay,
656
- ...resolveOneOf([{
657
- param: 'http_config',
658
- value: request.httpConfig
659
- }, {
660
- param: 'https_config',
661
- value: request.httpsConfig
662
- }, {
663
- param: 'ldap_config',
664
- value: request.ldapConfig
665
- }, {
666
- param: 'mysql_config',
667
- value: request.mysqlConfig
668
- }, {
669
- param: 'pgsql_config',
670
- value: request.pgsqlConfig
671
- }, {
672
- param: 'redis_config',
673
- value: request.redisConfig
674
- }, {
675
- param: 'tcp_config',
676
- value: request.tcpConfig
677
- }])
678
- });
679
- const marshalUpdateIpRequest = (request, defaults) => ({
680
- reverse: request.reverse
681
- });
682
- const marshalUpdateLbRequest = (request, defaults) => ({
683
- description: request.description,
684
- name: request.name,
685
- ssl_compatibility_level: request.sslCompatibilityLevel,
686
- tags: request.tags
687
- });
688
- const marshalUpdateRouteRequest = (request, defaults) => ({
689
- backend_id: request.backendId,
690
- match: request.match
691
- });
692
- const marshalUpdateSubscriberRequest = (request, defaults) => ({
693
- name: request.name,
694
- ...resolveOneOf([{
695
- param: 'email_config',
696
- value: request.emailConfig
697
- }, {
698
- param: 'webhook_config',
699
- value: request.webhookConfig
700
- }])
701
- });
702
- const marshalZonedApiAddBackendServersRequest = (request, defaults) => ({
703
- server_ip: request.serverIp
704
- });
705
- const marshalZonedApiAttachPrivateNetworkRequest = (request, defaults) => ({
706
- ...resolveOneOf([{
707
- param: 'dhcp_config',
708
- value: request.dhcpConfig
709
- }, {
710
- param: 'ipam_config',
711
- value: request.ipamConfig
712
- }, {
713
- param: 'static_config',
714
- value: request.staticConfig
715
- }])
716
- });
717
- const marshalZonedApiCreateAclRequest = (request, defaults) => ({
718
- action: request.action,
719
- description: request.description,
720
- index: request.index,
721
- match: request.match,
722
- name: request.name || randomName('acl')
723
- });
724
- const marshalZonedApiCreateBackendRequest = (request, defaults) => ({
725
- failover_host: request.failoverHost,
726
- forward_port: request.forwardPort,
727
- forward_port_algorithm: request.forwardPortAlgorithm,
728
- forward_protocol: request.forwardProtocol,
729
- health_check: request.healthCheck,
730
- ignore_ssl_server_verify: request.ignoreSslServerVerify,
731
- max_connections: request.maxConnections,
732
- max_retries: request.maxRetries,
733
- name: request.name || randomName('lbb'),
734
- on_marked_down_action: request.onMarkedDownAction,
735
- proxy_protocol: request.proxyProtocol,
736
- redispatch_attempt_count: request.redispatchAttemptCount,
737
- send_proxy_v2: request.sendProxyV2,
738
- server_ip: request.serverIp,
739
- ssl_bridging: request.sslBridging,
740
- sticky_sessions: request.stickySessions,
741
- sticky_sessions_cookie_name: request.stickySessionsCookieName,
742
- timeout_connect: request.timeoutConnect,
743
- timeout_queue: request.timeoutQueue,
744
- timeout_server: request.timeoutServer,
745
- timeout_tunnel: request.timeoutTunnel
746
- });
747
- const marshalZonedApiCreateCertificateRequest = (request, defaults) => ({
748
- name: request.name || randomName('certificate'),
749
- ...resolveOneOf([{
750
- param: 'custom_certificate',
751
- value: request.customCertificate
752
- }, {
753
- param: 'letsencrypt',
754
- value: request.letsencrypt
755
- }])
756
- });
757
- const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
758
- backend_id: request.backendId,
759
- certificate_id: request.certificateId,
760
- certificate_ids: request.certificateIds,
761
- enable_http3: request.enableHttp3,
762
- inbound_port: request.inboundPort,
763
- name: request.name || randomName('lbf'),
764
- timeout_client: request.timeoutClient
765
- });
766
- const marshalZonedApiCreateIpRequest = (request, defaults) => ({
767
- reverse: request.reverse,
768
- ...resolveOneOf([{
769
- param: 'organization_id',
770
- value: request.organizationId
771
- }, {
772
- param: 'project_id',
773
- value: request.projectId
774
- }])
775
- });
776
- const marshalZonedApiCreateLbRequest = (request, defaults) => ({
777
- assign_flexible_ip: request.assignFlexibleIp,
778
- description: request.description,
779
- ip_id: request.ipId,
780
- name: request.name || randomName('lb'),
781
- ssl_compatibility_level: request.sslCompatibilityLevel,
782
- tags: request.tags,
783
- type: request.type,
784
- ...resolveOneOf([{
785
- param: 'organization_id',
786
- value: request.organizationId
787
- }, {
788
- param: 'project_id',
789
- value: request.projectId
790
- }])
791
- });
792
- const marshalZonedApiCreateRouteRequest = (request, defaults) => ({
793
- backend_id: request.backendId,
794
- frontend_id: request.frontendId,
795
- match: request.match
796
- });
797
- const marshalZonedApiCreateSubscriberRequest = (request, defaults) => ({
798
- name: request.name,
799
- ...resolveOneOf([{
800
- param: 'organization_id',
801
- value: request.organizationId
802
- }, {
803
- param: 'project_id',
804
- value: request.projectId
805
- }]),
806
- ...resolveOneOf([{
807
- param: 'email_config',
808
- value: request.emailConfig
809
- }, {
810
- param: 'webhook_config',
811
- value: request.webhookConfig
812
- }])
813
- });
814
- const marshalZonedApiMigrateLbRequest = (request, defaults) => ({
815
- type: request.type
816
- });
817
- const marshalZonedApiRemoveBackendServersRequest = (request, defaults) => ({
818
- server_ip: request.serverIp
819
- });
820
- const marshalZonedApiSetAclsRequest = (request, defaults) => ({
821
- acls: request.acls
822
- });
823
- const marshalZonedApiSetBackendServersRequest = (request, defaults) => ({
824
- server_ip: request.serverIp
825
- });
826
- const marshalZonedApiSubscribeToLbRequest = (request, defaults) => ({
827
- subscriber_id: request.subscriberId
828
- });
829
- const marshalZonedApiUpdateAclRequest = (request, defaults) => ({
830
- action: request.action,
831
- description: request.description,
832
- index: request.index,
833
- match: request.match,
834
- name: request.name
835
- });
836
- const marshalZonedApiUpdateBackendRequest = (request, defaults) => ({
837
- failover_host: request.failoverHost,
838
- forward_port: request.forwardPort,
839
- forward_port_algorithm: request.forwardPortAlgorithm,
840
- forward_protocol: request.forwardProtocol,
841
- ignore_ssl_server_verify: request.ignoreSslServerVerify,
842
- max_connections: request.maxConnections,
843
- max_retries: request.maxRetries,
844
- name: request.name,
845
- on_marked_down_action: request.onMarkedDownAction,
846
- proxy_protocol: request.proxyProtocol,
847
- redispatch_attempt_count: request.redispatchAttemptCount,
848
- send_proxy_v2: request.sendProxyV2,
849
- ssl_bridging: request.sslBridging,
850
- sticky_sessions: request.stickySessions,
851
- sticky_sessions_cookie_name: request.stickySessionsCookieName,
852
- timeout_connect: request.timeoutConnect,
853
- timeout_queue: request.timeoutQueue,
854
- timeout_server: request.timeoutServer,
855
- timeout_tunnel: request.timeoutTunnel
856
- });
857
- const marshalZonedApiUpdateCertificateRequest = (request, defaults) => ({
858
- name: request.name
859
- });
860
- const marshalZonedApiUpdateFrontendRequest = (request, defaults) => ({
861
- backend_id: request.backendId,
862
- certificate_id: request.certificateId,
863
- certificate_ids: request.certificateIds,
864
- enable_http3: request.enableHttp3,
865
- inbound_port: request.inboundPort,
866
- name: request.name,
867
- timeout_client: request.timeoutClient
868
- });
869
- const marshalZonedApiUpdateHealthCheckRequest = (request, defaults) => ({
870
- check_delay: request.checkDelay,
871
- check_max_retries: request.checkMaxRetries,
872
- check_send_proxy: request.checkSendProxy,
873
- check_timeout: request.checkTimeout,
874
- port: request.port,
875
- transient_check_delay: request.transientCheckDelay,
876
- ...resolveOneOf([{
877
- param: 'http_config',
878
- value: request.httpConfig
879
- }, {
880
- param: 'https_config',
881
- value: request.httpsConfig
882
- }, {
883
- param: 'ldap_config',
884
- value: request.ldapConfig
885
- }, {
886
- param: 'mysql_config',
887
- value: request.mysqlConfig
888
- }, {
889
- param: 'pgsql_config',
890
- value: request.pgsqlConfig
891
- }, {
892
- param: 'redis_config',
893
- value: request.redisConfig
894
- }, {
895
- param: 'tcp_config',
896
- value: request.tcpConfig
897
- }])
898
- });
899
- const marshalZonedApiUpdateIpRequest = (request, defaults) => ({
900
- reverse: request.reverse
901
- });
902
- const marshalZonedApiUpdateLbRequest = (request, defaults) => ({
903
- description: request.description,
904
- name: request.name,
905
- ssl_compatibility_level: request.sslCompatibilityLevel,
906
- tags: request.tags
907
- });
908
- const marshalZonedApiUpdateRouteRequest = (request, defaults) => ({
909
- backend_id: request.backendId,
910
- match: request.match
911
- });
912
- const marshalZonedApiUpdateSubscriberRequest = (request, defaults) => ({
913
- name: request.name,
914
- ...resolveOneOf([{
915
- param: 'email_config',
916
- value: request.emailConfig
917
- }, {
918
- param: 'webhook_config',
919
- value: request.webhookConfig
920
- }])
921
- });
922
-
923
- 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, marshalZonedApiMigrateLbRequest, marshalZonedApiRemoveBackendServersRequest, marshalZonedApiSetAclsRequest, marshalZonedApiSetBackendServersRequest, marshalZonedApiSubscribeToLbRequest, marshalZonedApiUpdateAclRequest, marshalZonedApiUpdateBackendRequest, marshalZonedApiUpdateCertificateRequest, marshalZonedApiUpdateFrontendRequest, marshalZonedApiUpdateHealthCheckRequest, marshalZonedApiUpdateIpRequest, marshalZonedApiUpdateLbRequest, marshalZonedApiUpdateRouteRequest, marshalZonedApiUpdateSubscriberRequest, unmarshalAcl, unmarshalBackend, unmarshalCertificate, unmarshalFrontend, unmarshalHealthCheck, unmarshalIp, unmarshalLb, unmarshalLbStats, unmarshalListAclResponse, unmarshalListBackendStatsResponse, unmarshalListBackendsResponse, unmarshalListCertificatesResponse, unmarshalListFrontendsResponse, unmarshalListIpsResponse, unmarshalListLbPrivateNetworksResponse, unmarshalListLbTypesResponse, unmarshalListLbsResponse, unmarshalListRoutesResponse, unmarshalListSubscriberResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclsResponse, unmarshalSubscriber };