@scaleway/sdk 2.46.0 → 2.47.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 (174) hide show
  1. package/dist/api/baremetal/v1/api.gen.cjs +3 -1
  2. package/dist/api/baremetal/v1/api.gen.js +3 -1
  3. package/dist/api/edge_services/v1alpha1/api.gen.cjs +599 -0
  4. package/dist/api/edge_services/v1alpha1/api.gen.js +599 -0
  5. package/dist/api/edge_services/v1alpha1/content.gen.cjs +8 -0
  6. package/dist/api/edge_services/v1alpha1/content.gen.js +8 -0
  7. package/dist/api/edge_services/v1alpha1/index.gen.cjs +7 -0
  8. package/dist/api/edge_services/v1alpha1/index.gen.js +7 -0
  9. package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +434 -0
  10. package/dist/api/edge_services/v1alpha1/marshalling.gen.js +434 -0
  11. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +1 -0
  12. package/dist/api/iam/v1alpha1/marshalling.gen.js +1 -0
  13. package/dist/api/iam/v1alpha1/types.gen.d.ts +2 -0
  14. package/dist/api/index.d.ts +65 -35
  15. package/dist/api/inference/v1beta1/api.gen.cjs +306 -0
  16. package/dist/api/inference/v1beta1/api.gen.js +306 -0
  17. package/dist/api/inference/v1beta1/content.gen.cjs +8 -0
  18. package/dist/api/inference/v1beta1/content.gen.js +8 -0
  19. package/dist/api/inference/v1beta1/index.gen.cjs +8 -0
  20. package/dist/api/inference/v1beta1/index.gen.js +8 -0
  21. package/dist/api/inference/v1beta1/marshalling.gen.cjs +273 -0
  22. package/dist/api/inference/v1beta1/marshalling.gen.js +273 -0
  23. package/dist/api/inference/v1beta1/validation-rules.gen.cjs +56 -0
  24. package/dist/api/inference/v1beta1/validation-rules.gen.js +56 -0
  25. package/dist/api/k8s/v1/validation-rules.gen.cjs +65 -0
  26. package/dist/api/k8s/v1/validation-rules.gen.d.ts +62 -0
  27. package/dist/api/k8s/v1/validation-rules.gen.js +66 -1
  28. package/dist/api/mnq/index.gen.cjs +4 -0
  29. package/dist/api/mnq/index.gen.js +4 -0
  30. package/dist/api/qaas/v1alpha1/api.gen.cjs +527 -0
  31. package/dist/api/qaas/v1alpha1/api.gen.js +527 -0
  32. package/dist/api/qaas/v1alpha1/content.gen.cjs +19 -0
  33. package/dist/api/qaas/v1alpha1/content.gen.js +19 -0
  34. package/dist/api/qaas/v1alpha1/index.gen.cjs +10 -0
  35. package/dist/api/qaas/v1alpha1/index.gen.js +10 -0
  36. package/dist/api/qaas/v1alpha1/marshalling.gen.cjs +320 -0
  37. package/dist/api/qaas/v1alpha1/marshalling.gen.js +320 -0
  38. package/dist/api/qaas/v1alpha1/validation-rules.gen.cjs +14 -0
  39. package/dist/api/qaas/v1alpha1/validation-rules.gen.js +14 -0
  40. package/dist/api/tem/index.gen.cjs +4 -0
  41. package/dist/api/tem/index.gen.js +4 -0
  42. package/dist/api/tem/v1alpha1/api.gen.cjs +32 -0
  43. package/dist/api/tem/v1alpha1/api.gen.d.ts +17 -1
  44. package/dist/api/tem/v1alpha1/api.gen.js +33 -1
  45. package/dist/api/tem/v1alpha1/index.gen.d.ts +1 -1
  46. package/dist/api/tem/v1alpha1/marshalling.gen.cjs +36 -0
  47. package/dist/api/tem/v1alpha1/marshalling.gen.d.ts +3 -1
  48. package/dist/api/tem/v1alpha1/marshalling.gen.js +36 -0
  49. package/dist/api/tem/v1alpha1/types.gen.d.ts +51 -0
  50. package/dist/api/tem/v1alpha1/validation-rules.gen.cjs +11 -0
  51. package/dist/api/tem/v1alpha1/validation-rules.gen.d.ts +10 -0
  52. package/dist/api/tem/v1alpha1/validation-rules.gen.js +11 -0
  53. package/dist/api/webhosting/index.gen.cjs +6 -0
  54. package/dist/api/webhosting/index.gen.js +6 -0
  55. package/dist/api/webhosting/v1/api.gen.cjs +620 -0
  56. package/dist/api/webhosting/v1/api.gen.js +620 -0
  57. package/dist/api/webhosting/v1/content.gen.cjs +14 -0
  58. package/dist/api/webhosting/v1/content.gen.js +14 -0
  59. package/dist/api/webhosting/v1/index.gen.cjs +15 -0
  60. package/dist/api/webhosting/v1/index.gen.js +15 -0
  61. package/dist/api/webhosting/v1/marshalling.gen.cjs +391 -0
  62. package/dist/api/webhosting/v1/marshalling.gen.js +391 -0
  63. package/dist/api/webhosting/v1/types.gen.d.ts +5 -0
  64. package/dist/api/webhosting/v1/validation-rules.gen.cjs +82 -0
  65. package/dist/api/webhosting/v1/validation-rules.gen.js +82 -0
  66. package/dist/index.cjs +92 -70
  67. package/dist/index.js +92 -70
  68. package/dist/scw/constants.cjs +1 -1
  69. package/dist/scw/constants.d.ts +2 -2
  70. package/dist/scw/constants.js +1 -1
  71. package/package.json +2 -2
  72. package/dist/api/account/index.d.ts +0 -2
  73. package/dist/api/applesilicon/index.d.ts +0 -1
  74. package/dist/api/baremetal/index.d.ts +0 -1
  75. package/dist/api/billing/index.d.ts +0 -2
  76. package/dist/api/block/index.d.ts +0 -1
  77. package/dist/api/cockpit/index.d.ts +0 -2
  78. package/dist/api/container/index.d.ts +0 -1
  79. package/dist/api/dedibox/index.d.ts +0 -1
  80. package/dist/api/document_db/index.d.ts +0 -1
  81. package/dist/api/domain/index.d.ts +0 -1
  82. package/dist/api/edge_services/index.d.ts +0 -1
  83. package/dist/api/flexibleip/index.d.ts +0 -1
  84. package/dist/api/function/index.d.ts +0 -1
  85. package/dist/api/iam/index.d.ts +0 -1
  86. package/dist/api/instance/index.d.ts +0 -1
  87. package/dist/api/iot/index.d.ts +0 -1
  88. package/dist/api/ipam/index.d.ts +0 -1
  89. package/dist/api/ipfs/index.d.ts +0 -1
  90. package/dist/api/jobs/index.d.ts +0 -1
  91. package/dist/api/k8s/index.d.ts +0 -1
  92. package/dist/api/key_manager/index.d.ts +0 -1
  93. package/dist/api/lb/index.d.ts +0 -1
  94. package/dist/api/llm_inference/index.d.ts +0 -1
  95. package/dist/api/marketplace/index.d.ts +0 -1
  96. package/dist/api/mnq/index.d.ts +0 -1
  97. package/dist/api/rdb/index.d.ts +0 -1
  98. package/dist/api/redis/index.d.ts +0 -1
  99. package/dist/api/registry/index.d.ts +0 -1
  100. package/dist/api/secret/index.d.ts +0 -2
  101. package/dist/api/serverless_sqldb/index.d.ts +0 -1
  102. package/dist/api/tem/index.d.ts +0 -1
  103. package/dist/api/test/index.d.ts +0 -1
  104. package/dist/api/vpc/index.d.ts +0 -2
  105. package/dist/api/vpcgw/index.d.ts +0 -1
  106. package/dist/api/webhosting/index.d.ts +0 -1
  107. /package/dist/api/account/{index.cjs → index.gen.cjs} +0 -0
  108. /package/dist/api/account/{index.js → index.gen.js} +0 -0
  109. /package/dist/api/applesilicon/{index.cjs → index.gen.cjs} +0 -0
  110. /package/dist/api/applesilicon/{index.js → index.gen.js} +0 -0
  111. /package/dist/api/baremetal/{index.cjs → index.gen.cjs} +0 -0
  112. /package/dist/api/baremetal/{index.js → index.gen.js} +0 -0
  113. /package/dist/api/billing/{index.cjs → index.gen.cjs} +0 -0
  114. /package/dist/api/billing/{index.js → index.gen.js} +0 -0
  115. /package/dist/api/block/{index.cjs → index.gen.cjs} +0 -0
  116. /package/dist/api/block/{index.js → index.gen.js} +0 -0
  117. /package/dist/api/cockpit/{index.cjs → index.gen.cjs} +0 -0
  118. /package/dist/api/cockpit/{index.js → index.gen.js} +0 -0
  119. /package/dist/api/container/{index.cjs → index.gen.cjs} +0 -0
  120. /package/dist/api/container/{index.js → index.gen.js} +0 -0
  121. /package/dist/api/dedibox/{index.cjs → index.gen.cjs} +0 -0
  122. /package/dist/api/dedibox/{index.js → index.gen.js} +0 -0
  123. /package/dist/api/document_db/{index.cjs → index.gen.cjs} +0 -0
  124. /package/dist/api/document_db/{index.js → index.gen.js} +0 -0
  125. /package/dist/api/domain/{index.cjs → index.gen.cjs} +0 -0
  126. /package/dist/api/domain/{index.js → index.gen.js} +0 -0
  127. /package/dist/api/{flexibleip/index.cjs → edge_services/index.gen.cjs} +0 -0
  128. /package/dist/api/{flexibleip/index.js → edge_services/index.gen.js} +0 -0
  129. /package/dist/api/{iam/index.cjs → flexibleip/index.gen.cjs} +0 -0
  130. /package/dist/api/{iam/index.js → flexibleip/index.gen.js} +0 -0
  131. /package/dist/api/function/{index.cjs → index.gen.cjs} +0 -0
  132. /package/dist/api/function/{index.js → index.gen.js} +0 -0
  133. /package/dist/api/{ipfs/index.cjs → iam/index.gen.cjs} +0 -0
  134. /package/dist/api/{ipfs/index.js → iam/index.gen.js} +0 -0
  135. /package/dist/api/{llm_inference/index.cjs → inference/index.gen.cjs} +0 -0
  136. /package/dist/api/{llm_inference/index.js → inference/index.gen.js} +0 -0
  137. /package/dist/api/instance/{index.cjs → index.gen.cjs} +0 -0
  138. /package/dist/api/instance/{index.js → index.gen.js} +0 -0
  139. /package/dist/api/iot/{index.cjs → index.gen.cjs} +0 -0
  140. /package/dist/api/iot/{index.js → index.gen.js} +0 -0
  141. /package/dist/api/ipam/{index.cjs → index.gen.cjs} +0 -0
  142. /package/dist/api/ipam/{index.js → index.gen.js} +0 -0
  143. /package/dist/api/{jobs/index.cjs → ipfs/index.gen.cjs} +0 -0
  144. /package/dist/api/{jobs/index.js → ipfs/index.gen.js} +0 -0
  145. /package/dist/api/{key_manager/index.cjs → jobs/index.gen.cjs} +0 -0
  146. /package/dist/api/{key_manager/index.js → jobs/index.gen.js} +0 -0
  147. /package/dist/api/k8s/{index.cjs → index.gen.cjs} +0 -0
  148. /package/dist/api/k8s/{index.js → index.gen.js} +0 -0
  149. /package/dist/api/{serverless_sqldb/index.cjs → key_manager/index.gen.cjs} +0 -0
  150. /package/dist/api/{serverless_sqldb/index.js → key_manager/index.gen.js} +0 -0
  151. /package/dist/api/lb/{index.cjs → index.gen.cjs} +0 -0
  152. /package/dist/api/lb/{index.js → index.gen.js} +0 -0
  153. /package/dist/api/{mnq/index.cjs → llm_inference/index.gen.cjs} +0 -0
  154. /package/dist/api/{mnq/index.js → llm_inference/index.gen.js} +0 -0
  155. /package/dist/api/marketplace/{index.cjs → index.gen.cjs} +0 -0
  156. /package/dist/api/marketplace/{index.js → index.gen.js} +0 -0
  157. /package/dist/api/{tem/index.cjs → qaas/index.gen.cjs} +0 -0
  158. /package/dist/api/{tem/index.js → qaas/index.gen.js} +0 -0
  159. /package/dist/api/rdb/{index.cjs → index.gen.cjs} +0 -0
  160. /package/dist/api/rdb/{index.js → index.gen.js} +0 -0
  161. /package/dist/api/redis/{index.cjs → index.gen.cjs} +0 -0
  162. /package/dist/api/redis/{index.js → index.gen.js} +0 -0
  163. /package/dist/api/registry/{index.cjs → index.gen.cjs} +0 -0
  164. /package/dist/api/registry/{index.js → index.gen.js} +0 -0
  165. /package/dist/api/secret/{index.cjs → index.gen.cjs} +0 -0
  166. /package/dist/api/secret/{index.js → index.gen.js} +0 -0
  167. /package/dist/api/{webhosting/index.cjs → serverless_sqldb/index.gen.cjs} +0 -0
  168. /package/dist/api/{webhosting/index.js → serverless_sqldb/index.gen.js} +0 -0
  169. /package/dist/api/test/{index.cjs → index.gen.cjs} +0 -0
  170. /package/dist/api/test/{index.js → index.gen.js} +0 -0
  171. /package/dist/api/vpc/{index.cjs → index.gen.cjs} +0 -0
  172. /package/dist/api/vpc/{index.js → index.gen.js} +0 -0
  173. /package/dist/api/vpcgw/{index.cjs → index.gen.cjs} +0 -0
  174. /package/dist/api/vpcgw/{index.js → index.gen.js} +0 -0
