@aws-sdk/client-finspace 3.181.0 → 3.183.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/CHANGELOG.md +8 -0
- package/dist-es/Finspace.js +34 -41
- package/dist-es/FinspaceClient.js +22 -28
- package/dist-es/commands/CreateEnvironmentCommand.js +21 -28
- package/dist-es/commands/DeleteEnvironmentCommand.js +21 -28
- package/dist-es/commands/GetEnvironmentCommand.js +21 -28
- package/dist-es/commands/ListEnvironmentsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateEnvironmentCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/FinspaceServiceException.js +5 -10
- package/dist-es/models/models_0.js +149 -110
- package/dist-es/protocols/Aws_restJson1.js +646 -883
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,877 +1,657 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { FinspaceServiceException as __BaseException } from "../models/FinspaceServiceException";
|
|
5
4
|
import { AccessDeniedException, InternalServerException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export
|
|
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
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
36
|
-
return __generator(this, function (_c) {
|
|
37
|
-
switch (_c.label) {
|
|
38
|
-
case 0: return [4, context.endpoint()];
|
|
39
|
-
case 1:
|
|
40
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
41
|
-
headers = {};
|
|
42
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environment/{environmentId}";
|
|
43
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", function () { return input.environmentId; }, "{environmentId}", false);
|
|
44
|
-
return [2, new __HttpRequest({
|
|
45
|
-
protocol: protocol,
|
|
46
|
-
hostname: hostname,
|
|
47
|
-
port: port,
|
|
48
|
-
method: "DELETE",
|
|
49
|
-
headers: headers,
|
|
50
|
-
path: resolvedPath,
|
|
51
|
-
body: body,
|
|
52
|
-
})];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}); };
|
|
56
|
-
export var serializeAws_restJson1GetEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
57
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
58
|
-
return __generator(this, function (_c) {
|
|
59
|
-
switch (_c.label) {
|
|
60
|
-
case 0: return [4, context.endpoint()];
|
|
61
|
-
case 1:
|
|
62
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
63
|
-
headers = {};
|
|
64
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environment/{environmentId}";
|
|
65
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", function () { return input.environmentId; }, "{environmentId}", false);
|
|
66
|
-
return [2, new __HttpRequest({
|
|
67
|
-
protocol: protocol,
|
|
68
|
-
hostname: hostname,
|
|
69
|
-
port: port,
|
|
70
|
-
method: "GET",
|
|
71
|
-
headers: headers,
|
|
72
|
-
path: resolvedPath,
|
|
73
|
-
body: body,
|
|
74
|
-
})];
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}); };
|
|
78
|
-
export var serializeAws_restJson1ListEnvironmentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
79
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
80
|
-
return __generator(this, function (_c) {
|
|
81
|
-
switch (_c.label) {
|
|
82
|
-
case 0: return [4, context.endpoint()];
|
|
83
|
-
case 1:
|
|
84
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
85
|
-
headers = {};
|
|
86
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environment";
|
|
87
|
-
query = map({
|
|
88
|
-
nextToken: [, input.nextToken],
|
|
89
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
90
|
-
});
|
|
91
|
-
return [2, new __HttpRequest({
|
|
92
|
-
protocol: protocol,
|
|
93
|
-
hostname: hostname,
|
|
94
|
-
port: port,
|
|
95
|
-
method: "GET",
|
|
96
|
-
headers: headers,
|
|
97
|
-
path: resolvedPath,
|
|
98
|
-
query: query,
|
|
99
|
-
body: body,
|
|
100
|
-
})];
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}); };
|
|
104
|
-
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
105
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
106
|
-
return __generator(this, function (_c) {
|
|
107
|
-
switch (_c.label) {
|
|
108
|
-
case 0: return [4, context.endpoint()];
|
|
109
|
-
case 1:
|
|
110
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
111
|
-
headers = {};
|
|
112
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
113
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
114
|
-
return [2, new __HttpRequest({
|
|
115
|
-
protocol: protocol,
|
|
116
|
-
hostname: hostname,
|
|
117
|
-
port: port,
|
|
118
|
-
method: "GET",
|
|
119
|
-
headers: headers,
|
|
120
|
-
path: resolvedPath,
|
|
121
|
-
body: body,
|
|
122
|
-
})];
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
}); };
|
|
126
|
-
export var serializeAws_restJson1TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
127
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
128
|
-
return __generator(this, function (_c) {
|
|
129
|
-
switch (_c.label) {
|
|
130
|
-
case 0: return [4, context.endpoint()];
|
|
131
|
-
case 1:
|
|
132
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
133
|
-
headers = {
|
|
134
|
-
"content-type": "application/json",
|
|
135
|
-
};
|
|
136
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
137
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
138
|
-
body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
139
|
-
return [2, new __HttpRequest({
|
|
140
|
-
protocol: protocol,
|
|
141
|
-
hostname: hostname,
|
|
142
|
-
port: port,
|
|
143
|
-
method: "POST",
|
|
144
|
-
headers: headers,
|
|
145
|
-
path: resolvedPath,
|
|
146
|
-
body: body,
|
|
147
|
-
})];
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}); };
|
|
151
|
-
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
152
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
153
|
-
return __generator(this, function (_c) {
|
|
154
|
-
switch (_c.label) {
|
|
155
|
-
case 0: return [4, context.endpoint()];
|
|
156
|
-
case 1:
|
|
157
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
158
|
-
headers = {};
|
|
159
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
160
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
161
|
-
query = map({
|
|
162
|
-
tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
163
|
-
});
|
|
164
|
-
return [2, new __HttpRequest({
|
|
165
|
-
protocol: protocol,
|
|
166
|
-
hostname: hostname,
|
|
167
|
-
port: port,
|
|
168
|
-
method: "DELETE",
|
|
169
|
-
headers: headers,
|
|
170
|
-
path: resolvedPath,
|
|
171
|
-
query: query,
|
|
172
|
-
body: body,
|
|
173
|
-
})];
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
}); };
|
|
177
|
-
export var serializeAws_restJson1UpdateEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
179
|
-
return __generator(this, function (_c) {
|
|
180
|
-
switch (_c.label) {
|
|
181
|
-
case 0: return [4, context.endpoint()];
|
|
182
|
-
case 1:
|
|
183
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
184
|
-
headers = {
|
|
185
|
-
"content-type": "application/json",
|
|
186
|
-
};
|
|
187
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environment/{environmentId}";
|
|
188
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", function () { return input.environmentId; }, "{environmentId}", false);
|
|
189
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.description != null && { description: input.description })), (input.federationMode != null && { federationMode: input.federationMode })), (input.federationParameters != null && {
|
|
190
|
-
federationParameters: serializeAws_restJson1FederationParameters(input.federationParameters, context),
|
|
191
|
-
})), (input.name != null && { name: input.name })));
|
|
192
|
-
return [2, new __HttpRequest({
|
|
193
|
-
protocol: protocol,
|
|
194
|
-
hostname: hostname,
|
|
195
|
-
port: port,
|
|
196
|
-
method: "PUT",
|
|
197
|
-
headers: headers,
|
|
198
|
-
path: resolvedPath,
|
|
199
|
-
body: body,
|
|
200
|
-
})];
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}); };
|
|
204
|
-
export var deserializeAws_restJson1CreateEnvironmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
205
|
-
var contents, data, _a, _b;
|
|
206
|
-
return __generator(this, function (_c) {
|
|
207
|
-
switch (_c.label) {
|
|
208
|
-
case 0:
|
|
209
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
210
|
-
return [2, deserializeAws_restJson1CreateEnvironmentCommandError(output, context)];
|
|
211
|
-
}
|
|
212
|
-
contents = map({
|
|
213
|
-
$metadata: deserializeMetadata(output),
|
|
214
|
-
});
|
|
215
|
-
_a = __expectNonNull;
|
|
216
|
-
_b = __expectObject;
|
|
217
|
-
return [4, parseBody(output.body, context)];
|
|
218
|
-
case 1:
|
|
219
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
220
|
-
if (data.environmentArn != null) {
|
|
221
|
-
contents.environmentArn = __expectString(data.environmentArn);
|
|
222
|
-
}
|
|
223
|
-
if (data.environmentId != null) {
|
|
224
|
-
contents.environmentId = __expectString(data.environmentId);
|
|
225
|
-
}
|
|
226
|
-
if (data.environmentUrl != null) {
|
|
227
|
-
contents.environmentUrl = __expectString(data.environmentUrl);
|
|
228
|
-
}
|
|
229
|
-
return [2, contents];
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
}); };
|
|
233
|
-
var deserializeAws_restJson1CreateEnvironmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
234
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
235
|
-
var _c;
|
|
236
|
-
return __generator(this, function (_d) {
|
|
237
|
-
switch (_d.label) {
|
|
238
|
-
case 0:
|
|
239
|
-
_a = [__assign({}, output)];
|
|
240
|
-
_c = {};
|
|
241
|
-
return [4, parseErrorBody(output.body, context)];
|
|
242
|
-
case 1:
|
|
243
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
244
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
245
|
-
_b = errorCode;
|
|
246
|
-
switch (_b) {
|
|
247
|
-
case "AccessDeniedException": return [3, 2];
|
|
248
|
-
case "com.amazonaws.finspace#AccessDeniedException": return [3, 2];
|
|
249
|
-
case "InternalServerException": return [3, 4];
|
|
250
|
-
case "com.amazonaws.finspace#InternalServerException": return [3, 4];
|
|
251
|
-
case "LimitExceededException": return [3, 6];
|
|
252
|
-
case "com.amazonaws.finspace#LimitExceededException": return [3, 6];
|
|
253
|
-
case "ServiceQuotaExceededException": return [3, 8];
|
|
254
|
-
case "com.amazonaws.finspace#ServiceQuotaExceededException": return [3, 8];
|
|
255
|
-
case "ThrottlingException": return [3, 10];
|
|
256
|
-
case "com.amazonaws.finspace#ThrottlingException": return [3, 10];
|
|
257
|
-
case "ValidationException": return [3, 12];
|
|
258
|
-
case "com.amazonaws.finspace#ValidationException": return [3, 12];
|
|
259
|
-
}
|
|
260
|
-
return [3, 14];
|
|
261
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
262
|
-
case 3: throw _d.sent();
|
|
263
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
264
|
-
case 5: throw _d.sent();
|
|
265
|
-
case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
266
|
-
case 7: throw _d.sent();
|
|
267
|
-
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
268
|
-
case 9: throw _d.sent();
|
|
269
|
-
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
270
|
-
case 11: throw _d.sent();
|
|
271
|
-
case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
272
|
-
case 13: throw _d.sent();
|
|
273
|
-
case 14:
|
|
274
|
-
parsedBody = parsedOutput.body;
|
|
275
|
-
throwDefaultError({
|
|
276
|
-
output: output,
|
|
277
|
-
parsedBody: parsedBody,
|
|
278
|
-
exceptionCtor: __BaseException,
|
|
279
|
-
errorCode: errorCode,
|
|
280
|
-
});
|
|
281
|
-
_d.label = 15;
|
|
282
|
-
case 15: return [2];
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
}); };
|
|
286
|
-
export var deserializeAws_restJson1DeleteEnvironmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
287
|
-
var contents;
|
|
288
|
-
return __generator(this, function (_a) {
|
|
289
|
-
switch (_a.label) {
|
|
290
|
-
case 0:
|
|
291
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
292
|
-
return [2, deserializeAws_restJson1DeleteEnvironmentCommandError(output, context)];
|
|
293
|
-
}
|
|
294
|
-
contents = map({
|
|
295
|
-
$metadata: deserializeMetadata(output),
|
|
296
|
-
});
|
|
297
|
-
return [4, collectBody(output.body, context)];
|
|
298
|
-
case 1:
|
|
299
|
-
_a.sent();
|
|
300
|
-
return [2, contents];
|
|
301
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CreateEnvironmentCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environment";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.dataBundles != null && { dataBundles: serializeAws_restJson1DataBundleArns(input.dataBundles, context) }),
|
|
14
|
+
...(input.description != null && { description: input.description }),
|
|
15
|
+
...(input.federationMode != null && { federationMode: input.federationMode }),
|
|
16
|
+
...(input.federationParameters != null && {
|
|
17
|
+
federationParameters: serializeAws_restJson1FederationParameters(input.federationParameters, context),
|
|
18
|
+
}),
|
|
19
|
+
...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
|
|
20
|
+
...(input.name != null && { name: input.name }),
|
|
21
|
+
...(input.superuserParameters != null && {
|
|
22
|
+
superuserParameters: serializeAws_restJson1SuperuserParameters(input.superuserParameters, context),
|
|
23
|
+
}),
|
|
24
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
25
|
+
});
|
|
26
|
+
return new __HttpRequest({
|
|
27
|
+
protocol,
|
|
28
|
+
hostname,
|
|
29
|
+
port,
|
|
30
|
+
method: "POST",
|
|
31
|
+
headers,
|
|
32
|
+
path: resolvedPath,
|
|
33
|
+
body,
|
|
302
34
|
});
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
case "AccessDeniedException": return [3, 2];
|
|
319
|
-
case "com.amazonaws.finspace#AccessDeniedException": return [3, 2];
|
|
320
|
-
case "InternalServerException": return [3, 4];
|
|
321
|
-
case "com.amazonaws.finspace#InternalServerException": return [3, 4];
|
|
322
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
323
|
-
case "com.amazonaws.finspace#ResourceNotFoundException": return [3, 6];
|
|
324
|
-
case "ThrottlingException": return [3, 8];
|
|
325
|
-
case "com.amazonaws.finspace#ThrottlingException": return [3, 8];
|
|
326
|
-
case "ValidationException": return [3, 10];
|
|
327
|
-
case "com.amazonaws.finspace#ValidationException": return [3, 10];
|
|
328
|
-
}
|
|
329
|
-
return [3, 12];
|
|
330
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
331
|
-
case 3: throw _d.sent();
|
|
332
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
333
|
-
case 5: throw _d.sent();
|
|
334
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
335
|
-
case 7: throw _d.sent();
|
|
336
|
-
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
337
|
-
case 9: throw _d.sent();
|
|
338
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
339
|
-
case 11: throw _d.sent();
|
|
340
|
-
case 12:
|
|
341
|
-
parsedBody = parsedOutput.body;
|
|
342
|
-
throwDefaultError({
|
|
343
|
-
output: output,
|
|
344
|
-
parsedBody: parsedBody,
|
|
345
|
-
exceptionCtor: __BaseException,
|
|
346
|
-
errorCode: errorCode,
|
|
347
|
-
});
|
|
348
|
-
_d.label = 13;
|
|
349
|
-
case 13: return [2];
|
|
350
|
-
}
|
|
35
|
+
};
|
|
36
|
+
export const serializeAws_restJson1DeleteEnvironmentCommand = async (input, context) => {
|
|
37
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
38
|
+
const headers = {};
|
|
39
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environment/{environmentId}";
|
|
40
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", () => input.environmentId, "{environmentId}", false);
|
|
41
|
+
let body;
|
|
42
|
+
return new __HttpRequest({
|
|
43
|
+
protocol,
|
|
44
|
+
hostname,
|
|
45
|
+
port,
|
|
46
|
+
method: "DELETE",
|
|
47
|
+
headers,
|
|
48
|
+
path: resolvedPath,
|
|
49
|
+
body,
|
|
351
50
|
});
|
|
352
|
-
}
|
|
353
|
-
export
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
case 1:
|
|
368
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
369
|
-
if (data.environment != null) {
|
|
370
|
-
contents.environment = deserializeAws_restJson1Environment(data.environment, context);
|
|
371
|
-
}
|
|
372
|
-
return [2, contents];
|
|
373
|
-
}
|
|
51
|
+
};
|
|
52
|
+
export const serializeAws_restJson1GetEnvironmentCommand = async (input, context) => {
|
|
53
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
|
+
const headers = {};
|
|
55
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environment/{environmentId}";
|
|
56
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", () => input.environmentId, "{environmentId}", false);
|
|
57
|
+
let body;
|
|
58
|
+
return new __HttpRequest({
|
|
59
|
+
protocol,
|
|
60
|
+
hostname,
|
|
61
|
+
port,
|
|
62
|
+
method: "GET",
|
|
63
|
+
headers,
|
|
64
|
+
path: resolvedPath,
|
|
65
|
+
body,
|
|
374
66
|
});
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
395
|
-
case "com.amazonaws.finspace#ResourceNotFoundException": return [3, 6];
|
|
396
|
-
case "ValidationException": return [3, 8];
|
|
397
|
-
case "com.amazonaws.finspace#ValidationException": return [3, 8];
|
|
398
|
-
}
|
|
399
|
-
return [3, 10];
|
|
400
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
401
|
-
case 3: throw _d.sent();
|
|
402
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
403
|
-
case 5: throw _d.sent();
|
|
404
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
405
|
-
case 7: throw _d.sent();
|
|
406
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
407
|
-
case 9: throw _d.sent();
|
|
408
|
-
case 10:
|
|
409
|
-
parsedBody = parsedOutput.body;
|
|
410
|
-
throwDefaultError({
|
|
411
|
-
output: output,
|
|
412
|
-
parsedBody: parsedBody,
|
|
413
|
-
exceptionCtor: __BaseException,
|
|
414
|
-
errorCode: errorCode,
|
|
415
|
-
});
|
|
416
|
-
_d.label = 11;
|
|
417
|
-
case 11: return [2];
|
|
418
|
-
}
|
|
67
|
+
};
|
|
68
|
+
export const serializeAws_restJson1ListEnvironmentsCommand = async (input, context) => {
|
|
69
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
70
|
+
const headers = {};
|
|
71
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environment";
|
|
72
|
+
const query = map({
|
|
73
|
+
nextToken: [, input.nextToken],
|
|
74
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
75
|
+
});
|
|
76
|
+
let body;
|
|
77
|
+
return new __HttpRequest({
|
|
78
|
+
protocol,
|
|
79
|
+
hostname,
|
|
80
|
+
port,
|
|
81
|
+
method: "GET",
|
|
82
|
+
headers,
|
|
83
|
+
path: resolvedPath,
|
|
84
|
+
query,
|
|
85
|
+
body,
|
|
419
86
|
});
|
|
420
|
-
}
|
|
421
|
-
export
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
case 1:
|
|
436
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
437
|
-
if (data.environments != null) {
|
|
438
|
-
contents.environments = deserializeAws_restJson1EnvironmentList(data.environments, context);
|
|
439
|
-
}
|
|
440
|
-
if (data.nextToken != null) {
|
|
441
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
442
|
-
}
|
|
443
|
-
return [2, contents];
|
|
444
|
-
}
|
|
87
|
+
};
|
|
88
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
89
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
90
|
+
const headers = {};
|
|
91
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
92
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
93
|
+
let body;
|
|
94
|
+
return new __HttpRequest({
|
|
95
|
+
protocol,
|
|
96
|
+
hostname,
|
|
97
|
+
port,
|
|
98
|
+
method: "GET",
|
|
99
|
+
headers,
|
|
100
|
+
path: resolvedPath,
|
|
101
|
+
body,
|
|
445
102
|
});
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
return [3, 6];
|
|
467
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
468
|
-
case 3: throw _d.sent();
|
|
469
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
470
|
-
case 5: throw _d.sent();
|
|
471
|
-
case 6:
|
|
472
|
-
parsedBody = parsedOutput.body;
|
|
473
|
-
throwDefaultError({
|
|
474
|
-
output: output,
|
|
475
|
-
parsedBody: parsedBody,
|
|
476
|
-
exceptionCtor: __BaseException,
|
|
477
|
-
errorCode: errorCode,
|
|
478
|
-
});
|
|
479
|
-
_d.label = 7;
|
|
480
|
-
case 7: return [2];
|
|
481
|
-
}
|
|
103
|
+
};
|
|
104
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
105
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
106
|
+
const headers = {
|
|
107
|
+
"content-type": "application/json",
|
|
108
|
+
};
|
|
109
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
110
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
111
|
+
let body;
|
|
112
|
+
body = JSON.stringify({
|
|
113
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
114
|
+
});
|
|
115
|
+
return new __HttpRequest({
|
|
116
|
+
protocol,
|
|
117
|
+
hostname,
|
|
118
|
+
port,
|
|
119
|
+
method: "POST",
|
|
120
|
+
headers,
|
|
121
|
+
path: resolvedPath,
|
|
122
|
+
body,
|
|
482
123
|
});
|
|
483
|
-
}
|
|
484
|
-
export
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
return [2, contents];
|
|
504
|
-
}
|
|
124
|
+
};
|
|
125
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
126
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
127
|
+
const headers = {};
|
|
128
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
129
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
130
|
+
const query = map({
|
|
131
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
132
|
+
});
|
|
133
|
+
let body;
|
|
134
|
+
return new __HttpRequest({
|
|
135
|
+
protocol,
|
|
136
|
+
hostname,
|
|
137
|
+
port,
|
|
138
|
+
method: "DELETE",
|
|
139
|
+
headers,
|
|
140
|
+
path: resolvedPath,
|
|
141
|
+
query,
|
|
142
|
+
body,
|
|
505
143
|
});
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
532
|
-
case 5: throw _d.sent();
|
|
533
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
534
|
-
case 7: throw _d.sent();
|
|
535
|
-
case 8:
|
|
536
|
-
parsedBody = parsedOutput.body;
|
|
537
|
-
throwDefaultError({
|
|
538
|
-
output: output,
|
|
539
|
-
parsedBody: parsedBody,
|
|
540
|
-
exceptionCtor: __BaseException,
|
|
541
|
-
errorCode: errorCode,
|
|
542
|
-
});
|
|
543
|
-
_d.label = 9;
|
|
544
|
-
case 9: return [2];
|
|
545
|
-
}
|
|
144
|
+
};
|
|
145
|
+
export const serializeAws_restJson1UpdateEnvironmentCommand = async (input, context) => {
|
|
146
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
147
|
+
const headers = {
|
|
148
|
+
"content-type": "application/json",
|
|
149
|
+
};
|
|
150
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environment/{environmentId}";
|
|
151
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "environmentId", () => input.environmentId, "{environmentId}", false);
|
|
152
|
+
let body;
|
|
153
|
+
body = JSON.stringify({
|
|
154
|
+
...(input.description != null && { description: input.description }),
|
|
155
|
+
...(input.federationMode != null && { federationMode: input.federationMode }),
|
|
156
|
+
...(input.federationParameters != null && {
|
|
157
|
+
federationParameters: serializeAws_restJson1FederationParameters(input.federationParameters, context),
|
|
158
|
+
}),
|
|
159
|
+
...(input.name != null && { name: input.name }),
|
|
160
|
+
});
|
|
161
|
+
return new __HttpRequest({
|
|
162
|
+
protocol,
|
|
163
|
+
hostname,
|
|
164
|
+
port,
|
|
165
|
+
method: "PUT",
|
|
166
|
+
headers,
|
|
167
|
+
path: resolvedPath,
|
|
168
|
+
body,
|
|
546
169
|
});
|
|
547
|
-
}
|
|
548
|
-
export
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
return [2, deserializeAws_restJson1TagResourceCommandError(output, context)];
|
|
555
|
-
}
|
|
556
|
-
contents = map({
|
|
557
|
-
$metadata: deserializeMetadata(output),
|
|
558
|
-
});
|
|
559
|
-
return [4, collectBody(output.body, context)];
|
|
560
|
-
case 1:
|
|
561
|
-
_a.sent();
|
|
562
|
-
return [2, contents];
|
|
563
|
-
}
|
|
170
|
+
};
|
|
171
|
+
export const deserializeAws_restJson1CreateEnvironmentCommand = async (output, context) => {
|
|
172
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
173
|
+
return deserializeAws_restJson1CreateEnvironmentCommandError(output, context);
|
|
174
|
+
}
|
|
175
|
+
const contents = map({
|
|
176
|
+
$metadata: deserializeMetadata(output),
|
|
564
177
|
});
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
178
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
179
|
+
if (data.environmentArn != null) {
|
|
180
|
+
contents.environmentArn = __expectString(data.environmentArn);
|
|
181
|
+
}
|
|
182
|
+
if (data.environmentId != null) {
|
|
183
|
+
contents.environmentId = __expectString(data.environmentId);
|
|
184
|
+
}
|
|
185
|
+
if (data.environmentUrl != null) {
|
|
186
|
+
contents.environmentUrl = __expectString(data.environmentUrl);
|
|
187
|
+
}
|
|
188
|
+
return contents;
|
|
189
|
+
};
|
|
190
|
+
const deserializeAws_restJson1CreateEnvironmentCommandError = async (output, context) => {
|
|
191
|
+
const parsedOutput = {
|
|
192
|
+
...output,
|
|
193
|
+
body: await parseErrorBody(output.body, context),
|
|
194
|
+
};
|
|
195
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
196
|
+
switch (errorCode) {
|
|
197
|
+
case "AccessDeniedException":
|
|
198
|
+
case "com.amazonaws.finspace#AccessDeniedException":
|
|
199
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
200
|
+
case "InternalServerException":
|
|
201
|
+
case "com.amazonaws.finspace#InternalServerException":
|
|
202
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
203
|
+
case "LimitExceededException":
|
|
204
|
+
case "com.amazonaws.finspace#LimitExceededException":
|
|
205
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
206
|
+
case "ServiceQuotaExceededException":
|
|
207
|
+
case "com.amazonaws.finspace#ServiceQuotaExceededException":
|
|
208
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
209
|
+
case "ThrottlingException":
|
|
210
|
+
case "com.amazonaws.finspace#ThrottlingException":
|
|
211
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
212
|
+
case "ValidationException":
|
|
213
|
+
case "com.amazonaws.finspace#ValidationException":
|
|
214
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
215
|
+
default:
|
|
216
|
+
const parsedBody = parsedOutput.body;
|
|
217
|
+
throwDefaultError({
|
|
218
|
+
output,
|
|
219
|
+
parsedBody,
|
|
220
|
+
exceptionCtor: __BaseException,
|
|
221
|
+
errorCode,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
export const deserializeAws_restJson1DeleteEnvironmentCommand = async (output, context) => {
|
|
226
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
227
|
+
return deserializeAws_restJson1DeleteEnvironmentCommandError(output, context);
|
|
228
|
+
}
|
|
229
|
+
const contents = map({
|
|
230
|
+
$metadata: deserializeMetadata(output),
|
|
605
231
|
});
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
232
|
+
await collectBody(output.body, context);
|
|
233
|
+
return contents;
|
|
234
|
+
};
|
|
235
|
+
const deserializeAws_restJson1DeleteEnvironmentCommandError = async (output, context) => {
|
|
236
|
+
const parsedOutput = {
|
|
237
|
+
...output,
|
|
238
|
+
body: await parseErrorBody(output.body, context),
|
|
239
|
+
};
|
|
240
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
241
|
+
switch (errorCode) {
|
|
242
|
+
case "AccessDeniedException":
|
|
243
|
+
case "com.amazonaws.finspace#AccessDeniedException":
|
|
244
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
245
|
+
case "InternalServerException":
|
|
246
|
+
case "com.amazonaws.finspace#InternalServerException":
|
|
247
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
248
|
+
case "ResourceNotFoundException":
|
|
249
|
+
case "com.amazonaws.finspace#ResourceNotFoundException":
|
|
250
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
251
|
+
case "ThrottlingException":
|
|
252
|
+
case "com.amazonaws.finspace#ThrottlingException":
|
|
253
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
254
|
+
case "ValidationException":
|
|
255
|
+
case "com.amazonaws.finspace#ValidationException":
|
|
256
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
257
|
+
default:
|
|
258
|
+
const parsedBody = parsedOutput.body;
|
|
259
|
+
throwDefaultError({
|
|
260
|
+
output,
|
|
261
|
+
parsedBody,
|
|
262
|
+
exceptionCtor: __BaseException,
|
|
263
|
+
errorCode,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
export const deserializeAws_restJson1GetEnvironmentCommand = async (output, context) => {
|
|
268
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
269
|
+
return deserializeAws_restJson1GetEnvironmentCommandError(output, context);
|
|
270
|
+
}
|
|
271
|
+
const contents = map({
|
|
272
|
+
$metadata: deserializeMetadata(output),
|
|
623
273
|
});
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
return
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
274
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
275
|
+
if (data.environment != null) {
|
|
276
|
+
contents.environment = deserializeAws_restJson1Environment(data.environment, context);
|
|
277
|
+
}
|
|
278
|
+
return contents;
|
|
279
|
+
};
|
|
280
|
+
const deserializeAws_restJson1GetEnvironmentCommandError = async (output, context) => {
|
|
281
|
+
const parsedOutput = {
|
|
282
|
+
...output,
|
|
283
|
+
body: await parseErrorBody(output.body, context),
|
|
284
|
+
};
|
|
285
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
286
|
+
switch (errorCode) {
|
|
287
|
+
case "AccessDeniedException":
|
|
288
|
+
case "com.amazonaws.finspace#AccessDeniedException":
|
|
289
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
290
|
+
case "InternalServerException":
|
|
291
|
+
case "com.amazonaws.finspace#InternalServerException":
|
|
292
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
293
|
+
case "ResourceNotFoundException":
|
|
294
|
+
case "com.amazonaws.finspace#ResourceNotFoundException":
|
|
295
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
296
|
+
case "ValidationException":
|
|
297
|
+
case "com.amazonaws.finspace#ValidationException":
|
|
298
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
299
|
+
default:
|
|
300
|
+
const parsedBody = parsedOutput.body;
|
|
301
|
+
throwDefaultError({
|
|
302
|
+
output,
|
|
303
|
+
parsedBody,
|
|
304
|
+
exceptionCtor: __BaseException,
|
|
305
|
+
errorCode,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
export const deserializeAws_restJson1ListEnvironmentsCommand = async (output, context) => {
|
|
310
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
311
|
+
return deserializeAws_restJson1ListEnvironmentsCommandError(output, context);
|
|
312
|
+
}
|
|
313
|
+
const contents = map({
|
|
314
|
+
$metadata: deserializeMetadata(output),
|
|
664
315
|
});
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
316
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
317
|
+
if (data.environments != null) {
|
|
318
|
+
contents.environments = deserializeAws_restJson1EnvironmentList(data.environments, context);
|
|
319
|
+
}
|
|
320
|
+
if (data.nextToken != null) {
|
|
321
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
322
|
+
}
|
|
323
|
+
return contents;
|
|
324
|
+
};
|
|
325
|
+
const deserializeAws_restJson1ListEnvironmentsCommandError = async (output, context) => {
|
|
326
|
+
const parsedOutput = {
|
|
327
|
+
...output,
|
|
328
|
+
body: await parseErrorBody(output.body, context),
|
|
329
|
+
};
|
|
330
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
331
|
+
switch (errorCode) {
|
|
332
|
+
case "InternalServerException":
|
|
333
|
+
case "com.amazonaws.finspace#InternalServerException":
|
|
334
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
335
|
+
case "ValidationException":
|
|
336
|
+
case "com.amazonaws.finspace#ValidationException":
|
|
337
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
338
|
+
default:
|
|
339
|
+
const parsedBody = parsedOutput.body;
|
|
340
|
+
throwDefaultError({
|
|
341
|
+
output,
|
|
342
|
+
parsedBody,
|
|
343
|
+
exceptionCtor: __BaseException,
|
|
344
|
+
errorCode,
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
349
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
350
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
351
|
+
}
|
|
352
|
+
const contents = map({
|
|
353
|
+
$metadata: deserializeMetadata(output),
|
|
687
354
|
});
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
return
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
parsedBody = parsedOutput.body;
|
|
727
|
-
throwDefaultError({
|
|
728
|
-
output: output,
|
|
729
|
-
parsedBody: parsedBody,
|
|
730
|
-
exceptionCtor: __BaseException,
|
|
731
|
-
errorCode: errorCode,
|
|
732
|
-
});
|
|
733
|
-
_d.label = 13;
|
|
734
|
-
case 13: return [2];
|
|
735
|
-
}
|
|
355
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
356
|
+
if (data.tags != null) {
|
|
357
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
358
|
+
}
|
|
359
|
+
return contents;
|
|
360
|
+
};
|
|
361
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
362
|
+
const parsedOutput = {
|
|
363
|
+
...output,
|
|
364
|
+
body: await parseErrorBody(output.body, context),
|
|
365
|
+
};
|
|
366
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
367
|
+
switch (errorCode) {
|
|
368
|
+
case "InternalServerException":
|
|
369
|
+
case "com.amazonaws.finspace#InternalServerException":
|
|
370
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
371
|
+
case "InvalidRequestException":
|
|
372
|
+
case "com.amazonaws.finspace#InvalidRequestException":
|
|
373
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
374
|
+
case "ResourceNotFoundException":
|
|
375
|
+
case "com.amazonaws.finspace#ResourceNotFoundException":
|
|
376
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
377
|
+
default:
|
|
378
|
+
const parsedBody = parsedOutput.body;
|
|
379
|
+
throwDefaultError({
|
|
380
|
+
output,
|
|
381
|
+
parsedBody,
|
|
382
|
+
exceptionCtor: __BaseException,
|
|
383
|
+
errorCode,
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
388
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
389
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
390
|
+
}
|
|
391
|
+
const contents = map({
|
|
392
|
+
$metadata: deserializeMetadata(output),
|
|
736
393
|
});
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
394
|
+
await collectBody(output.body, context);
|
|
395
|
+
return contents;
|
|
396
|
+
};
|
|
397
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
398
|
+
const parsedOutput = {
|
|
399
|
+
...output,
|
|
400
|
+
body: await parseErrorBody(output.body, context),
|
|
401
|
+
};
|
|
402
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
403
|
+
switch (errorCode) {
|
|
404
|
+
case "InternalServerException":
|
|
405
|
+
case "com.amazonaws.finspace#InternalServerException":
|
|
406
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
407
|
+
case "InvalidRequestException":
|
|
408
|
+
case "com.amazonaws.finspace#InvalidRequestException":
|
|
409
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
410
|
+
case "ResourceNotFoundException":
|
|
411
|
+
case "com.amazonaws.finspace#ResourceNotFoundException":
|
|
412
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
413
|
+
default:
|
|
414
|
+
const parsedBody = parsedOutput.body;
|
|
415
|
+
throwDefaultError({
|
|
416
|
+
output,
|
|
417
|
+
parsedBody,
|
|
418
|
+
exceptionCtor: __BaseException,
|
|
419
|
+
errorCode,
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
424
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
425
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
426
|
+
}
|
|
427
|
+
const contents = map({
|
|
428
|
+
$metadata: deserializeMetadata(output),
|
|
746
429
|
});
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
430
|
+
await collectBody(output.body, context);
|
|
431
|
+
return contents;
|
|
432
|
+
};
|
|
433
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
434
|
+
const parsedOutput = {
|
|
435
|
+
...output,
|
|
436
|
+
body: await parseErrorBody(output.body, context),
|
|
437
|
+
};
|
|
438
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
439
|
+
switch (errorCode) {
|
|
440
|
+
case "InternalServerException":
|
|
441
|
+
case "com.amazonaws.finspace#InternalServerException":
|
|
442
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
443
|
+
case "InvalidRequestException":
|
|
444
|
+
case "com.amazonaws.finspace#InvalidRequestException":
|
|
445
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
446
|
+
case "ResourceNotFoundException":
|
|
447
|
+
case "com.amazonaws.finspace#ResourceNotFoundException":
|
|
448
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
449
|
+
default:
|
|
450
|
+
const parsedBody = parsedOutput.body;
|
|
451
|
+
throwDefaultError({
|
|
452
|
+
output,
|
|
453
|
+
parsedBody,
|
|
454
|
+
exceptionCtor: __BaseException,
|
|
455
|
+
errorCode,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
export const deserializeAws_restJson1UpdateEnvironmentCommand = async (output, context) => {
|
|
460
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
461
|
+
return deserializeAws_restJson1UpdateEnvironmentCommandError(output, context);
|
|
462
|
+
}
|
|
463
|
+
const contents = map({
|
|
464
|
+
$metadata: deserializeMetadata(output),
|
|
758
465
|
});
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
466
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
467
|
+
if (data.environment != null) {
|
|
468
|
+
contents.environment = deserializeAws_restJson1Environment(data.environment, context);
|
|
469
|
+
}
|
|
470
|
+
return contents;
|
|
471
|
+
};
|
|
472
|
+
const deserializeAws_restJson1UpdateEnvironmentCommandError = async (output, context) => {
|
|
473
|
+
const parsedOutput = {
|
|
474
|
+
...output,
|
|
475
|
+
body: await parseErrorBody(output.body, context),
|
|
476
|
+
};
|
|
477
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
478
|
+
switch (errorCode) {
|
|
479
|
+
case "AccessDeniedException":
|
|
480
|
+
case "com.amazonaws.finspace#AccessDeniedException":
|
|
481
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
482
|
+
case "InternalServerException":
|
|
483
|
+
case "com.amazonaws.finspace#InternalServerException":
|
|
484
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
485
|
+
case "ResourceNotFoundException":
|
|
486
|
+
case "com.amazonaws.finspace#ResourceNotFoundException":
|
|
487
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
488
|
+
case "ThrottlingException":
|
|
489
|
+
case "com.amazonaws.finspace#ThrottlingException":
|
|
490
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
491
|
+
case "ValidationException":
|
|
492
|
+
case "com.amazonaws.finspace#ValidationException":
|
|
493
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
494
|
+
default:
|
|
495
|
+
const parsedBody = parsedOutput.body;
|
|
496
|
+
throwDefaultError({
|
|
497
|
+
output,
|
|
498
|
+
parsedBody,
|
|
499
|
+
exceptionCtor: __BaseException,
|
|
500
|
+
errorCode,
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
const map = __map;
|
|
505
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
506
|
+
const contents = map({});
|
|
507
|
+
const data = parsedOutput.body;
|
|
508
|
+
const exception = new AccessDeniedException({
|
|
509
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
510
|
+
...contents,
|
|
511
|
+
});
|
|
512
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
513
|
+
};
|
|
514
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
515
|
+
const contents = map({});
|
|
516
|
+
const data = parsedOutput.body;
|
|
517
|
+
if (data.message != null) {
|
|
518
|
+
contents.message = __expectString(data.message);
|
|
519
|
+
}
|
|
520
|
+
const exception = new InternalServerException({
|
|
521
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
522
|
+
...contents,
|
|
770
523
|
});
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
524
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
525
|
+
};
|
|
526
|
+
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
527
|
+
const contents = map({});
|
|
528
|
+
const data = parsedOutput.body;
|
|
529
|
+
if (data.message != null) {
|
|
530
|
+
contents.message = __expectString(data.message);
|
|
531
|
+
}
|
|
532
|
+
const exception = new InvalidRequestException({
|
|
533
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
534
|
+
...contents,
|
|
782
535
|
});
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
536
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
537
|
+
};
|
|
538
|
+
const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
539
|
+
const contents = map({});
|
|
540
|
+
const data = parsedOutput.body;
|
|
541
|
+
if (data.message != null) {
|
|
542
|
+
contents.message = __expectString(data.message);
|
|
543
|
+
}
|
|
544
|
+
const exception = new LimitExceededException({
|
|
545
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
546
|
+
...contents,
|
|
794
547
|
});
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
548
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
549
|
+
};
|
|
550
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
551
|
+
const contents = map({});
|
|
552
|
+
const data = parsedOutput.body;
|
|
553
|
+
if (data.message != null) {
|
|
554
|
+
contents.message = __expectString(data.message);
|
|
555
|
+
}
|
|
556
|
+
const exception = new ResourceNotFoundException({
|
|
557
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
558
|
+
...contents,
|
|
806
559
|
});
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
560
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
561
|
+
};
|
|
562
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
563
|
+
const contents = map({});
|
|
564
|
+
const data = parsedOutput.body;
|
|
565
|
+
if (data.message != null) {
|
|
566
|
+
contents.message = __expectString(data.message);
|
|
567
|
+
}
|
|
568
|
+
const exception = new ServiceQuotaExceededException({
|
|
569
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
570
|
+
...contents,
|
|
815
571
|
});
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
572
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
573
|
+
};
|
|
574
|
+
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
575
|
+
const contents = map({});
|
|
576
|
+
const data = parsedOutput.body;
|
|
577
|
+
const exception = new ThrottlingException({
|
|
578
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
579
|
+
...contents,
|
|
580
|
+
});
|
|
581
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
582
|
+
};
|
|
583
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
584
|
+
const contents = map({});
|
|
585
|
+
const data = parsedOutput.body;
|
|
586
|
+
if (data.message != null) {
|
|
587
|
+
contents.message = __expectString(data.message);
|
|
588
|
+
}
|
|
589
|
+
const exception = new ValidationException({
|
|
590
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
591
|
+
...contents,
|
|
827
592
|
});
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
593
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
594
|
+
};
|
|
595
|
+
const serializeAws_restJson1AttributeMap = (input, context) => {
|
|
596
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
833
597
|
if (value === null) {
|
|
834
598
|
return acc;
|
|
835
599
|
}
|
|
836
|
-
return
|
|
600
|
+
return {
|
|
601
|
+
...acc,
|
|
602
|
+
[key]: value,
|
|
603
|
+
};
|
|
837
604
|
}, {});
|
|
838
605
|
};
|
|
839
|
-
|
|
606
|
+
const serializeAws_restJson1DataBundleArns = (input, context) => {
|
|
840
607
|
return input
|
|
841
|
-
.filter(
|
|
842
|
-
.map(
|
|
608
|
+
.filter((e) => e != null)
|
|
609
|
+
.map((entry) => {
|
|
843
610
|
return entry;
|
|
844
611
|
});
|
|
845
612
|
};
|
|
846
|
-
|
|
847
|
-
return
|
|
848
|
-
|
|
849
|
-
|
|
613
|
+
const serializeAws_restJson1FederationParameters = (input, context) => {
|
|
614
|
+
return {
|
|
615
|
+
...(input.applicationCallBackURL != null && { applicationCallBackURL: input.applicationCallBackURL }),
|
|
616
|
+
...(input.attributeMap != null && {
|
|
617
|
+
attributeMap: serializeAws_restJson1AttributeMap(input.attributeMap, context),
|
|
618
|
+
}),
|
|
619
|
+
...(input.federationProviderName != null && { federationProviderName: input.federationProviderName }),
|
|
620
|
+
...(input.federationURN != null && { federationURN: input.federationURN }),
|
|
621
|
+
...(input.samlMetadataDocument != null && { samlMetadataDocument: input.samlMetadataDocument }),
|
|
622
|
+
...(input.samlMetadataURL != null && { samlMetadataURL: input.samlMetadataURL }),
|
|
623
|
+
};
|
|
850
624
|
};
|
|
851
|
-
|
|
852
|
-
return
|
|
625
|
+
const serializeAws_restJson1SuperuserParameters = (input, context) => {
|
|
626
|
+
return {
|
|
627
|
+
...(input.emailAddress != null && { emailAddress: input.emailAddress }),
|
|
628
|
+
...(input.firstName != null && { firstName: input.firstName }),
|
|
629
|
+
...(input.lastName != null && { lastName: input.lastName }),
|
|
630
|
+
};
|
|
853
631
|
};
|
|
854
|
-
|
|
855
|
-
return Object.entries(input).reduce(
|
|
856
|
-
var _b;
|
|
857
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
632
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
633
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
858
634
|
if (value === null) {
|
|
859
635
|
return acc;
|
|
860
636
|
}
|
|
861
|
-
return
|
|
637
|
+
return {
|
|
638
|
+
...acc,
|
|
639
|
+
[key]: value,
|
|
640
|
+
};
|
|
862
641
|
}, {});
|
|
863
642
|
};
|
|
864
|
-
|
|
865
|
-
return Object.entries(output).reduce(
|
|
866
|
-
var _b;
|
|
867
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
643
|
+
const deserializeAws_restJson1AttributeMap = (output, context) => {
|
|
644
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
868
645
|
if (value === null) {
|
|
869
646
|
return acc;
|
|
870
647
|
}
|
|
871
|
-
return
|
|
648
|
+
return {
|
|
649
|
+
...acc,
|
|
650
|
+
[key]: __expectString(value),
|
|
651
|
+
};
|
|
872
652
|
}, {});
|
|
873
653
|
};
|
|
874
|
-
|
|
654
|
+
const deserializeAws_restJson1Environment = (output, context) => {
|
|
875
655
|
return {
|
|
876
656
|
awsAccountId: __expectString(output.awsAccountId),
|
|
877
657
|
dedicatedServiceAccountId: __expectString(output.dedicatedServiceAccountId),
|
|
@@ -889,10 +669,10 @@ var deserializeAws_restJson1Environment = function (output, context) {
|
|
|
889
669
|
status: __expectString(output.status),
|
|
890
670
|
};
|
|
891
671
|
};
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
.filter(
|
|
895
|
-
.map(
|
|
672
|
+
const deserializeAws_restJson1EnvironmentList = (output, context) => {
|
|
673
|
+
const retVal = (output || [])
|
|
674
|
+
.filter((e) => e != null)
|
|
675
|
+
.map((entry) => {
|
|
896
676
|
if (entry === null) {
|
|
897
677
|
return null;
|
|
898
678
|
}
|
|
@@ -900,7 +680,7 @@ var deserializeAws_restJson1EnvironmentList = function (output, context) {
|
|
|
900
680
|
});
|
|
901
681
|
return retVal;
|
|
902
682
|
};
|
|
903
|
-
|
|
683
|
+
const deserializeAws_restJson1FederationParameters = (output, context) => {
|
|
904
684
|
return {
|
|
905
685
|
applicationCallBackURL: __expectString(output.applicationCallBackURL),
|
|
906
686
|
attributeMap: output.attributeMap != null ? deserializeAws_restJson1AttributeMap(output.attributeMap, context) : undefined,
|
|
@@ -910,67 +690,50 @@ var deserializeAws_restJson1FederationParameters = function (output, context) {
|
|
|
910
690
|
samlMetadataURL: __expectString(output.samlMetadataURL),
|
|
911
691
|
};
|
|
912
692
|
};
|
|
913
|
-
|
|
914
|
-
return Object.entries(output).reduce(
|
|
915
|
-
var _b;
|
|
916
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
693
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
694
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
917
695
|
if (value === null) {
|
|
918
696
|
return acc;
|
|
919
697
|
}
|
|
920
|
-
return
|
|
698
|
+
return {
|
|
699
|
+
...acc,
|
|
700
|
+
[key]: __expectString(value),
|
|
701
|
+
};
|
|
921
702
|
}, {});
|
|
922
703
|
};
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
});
|
|
931
|
-
};
|
|
932
|
-
var collectBody = function (streamBody, context) {
|
|
933
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
704
|
+
const deserializeMetadata = (output) => ({
|
|
705
|
+
httpStatusCode: output.statusCode,
|
|
706
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
707
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
708
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
709
|
+
});
|
|
710
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
934
711
|
if (streamBody instanceof Uint8Array) {
|
|
935
712
|
return Promise.resolve(streamBody);
|
|
936
713
|
}
|
|
937
714
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
938
715
|
};
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
});
|
|
716
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
717
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
718
|
+
value !== null &&
|
|
719
|
+
value !== "" &&
|
|
720
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
721
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
722
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
723
|
+
if (encoded.length) {
|
|
724
|
+
return JSON.parse(encoded);
|
|
725
|
+
}
|
|
726
|
+
return {};
|
|
727
|
+
});
|
|
728
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
729
|
+
const value = await parseBody(errorBody, context);
|
|
730
|
+
value.message = value.message ?? value.Message;
|
|
731
|
+
return value;
|
|
956
732
|
};
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
switch (_b.label) {
|
|
962
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
963
|
-
case 1:
|
|
964
|
-
value = _b.sent();
|
|
965
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
966
|
-
return [2, value];
|
|
967
|
-
}
|
|
968
|
-
});
|
|
969
|
-
}); };
|
|
970
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
971
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
972
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
973
|
-
var cleanValue = rawValue;
|
|
733
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
734
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
735
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
736
|
+
let cleanValue = rawValue;
|
|
974
737
|
if (typeof cleanValue === "number") {
|
|
975
738
|
cleanValue = cleanValue.toString();
|
|
976
739
|
}
|
|
@@ -985,7 +748,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
985
748
|
}
|
|
986
749
|
return cleanValue;
|
|
987
750
|
};
|
|
988
|
-
|
|
751
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
989
752
|
if (headerKey !== undefined) {
|
|
990
753
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
991
754
|
}
|