@scaleway/sdk-edge-services 2.4.0 → 2.5.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.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1beta1/api.gen.js +574 -899
- package/dist/v1beta1/content.gen.js +4 -7
- package/dist/v1beta1/index.gen.d.ts +1 -1
- package/dist/v1beta1/index.gen.js +62 -60
- package/dist/v1beta1/marshalling.gen.js +559 -784
- package/dist/v1beta1/types.gen.d.ts +5 -1
- package/dist/v1beta1/validation-rules.gen.js +19 -23
- package/package.json +4 -4
|
@@ -1,874 +1,649 @@
|
|
|
1
|
-
import { resolveOneOf,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
const unmarshalScalewayServerlessContainerBackendConfig = (data) => {
|
|
40
|
-
if (!isJSONObject(data)) {
|
|
41
|
-
throw new TypeError(
|
|
42
|
-
`Unmarshalling the type 'ScalewayServerlessContainerBackendConfig' failed as data isn't a dictionary.`
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
containerId: data.container_id,
|
|
47
|
-
region: data.region
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
const unmarshalScalewayServerlessFunctionBackendConfig = (data) => {
|
|
51
|
-
if (!isJSONObject(data)) {
|
|
52
|
-
throw new TypeError(
|
|
53
|
-
`Unmarshalling the type 'ScalewayServerlessFunctionBackendConfig' failed as data isn't a dictionary.`
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
return {
|
|
57
|
-
functionId: data.function_id,
|
|
58
|
-
region: data.region
|
|
59
|
-
};
|
|
1
|
+
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
|
+
var unmarshalScalewayLb = (data) => {
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ScalewayLb' failed as data isn't a dictionary.`);
|
|
4
|
+
return {
|
|
5
|
+
domainName: data.domain_name,
|
|
6
|
+
frontendId: data.frontend_id,
|
|
7
|
+
hasWebsocket: data.has_websocket,
|
|
8
|
+
id: data.id,
|
|
9
|
+
isSsl: data.is_ssl,
|
|
10
|
+
zone: data.zone
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
var unmarshalScalewayLbBackendConfig = (data) => {
|
|
14
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ScalewayLbBackendConfig' failed as data isn't a dictionary.`);
|
|
15
|
+
return { lbs: unmarshalArrayOfObject(data.lbs, unmarshalScalewayLb) };
|
|
16
|
+
};
|
|
17
|
+
var unmarshalScalewayS3BackendConfig = (data) => {
|
|
18
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ScalewayS3BackendConfig' failed as data isn't a dictionary.`);
|
|
19
|
+
return {
|
|
20
|
+
bucketName: data.bucket_name,
|
|
21
|
+
bucketRegion: data.bucket_region,
|
|
22
|
+
isWebsite: data.is_website
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
var unmarshalScalewayServerlessContainerBackendConfig = (data) => {
|
|
26
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ScalewayServerlessContainerBackendConfig' failed as data isn't a dictionary.`);
|
|
27
|
+
return {
|
|
28
|
+
containerId: data.container_id,
|
|
29
|
+
region: data.region
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
var unmarshalScalewayServerlessFunctionBackendConfig = (data) => {
|
|
33
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ScalewayServerlessFunctionBackendConfig' failed as data isn't a dictionary.`);
|
|
34
|
+
return {
|
|
35
|
+
functionId: data.function_id,
|
|
36
|
+
region: data.region
|
|
37
|
+
};
|
|
60
38
|
};
|
|
61
39
|
const unmarshalBackendStage = (data) => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
scalewayServerlessContainer: data.scaleway_serverless_container ? unmarshalScalewayServerlessContainerBackendConfig(
|
|
74
|
-
data.scaleway_serverless_container
|
|
75
|
-
) : void 0,
|
|
76
|
-
scalewayServerlessFunction: data.scaleway_serverless_function ? unmarshalScalewayServerlessFunctionBackendConfig(
|
|
77
|
-
data.scaleway_serverless_function
|
|
78
|
-
) : void 0,
|
|
79
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
80
|
-
};
|
|
40
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BackendStage' failed as data isn't a dictionary.`);
|
|
41
|
+
return {
|
|
42
|
+
createdAt: unmarshalDate(data.created_at),
|
|
43
|
+
id: data.id,
|
|
44
|
+
pipelineId: data.pipeline_id,
|
|
45
|
+
scalewayLb: data.scaleway_lb ? unmarshalScalewayLbBackendConfig(data.scaleway_lb) : void 0,
|
|
46
|
+
scalewayS3: data.scaleway_s3 ? unmarshalScalewayS3BackendConfig(data.scaleway_s3) : void 0,
|
|
47
|
+
scalewayServerlessContainer: data.scaleway_serverless_container ? unmarshalScalewayServerlessContainerBackendConfig(data.scaleway_serverless_container) : void 0,
|
|
48
|
+
scalewayServerlessFunction: data.scaleway_serverless_function ? unmarshalScalewayServerlessFunctionBackendConfig(data.scaleway_serverless_function) : void 0,
|
|
49
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
50
|
+
};
|
|
81
51
|
};
|
|
82
52
|
const unmarshalCacheStage = (data) => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
routeStageId: data.route_stage_id,
|
|
96
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
97
|
-
wafStageId: data.waf_stage_id
|
|
98
|
-
};
|
|
53
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CacheStage' failed as data isn't a dictionary.`);
|
|
54
|
+
return {
|
|
55
|
+
backendStageId: data.backend_stage_id,
|
|
56
|
+
createdAt: unmarshalDate(data.created_at),
|
|
57
|
+
fallbackTtl: data.fallback_ttl,
|
|
58
|
+
id: data.id,
|
|
59
|
+
includeCookies: data.include_cookies,
|
|
60
|
+
pipelineId: data.pipeline_id,
|
|
61
|
+
routeStageId: data.route_stage_id,
|
|
62
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
63
|
+
wafStageId: data.waf_stage_id
|
|
64
|
+
};
|
|
99
65
|
};
|
|
100
66
|
const unmarshalDNSStage = (data) => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
return {
|
|
126
|
-
code: data.code,
|
|
127
|
-
message: data.message,
|
|
128
|
-
severity: data.severity,
|
|
129
|
-
stage: data.stage,
|
|
130
|
-
type: data.type
|
|
131
|
-
};
|
|
67
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DNSStage' failed as data isn't a dictionary.`);
|
|
68
|
+
return {
|
|
69
|
+
backendStageId: data.backend_stage_id,
|
|
70
|
+
cacheStageId: data.cache_stage_id,
|
|
71
|
+
createdAt: unmarshalDate(data.created_at),
|
|
72
|
+
defaultFqdn: data.default_fqdn,
|
|
73
|
+
fqdns: data.fqdns,
|
|
74
|
+
id: data.id,
|
|
75
|
+
pipelineId: data.pipeline_id,
|
|
76
|
+
tlsStageId: data.tls_stage_id,
|
|
77
|
+
type: data.type,
|
|
78
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
var unmarshalPipelineError = (data) => {
|
|
82
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PipelineError' failed as data isn't a dictionary.`);
|
|
83
|
+
return {
|
|
84
|
+
code: data.code,
|
|
85
|
+
message: data.message,
|
|
86
|
+
severity: data.severity,
|
|
87
|
+
stage: data.stage,
|
|
88
|
+
type: data.type
|
|
89
|
+
};
|
|
132
90
|
};
|
|
133
91
|
const unmarshalPipeline = (data) => {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
projectId: data.project_id,
|
|
147
|
-
status: data.status,
|
|
148
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
149
|
-
};
|
|
92
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Pipeline' failed as data isn't a dictionary.`);
|
|
93
|
+
return {
|
|
94
|
+
createdAt: unmarshalDate(data.created_at),
|
|
95
|
+
description: data.description,
|
|
96
|
+
errors: unmarshalArrayOfObject(data.errors, unmarshalPipelineError),
|
|
97
|
+
id: data.id,
|
|
98
|
+
name: data.name,
|
|
99
|
+
organizationId: data.organization_id,
|
|
100
|
+
projectId: data.project_id,
|
|
101
|
+
status: data.status,
|
|
102
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
103
|
+
};
|
|
150
104
|
};
|
|
151
105
|
const unmarshalRouteStage = (data) => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
throw new TypeError(
|
|
168
|
-
`Unmarshalling the type 'TLSSecret' failed as data isn't a dictionary.`
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
return {
|
|
172
|
-
region: data.region,
|
|
173
|
-
secretId: data.secret_id
|
|
174
|
-
};
|
|
106
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RouteStage' failed as data isn't a dictionary.`);
|
|
107
|
+
return {
|
|
108
|
+
createdAt: unmarshalDate(data.created_at),
|
|
109
|
+
id: data.id,
|
|
110
|
+
pipelineId: data.pipeline_id,
|
|
111
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
112
|
+
wafStageId: data.waf_stage_id
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
var unmarshalTLSSecret = (data) => {
|
|
116
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'TLSSecret' failed as data isn't a dictionary.`);
|
|
117
|
+
return {
|
|
118
|
+
region: data.region,
|
|
119
|
+
secretId: data.secret_id
|
|
120
|
+
};
|
|
175
121
|
};
|
|
176
122
|
const unmarshalTLSStage = (data) => {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
secrets: unmarshalArrayOfObject(data.secrets, unmarshalTLSSecret),
|
|
192
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
193
|
-
wafStageId: data.waf_stage_id
|
|
194
|
-
};
|
|
123
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'TLSStage' failed as data isn't a dictionary.`);
|
|
124
|
+
return {
|
|
125
|
+
backendStageId: data.backend_stage_id,
|
|
126
|
+
cacheStageId: data.cache_stage_id,
|
|
127
|
+
certificateExpiresAt: unmarshalDate(data.certificate_expires_at),
|
|
128
|
+
createdAt: unmarshalDate(data.created_at),
|
|
129
|
+
id: data.id,
|
|
130
|
+
managedCertificate: data.managed_certificate,
|
|
131
|
+
pipelineId: data.pipeline_id,
|
|
132
|
+
routeStageId: data.route_stage_id,
|
|
133
|
+
secrets: unmarshalArrayOfObject(data.secrets, unmarshalTLSSecret),
|
|
134
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
135
|
+
wafStageId: data.waf_stage_id
|
|
136
|
+
};
|
|
195
137
|
};
|
|
196
138
|
const unmarshalWafStage = (data) => {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
paranoiaLevel: data.paranoia_level,
|
|
208
|
-
pipelineId: data.pipeline_id,
|
|
209
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
210
|
-
};
|
|
139
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'WafStage' failed as data isn't a dictionary.`);
|
|
140
|
+
return {
|
|
141
|
+
backendStageId: data.backend_stage_id,
|
|
142
|
+
createdAt: unmarshalDate(data.created_at),
|
|
143
|
+
id: data.id,
|
|
144
|
+
mode: data.mode,
|
|
145
|
+
paranoiaLevel: data.paranoia_level,
|
|
146
|
+
pipelineId: data.pipeline_id,
|
|
147
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
148
|
+
};
|
|
211
149
|
};
|
|
212
150
|
const unmarshalPipelineStages = (data) => {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
cacheStages: unmarshalArrayOfObject(data.cache_stages, unmarshalCacheStage),
|
|
224
|
-
dnsStages: unmarshalArrayOfObject(data.dns_stages, unmarshalDNSStage),
|
|
225
|
-
pipeline: data.pipeline ? unmarshalPipeline(data.pipeline) : void 0,
|
|
226
|
-
routeStages: unmarshalArrayOfObject(data.route_stages, unmarshalRouteStage),
|
|
227
|
-
tlsStages: unmarshalArrayOfObject(data.tls_stages, unmarshalTLSStage),
|
|
228
|
-
wafStages: unmarshalArrayOfObject(data.waf_stages, unmarshalWafStage)
|
|
229
|
-
};
|
|
151
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PipelineStages' failed as data isn't a dictionary.`);
|
|
152
|
+
return {
|
|
153
|
+
backendStages: unmarshalArrayOfObject(data.backend_stages, unmarshalBackendStage),
|
|
154
|
+
cacheStages: unmarshalArrayOfObject(data.cache_stages, unmarshalCacheStage),
|
|
155
|
+
dnsStages: unmarshalArrayOfObject(data.dns_stages, unmarshalDNSStage),
|
|
156
|
+
pipeline: data.pipeline ? unmarshalPipeline(data.pipeline) : void 0,
|
|
157
|
+
routeStages: unmarshalArrayOfObject(data.route_stages, unmarshalRouteStage),
|
|
158
|
+
tlsStages: unmarshalArrayOfObject(data.tls_stages, unmarshalTLSStage),
|
|
159
|
+
wafStages: unmarshalArrayOfObject(data.waf_stages, unmarshalWafStage)
|
|
160
|
+
};
|
|
230
161
|
};
|
|
231
162
|
const unmarshalPurgeRequest = (data) => {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
methodFilters: data.method_filters,
|
|
266
|
-
pathFilter: data.path_filter ? unmarshalRuleHttpMatchPathFilter(data.path_filter) : void 0
|
|
267
|
-
};
|
|
268
|
-
};
|
|
269
|
-
const unmarshalRouteRule = (data) => {
|
|
270
|
-
if (!isJSONObject(data)) {
|
|
271
|
-
throw new TypeError(
|
|
272
|
-
`Unmarshalling the type 'RouteRule' failed as data isn't a dictionary.`
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
return {
|
|
276
|
-
backendStageId: data.backend_stage_id,
|
|
277
|
-
position: data.position,
|
|
278
|
-
routeStageId: data.route_stage_id,
|
|
279
|
-
ruleHttpMatch: data.rule_http_match ? unmarshalRuleHttpMatch(data.rule_http_match) : void 0
|
|
280
|
-
};
|
|
163
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PurgeRequest' failed as data isn't a dictionary.`);
|
|
164
|
+
return {
|
|
165
|
+
all: data.all,
|
|
166
|
+
assets: data.assets,
|
|
167
|
+
createdAt: unmarshalDate(data.created_at),
|
|
168
|
+
id: data.id,
|
|
169
|
+
pipelineId: data.pipeline_id,
|
|
170
|
+
status: data.status,
|
|
171
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
var unmarshalRuleHttpMatchPathFilter = (data) => {
|
|
175
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RuleHttpMatchPathFilter' failed as data isn't a dictionary.`);
|
|
176
|
+
return {
|
|
177
|
+
pathFilterType: data.path_filter_type,
|
|
178
|
+
value: data.value
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
var unmarshalRuleHttpMatch = (data) => {
|
|
182
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RuleHttpMatch' failed as data isn't a dictionary.`);
|
|
183
|
+
return {
|
|
184
|
+
methodFilters: data.method_filters,
|
|
185
|
+
pathFilter: data.path_filter ? unmarshalRuleHttpMatchPathFilter(data.path_filter) : void 0
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
var unmarshalRouteRule = (data) => {
|
|
189
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RouteRule' failed as data isn't a dictionary.`);
|
|
190
|
+
return {
|
|
191
|
+
backendStageId: data.backend_stage_id,
|
|
192
|
+
position: data.position,
|
|
193
|
+
routeStageId: data.route_stage_id,
|
|
194
|
+
ruleHttpMatch: data.rule_http_match ? unmarshalRuleHttpMatch(data.rule_http_match) : void 0
|
|
195
|
+
};
|
|
281
196
|
};
|
|
282
197
|
const unmarshalAddRouteRulesResponse = (data) => {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
`Unmarshalling the type 'AddRouteRulesResponse' failed as data isn't a dictionary.`
|
|
286
|
-
);
|
|
287
|
-
}
|
|
288
|
-
return {
|
|
289
|
-
routeRules: unmarshalArrayOfObject(data.route_rules, unmarshalRouteRule)
|
|
290
|
-
};
|
|
198
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddRouteRulesResponse' failed as data isn't a dictionary.`);
|
|
199
|
+
return { routeRules: unmarshalArrayOfObject(data.route_rules, unmarshalRouteRule) };
|
|
291
200
|
};
|
|
292
201
|
const unmarshalCheckDomainResponse = (data) => {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
`Unmarshalling the type 'CheckDomainResponse' failed as data isn't a dictionary.`
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
return {
|
|
299
|
-
isValid: data.is_valid
|
|
300
|
-
};
|
|
202
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CheckDomainResponse' failed as data isn't a dictionary.`);
|
|
203
|
+
return { isValid: data.is_valid };
|
|
301
204
|
};
|
|
302
205
|
const unmarshalCheckLbOriginResponse = (data) => {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
return {
|
|
309
|
-
errorType: data.error_type,
|
|
310
|
-
isValid: data.is_valid
|
|
311
|
-
};
|
|
206
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CheckLbOriginResponse' failed as data isn't a dictionary.`);
|
|
207
|
+
return {
|
|
208
|
+
errorType: data.error_type,
|
|
209
|
+
isValid: data.is_valid
|
|
210
|
+
};
|
|
312
211
|
};
|
|
313
212
|
const unmarshalCheckPEMChainResponse = (data) => {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
packageGb: data.package_gb,
|
|
331
|
-
pipelineLimit: data.pipeline_limit,
|
|
332
|
-
planName: data.plan_name,
|
|
333
|
-
wafRequests: data.waf_requests
|
|
334
|
-
};
|
|
335
|
-
};
|
|
336
|
-
const unmarshalPlanUsageDetails = (data) => {
|
|
337
|
-
if (!isJSONObject(data)) {
|
|
338
|
-
throw new TypeError(
|
|
339
|
-
`Unmarshalling the type 'PlanUsageDetails' failed as data isn't a dictionary.`
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
return {
|
|
343
|
-
planCost: data.plan_cost ? unmarshalMoney(data.plan_cost) : void 0
|
|
344
|
-
};
|
|
213
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CheckPEMChainResponse' failed as data isn't a dictionary.`);
|
|
214
|
+
return { isValid: data.is_valid };
|
|
215
|
+
};
|
|
216
|
+
var unmarshalPlanDetails = (data) => {
|
|
217
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlanDetails' failed as data isn't a dictionary.`);
|
|
218
|
+
return {
|
|
219
|
+
backendLimit: data.backend_limit,
|
|
220
|
+
packageGb: data.package_gb,
|
|
221
|
+
pipelineLimit: data.pipeline_limit,
|
|
222
|
+
planName: data.plan_name,
|
|
223
|
+
wafRequests: data.waf_requests
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
var unmarshalPlanUsageDetails = (data) => {
|
|
227
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlanUsageDetails' failed as data isn't a dictionary.`);
|
|
228
|
+
return { planCost: data.plan_cost ? unmarshalMoney(data.plan_cost) : void 0 };
|
|
345
229
|
};
|
|
346
230
|
const unmarshalGetBillingResponse = (data) => {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
totalCost: data.total_cost ? unmarshalMoney(data.total_cost) : void 0,
|
|
368
|
-
wafAddOn: data.waf_add_on ? unmarshalMoney(data.waf_add_on) : void 0
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
const unmarshalHeadStageResponseHeadStage = (data) => {
|
|
372
|
-
if (!isJSONObject(data)) {
|
|
373
|
-
throw new TypeError(
|
|
374
|
-
`Unmarshalling the type 'HeadStageResponseHeadStage' failed as data isn't a dictionary.`
|
|
375
|
-
);
|
|
376
|
-
}
|
|
377
|
-
return {
|
|
378
|
-
dnsStageId: data.dns_stage_id
|
|
379
|
-
};
|
|
231
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetBillingResponse' failed as data isn't a dictionary.`);
|
|
232
|
+
return {
|
|
233
|
+
currentPlan: data.current_plan ? unmarshalPlanDetails(data.current_plan) : void 0,
|
|
234
|
+
currentPlanCacheUsage: data.current_plan_cache_usage,
|
|
235
|
+
currentPlanWafUsage: data.current_plan_waf_usage,
|
|
236
|
+
extraCacheCost: data.extra_cache_cost ? unmarshalMoney(data.extra_cache_cost) : void 0,
|
|
237
|
+
extraCacheUsage: data.extra_cache_usage,
|
|
238
|
+
extraPipelinesCost: data.extra_pipelines_cost ? unmarshalMoney(data.extra_pipelines_cost) : void 0,
|
|
239
|
+
extraWafCost: data.extra_waf_cost ? unmarshalMoney(data.extra_waf_cost) : void 0,
|
|
240
|
+
extraWafUsage: data.extra_waf_usage,
|
|
241
|
+
pipelineNumber: data.pipeline_number,
|
|
242
|
+
planCost: data.plan_cost ? unmarshalMoney(data.plan_cost) : void 0,
|
|
243
|
+
plansUsageDetails: unmarshalMapOfObject(data.plans_usage_details, unmarshalPlanUsageDetails),
|
|
244
|
+
totalCost: data.total_cost ? unmarshalMoney(data.total_cost) : void 0,
|
|
245
|
+
wafAddOn: data.waf_add_on ? unmarshalMoney(data.waf_add_on) : void 0
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
var unmarshalHeadStageResponseHeadStage = (data) => {
|
|
249
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HeadStageResponseHeadStage' failed as data isn't a dictionary.`);
|
|
250
|
+
return { dnsStageId: data.dns_stage_id };
|
|
380
251
|
};
|
|
381
252
|
const unmarshalHeadStageResponse = (data) => {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
`Unmarshalling the type 'HeadStageResponse' failed as data isn't a dictionary.`
|
|
385
|
-
);
|
|
386
|
-
}
|
|
387
|
-
return {
|
|
388
|
-
headStage: data.head_stage ? unmarshalHeadStageResponseHeadStage(data.head_stage) : void 0
|
|
389
|
-
};
|
|
253
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HeadStageResponse' failed as data isn't a dictionary.`);
|
|
254
|
+
return { headStage: data.head_stage ? unmarshalHeadStageResponseHeadStage(data.head_stage) : void 0 };
|
|
390
255
|
};
|
|
391
256
|
const unmarshalListBackendStagesResponse = (data) => {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
return {
|
|
398
|
-
stages: unmarshalArrayOfObject(data.stages, unmarshalBackendStage),
|
|
399
|
-
totalCount: data.total_count
|
|
400
|
-
};
|
|
257
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBackendStagesResponse' failed as data isn't a dictionary.`);
|
|
258
|
+
return {
|
|
259
|
+
stages: unmarshalArrayOfObject(data.stages, unmarshalBackendStage),
|
|
260
|
+
totalCount: data.total_count
|
|
261
|
+
};
|
|
401
262
|
};
|
|
402
263
|
const unmarshalListCacheStagesResponse = (data) => {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
return {
|
|
409
|
-
stages: unmarshalArrayOfObject(data.stages, unmarshalCacheStage),
|
|
410
|
-
totalCount: data.total_count
|
|
411
|
-
};
|
|
264
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListCacheStagesResponse' failed as data isn't a dictionary.`);
|
|
265
|
+
return {
|
|
266
|
+
stages: unmarshalArrayOfObject(data.stages, unmarshalCacheStage),
|
|
267
|
+
totalCount: data.total_count
|
|
268
|
+
};
|
|
412
269
|
};
|
|
413
270
|
const unmarshalListDNSStagesResponse = (data) => {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
};
|
|
424
|
-
const unmarshalListHeadStagesResponseHeadStage = (data) => {
|
|
425
|
-
if (!isJSONObject(data)) {
|
|
426
|
-
throw new TypeError(
|
|
427
|
-
`Unmarshalling the type 'ListHeadStagesResponseHeadStage' failed as data isn't a dictionary.`
|
|
428
|
-
);
|
|
429
|
-
}
|
|
430
|
-
return {
|
|
431
|
-
dnsStageId: data.dns_stage_id
|
|
432
|
-
};
|
|
271
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDNSStagesResponse' failed as data isn't a dictionary.`);
|
|
272
|
+
return {
|
|
273
|
+
stages: unmarshalArrayOfObject(data.stages, unmarshalDNSStage),
|
|
274
|
+
totalCount: data.total_count
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
var unmarshalListHeadStagesResponseHeadStage = (data) => {
|
|
278
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListHeadStagesResponseHeadStage' failed as data isn't a dictionary.`);
|
|
279
|
+
return { dnsStageId: data.dns_stage_id };
|
|
433
280
|
};
|
|
434
281
|
const unmarshalListHeadStagesResponse = (data) => {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
return {
|
|
441
|
-
headStages: unmarshalArrayOfObject(
|
|
442
|
-
data.head_stages,
|
|
443
|
-
unmarshalListHeadStagesResponseHeadStage
|
|
444
|
-
),
|
|
445
|
-
totalCount: data.total_count
|
|
446
|
-
};
|
|
282
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListHeadStagesResponse' failed as data isn't a dictionary.`);
|
|
283
|
+
return {
|
|
284
|
+
headStages: unmarshalArrayOfObject(data.head_stages, unmarshalListHeadStagesResponseHeadStage),
|
|
285
|
+
totalCount: data.total_count
|
|
286
|
+
};
|
|
447
287
|
};
|
|
448
288
|
const unmarshalListPipelinesResponse = (data) => {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
return {
|
|
455
|
-
pipelines: unmarshalArrayOfObject(data.pipelines, unmarshalPipeline),
|
|
456
|
-
totalCount: data.total_count
|
|
457
|
-
};
|
|
289
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPipelinesResponse' failed as data isn't a dictionary.`);
|
|
290
|
+
return {
|
|
291
|
+
pipelines: unmarshalArrayOfObject(data.pipelines, unmarshalPipeline),
|
|
292
|
+
totalCount: data.total_count
|
|
293
|
+
};
|
|
458
294
|
};
|
|
459
295
|
const unmarshalListPipelinesWithStagesResponse = (data) => {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
return {
|
|
466
|
-
pipelines: unmarshalArrayOfObject(data.pipelines, unmarshalPipelineStages),
|
|
467
|
-
totalCount: data.total_count
|
|
468
|
-
};
|
|
296
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPipelinesWithStagesResponse' failed as data isn't a dictionary.`);
|
|
297
|
+
return {
|
|
298
|
+
pipelines: unmarshalArrayOfObject(data.pipelines, unmarshalPipelineStages),
|
|
299
|
+
totalCount: data.total_count
|
|
300
|
+
};
|
|
469
301
|
};
|
|
470
302
|
const unmarshalListPlansResponse = (data) => {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
return {
|
|
477
|
-
plans: unmarshalArrayOfObject(data.plans, unmarshalPlanDetails),
|
|
478
|
-
totalCount: data.total_count
|
|
479
|
-
};
|
|
303
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPlansResponse' failed as data isn't a dictionary.`);
|
|
304
|
+
return {
|
|
305
|
+
plans: unmarshalArrayOfObject(data.plans, unmarshalPlanDetails),
|
|
306
|
+
totalCount: data.total_count
|
|
307
|
+
};
|
|
480
308
|
};
|
|
481
309
|
const unmarshalListPurgeRequestsResponse = (data) => {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
return {
|
|
488
|
-
purgeRequests: unmarshalArrayOfObject(
|
|
489
|
-
data.purge_requests,
|
|
490
|
-
unmarshalPurgeRequest
|
|
491
|
-
),
|
|
492
|
-
totalCount: data.total_count
|
|
493
|
-
};
|
|
310
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPurgeRequestsResponse' failed as data isn't a dictionary.`);
|
|
311
|
+
return {
|
|
312
|
+
purgeRequests: unmarshalArrayOfObject(data.purge_requests, unmarshalPurgeRequest),
|
|
313
|
+
totalCount: data.total_count
|
|
314
|
+
};
|
|
494
315
|
};
|
|
495
316
|
const unmarshalListRouteRulesResponse = (data) => {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
return {
|
|
502
|
-
routeRules: unmarshalArrayOfObject(data.route_rules, unmarshalRouteRule),
|
|
503
|
-
totalCount: data.total_count
|
|
504
|
-
};
|
|
317
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRouteRulesResponse' failed as data isn't a dictionary.`);
|
|
318
|
+
return {
|
|
319
|
+
routeRules: unmarshalArrayOfObject(data.route_rules, unmarshalRouteRule),
|
|
320
|
+
totalCount: data.total_count
|
|
321
|
+
};
|
|
505
322
|
};
|
|
506
323
|
const unmarshalListRouteStagesResponse = (data) => {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
return {
|
|
513
|
-
stages: unmarshalArrayOfObject(data.stages, unmarshalRouteStage),
|
|
514
|
-
totalCount: data.total_count
|
|
515
|
-
};
|
|
324
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRouteStagesResponse' failed as data isn't a dictionary.`);
|
|
325
|
+
return {
|
|
326
|
+
stages: unmarshalArrayOfObject(data.stages, unmarshalRouteStage),
|
|
327
|
+
totalCount: data.total_count
|
|
328
|
+
};
|
|
516
329
|
};
|
|
517
330
|
const unmarshalListTLSStagesResponse = (data) => {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
return {
|
|
524
|
-
stages: unmarshalArrayOfObject(data.stages, unmarshalTLSStage),
|
|
525
|
-
totalCount: data.total_count
|
|
526
|
-
};
|
|
331
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTLSStagesResponse' failed as data isn't a dictionary.`);
|
|
332
|
+
return {
|
|
333
|
+
stages: unmarshalArrayOfObject(data.stages, unmarshalTLSStage),
|
|
334
|
+
totalCount: data.total_count
|
|
335
|
+
};
|
|
527
336
|
};
|
|
528
337
|
const unmarshalListWafStagesResponse = (data) => {
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
return {
|
|
535
|
-
stages: unmarshalArrayOfObject(data.stages, unmarshalWafStage),
|
|
536
|
-
totalCount: data.total_count
|
|
537
|
-
};
|
|
338
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListWafStagesResponse' failed as data isn't a dictionary.`);
|
|
339
|
+
return {
|
|
340
|
+
stages: unmarshalArrayOfObject(data.stages, unmarshalWafStage),
|
|
341
|
+
totalCount: data.total_count
|
|
342
|
+
};
|
|
538
343
|
};
|
|
539
344
|
const unmarshalPlan = (data) => {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
`Unmarshalling the type 'Plan' failed as data isn't a dictionary.`
|
|
543
|
-
);
|
|
544
|
-
}
|
|
545
|
-
return {
|
|
546
|
-
planName: data.plan_name
|
|
547
|
-
};
|
|
345
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Plan' failed as data isn't a dictionary.`);
|
|
346
|
+
return { planName: data.plan_name };
|
|
548
347
|
};
|
|
549
348
|
const unmarshalSetRouteRulesResponse = (data) => {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
routeRules: unmarshalArrayOfObject(data.route_rules, unmarshalRouteRule)
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
const marshalRuleHttpMatchPathFilter = (request, defaults) => ({
|
|
560
|
-
path_filter_type: request.pathFilterType,
|
|
561
|
-
value: request.value
|
|
349
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetRouteRulesResponse' failed as data isn't a dictionary.`);
|
|
350
|
+
return { routeRules: unmarshalArrayOfObject(data.route_rules, unmarshalRouteRule) };
|
|
351
|
+
};
|
|
352
|
+
var marshalRuleHttpMatchPathFilter = (request, defaults) => ({
|
|
353
|
+
path_filter_type: request.pathFilterType,
|
|
354
|
+
value: request.value
|
|
562
355
|
});
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
356
|
+
var marshalRuleHttpMatch = (request, defaults) => ({
|
|
357
|
+
method_filters: request.methodFilters,
|
|
358
|
+
path_filter: request.pathFilter !== void 0 ? marshalRuleHttpMatchPathFilter(request.pathFilter, defaults) : void 0
|
|
566
359
|
});
|
|
567
360
|
const marshalSetRouteRulesRequestRouteRule = (request, defaults) => ({
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
])
|
|
361
|
+
...resolveOneOf([{
|
|
362
|
+
param: "rule_http_match",
|
|
363
|
+
value: request.ruleHttpMatch !== void 0 ? marshalRuleHttpMatch(request.ruleHttpMatch, defaults) : void 0
|
|
364
|
+
}]),
|
|
365
|
+
...resolveOneOf([{
|
|
366
|
+
param: "backend_stage_id",
|
|
367
|
+
value: request.backendStageId
|
|
368
|
+
}])
|
|
577
369
|
});
|
|
578
370
|
const marshalAddRouteRulesRequest = (request, defaults) => ({
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
371
|
+
route_rules: request.routeRules !== void 0 ? request.routeRules.map((elt) => marshalSetRouteRulesRequestRouteRule(elt, defaults)) : void 0,
|
|
372
|
+
...resolveOneOf([{
|
|
373
|
+
param: "after_position",
|
|
374
|
+
value: request.afterPosition
|
|
375
|
+
}, {
|
|
376
|
+
param: "before_position",
|
|
377
|
+
value: request.beforePosition
|
|
378
|
+
}])
|
|
586
379
|
});
|
|
587
380
|
const marshalCheckDomainRequest = (request, defaults) => ({
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
});
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
});
|
|
600
|
-
const marshalCheckLbOriginRequest = (request, defaults) => ({
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
secret_id: request.secretId,
|
|
605
|
-
secret_region: request.secretRegion
|
|
381
|
+
cname: request.cname,
|
|
382
|
+
fqdn: request.fqdn,
|
|
383
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
384
|
+
});
|
|
385
|
+
var marshalScalewayLb = (request, defaults) => ({
|
|
386
|
+
domain_name: request.domainName,
|
|
387
|
+
frontend_id: request.frontendId,
|
|
388
|
+
has_websocket: request.hasWebsocket,
|
|
389
|
+
id: request.id,
|
|
390
|
+
is_ssl: request.isSsl,
|
|
391
|
+
zone: request.zone
|
|
392
|
+
});
|
|
393
|
+
const marshalCheckLbOriginRequest = (request, defaults) => ({ lb: request.lb !== void 0 ? marshalScalewayLb(request.lb, defaults) : void 0 });
|
|
394
|
+
var marshalCheckPEMChainRequestSecretChain = (request, defaults) => ({
|
|
395
|
+
secret_id: request.secretId,
|
|
396
|
+
secret_region: request.secretRegion
|
|
606
397
|
});
|
|
607
398
|
const marshalCheckPEMChainRequest = (request, defaults) => ({
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
});
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
{
|
|
651
|
-
param: "scaleway_serverless_function",
|
|
652
|
-
value: request.scalewayServerlessFunction !== void 0 ? marshalScalewayServerlessFunctionBackendConfig(
|
|
653
|
-
request.scalewayServerlessFunction
|
|
654
|
-
) : void 0
|
|
655
|
-
}
|
|
656
|
-
])
|
|
657
|
-
});
|
|
399
|
+
fqdn: request.fqdn,
|
|
400
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
401
|
+
...resolveOneOf([{
|
|
402
|
+
param: "secret",
|
|
403
|
+
value: request.secret !== void 0 ? marshalCheckPEMChainRequestSecretChain(request.secret, defaults) : void 0
|
|
404
|
+
}, {
|
|
405
|
+
param: "raw",
|
|
406
|
+
value: request.raw
|
|
407
|
+
}])
|
|
408
|
+
});
|
|
409
|
+
var marshalScalewayLbBackendConfig = (request, defaults) => ({ lbs: request.lbs.map((elt) => marshalScalewayLb(elt, defaults)) });
|
|
410
|
+
var marshalScalewayS3BackendConfig = (request, defaults) => ({
|
|
411
|
+
bucket_name: request.bucketName,
|
|
412
|
+
bucket_region: request.bucketRegion,
|
|
413
|
+
is_website: request.isWebsite
|
|
414
|
+
});
|
|
415
|
+
var marshalScalewayServerlessContainerBackendConfig = (request, defaults) => ({
|
|
416
|
+
container_id: request.containerId,
|
|
417
|
+
region: request.region
|
|
418
|
+
});
|
|
419
|
+
var marshalScalewayServerlessFunctionBackendConfig = (request, defaults) => ({
|
|
420
|
+
function_id: request.functionId,
|
|
421
|
+
region: request.region
|
|
422
|
+
});
|
|
423
|
+
const marshalCreateBackendStageRequest = (request, defaults) => ({ ...resolveOneOf([
|
|
424
|
+
{
|
|
425
|
+
param: "scaleway_s3",
|
|
426
|
+
value: request.scalewayS3 !== void 0 ? marshalScalewayS3BackendConfig(request.scalewayS3, defaults) : void 0
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
param: "scaleway_lb",
|
|
430
|
+
value: request.scalewayLb !== void 0 ? marshalScalewayLbBackendConfig(request.scalewayLb, defaults) : void 0
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
param: "scaleway_serverless_container",
|
|
434
|
+
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(request.scalewayServerlessContainer, defaults) : void 0
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
param: "scaleway_serverless_function",
|
|
438
|
+
value: request.scalewayServerlessFunction !== void 0 ? marshalScalewayServerlessFunctionBackendConfig(request.scalewayServerlessFunction, defaults) : void 0
|
|
439
|
+
}
|
|
440
|
+
]) });
|
|
658
441
|
const marshalCreateCacheStageRequest = (request, defaults) => ({
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
442
|
+
fallback_ttl: request.fallbackTtl,
|
|
443
|
+
include_cookies: request.includeCookies,
|
|
444
|
+
...resolveOneOf([
|
|
445
|
+
{
|
|
446
|
+
param: "backend_stage_id",
|
|
447
|
+
value: request.backendStageId
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
param: "waf_stage_id",
|
|
451
|
+
value: request.wafStageId
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
param: "route_stage_id",
|
|
455
|
+
value: request.routeStageId
|
|
456
|
+
}
|
|
457
|
+
])
|
|
666
458
|
});
|
|
667
459
|
const marshalCreateDNSStageRequest = (request, defaults) => ({
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
460
|
+
fqdns: request.fqdns,
|
|
461
|
+
...resolveOneOf([
|
|
462
|
+
{
|
|
463
|
+
param: "tls_stage_id",
|
|
464
|
+
value: request.tlsStageId
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
param: "cache_stage_id",
|
|
468
|
+
value: request.cacheStageId
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
param: "backend_stage_id",
|
|
472
|
+
value: request.backendStageId
|
|
473
|
+
}
|
|
474
|
+
])
|
|
674
475
|
});
|
|
675
476
|
const marshalCreatePipelineRequest = (request, defaults) => ({
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
477
|
+
description: request.description,
|
|
478
|
+
name: request.name,
|
|
479
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
679
480
|
});
|
|
680
481
|
const marshalCreatePurgeRequestRequest = (request, defaults) => ({
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
});
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
|
|
482
|
+
pipeline_id: request.pipelineId,
|
|
483
|
+
...resolveOneOf([{
|
|
484
|
+
param: "assets",
|
|
485
|
+
value: request.assets
|
|
486
|
+
}, {
|
|
487
|
+
param: "all",
|
|
488
|
+
value: request.all
|
|
489
|
+
}])
|
|
490
|
+
});
|
|
491
|
+
const marshalCreateRouteStageRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
492
|
+
param: "waf_stage_id",
|
|
493
|
+
value: request.wafStageId
|
|
494
|
+
}]) });
|
|
495
|
+
var marshalTLSSecret = (request, defaults) => ({
|
|
496
|
+
region: request.region,
|
|
497
|
+
secret_id: request.secretId
|
|
693
498
|
});
|
|
694
499
|
const marshalCreateTLSStageRequest = (request, defaults) => ({
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
500
|
+
managed_certificate: request.managedCertificate,
|
|
501
|
+
secrets: request.secrets !== void 0 ? request.secrets.map((elt) => marshalTLSSecret(elt, defaults)) : void 0,
|
|
502
|
+
...resolveOneOf([
|
|
503
|
+
{
|
|
504
|
+
param: "cache_stage_id",
|
|
505
|
+
value: request.cacheStageId
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
param: "backend_stage_id",
|
|
509
|
+
value: request.backendStageId
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
param: "route_stage_id",
|
|
513
|
+
value: request.routeStageId
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
param: "waf_stage_id",
|
|
517
|
+
value: request.wafStageId
|
|
518
|
+
}
|
|
519
|
+
])
|
|
703
520
|
});
|
|
704
521
|
const marshalCreateWafStageRequest = (request, defaults) => ({
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
522
|
+
mode: request.mode,
|
|
523
|
+
paranoia_level: request.paranoiaLevel,
|
|
524
|
+
...resolveOneOf([{
|
|
525
|
+
param: "backend_stage_id",
|
|
526
|
+
value: request.backendStageId
|
|
527
|
+
}])
|
|
710
528
|
});
|
|
711
529
|
const marshalSelectPlanRequest = (request, defaults) => ({
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
});
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
});
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
request.removeHeadStage
|
|
737
|
-
) : void 0
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
param: "swap_head_stage",
|
|
741
|
-
value: request.swapHeadStage !== void 0 ? marshalSetHeadStageRequestSwapHeadStage(
|
|
742
|
-
request.swapHeadStage
|
|
743
|
-
) : void 0
|
|
744
|
-
}
|
|
745
|
-
])
|
|
746
|
-
});
|
|
747
|
-
const marshalSetRouteRulesRequest = (request, defaults) => ({
|
|
748
|
-
route_rules: request.routeRules !== void 0 ? request.routeRules.map(
|
|
749
|
-
(elt) => marshalSetRouteRulesRequestRouteRule(elt)
|
|
750
|
-
) : void 0
|
|
751
|
-
});
|
|
530
|
+
plan_name: request.planName,
|
|
531
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
532
|
+
});
|
|
533
|
+
var marshalSetHeadStageRequestAddNewHeadStage = (request, defaults) => ({ new_stage_id: request.newStageId });
|
|
534
|
+
var marshalSetHeadStageRequestRemoveHeadStage = (request, defaults) => ({ remove_stage_id: request.removeStageId });
|
|
535
|
+
var marshalSetHeadStageRequestSwapHeadStage = (request, defaults) => ({
|
|
536
|
+
current_stage_id: request.currentStageId,
|
|
537
|
+
new_stage_id: request.newStageId
|
|
538
|
+
});
|
|
539
|
+
const marshalSetHeadStageRequest = (request, defaults) => ({ ...resolveOneOf([
|
|
540
|
+
{
|
|
541
|
+
param: "add_new_head_stage",
|
|
542
|
+
value: request.addNewHeadStage !== void 0 ? marshalSetHeadStageRequestAddNewHeadStage(request.addNewHeadStage, defaults) : void 0
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
param: "remove_head_stage",
|
|
546
|
+
value: request.removeHeadStage !== void 0 ? marshalSetHeadStageRequestRemoveHeadStage(request.removeHeadStage, defaults) : void 0
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
param: "swap_head_stage",
|
|
550
|
+
value: request.swapHeadStage !== void 0 ? marshalSetHeadStageRequestSwapHeadStage(request.swapHeadStage, defaults) : void 0
|
|
551
|
+
}
|
|
552
|
+
]) });
|
|
553
|
+
const marshalSetRouteRulesRequest = (request, defaults) => ({ route_rules: request.routeRules !== void 0 ? request.routeRules.map((elt) => marshalSetRouteRulesRequestRouteRule(elt, defaults)) : void 0 });
|
|
752
554
|
const marshalUpdateBackendStageRequest = (request, defaults) => ({
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
request.scalewayServerlessFunction
|
|
773
|
-
) : void 0
|
|
774
|
-
}
|
|
775
|
-
])
|
|
555
|
+
pipeline_id: request.pipelineId,
|
|
556
|
+
...resolveOneOf([
|
|
557
|
+
{
|
|
558
|
+
param: "scaleway_s3",
|
|
559
|
+
value: request.scalewayS3 !== void 0 ? marshalScalewayS3BackendConfig(request.scalewayS3, defaults) : void 0
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
param: "scaleway_lb",
|
|
563
|
+
value: request.scalewayLb !== void 0 ? marshalScalewayLbBackendConfig(request.scalewayLb, defaults) : void 0
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
param: "scaleway_serverless_container",
|
|
567
|
+
value: request.scalewayServerlessContainer !== void 0 ? marshalScalewayServerlessContainerBackendConfig(request.scalewayServerlessContainer, defaults) : void 0
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
param: "scaleway_serverless_function",
|
|
571
|
+
value: request.scalewayServerlessFunction !== void 0 ? marshalScalewayServerlessFunctionBackendConfig(request.scalewayServerlessFunction, defaults) : void 0
|
|
572
|
+
}
|
|
573
|
+
])
|
|
776
574
|
});
|
|
777
575
|
const marshalUpdateCacheStageRequest = (request, defaults) => ({
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
576
|
+
fallback_ttl: request.fallbackTtl,
|
|
577
|
+
include_cookies: request.includeCookies,
|
|
578
|
+
...resolveOneOf([
|
|
579
|
+
{
|
|
580
|
+
param: "backend_stage_id",
|
|
581
|
+
value: request.backendStageId
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
param: "waf_stage_id",
|
|
585
|
+
value: request.wafStageId
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
param: "route_stage_id",
|
|
589
|
+
value: request.routeStageId
|
|
590
|
+
}
|
|
591
|
+
])
|
|
785
592
|
});
|
|
786
593
|
const marshalUpdateDNSStageRequest = (request, defaults) => ({
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
594
|
+
fqdns: request.fqdns,
|
|
595
|
+
...resolveOneOf([
|
|
596
|
+
{
|
|
597
|
+
param: "tls_stage_id",
|
|
598
|
+
value: request.tlsStageId
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
param: "cache_stage_id",
|
|
602
|
+
value: request.cacheStageId
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
param: "backend_stage_id",
|
|
606
|
+
value: request.backendStageId
|
|
607
|
+
}
|
|
608
|
+
])
|
|
793
609
|
});
|
|
794
610
|
const marshalUpdatePipelineRequest = (request, defaults) => ({
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
});
|
|
798
|
-
const marshalUpdateRouteStageRequest = (request, defaults) => ({
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
});
|
|
611
|
+
description: request.description,
|
|
612
|
+
name: request.name
|
|
613
|
+
});
|
|
614
|
+
const marshalUpdateRouteStageRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
615
|
+
param: "waf_stage_id",
|
|
616
|
+
value: request.wafStageId
|
|
617
|
+
}]) });
|
|
618
|
+
var marshalTLSSecretsConfig = (request, defaults) => ({ tls_secrets: request.tlsSecrets.map((elt) => marshalTLSSecret(elt, defaults)) });
|
|
804
619
|
const marshalUpdateTLSStageRequest = (request, defaults) => ({
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
620
|
+
managed_certificate: request.managedCertificate,
|
|
621
|
+
tls_secrets_config: request.tlsSecretsConfig !== void 0 ? marshalTLSSecretsConfig(request.tlsSecretsConfig, defaults) : void 0,
|
|
622
|
+
...resolveOneOf([
|
|
623
|
+
{
|
|
624
|
+
param: "cache_stage_id",
|
|
625
|
+
value: request.cacheStageId
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
param: "backend_stage_id",
|
|
629
|
+
value: request.backendStageId
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
param: "route_stage_id",
|
|
633
|
+
value: request.routeStageId
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
param: "waf_stage_id",
|
|
637
|
+
value: request.wafStageId
|
|
638
|
+
}
|
|
639
|
+
])
|
|
813
640
|
});
|
|
814
641
|
const marshalUpdateWafStageRequest = (request, defaults) => ({
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
})
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
marshalCheckDomainRequest,
|
|
824
|
-
marshalCheckLbOriginRequest,
|
|
825
|
-
marshalCheckPEMChainRequest,
|
|
826
|
-
marshalCreateBackendStageRequest,
|
|
827
|
-
marshalCreateCacheStageRequest,
|
|
828
|
-
marshalCreateDNSStageRequest,
|
|
829
|
-
marshalCreatePipelineRequest,
|
|
830
|
-
marshalCreatePurgeRequestRequest,
|
|
831
|
-
marshalCreateRouteStageRequest,
|
|
832
|
-
marshalCreateTLSStageRequest,
|
|
833
|
-
marshalCreateWafStageRequest,
|
|
834
|
-
marshalSelectPlanRequest,
|
|
835
|
-
marshalSetHeadStageRequest,
|
|
836
|
-
marshalSetRouteRulesRequest,
|
|
837
|
-
marshalSetRouteRulesRequestRouteRule,
|
|
838
|
-
marshalUpdateBackendStageRequest,
|
|
839
|
-
marshalUpdateCacheStageRequest,
|
|
840
|
-
marshalUpdateDNSStageRequest,
|
|
841
|
-
marshalUpdatePipelineRequest,
|
|
842
|
-
marshalUpdateRouteStageRequest,
|
|
843
|
-
marshalUpdateTLSStageRequest,
|
|
844
|
-
marshalUpdateWafStageRequest,
|
|
845
|
-
unmarshalAddRouteRulesResponse,
|
|
846
|
-
unmarshalBackendStage,
|
|
847
|
-
unmarshalCacheStage,
|
|
848
|
-
unmarshalCheckDomainResponse,
|
|
849
|
-
unmarshalCheckLbOriginResponse,
|
|
850
|
-
unmarshalCheckPEMChainResponse,
|
|
851
|
-
unmarshalDNSStage,
|
|
852
|
-
unmarshalGetBillingResponse,
|
|
853
|
-
unmarshalHeadStageResponse,
|
|
854
|
-
unmarshalListBackendStagesResponse,
|
|
855
|
-
unmarshalListCacheStagesResponse,
|
|
856
|
-
unmarshalListDNSStagesResponse,
|
|
857
|
-
unmarshalListHeadStagesResponse,
|
|
858
|
-
unmarshalListPipelinesResponse,
|
|
859
|
-
unmarshalListPipelinesWithStagesResponse,
|
|
860
|
-
unmarshalListPlansResponse,
|
|
861
|
-
unmarshalListPurgeRequestsResponse,
|
|
862
|
-
unmarshalListRouteRulesResponse,
|
|
863
|
-
unmarshalListRouteStagesResponse,
|
|
864
|
-
unmarshalListTLSStagesResponse,
|
|
865
|
-
unmarshalListWafStagesResponse,
|
|
866
|
-
unmarshalPipeline,
|
|
867
|
-
unmarshalPipelineStages,
|
|
868
|
-
unmarshalPlan,
|
|
869
|
-
unmarshalPurgeRequest,
|
|
870
|
-
unmarshalRouteStage,
|
|
871
|
-
unmarshalSetRouteRulesResponse,
|
|
872
|
-
unmarshalTLSStage,
|
|
873
|
-
unmarshalWafStage
|
|
874
|
-
};
|
|
642
|
+
mode: request.mode,
|
|
643
|
+
paranoia_level: request.paranoiaLevel,
|
|
644
|
+
...resolveOneOf([{
|
|
645
|
+
param: "backend_stage_id",
|
|
646
|
+
value: request.backendStageId
|
|
647
|
+
}])
|
|
648
|
+
});
|
|
649
|
+
export { marshalAddRouteRulesRequest, marshalCheckDomainRequest, marshalCheckLbOriginRequest, marshalCheckPEMChainRequest, marshalCreateBackendStageRequest, marshalCreateCacheStageRequest, marshalCreateDNSStageRequest, marshalCreatePipelineRequest, marshalCreatePurgeRequestRequest, marshalCreateRouteStageRequest, marshalCreateTLSStageRequest, marshalCreateWafStageRequest, marshalSelectPlanRequest, marshalSetHeadStageRequest, marshalSetRouteRulesRequest, marshalSetRouteRulesRequestRouteRule, marshalUpdateBackendStageRequest, marshalUpdateCacheStageRequest, marshalUpdateDNSStageRequest, marshalUpdatePipelineRequest, marshalUpdateRouteStageRequest, marshalUpdateTLSStageRequest, marshalUpdateWafStageRequest, unmarshalAddRouteRulesResponse, unmarshalBackendStage, unmarshalCacheStage, unmarshalCheckDomainResponse, unmarshalCheckLbOriginResponse, unmarshalCheckPEMChainResponse, unmarshalDNSStage, unmarshalGetBillingResponse, unmarshalHeadStageResponse, unmarshalListBackendStagesResponse, unmarshalListCacheStagesResponse, unmarshalListDNSStagesResponse, unmarshalListHeadStagesResponse, unmarshalListPipelinesResponse, unmarshalListPipelinesWithStagesResponse, unmarshalListPlansResponse, unmarshalListPurgeRequestsResponse, unmarshalListRouteRulesResponse, unmarshalListRouteStagesResponse, unmarshalListTLSStagesResponse, unmarshalListWafStagesResponse, unmarshalPipeline, unmarshalPipelineStages, unmarshalPlan, unmarshalPurgeRequest, unmarshalRouteStage, unmarshalSetRouteRulesResponse, unmarshalTLSStage, unmarshalWafStage };
|