@@ -0,0 +1,434 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const json = require("../../../helpers/json.cjs");
4
+ const marshalling = require("../../../helpers/marshalling.cjs");
5
+ require("../../../vendor/base64/index.cjs");
6
+ const unmarshalScalewayLb = (data) => {
7
+ if (!json.isJSONObject(data)) {
8
+ throw new TypeError(
9
+ `Unmarshalling the type 'ScalewayLb' failed as data isn't a dictionary.`
10
+ );
11
+ }
12
+ return {
13
+ domainName: data.domain_name,
14
+ frontendId: data.frontend_id,
15
+ id: data.id,
16
+ isSsl: data.is_ssl,
17
+ zone: data.zone
18
+ };
19
+ };
20
+ const unmarshalScalewayLbBackendConfig = (data) => {
21
+ if (!json.isJSONObject(data)) {
22
+ throw new TypeError(
23
+ `Unmarshalling the type 'ScalewayLbBackendConfig' failed as data isn't a dictionary.`
24
+ );
25
+ }
26
+ return {
27
+ lbs: marshalling.unmarshalArrayOfObject(data.lbs, unmarshalScalewayLb)
28
+ };
29
+ };
30
+ const unmarshalScalewayS3BackendConfig = (data) => {
31
+ if (!json.isJSONObject(data)) {
32
+ throw new TypeError(
33
+ `Unmarshalling the type 'ScalewayS3BackendConfig' failed as data isn't a dictionary.`
34
+ );
35
+ }
36
+ return {
37
+ bucketName: data.bucket_name,
38
+ bucketRegion: data.bucket_region,
39
+ isWebsite: data.is_website
40
+ };
41
+ };
42
+ const unmarshalBackendStage = (data) => {
43
+ if (!json.isJSONObject(data)) {
44
+ throw new TypeError(
45
+ `Unmarshalling the type 'BackendStage' failed as data isn't a dictionary.`
46
+ );
47
+ }
48
+ return {
49
+ createdAt: marshalling.unmarshalDate(data.created_at),
50
+ id: data.id,
51
+ pipelineId: data.pipeline_id,
52
+ projectId: data.project_id,
53
+ scalewayLb: data.scaleway_lb ? unmarshalScalewayLbBackendConfig(data.scaleway_lb) : void 0,
54
+ scalewayS3: data.scaleway_s3 ? unmarshalScalewayS3BackendConfig(data.scaleway_s3) : void 0,
55
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
56
+ };
57
+ };
58
+ const unmarshalCacheStage = (data) => {
59
+ if (!json.isJSONObject(data)) {
60
+ throw new TypeError(
61
+ `Unmarshalling the type 'CacheStage' failed as data isn't a dictionary.`
62
+ );
63
+ }
64
+ return {
65
+ backendStageId: data.backend_stage_id,
66
+ createdAt: marshalling.unmarshalDate(data.created_at),
67
+ fallbackTtl: data.fallback_ttl,
68
+ id: data.id,
69
+ pipelineId: data.pipeline_id,
70
+ projectId: data.project_id,
71
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
72
+ };
73
+ };
74
+ const unmarshalDNSStage = (data) => {
75
+ if (!json.isJSONObject(data)) {
76
+ throw new TypeError(
77
+ `Unmarshalling the type 'DNSStage' failed as data isn't a dictionary.`
78
+ );
79
+ }
80
+ return {
81
+ backendStageId: data.backend_stage_id,
82
+ cacheStageId: data.cache_stage_id,
83
+ createdAt: marshalling.unmarshalDate(data.created_at),
84
+ fqdns: data.fqdns,
85
+ id: data.id,
86
+ pipelineId: data.pipeline_id,
87
+ projectId: data.project_id,
88
+ tlsStageId: data.tls_stage_id,
89
+ type: data.type,
90
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
91
+ };
92
+ };
93
+ const unmarshalPipelineError = (data) => {
94
+ if (!json.isJSONObject(data)) {
95
+ throw new TypeError(
96
+ `Unmarshalling the type 'PipelineError' failed as data isn't a dictionary.`
97
+ );
98
+ }
99
+ return {
100
+ code: data.code,
101
+ message: data.message,
102
+ severity: data.severity,
103
+ stage: data.stage,
104
+ type: data.type
105
+ };
106
+ };
107
+ const unmarshalPipeline = (data) => {
108
+ if (!json.isJSONObject(data)) {
109
+ throw new TypeError(
110
+ `Unmarshalling the type 'Pipeline' failed as data isn't a dictionary.`
111
+ );
112
+ }
113
+ return {
114
+ createdAt: marshalling.unmarshalDate(data.created_at),
115
+ description: data.description,
116
+ dnsStageId: data.dns_stage_id,
117
+ errors: marshalling.unmarshalArrayOfObject(data.errors, unmarshalPipelineError),
118
+ id: data.id,
119
+ name: data.name,
120
+ projectId: data.project_id,
121
+ status: data.status,
122
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
123
+ };
124
+ };
125
+ const unmarshalPurgeRequest = (data) => {
126
+ if (!json.isJSONObject(data)) {
127
+ throw new TypeError(
128
+ `Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`
129
+ );
130
+ }
131
+ return {
132
+ all: data.all,
133
+ assets: data.assets,
134
+ createdAt: marshalling.unmarshalDate(data.created_at),
135
+ id: data.id,
136
+ pipelineId: data.pipeline_id,
137
+ status: data.status,
138
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
139
+ };
140
+ };
141
+ const unmarshalTLSSecret = (data) => {
142
+ if (!json.isJSONObject(data)) {
143
+ throw new TypeError(
144
+ `Unmarshalling the type 'TLSSecret' failed as data isn't a dictionary.`
145
+ );
146
+ }
147
+ return {
148
+ region: data.region,
149
+ secretId: data.secret_id
150
+ };
151
+ };
152
+ const unmarshalTLSStage = (data) => {
153
+ if (!json.isJSONObject(data)) {
154
+ throw new TypeError(
155
+ `Unmarshalling the type 'TLSStage' failed as data isn't a dictionary.`
156
+ );
157
+ }
158
+ return {
159
+ backendStageId: data.backend_stage_id,
160
+ cacheStageId: data.cache_stage_id,
161
+ certificateExpiresAt: marshalling.unmarshalDate(data.certificate_expires_at),
162
+ createdAt: marshalling.unmarshalDate(data.created_at),
163
+ id: data.id,
164
+ managedCertificate: data.managed_certificate,
165
+ pipelineId: data.pipeline_id,
166
+ projectId: data.project_id,
167
+ secrets: marshalling.unmarshalArrayOfObject(data.secrets, unmarshalTLSSecret),
168
+ updatedAt: marshalling.unmarshalDate(data.updated_at)
169
+ };
170
+ };
171
+ const unmarshalCheckDomainResponse = (data) => {
172
+ if (!json.isJSONObject(data)) {
173
+ throw new TypeError(
174
+ `Unmarshalling the type 'CheckDomainResponse' failed as data isn't a dictionary.`
175
+ );
176
+ }
177
+ return {
178
+ isValid: data.is_valid
179
+ };
180
+ };
181
+ const unmarshalCheckLbOriginResponse = (data) => {
182
+ if (!json.isJSONObject(data)) {
183
+ throw new TypeError(
184
+ `Unmarshalling the type 'CheckLbOriginResponse' failed as data isn't a dictionary.`
185
+ );
186
+ }
187
+ return {
188
+ errorType: data.error_type,
189
+ isValid: data.is_valid
190
+ };
191
+ };
192
+ const unmarshalCheckPEMChainResponse = (data) => {
193
+ if (!json.isJSONObject(data)) {
194
+ throw new TypeError(
195
+ `Unmarshalling the type 'CheckPEMChainResponse' failed as data isn't a dictionary.`
196
+ );
197
+ }
198
+ return {
199
+ isValid: data.is_valid
200
+ };
201
+ };
202
+ const unmarshalListBackendStagesResponse = (data) => {
203
+ if (!json.isJSONObject(data)) {
204
+ throw new TypeError(
205
+ `Unmarshalling the type 'ListBackendStagesResponse' failed as data isn't a dictionary.`
206
+ );
207
+ }
208
+ return {
209
+ stages: marshalling.unmarshalArrayOfObject(data.stages, unmarshalBackendStage),
210
+ totalCount: data.total_count
211
+ };
212
+ };
213
+ const unmarshalListCacheStagesResponse = (data) => {
214
+ if (!json.isJSONObject(data)) {
215
+ throw new TypeError(
216
+ `Unmarshalling the type 'ListCacheStagesResponse' failed as data isn't a dictionary.`
217
+ );
218
+ }
219
+ return {
220
+ stages: marshalling.unmarshalArrayOfObject(data.stages, unmarshalCacheStage),
221
+ totalCount: data.total_count
222
+ };
223
+ };
224
+ const unmarshalListDNSStagesResponse = (data) => {
225
+ if (!json.isJSONObject(data)) {
226
+ throw new TypeError(
227
+ `Unmarshalling the type 'ListDNSStagesResponse' failed as data isn't a dictionary.`
228
+ );
229
+ }
230
+ return {
231
+ stages: marshalling.unmarshalArrayOfObject(data.stages, unmarshalDNSStage),
232
+ totalCount: data.total_count
233
+ };
234
+ };
235
+ const unmarshalListPipelinesResponse = (data) => {
236
+ if (!json.isJSONObject(data)) {
237
+ throw new TypeError(
238
+ `Unmarshalling the type 'ListPipelinesResponse' failed as data isn't a dictionary.`
239
+ );
240
+ }
241
+ return {
242
+ pipelines: marshalling.unmarshalArrayOfObject(data.pipelines, unmarshalPipeline),
243
+ totalCount: data.total_count
244
+ };
245
+ };
246
+ const unmarshalListPurgeRequestsResponse = (data) => {
247
+ if (!json.isJSONObject(data)) {
248
+ throw new TypeError(
249
+ `Unmarshalling the type 'ListPurgeRequestsResponse' failed as data isn't a dictionary.`
250
+ );
251
+ }
252
+ return {
253
+ purgeRequests: marshalling.unmarshalArrayOfObject(
254
+ data.purge_requests,
255
+ unmarshalPurgeRequest
256
+ ),
257
+ totalCount: data.total_count
258
+ };
259
+ };
260
+ const unmarshalListTLSStagesResponse = (data) => {
261
+ if (!json.isJSONObject(data)) {
262
+ throw new TypeError(
263
+ `Unmarshalling the type 'ListTLSStagesResponse' failed as data isn't a dictionary.`
264
+ );
265
+ }
266
+ return {
267
+ stages: marshalling.unmarshalArrayOfObject(data.stages, unmarshalTLSStage),
268
+ totalCount: data.total_count
269
+ };
270
+ };
271
+ const marshalCheckDomainRequest = (request, defaults) => ({
272
+ cname: request.cname,
273
+ fqdn: request.fqdn,
274
+ project_id: request.projectId ?? defaults.defaultProjectId
275
+ });
276
+ const marshalScalewayLb = (request, defaults) => ({
277
+ domain_name: request.domainName,
278
+ frontend_id: request.frontendId,
279
+ id: request.id,
280
+ is_ssl: request.isSsl,
281
+ zone: request.zone
282
+ });
283
+ const marshalCheckLbOriginRequest = (request, defaults) => ({
284
+ lb: request.lb !== void 0 ? marshalScalewayLb(request.lb) : void 0
285
+ });
286
+ const marshalCheckPEMChainRequestSecretChain = (request, defaults) => ({
287
+ secret_id: request.secretId,
288
+ secret_region: request.secretRegion
289
+ });
290
+ const marshalCheckPEMChainRequest = (request, defaults) => ({
291
+ fqdn: request.fqdn,
292
+ project_id: request.projectId ?? defaults.defaultProjectId,
293
+ ...marshalling.resolveOneOf([
294
+ {
295
+ param: "secret",
296
+ value: request.secret !== void 0 ? marshalCheckPEMChainRequestSecretChain(request.secret) : void 0
297
+ },
298
+ { param: "raw", value: request.raw }
299
+ ])
300
+ });
301
+ const marshalScalewayLbBackendConfig = (request, defaults) => ({
302
+ lbs: request.lbs.map((elt) => marshalScalewayLb(elt))
303
+ });
304
+ const marshalScalewayS3BackendConfig = (request, defaults) => ({
305
+ bucket_name: request.bucketName,
306
+ bucket_region: request.bucketRegion,
307
+ is_website: request.isWebsite
308
+ });
309
+ const marshalCreateBackendStageRequest = (request, defaults) => ({
310
+ project_id: request.projectId ?? defaults.defaultProjectId,
311
+ ...marshalling.resolveOneOf([
312
+ {
313
+ param: "scaleway_s3",
314
+ value: request.scalewayS3 !== void 0 ? marshalScalewayS3BackendConfig(request.scalewayS3) : void 0
315
+ },
316
+ {
317
+ param: "scaleway_lb",
318
+ value: request.scalewayLb !== void 0 ? marshalScalewayLbBackendConfig(request.scalewayLb) : void 0
319
+ }
320
+ ])
321
+ });
322
+ const marshalCreateCacheStageRequest = (request, defaults) => ({
323
+ fallback_ttl: request.fallbackTtl,
324
+ project_id: request.projectId ?? defaults.defaultProjectId,
325
+ ...marshalling.resolveOneOf([
326
+ { param: "backend_stage_id", value: request.backendStageId }
327
+ ])
328
+ });
329
+ const marshalCreateDNSStageRequest = (request, defaults) => ({
330
+ fqdns: request.fqdns,
331
+ project_id: request.projectId ?? defaults.defaultProjectId,
332
+ ...marshalling.resolveOneOf([
333
+ { param: "tls_stage_id", value: request.tlsStageId },
334
+ { param: "cache_stage_id", value: request.cacheStageId },
335
+ { param: "backend_stage_id", value: request.backendStageId }
336
+ ])
337
+ });
338
+ const marshalCreatePipelineRequest = (request, defaults) => ({
339
+ description: request.description,
340
+ name: request.name,
341
+ project_id: request.projectId ?? defaults.defaultProjectId,
342
+ ...marshalling.resolveOneOf([{ param: "dns_stage_id", value: request.dnsStageId }])
343
+ });
344
+ const marshalCreatePurgeRequestRequest = (request, defaults) => ({
345
+ pipeline_id: request.pipelineId,
346
+ ...marshalling.resolveOneOf([
347
+ { param: "assets", value: request.assets },
348
+ { param: "all", value: request.all }
349
+ ])
350
+ });
351
+ const marshalTLSSecret = (request, defaults) => ({
352
+ region: request.region,
353
+ secret_id: request.secretId
354
+ });
355
+ const marshalCreateTLSStageRequest = (request, defaults) => ({
356
+ managed_certificate: request.managedCertificate,
357
+ project_id: request.projectId ?? defaults.defaultProjectId,
358
+ secrets: request.secrets !== void 0 ? request.secrets.map((elt) => marshalTLSSecret(elt)) : void 0,
359
+ ...marshalling.resolveOneOf([
360
+ { param: "cache_stage_id", value: request.cacheStageId },
361
+ { param: "backend_stage_id", value: request.backendStageId }
362
+ ])
363
+ });
364
+ const marshalUpdateBackendStageRequest = (request, defaults) => ({
365
+ ...marshalling.resolveOneOf([
366
+ {
367
+ param: "scaleway_s3",
368
+ value: request.scalewayS3 !== void 0 ? marshalScalewayS3BackendConfig(request.scalewayS3) : void 0
369
+ },
370
+ {
371
+ param: "scaleway_lb",
372
+ value: request.scalewayLb !== void 0 ? marshalScalewayLbBackendConfig(request.scalewayLb) : void 0
373
+ }
374
+ ])
375
+ });
376
+ const marshalUpdateCacheStageRequest = (request, defaults) => ({
377
+ fallback_ttl: request.fallbackTtl,
378
+ ...marshalling.resolveOneOf([
379
+ { param: "backend_stage_id", value: request.backendStageId }
380
+ ])
381
+ });
382
+ const marshalUpdateDNSStageRequest = (request, defaults) => ({
383
+ fqdns: request.fqdns,
384
+ ...marshalling.resolveOneOf([
385
+ { param: "tls_stage_id", value: request.tlsStageId },
386
+ { param: "cache_stage_id", value: request.cacheStageId },
387
+ { param: "backend_stage_id", value: request.backendStageId }
388
+ ])
389
+ });
390
+ const marshalUpdatePipelineRequest = (request, defaults) => ({
391
+ description: request.description,
392
+ name: request.name,
393
+ ...marshalling.resolveOneOf([{ param: "dns_stage_id", value: request.dnsStageId }])
394
+ });
395
+ const marshalTLSSecretsConfig = (request, defaults) => ({
396
+ tls_secrets: request.tlsSecrets.map((elt) => marshalTLSSecret(elt))
397
+ });
398
+ const marshalUpdateTLSStageRequest = (request, defaults) => ({
399
+ managed_certificate: request.managedCertificate,
400
+ tls_secrets_config: request.tlsSecretsConfig !== void 0 ? marshalTLSSecretsConfig(request.tlsSecretsConfig) : void 0,
401
+ ...marshalling.resolveOneOf([
402
+ { param: "cache_stage_id", value: request.cacheStageId },
403
+ { param: "backend_stage_id", value: request.backendStageId }
404
+ ])
405
+ });
406
+ exports.marshalCheckDomainRequest = marshalCheckDomainRequest;
407
+ exports.marshalCheckLbOriginRequest = marshalCheckLbOriginRequest;
408
+ exports.marshalCheckPEMChainRequest = marshalCheckPEMChainRequest;
409
+ exports.marshalCreateBackendStageRequest = marshalCreateBackendStageRequest;
410
+ exports.marshalCreateCacheStageRequest = marshalCreateCacheStageRequest;
411
+ exports.marshalCreateDNSStageRequest = marshalCreateDNSStageRequest;
412
+ exports.marshalCreatePipelineRequest = marshalCreatePipelineRequest;
413
+ exports.marshalCreatePurgeRequestRequest = marshalCreatePurgeRequestRequest;
414
+ exports.marshalCreateTLSStageRequest = marshalCreateTLSStageRequest;
415
+ exports.marshalUpdateBackendStageRequest = marshalUpdateBackendStageRequest;
416
+ exports.marshalUpdateCacheStageRequest = marshalUpdateCacheStageRequest;
417
+ exports.marshalUpdateDNSStageRequest = marshalUpdateDNSStageRequest;
418
+ exports.marshalUpdatePipelineRequest = marshalUpdatePipelineRequest;
419
+ exports.marshalUpdateTLSStageRequest = marshalUpdateTLSStageRequest;
420
+ exports.unmarshalBackendStage = unmarshalBackendStage;
421
+ exports.unmarshalCacheStage = unmarshalCacheStage;
422
+ exports.unmarshalCheckDomainResponse = unmarshalCheckDomainResponse;
423
+ exports.unmarshalCheckLbOriginResponse = unmarshalCheckLbOriginResponse;
424
+ exports.unmarshalCheckPEMChainResponse = unmarshalCheckPEMChainResponse;
425
+ exports.unmarshalDNSStage = unmarshalDNSStage;
426
+ exports.unmarshalListBackendStagesResponse = unmarshalListBackendStagesResponse;
427
+ exports.unmarshalListCacheStagesResponse = unmarshalListCacheStagesResponse;
428
+ exports.unmarshalListDNSStagesResponse = unmarshalListDNSStagesResponse;
429
+ exports.unmarshalListPipelinesResponse = unmarshalListPipelinesResponse;
430
+ exports.unmarshalListPurgeRequestsResponse = unmarshalListPurgeRequestsResponse;
431
+ exports.unmarshalListTLSStagesResponse = unmarshalListTLSStagesResponse;
432
+ exports.unmarshalPipeline = unmarshalPipeline;
433
+ exports.unmarshalPurgeRequest = unmarshalPurgeRequest;
434
+ exports.unmarshalTLSStage = unmarshalTLSStage;