@aws-sdk/client-rds-data 3.180.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 +20 -0
- package/dist-cjs/protocols/Aws_restJson1.js +12 -6
- package/dist-es/RDSData.js +26 -33
- package/dist-es/RDSDataClient.js +22 -28
- package/dist-es/commands/BatchExecuteStatementCommand.js +21 -28
- package/dist-es/commands/BeginTransactionCommand.js +21 -28
- package/dist-es/commands/CommitTransactionCommand.js +21 -28
- package/dist-es/commands/ExecuteSqlCommand.js +21 -28
- package/dist-es/commands/ExecuteStatementCommand.js +21 -28
- package/dist-es/commands/RollbackTransactionCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/RDSDataServiceException.js +5 -10
- package/dist-es/models/models_0.js +164 -116
- package/dist-es/protocols/Aws_restJson1.js +666 -831
- 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,791 +1,631 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map as __map, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { AccessDeniedException, ArrayValue, BadRequestException, Field, ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableError, StatementTimeoutException, } from "../models/models_0";
|
|
5
4
|
import { RDSDataServiceException as __BaseException } from "../models/RDSDataServiceException";
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
$metadata: deserializeMetadata(output),
|
|
164
|
-
});
|
|
165
|
-
_a = __expectNonNull;
|
|
166
|
-
_b = __expectObject;
|
|
167
|
-
return [4, parseBody(output.body, context)];
|
|
168
|
-
case 1:
|
|
169
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
170
|
-
if (data.updateResults != null) {
|
|
171
|
-
contents.updateResults = deserializeAws_restJson1UpdateResults(data.updateResults, context);
|
|
172
|
-
}
|
|
173
|
-
return [2, contents];
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
}); };
|
|
177
|
-
var deserializeAws_restJson1BatchExecuteStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
178
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
179
|
-
var _c;
|
|
180
|
-
return __generator(this, function (_d) {
|
|
181
|
-
switch (_d.label) {
|
|
182
|
-
case 0:
|
|
183
|
-
_a = [__assign({}, output)];
|
|
184
|
-
_c = {};
|
|
185
|
-
return [4, parseBody(output.body, context)];
|
|
186
|
-
case 1:
|
|
187
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
188
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
189
|
-
_b = errorCode;
|
|
190
|
-
switch (_b) {
|
|
191
|
-
case "AccessDeniedException": return [3, 2];
|
|
192
|
-
case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
|
|
193
|
-
case "BadRequestException": return [3, 4];
|
|
194
|
-
case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
|
|
195
|
-
case "ForbiddenException": return [3, 6];
|
|
196
|
-
case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
|
|
197
|
-
case "InternalServerErrorException": return [3, 8];
|
|
198
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
|
|
199
|
-
case "ServiceUnavailableError": return [3, 10];
|
|
200
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
|
|
201
|
-
case "StatementTimeoutException": return [3, 12];
|
|
202
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 12];
|
|
203
|
-
}
|
|
204
|
-
return [3, 14];
|
|
205
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
206
|
-
case 3: throw _d.sent();
|
|
207
|
-
case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
208
|
-
case 5: throw _d.sent();
|
|
209
|
-
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
210
|
-
case 7: throw _d.sent();
|
|
211
|
-
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
212
|
-
case 9: throw _d.sent();
|
|
213
|
-
case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
|
|
214
|
-
case 11: throw _d.sent();
|
|
215
|
-
case 12: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
|
|
216
|
-
case 13: throw _d.sent();
|
|
217
|
-
case 14:
|
|
218
|
-
parsedBody = parsedOutput.body;
|
|
219
|
-
throwDefaultError({
|
|
220
|
-
output: output,
|
|
221
|
-
parsedBody: parsedBody,
|
|
222
|
-
exceptionCtor: __BaseException,
|
|
223
|
-
errorCode: errorCode,
|
|
224
|
-
});
|
|
225
|
-
_d.label = 15;
|
|
226
|
-
case 15: return [2];
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
}); };
|
|
230
|
-
export var deserializeAws_restJson1BeginTransactionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
231
|
-
var contents, data, _a, _b;
|
|
232
|
-
return __generator(this, function (_c) {
|
|
233
|
-
switch (_c.label) {
|
|
234
|
-
case 0:
|
|
235
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
236
|
-
return [2, deserializeAws_restJson1BeginTransactionCommandError(output, context)];
|
|
237
|
-
}
|
|
238
|
-
contents = map({
|
|
239
|
-
$metadata: deserializeMetadata(output),
|
|
240
|
-
});
|
|
241
|
-
_a = __expectNonNull;
|
|
242
|
-
_b = __expectObject;
|
|
243
|
-
return [4, parseBody(output.body, context)];
|
|
244
|
-
case 1:
|
|
245
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
246
|
-
if (data.transactionId != null) {
|
|
247
|
-
contents.transactionId = __expectString(data.transactionId);
|
|
248
|
-
}
|
|
249
|
-
return [2, contents];
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}); };
|
|
253
|
-
var deserializeAws_restJson1BeginTransactionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
254
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
255
|
-
var _c;
|
|
256
|
-
return __generator(this, function (_d) {
|
|
257
|
-
switch (_d.label) {
|
|
258
|
-
case 0:
|
|
259
|
-
_a = [__assign({}, output)];
|
|
260
|
-
_c = {};
|
|
261
|
-
return [4, parseBody(output.body, context)];
|
|
262
|
-
case 1:
|
|
263
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
264
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
265
|
-
_b = errorCode;
|
|
266
|
-
switch (_b) {
|
|
267
|
-
case "AccessDeniedException": return [3, 2];
|
|
268
|
-
case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
|
|
269
|
-
case "BadRequestException": return [3, 4];
|
|
270
|
-
case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
|
|
271
|
-
case "ForbiddenException": return [3, 6];
|
|
272
|
-
case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
|
|
273
|
-
case "InternalServerErrorException": return [3, 8];
|
|
274
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
|
|
275
|
-
case "ServiceUnavailableError": return [3, 10];
|
|
276
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
|
|
277
|
-
case "StatementTimeoutException": return [3, 12];
|
|
278
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 12];
|
|
279
|
-
}
|
|
280
|
-
return [3, 14];
|
|
281
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
282
|
-
case 3: throw _d.sent();
|
|
283
|
-
case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
284
|
-
case 5: throw _d.sent();
|
|
285
|
-
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
286
|
-
case 7: throw _d.sent();
|
|
287
|
-
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
288
|
-
case 9: throw _d.sent();
|
|
289
|
-
case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
|
|
290
|
-
case 11: throw _d.sent();
|
|
291
|
-
case 12: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
|
|
292
|
-
case 13: throw _d.sent();
|
|
293
|
-
case 14:
|
|
294
|
-
parsedBody = parsedOutput.body;
|
|
295
|
-
throwDefaultError({
|
|
296
|
-
output: output,
|
|
297
|
-
parsedBody: parsedBody,
|
|
298
|
-
exceptionCtor: __BaseException,
|
|
299
|
-
errorCode: errorCode,
|
|
300
|
-
});
|
|
301
|
-
_d.label = 15;
|
|
302
|
-
case 15: return [2];
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
}); };
|
|
306
|
-
export var deserializeAws_restJson1CommitTransactionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
307
|
-
var contents, data, _a, _b;
|
|
308
|
-
return __generator(this, function (_c) {
|
|
309
|
-
switch (_c.label) {
|
|
310
|
-
case 0:
|
|
311
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
312
|
-
return [2, deserializeAws_restJson1CommitTransactionCommandError(output, context)];
|
|
313
|
-
}
|
|
314
|
-
contents = map({
|
|
315
|
-
$metadata: deserializeMetadata(output),
|
|
316
|
-
});
|
|
317
|
-
_a = __expectNonNull;
|
|
318
|
-
_b = __expectObject;
|
|
319
|
-
return [4, parseBody(output.body, context)];
|
|
320
|
-
case 1:
|
|
321
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
322
|
-
if (data.transactionStatus != null) {
|
|
323
|
-
contents.transactionStatus = __expectString(data.transactionStatus);
|
|
324
|
-
}
|
|
325
|
-
return [2, contents];
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
}); };
|
|
329
|
-
var deserializeAws_restJson1CommitTransactionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
330
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
331
|
-
var _c;
|
|
332
|
-
return __generator(this, function (_d) {
|
|
333
|
-
switch (_d.label) {
|
|
334
|
-
case 0:
|
|
335
|
-
_a = [__assign({}, output)];
|
|
336
|
-
_c = {};
|
|
337
|
-
return [4, parseBody(output.body, context)];
|
|
338
|
-
case 1:
|
|
339
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
340
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
341
|
-
_b = errorCode;
|
|
342
|
-
switch (_b) {
|
|
343
|
-
case "AccessDeniedException": return [3, 2];
|
|
344
|
-
case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
|
|
345
|
-
case "BadRequestException": return [3, 4];
|
|
346
|
-
case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
|
|
347
|
-
case "ForbiddenException": return [3, 6];
|
|
348
|
-
case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
|
|
349
|
-
case "InternalServerErrorException": return [3, 8];
|
|
350
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
|
|
351
|
-
case "NotFoundException": return [3, 10];
|
|
352
|
-
case "com.amazonaws.rdsdata#NotFoundException": return [3, 10];
|
|
353
|
-
case "ServiceUnavailableError": return [3, 12];
|
|
354
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 12];
|
|
355
|
-
case "StatementTimeoutException": return [3, 14];
|
|
356
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 14];
|
|
357
|
-
}
|
|
358
|
-
return [3, 16];
|
|
359
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
360
|
-
case 3: throw _d.sent();
|
|
361
|
-
case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
362
|
-
case 5: throw _d.sent();
|
|
363
|
-
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
364
|
-
case 7: throw _d.sent();
|
|
365
|
-
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
366
|
-
case 9: throw _d.sent();
|
|
367
|
-
case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
|
|
368
|
-
case 11: throw _d.sent();
|
|
369
|
-
case 12: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
|
|
370
|
-
case 13: throw _d.sent();
|
|
371
|
-
case 14: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
|
|
372
|
-
case 15: throw _d.sent();
|
|
373
|
-
case 16:
|
|
374
|
-
parsedBody = parsedOutput.body;
|
|
375
|
-
throwDefaultError({
|
|
376
|
-
output: output,
|
|
377
|
-
parsedBody: parsedBody,
|
|
378
|
-
exceptionCtor: __BaseException,
|
|
379
|
-
errorCode: errorCode,
|
|
380
|
-
});
|
|
381
|
-
_d.label = 17;
|
|
382
|
-
case 17: return [2];
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
}); };
|
|
386
|
-
export var deserializeAws_restJson1ExecuteSqlCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
387
|
-
var contents, data, _a, _b;
|
|
388
|
-
return __generator(this, function (_c) {
|
|
389
|
-
switch (_c.label) {
|
|
390
|
-
case 0:
|
|
391
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
392
|
-
return [2, deserializeAws_restJson1ExecuteSqlCommandError(output, context)];
|
|
393
|
-
}
|
|
394
|
-
contents = map({
|
|
395
|
-
$metadata: deserializeMetadata(output),
|
|
396
|
-
});
|
|
397
|
-
_a = __expectNonNull;
|
|
398
|
-
_b = __expectObject;
|
|
399
|
-
return [4, parseBody(output.body, context)];
|
|
400
|
-
case 1:
|
|
401
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
402
|
-
if (data.sqlStatementResults != null) {
|
|
403
|
-
contents.sqlStatementResults = deserializeAws_restJson1SqlStatementResults(data.sqlStatementResults, context);
|
|
404
|
-
}
|
|
405
|
-
return [2, contents];
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
}); };
|
|
409
|
-
var deserializeAws_restJson1ExecuteSqlCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
410
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
411
|
-
var _c;
|
|
412
|
-
return __generator(this, function (_d) {
|
|
413
|
-
switch (_d.label) {
|
|
414
|
-
case 0:
|
|
415
|
-
_a = [__assign({}, output)];
|
|
416
|
-
_c = {};
|
|
417
|
-
return [4, parseBody(output.body, context)];
|
|
418
|
-
case 1:
|
|
419
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
420
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
421
|
-
_b = errorCode;
|
|
422
|
-
switch (_b) {
|
|
423
|
-
case "AccessDeniedException": return [3, 2];
|
|
424
|
-
case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
|
|
425
|
-
case "BadRequestException": return [3, 4];
|
|
426
|
-
case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
|
|
427
|
-
case "ForbiddenException": return [3, 6];
|
|
428
|
-
case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
|
|
429
|
-
case "InternalServerErrorException": return [3, 8];
|
|
430
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
|
|
431
|
-
case "ServiceUnavailableError": return [3, 10];
|
|
432
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
|
|
433
|
-
}
|
|
434
|
-
return [3, 12];
|
|
435
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
436
|
-
case 3: throw _d.sent();
|
|
437
|
-
case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
438
|
-
case 5: throw _d.sent();
|
|
439
|
-
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
440
|
-
case 7: throw _d.sent();
|
|
441
|
-
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
442
|
-
case 9: throw _d.sent();
|
|
443
|
-
case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
|
|
444
|
-
case 11: throw _d.sent();
|
|
445
|
-
case 12:
|
|
446
|
-
parsedBody = parsedOutput.body;
|
|
447
|
-
throwDefaultError({
|
|
448
|
-
output: output,
|
|
449
|
-
parsedBody: parsedBody,
|
|
450
|
-
exceptionCtor: __BaseException,
|
|
451
|
-
errorCode: errorCode,
|
|
452
|
-
});
|
|
453
|
-
_d.label = 13;
|
|
454
|
-
case 13: return [2];
|
|
455
|
-
}
|
|
456
|
-
});
|
|
457
|
-
}); };
|
|
458
|
-
export var deserializeAws_restJson1ExecuteStatementCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
459
|
-
var contents, data, _a, _b;
|
|
460
|
-
return __generator(this, function (_c) {
|
|
461
|
-
switch (_c.label) {
|
|
462
|
-
case 0:
|
|
463
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
464
|
-
return [2, deserializeAws_restJson1ExecuteStatementCommandError(output, context)];
|
|
465
|
-
}
|
|
466
|
-
contents = map({
|
|
467
|
-
$metadata: deserializeMetadata(output),
|
|
468
|
-
});
|
|
469
|
-
_a = __expectNonNull;
|
|
470
|
-
_b = __expectObject;
|
|
471
|
-
return [4, parseBody(output.body, context)];
|
|
472
|
-
case 1:
|
|
473
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
474
|
-
if (data.columnMetadata != null) {
|
|
475
|
-
contents.columnMetadata = deserializeAws_restJson1Metadata(data.columnMetadata, context);
|
|
476
|
-
}
|
|
477
|
-
if (data.formattedRecords != null) {
|
|
478
|
-
contents.formattedRecords = __expectString(data.formattedRecords);
|
|
479
|
-
}
|
|
480
|
-
if (data.generatedFields != null) {
|
|
481
|
-
contents.generatedFields = deserializeAws_restJson1FieldList(data.generatedFields, context);
|
|
482
|
-
}
|
|
483
|
-
if (data.numberOfRecordsUpdated != null) {
|
|
484
|
-
contents.numberOfRecordsUpdated = __expectLong(data.numberOfRecordsUpdated);
|
|
485
|
-
}
|
|
486
|
-
if (data.records != null) {
|
|
487
|
-
contents.records = deserializeAws_restJson1SqlRecords(data.records, context);
|
|
488
|
-
}
|
|
489
|
-
return [2, contents];
|
|
490
|
-
}
|
|
491
|
-
});
|
|
492
|
-
}); };
|
|
493
|
-
var deserializeAws_restJson1ExecuteStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
494
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
495
|
-
var _c;
|
|
496
|
-
return __generator(this, function (_d) {
|
|
497
|
-
switch (_d.label) {
|
|
498
|
-
case 0:
|
|
499
|
-
_a = [__assign({}, output)];
|
|
500
|
-
_c = {};
|
|
501
|
-
return [4, parseBody(output.body, context)];
|
|
502
|
-
case 1:
|
|
503
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
504
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
505
|
-
_b = errorCode;
|
|
506
|
-
switch (_b) {
|
|
507
|
-
case "AccessDeniedException": return [3, 2];
|
|
508
|
-
case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
|
|
509
|
-
case "BadRequestException": return [3, 4];
|
|
510
|
-
case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
|
|
511
|
-
case "ForbiddenException": return [3, 6];
|
|
512
|
-
case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
|
|
513
|
-
case "InternalServerErrorException": return [3, 8];
|
|
514
|
-
case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
|
|
515
|
-
case "ServiceUnavailableError": return [3, 10];
|
|
516
|
-
case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
|
|
517
|
-
case "StatementTimeoutException": return [3, 12];
|
|
518
|
-
case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 12];
|
|
519
|
-
}
|
|
520
|
-
return [3, 14];
|
|
521
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
522
|
-
case 3: throw _d.sent();
|
|
523
|
-
case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
524
|
-
case 5: throw _d.sent();
|
|
525
|
-
case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
|
|
526
|
-
case 7: throw _d.sent();
|
|
527
|
-
case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
|
|
528
|
-
case 9: throw _d.sent();
|
|
529
|
-
case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
|
|
530
|
-
case 11: throw _d.sent();
|
|
531
|
-
case 12: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
|
|
532
|
-
case 13: throw _d.sent();
|
|
533
|
-
case 14:
|
|
534
|
-
parsedBody = parsedOutput.body;
|
|
535
|
-
throwDefaultError({
|
|
536
|
-
output: output,
|
|
537
|
-
parsedBody: parsedBody,
|
|
538
|
-
exceptionCtor: __BaseException,
|
|
539
|
-
errorCode: errorCode,
|
|
540
|
-
});
|
|
541
|
-
_d.label = 15;
|
|
542
|
-
case 15: return [2];
|
|
543
|
-
}
|
|
544
|
-
});
|
|
545
|
-
}); };
|
|
546
|
-
export var deserializeAws_restJson1RollbackTransactionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
547
|
-
var contents, data, _a, _b;
|
|
548
|
-
return __generator(this, function (_c) {
|
|
549
|
-
switch (_c.label) {
|
|
550
|
-
case 0:
|
|
551
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
552
|
-
return [2, deserializeAws_restJson1RollbackTransactionCommandError(output, context)];
|
|
553
|
-
}
|
|
554
|
-
contents = map({
|
|
555
|
-
$metadata: deserializeMetadata(output),
|
|
556
|
-
});
|
|
557
|
-
_a = __expectNonNull;
|
|
558
|
-
_b = __expectObject;
|
|
559
|
-
return [4, parseBody(output.body, context)];
|
|
560
|
-
case 1:
|
|
561
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
562
|
-
if (data.transactionStatus != null) {
|
|
563
|
-
contents.transactionStatus = __expectString(data.transactionStatus);
|
|
564
|
-
}
|
|
565
|
-
return [2, contents];
|
|
566
|
-
}
|
|
5
|
+
export const serializeAws_restJson1BatchExecuteStatementCommand = 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 || ""}` + "/BatchExecute";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.database != null && { database: input.database }),
|
|
14
|
+
...(input.parameterSets != null && {
|
|
15
|
+
parameterSets: serializeAws_restJson1SqlParameterSets(input.parameterSets, context),
|
|
16
|
+
}),
|
|
17
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
18
|
+
...(input.schema != null && { schema: input.schema }),
|
|
19
|
+
...(input.secretArn != null && { secretArn: input.secretArn }),
|
|
20
|
+
...(input.sql != null && { sql: input.sql }),
|
|
21
|
+
...(input.transactionId != null && { transactionId: input.transactionId }),
|
|
22
|
+
});
|
|
23
|
+
return new __HttpRequest({
|
|
24
|
+
protocol,
|
|
25
|
+
hostname,
|
|
26
|
+
port,
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers,
|
|
29
|
+
path: resolvedPath,
|
|
30
|
+
body,
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export const serializeAws_restJson1BeginTransactionCommand = async (input, context) => {
|
|
34
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
35
|
+
const headers = {
|
|
36
|
+
"content-type": "application/json",
|
|
37
|
+
};
|
|
38
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BeginTransaction";
|
|
39
|
+
let body;
|
|
40
|
+
body = JSON.stringify({
|
|
41
|
+
...(input.database != null && { database: input.database }),
|
|
42
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
43
|
+
...(input.schema != null && { schema: input.schema }),
|
|
44
|
+
...(input.secretArn != null && { secretArn: input.secretArn }),
|
|
45
|
+
});
|
|
46
|
+
return new __HttpRequest({
|
|
47
|
+
protocol,
|
|
48
|
+
hostname,
|
|
49
|
+
port,
|
|
50
|
+
method: "POST",
|
|
51
|
+
headers,
|
|
52
|
+
path: resolvedPath,
|
|
53
|
+
body,
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
export const serializeAws_restJson1CommitTransactionCommand = async (input, context) => {
|
|
57
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
58
|
+
const headers = {
|
|
59
|
+
"content-type": "application/json",
|
|
60
|
+
};
|
|
61
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CommitTransaction";
|
|
62
|
+
let body;
|
|
63
|
+
body = JSON.stringify({
|
|
64
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
65
|
+
...(input.secretArn != null && { secretArn: input.secretArn }),
|
|
66
|
+
...(input.transactionId != null && { transactionId: input.transactionId }),
|
|
67
|
+
});
|
|
68
|
+
return new __HttpRequest({
|
|
69
|
+
protocol,
|
|
70
|
+
hostname,
|
|
71
|
+
port,
|
|
72
|
+
method: "POST",
|
|
73
|
+
headers,
|
|
74
|
+
path: resolvedPath,
|
|
75
|
+
body,
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
export const serializeAws_restJson1ExecuteSqlCommand = async (input, context) => {
|
|
79
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
80
|
+
const headers = {
|
|
81
|
+
"content-type": "application/json",
|
|
82
|
+
};
|
|
83
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ExecuteSql";
|
|
84
|
+
let body;
|
|
85
|
+
body = JSON.stringify({
|
|
86
|
+
...(input.awsSecretStoreArn != null && { awsSecretStoreArn: input.awsSecretStoreArn }),
|
|
87
|
+
...(input.database != null && { database: input.database }),
|
|
88
|
+
...(input.dbClusterOrInstanceArn != null && { dbClusterOrInstanceArn: input.dbClusterOrInstanceArn }),
|
|
89
|
+
...(input.schema != null && { schema: input.schema }),
|
|
90
|
+
...(input.sqlStatements != null && { sqlStatements: input.sqlStatements }),
|
|
91
|
+
});
|
|
92
|
+
return new __HttpRequest({
|
|
93
|
+
protocol,
|
|
94
|
+
hostname,
|
|
95
|
+
port,
|
|
96
|
+
method: "POST",
|
|
97
|
+
headers,
|
|
98
|
+
path: resolvedPath,
|
|
99
|
+
body,
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
export const serializeAws_restJson1ExecuteStatementCommand = async (input, context) => {
|
|
103
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
104
|
+
const headers = {
|
|
105
|
+
"content-type": "application/json",
|
|
106
|
+
};
|
|
107
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Execute";
|
|
108
|
+
let body;
|
|
109
|
+
body = JSON.stringify({
|
|
110
|
+
...(input.continueAfterTimeout != null && { continueAfterTimeout: input.continueAfterTimeout }),
|
|
111
|
+
...(input.database != null && { database: input.database }),
|
|
112
|
+
...(input.formatRecordsAs != null && { formatRecordsAs: input.formatRecordsAs }),
|
|
113
|
+
...(input.includeResultMetadata != null && { includeResultMetadata: input.includeResultMetadata }),
|
|
114
|
+
...(input.parameters != null && { parameters: serializeAws_restJson1SqlParametersList(input.parameters, context) }),
|
|
115
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
116
|
+
...(input.resultSetOptions != null && {
|
|
117
|
+
resultSetOptions: serializeAws_restJson1ResultSetOptions(input.resultSetOptions, context),
|
|
118
|
+
}),
|
|
119
|
+
...(input.schema != null && { schema: input.schema }),
|
|
120
|
+
...(input.secretArn != null && { secretArn: input.secretArn }),
|
|
121
|
+
...(input.sql != null && { sql: input.sql }),
|
|
122
|
+
...(input.transactionId != null && { transactionId: input.transactionId }),
|
|
123
|
+
});
|
|
124
|
+
return new __HttpRequest({
|
|
125
|
+
protocol,
|
|
126
|
+
hostname,
|
|
127
|
+
port,
|
|
128
|
+
method: "POST",
|
|
129
|
+
headers,
|
|
130
|
+
path: resolvedPath,
|
|
131
|
+
body,
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
export const serializeAws_restJson1RollbackTransactionCommand = async (input, context) => {
|
|
135
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
136
|
+
const headers = {
|
|
137
|
+
"content-type": "application/json",
|
|
138
|
+
};
|
|
139
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RollbackTransaction";
|
|
140
|
+
let body;
|
|
141
|
+
body = JSON.stringify({
|
|
142
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
143
|
+
...(input.secretArn != null && { secretArn: input.secretArn }),
|
|
144
|
+
...(input.transactionId != null && { transactionId: input.transactionId }),
|
|
145
|
+
});
|
|
146
|
+
return new __HttpRequest({
|
|
147
|
+
protocol,
|
|
148
|
+
hostname,
|
|
149
|
+
port,
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers,
|
|
152
|
+
path: resolvedPath,
|
|
153
|
+
body,
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
export const deserializeAws_restJson1BatchExecuteStatementCommand = async (output, context) => {
|
|
157
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
158
|
+
return deserializeAws_restJson1BatchExecuteStatementCommandError(output, context);
|
|
159
|
+
}
|
|
160
|
+
const contents = map({
|
|
161
|
+
$metadata: deserializeMetadata(output),
|
|
567
162
|
});
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
return
|
|
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
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
throwDefaultError({
|
|
616
|
-
output: output,
|
|
617
|
-
parsedBody: parsedBody,
|
|
618
|
-
exceptionCtor: __BaseException,
|
|
619
|
-
errorCode: errorCode,
|
|
620
|
-
});
|
|
621
|
-
_d.label = 17;
|
|
622
|
-
case 17: return [2];
|
|
623
|
-
}
|
|
163
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
164
|
+
if (data.updateResults != null) {
|
|
165
|
+
contents.updateResults = deserializeAws_restJson1UpdateResults(data.updateResults, context);
|
|
166
|
+
}
|
|
167
|
+
return contents;
|
|
168
|
+
};
|
|
169
|
+
const deserializeAws_restJson1BatchExecuteStatementCommandError = async (output, context) => {
|
|
170
|
+
const parsedOutput = {
|
|
171
|
+
...output,
|
|
172
|
+
body: await parseErrorBody(output.body, context),
|
|
173
|
+
};
|
|
174
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
175
|
+
switch (errorCode) {
|
|
176
|
+
case "AccessDeniedException":
|
|
177
|
+
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
178
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
179
|
+
case "BadRequestException":
|
|
180
|
+
case "com.amazonaws.rdsdata#BadRequestException":
|
|
181
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
182
|
+
case "ForbiddenException":
|
|
183
|
+
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
184
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
185
|
+
case "InternalServerErrorException":
|
|
186
|
+
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
187
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
188
|
+
case "ServiceUnavailableError":
|
|
189
|
+
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
190
|
+
throw await deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context);
|
|
191
|
+
case "StatementTimeoutException":
|
|
192
|
+
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
193
|
+
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
194
|
+
default:
|
|
195
|
+
const parsedBody = parsedOutput.body;
|
|
196
|
+
throwDefaultError({
|
|
197
|
+
output,
|
|
198
|
+
parsedBody,
|
|
199
|
+
exceptionCtor: __BaseException,
|
|
200
|
+
errorCode,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
export const deserializeAws_restJson1BeginTransactionCommand = async (output, context) => {
|
|
205
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
206
|
+
return deserializeAws_restJson1BeginTransactionCommandError(output, context);
|
|
207
|
+
}
|
|
208
|
+
const contents = map({
|
|
209
|
+
$metadata: deserializeMetadata(output),
|
|
624
210
|
});
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
return
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
211
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
212
|
+
if (data.transactionId != null) {
|
|
213
|
+
contents.transactionId = __expectString(data.transactionId);
|
|
214
|
+
}
|
|
215
|
+
return contents;
|
|
216
|
+
};
|
|
217
|
+
const deserializeAws_restJson1BeginTransactionCommandError = async (output, context) => {
|
|
218
|
+
const parsedOutput = {
|
|
219
|
+
...output,
|
|
220
|
+
body: await parseErrorBody(output.body, context),
|
|
221
|
+
};
|
|
222
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
223
|
+
switch (errorCode) {
|
|
224
|
+
case "AccessDeniedException":
|
|
225
|
+
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
226
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
227
|
+
case "BadRequestException":
|
|
228
|
+
case "com.amazonaws.rdsdata#BadRequestException":
|
|
229
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
230
|
+
case "ForbiddenException":
|
|
231
|
+
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
232
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
233
|
+
case "InternalServerErrorException":
|
|
234
|
+
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
235
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
236
|
+
case "ServiceUnavailableError":
|
|
237
|
+
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
238
|
+
throw await deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context);
|
|
239
|
+
case "StatementTimeoutException":
|
|
240
|
+
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
241
|
+
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
242
|
+
default:
|
|
243
|
+
const parsedBody = parsedOutput.body;
|
|
244
|
+
throwDefaultError({
|
|
245
|
+
output,
|
|
246
|
+
parsedBody,
|
|
247
|
+
exceptionCtor: __BaseException,
|
|
248
|
+
errorCode,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
export const deserializeAws_restJson1CommitTransactionCommand = async (output, context) => {
|
|
253
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
254
|
+
return deserializeAws_restJson1CommitTransactionCommandError(output, context);
|
|
255
|
+
}
|
|
256
|
+
const contents = map({
|
|
257
|
+
$metadata: deserializeMetadata(output),
|
|
637
258
|
});
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
259
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
260
|
+
if (data.transactionStatus != null) {
|
|
261
|
+
contents.transactionStatus = __expectString(data.transactionStatus);
|
|
262
|
+
}
|
|
263
|
+
return contents;
|
|
264
|
+
};
|
|
265
|
+
const deserializeAws_restJson1CommitTransactionCommandError = async (output, context) => {
|
|
266
|
+
const parsedOutput = {
|
|
267
|
+
...output,
|
|
268
|
+
body: await parseErrorBody(output.body, context),
|
|
269
|
+
};
|
|
270
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
271
|
+
switch (errorCode) {
|
|
272
|
+
case "AccessDeniedException":
|
|
273
|
+
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
274
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
275
|
+
case "BadRequestException":
|
|
276
|
+
case "com.amazonaws.rdsdata#BadRequestException":
|
|
277
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
278
|
+
case "ForbiddenException":
|
|
279
|
+
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
280
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
281
|
+
case "InternalServerErrorException":
|
|
282
|
+
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
283
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
284
|
+
case "NotFoundException":
|
|
285
|
+
case "com.amazonaws.rdsdata#NotFoundException":
|
|
286
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
287
|
+
case "ServiceUnavailableError":
|
|
288
|
+
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
289
|
+
throw await deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context);
|
|
290
|
+
case "StatementTimeoutException":
|
|
291
|
+
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
292
|
+
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
293
|
+
default:
|
|
294
|
+
const parsedBody = parsedOutput.body;
|
|
295
|
+
throwDefaultError({
|
|
296
|
+
output,
|
|
297
|
+
parsedBody,
|
|
298
|
+
exceptionCtor: __BaseException,
|
|
299
|
+
errorCode,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
export const deserializeAws_restJson1ExecuteSqlCommand = async (output, context) => {
|
|
304
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
305
|
+
return deserializeAws_restJson1ExecuteSqlCommandError(output, context);
|
|
306
|
+
}
|
|
307
|
+
const contents = map({
|
|
308
|
+
$metadata: deserializeMetadata(output),
|
|
649
309
|
});
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
310
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
311
|
+
if (data.sqlStatementResults != null) {
|
|
312
|
+
contents.sqlStatementResults = deserializeAws_restJson1SqlStatementResults(data.sqlStatementResults, context);
|
|
313
|
+
}
|
|
314
|
+
return contents;
|
|
315
|
+
};
|
|
316
|
+
const deserializeAws_restJson1ExecuteSqlCommandError = async (output, context) => {
|
|
317
|
+
const parsedOutput = {
|
|
318
|
+
...output,
|
|
319
|
+
body: await parseErrorBody(output.body, context),
|
|
320
|
+
};
|
|
321
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
322
|
+
switch (errorCode) {
|
|
323
|
+
case "AccessDeniedException":
|
|
324
|
+
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
325
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
326
|
+
case "BadRequestException":
|
|
327
|
+
case "com.amazonaws.rdsdata#BadRequestException":
|
|
328
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
329
|
+
case "ForbiddenException":
|
|
330
|
+
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
331
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
332
|
+
case "InternalServerErrorException":
|
|
333
|
+
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
334
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
335
|
+
case "ServiceUnavailableError":
|
|
336
|
+
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
337
|
+
throw await deserializeAws_restJson1ServiceUnavailableErrorResponse(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_restJson1ExecuteStatementCommand = async (output, context) => {
|
|
349
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
350
|
+
return deserializeAws_restJson1ExecuteStatementCommandError(output, context);
|
|
351
|
+
}
|
|
352
|
+
const contents = map({
|
|
353
|
+
$metadata: deserializeMetadata(output),
|
|
661
354
|
});
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
355
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
356
|
+
if (data.columnMetadata != null) {
|
|
357
|
+
contents.columnMetadata = deserializeAws_restJson1Metadata(data.columnMetadata, context);
|
|
358
|
+
}
|
|
359
|
+
if (data.formattedRecords != null) {
|
|
360
|
+
contents.formattedRecords = __expectString(data.formattedRecords);
|
|
361
|
+
}
|
|
362
|
+
if (data.generatedFields != null) {
|
|
363
|
+
contents.generatedFields = deserializeAws_restJson1FieldList(data.generatedFields, context);
|
|
364
|
+
}
|
|
365
|
+
if (data.numberOfRecordsUpdated != null) {
|
|
366
|
+
contents.numberOfRecordsUpdated = __expectLong(data.numberOfRecordsUpdated);
|
|
367
|
+
}
|
|
368
|
+
if (data.records != null) {
|
|
369
|
+
contents.records = deserializeAws_restJson1SqlRecords(data.records, context);
|
|
370
|
+
}
|
|
371
|
+
return contents;
|
|
372
|
+
};
|
|
373
|
+
const deserializeAws_restJson1ExecuteStatementCommandError = async (output, context) => {
|
|
374
|
+
const parsedOutput = {
|
|
375
|
+
...output,
|
|
376
|
+
body: await parseErrorBody(output.body, context),
|
|
377
|
+
};
|
|
378
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
379
|
+
switch (errorCode) {
|
|
380
|
+
case "AccessDeniedException":
|
|
381
|
+
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
382
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
383
|
+
case "BadRequestException":
|
|
384
|
+
case "com.amazonaws.rdsdata#BadRequestException":
|
|
385
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
386
|
+
case "ForbiddenException":
|
|
387
|
+
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
388
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
389
|
+
case "InternalServerErrorException":
|
|
390
|
+
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
391
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
392
|
+
case "ServiceUnavailableError":
|
|
393
|
+
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
394
|
+
throw await deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context);
|
|
395
|
+
case "StatementTimeoutException":
|
|
396
|
+
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
397
|
+
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
398
|
+
default:
|
|
399
|
+
const parsedBody = parsedOutput.body;
|
|
400
|
+
throwDefaultError({
|
|
401
|
+
output,
|
|
402
|
+
parsedBody,
|
|
403
|
+
exceptionCtor: __BaseException,
|
|
404
|
+
errorCode,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
export const deserializeAws_restJson1RollbackTransactionCommand = async (output, context) => {
|
|
409
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
410
|
+
return deserializeAws_restJson1RollbackTransactionCommandError(output, context);
|
|
411
|
+
}
|
|
412
|
+
const contents = map({
|
|
413
|
+
$metadata: deserializeMetadata(output),
|
|
670
414
|
});
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
415
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
416
|
+
if (data.transactionStatus != null) {
|
|
417
|
+
contents.transactionStatus = __expectString(data.transactionStatus);
|
|
418
|
+
}
|
|
419
|
+
return contents;
|
|
420
|
+
};
|
|
421
|
+
const deserializeAws_restJson1RollbackTransactionCommandError = async (output, context) => {
|
|
422
|
+
const parsedOutput = {
|
|
423
|
+
...output,
|
|
424
|
+
body: await parseErrorBody(output.body, context),
|
|
425
|
+
};
|
|
426
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
427
|
+
switch (errorCode) {
|
|
428
|
+
case "AccessDeniedException":
|
|
429
|
+
case "com.amazonaws.rdsdata#AccessDeniedException":
|
|
430
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
431
|
+
case "BadRequestException":
|
|
432
|
+
case "com.amazonaws.rdsdata#BadRequestException":
|
|
433
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
434
|
+
case "ForbiddenException":
|
|
435
|
+
case "com.amazonaws.rdsdata#ForbiddenException":
|
|
436
|
+
throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
|
|
437
|
+
case "InternalServerErrorException":
|
|
438
|
+
case "com.amazonaws.rdsdata#InternalServerErrorException":
|
|
439
|
+
throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
|
|
440
|
+
case "NotFoundException":
|
|
441
|
+
case "com.amazonaws.rdsdata#NotFoundException":
|
|
442
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
443
|
+
case "ServiceUnavailableError":
|
|
444
|
+
case "com.amazonaws.rdsdata#ServiceUnavailableError":
|
|
445
|
+
throw await deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context);
|
|
446
|
+
case "StatementTimeoutException":
|
|
447
|
+
case "com.amazonaws.rdsdata#StatementTimeoutException":
|
|
448
|
+
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
449
|
+
default:
|
|
450
|
+
const parsedBody = parsedOutput.body;
|
|
451
|
+
throwDefaultError({
|
|
452
|
+
output,
|
|
453
|
+
parsedBody,
|
|
454
|
+
exceptionCtor: __BaseException,
|
|
455
|
+
errorCode,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
const map = __map;
|
|
460
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
461
|
+
const contents = map({});
|
|
462
|
+
const data = parsedOutput.body;
|
|
463
|
+
if (data.message != null) {
|
|
464
|
+
contents.message = __expectString(data.message);
|
|
465
|
+
}
|
|
466
|
+
const exception = new AccessDeniedException({
|
|
467
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
468
|
+
...contents,
|
|
682
469
|
});
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
470
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
471
|
+
};
|
|
472
|
+
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
473
|
+
const contents = map({});
|
|
474
|
+
const data = parsedOutput.body;
|
|
475
|
+
if (data.message != null) {
|
|
476
|
+
contents.message = __expectString(data.message);
|
|
477
|
+
}
|
|
478
|
+
const exception = new BadRequestException({
|
|
479
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
480
|
+
...contents,
|
|
691
481
|
});
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
482
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
483
|
+
};
|
|
484
|
+
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
485
|
+
const contents = map({});
|
|
486
|
+
const data = parsedOutput.body;
|
|
487
|
+
if (data.message != null) {
|
|
488
|
+
contents.message = __expectString(data.message);
|
|
489
|
+
}
|
|
490
|
+
const exception = new ForbiddenException({
|
|
491
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
492
|
+
...contents,
|
|
493
|
+
});
|
|
494
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
495
|
+
};
|
|
496
|
+
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
|
|
497
|
+
const contents = map({});
|
|
498
|
+
const data = parsedOutput.body;
|
|
499
|
+
const exception = new InternalServerErrorException({
|
|
500
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
501
|
+
...contents,
|
|
502
|
+
});
|
|
503
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
504
|
+
};
|
|
505
|
+
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
506
|
+
const contents = map({});
|
|
507
|
+
const data = parsedOutput.body;
|
|
508
|
+
if (data.message != null) {
|
|
509
|
+
contents.message = __expectString(data.message);
|
|
510
|
+
}
|
|
511
|
+
const exception = new NotFoundException({
|
|
512
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
513
|
+
...contents,
|
|
514
|
+
});
|
|
515
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
516
|
+
};
|
|
517
|
+
const deserializeAws_restJson1ServiceUnavailableErrorResponse = async (parsedOutput, context) => {
|
|
518
|
+
const contents = map({});
|
|
519
|
+
const data = parsedOutput.body;
|
|
520
|
+
const exception = new ServiceUnavailableError({
|
|
521
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
522
|
+
...contents,
|
|
523
|
+
});
|
|
524
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
525
|
+
};
|
|
526
|
+
const deserializeAws_restJson1StatementTimeoutExceptionResponse = async (parsedOutput, context) => {
|
|
527
|
+
const contents = map({});
|
|
528
|
+
const data = parsedOutput.body;
|
|
529
|
+
if (data.dbConnectionId != null) {
|
|
530
|
+
contents.dbConnectionId = __expectLong(data.dbConnectionId);
|
|
531
|
+
}
|
|
532
|
+
if (data.message != null) {
|
|
533
|
+
contents.message = __expectString(data.message);
|
|
534
|
+
}
|
|
535
|
+
const exception = new StatementTimeoutException({
|
|
536
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
537
|
+
...contents,
|
|
706
538
|
});
|
|
707
|
-
|
|
708
|
-
|
|
539
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
540
|
+
};
|
|
541
|
+
const serializeAws_restJson1ArrayOfArray = (input, context) => {
|
|
709
542
|
return input
|
|
710
|
-
.filter(
|
|
711
|
-
.map(
|
|
543
|
+
.filter((e) => e != null)
|
|
544
|
+
.map((entry) => {
|
|
712
545
|
return serializeAws_restJson1ArrayValue(entry, context);
|
|
713
546
|
});
|
|
714
547
|
};
|
|
715
|
-
|
|
548
|
+
const serializeAws_restJson1ArrayValue = (input, context) => {
|
|
716
549
|
return ArrayValue.visit(input, {
|
|
717
|
-
arrayValues:
|
|
718
|
-
booleanValues:
|
|
719
|
-
doubleValues:
|
|
720
|
-
longValues:
|
|
721
|
-
stringValues:
|
|
722
|
-
_:
|
|
550
|
+
arrayValues: (value) => ({ arrayValues: serializeAws_restJson1ArrayOfArray(value, context) }),
|
|
551
|
+
booleanValues: (value) => ({ booleanValues: serializeAws_restJson1BooleanArray(value, context) }),
|
|
552
|
+
doubleValues: (value) => ({ doubleValues: serializeAws_restJson1DoubleArray(value, context) }),
|
|
553
|
+
longValues: (value) => ({ longValues: serializeAws_restJson1LongArray(value, context) }),
|
|
554
|
+
stringValues: (value) => ({ stringValues: serializeAws_restJson1StringArray(value, context) }),
|
|
555
|
+
_: (name, value) => ({ name: value }),
|
|
723
556
|
});
|
|
724
557
|
};
|
|
725
|
-
|
|
558
|
+
const serializeAws_restJson1BooleanArray = (input, context) => {
|
|
726
559
|
return input
|
|
727
|
-
.filter(
|
|
728
|
-
.map(
|
|
560
|
+
.filter((e) => e != null)
|
|
561
|
+
.map((entry) => {
|
|
729
562
|
return entry;
|
|
730
563
|
});
|
|
731
564
|
};
|
|
732
|
-
|
|
565
|
+
const serializeAws_restJson1DoubleArray = (input, context) => {
|
|
733
566
|
return input
|
|
734
|
-
.filter(
|
|
735
|
-
.map(
|
|
567
|
+
.filter((e) => e != null)
|
|
568
|
+
.map((entry) => {
|
|
736
569
|
return __serializeFloat(entry);
|
|
737
570
|
});
|
|
738
571
|
};
|
|
739
|
-
|
|
572
|
+
const serializeAws_restJson1Field = (input, context) => {
|
|
740
573
|
return Field.visit(input, {
|
|
741
|
-
arrayValue:
|
|
742
|
-
blobValue:
|
|
743
|
-
booleanValue:
|
|
744
|
-
doubleValue:
|
|
745
|
-
isNull:
|
|
746
|
-
longValue:
|
|
747
|
-
stringValue:
|
|
748
|
-
_:
|
|
574
|
+
arrayValue: (value) => ({ arrayValue: serializeAws_restJson1ArrayValue(value, context) }),
|
|
575
|
+
blobValue: (value) => ({ blobValue: context.base64Encoder(value) }),
|
|
576
|
+
booleanValue: (value) => ({ booleanValue: value }),
|
|
577
|
+
doubleValue: (value) => ({ doubleValue: __serializeFloat(value) }),
|
|
578
|
+
isNull: (value) => ({ isNull: value }),
|
|
579
|
+
longValue: (value) => ({ longValue: value }),
|
|
580
|
+
stringValue: (value) => ({ stringValue: value }),
|
|
581
|
+
_: (name, value) => ({ name: value }),
|
|
749
582
|
});
|
|
750
583
|
};
|
|
751
|
-
|
|
584
|
+
const serializeAws_restJson1LongArray = (input, context) => {
|
|
752
585
|
return input
|
|
753
|
-
.filter(
|
|
754
|
-
.map(
|
|
586
|
+
.filter((e) => e != null)
|
|
587
|
+
.map((entry) => {
|
|
755
588
|
return entry;
|
|
756
589
|
});
|
|
757
590
|
};
|
|
758
|
-
|
|
759
|
-
return
|
|
591
|
+
const serializeAws_restJson1ResultSetOptions = (input, context) => {
|
|
592
|
+
return {
|
|
593
|
+
...(input.decimalReturnType != null && { decimalReturnType: input.decimalReturnType }),
|
|
594
|
+
...(input.longReturnType != null && { longReturnType: input.longReturnType }),
|
|
595
|
+
};
|
|
760
596
|
};
|
|
761
|
-
|
|
762
|
-
return
|
|
597
|
+
const serializeAws_restJson1SqlParameter = (input, context) => {
|
|
598
|
+
return {
|
|
599
|
+
...(input.name != null && { name: input.name }),
|
|
600
|
+
...(input.typeHint != null && { typeHint: input.typeHint }),
|
|
601
|
+
...(input.value != null && { value: serializeAws_restJson1Field(input.value, context) }),
|
|
602
|
+
};
|
|
763
603
|
};
|
|
764
|
-
|
|
604
|
+
const serializeAws_restJson1SqlParameterSets = (input, context) => {
|
|
765
605
|
return input
|
|
766
|
-
.filter(
|
|
767
|
-
.map(
|
|
606
|
+
.filter((e) => e != null)
|
|
607
|
+
.map((entry) => {
|
|
768
608
|
return serializeAws_restJson1SqlParametersList(entry, context);
|
|
769
609
|
});
|
|
770
610
|
};
|
|
771
|
-
|
|
611
|
+
const serializeAws_restJson1SqlParametersList = (input, context) => {
|
|
772
612
|
return input
|
|
773
|
-
.filter(
|
|
774
|
-
.map(
|
|
613
|
+
.filter((e) => e != null)
|
|
614
|
+
.map((entry) => {
|
|
775
615
|
return serializeAws_restJson1SqlParameter(entry, context);
|
|
776
616
|
});
|
|
777
617
|
};
|
|
778
|
-
|
|
618
|
+
const serializeAws_restJson1StringArray = (input, context) => {
|
|
779
619
|
return input
|
|
780
|
-
.filter(
|
|
781
|
-
.map(
|
|
620
|
+
.filter((e) => e != null)
|
|
621
|
+
.map((entry) => {
|
|
782
622
|
return entry;
|
|
783
623
|
});
|
|
784
624
|
};
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
.filter(
|
|
788
|
-
.map(
|
|
625
|
+
const deserializeAws_restJson1ArrayOfArray = (output, context) => {
|
|
626
|
+
const retVal = (output || [])
|
|
627
|
+
.filter((e) => e != null)
|
|
628
|
+
.map((entry) => {
|
|
789
629
|
if (entry === null) {
|
|
790
630
|
return null;
|
|
791
631
|
}
|
|
@@ -793,7 +633,7 @@ var deserializeAws_restJson1ArrayOfArray = function (output, context) {
|
|
|
793
633
|
});
|
|
794
634
|
return retVal;
|
|
795
635
|
};
|
|
796
|
-
|
|
636
|
+
const deserializeAws_restJson1ArrayValue = (output, context) => {
|
|
797
637
|
if (output.arrayValues != null) {
|
|
798
638
|
return {
|
|
799
639
|
arrayValues: deserializeAws_restJson1ArrayOfArray(output.arrayValues, context),
|
|
@@ -821,10 +661,10 @@ var deserializeAws_restJson1ArrayValue = function (output, context) {
|
|
|
821
661
|
}
|
|
822
662
|
return { $unknown: Object.entries(output)[0] };
|
|
823
663
|
};
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
.filter(
|
|
827
|
-
.map(
|
|
664
|
+
const deserializeAws_restJson1ArrayValueList = (output, context) => {
|
|
665
|
+
const retVal = (output || [])
|
|
666
|
+
.filter((e) => e != null)
|
|
667
|
+
.map((entry) => {
|
|
828
668
|
if (entry === null) {
|
|
829
669
|
return null;
|
|
830
670
|
}
|
|
@@ -832,10 +672,10 @@ var deserializeAws_restJson1ArrayValueList = function (output, context) {
|
|
|
832
672
|
});
|
|
833
673
|
return retVal;
|
|
834
674
|
};
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
.filter(
|
|
838
|
-
.map(
|
|
675
|
+
const deserializeAws_restJson1BooleanArray = (output, context) => {
|
|
676
|
+
const retVal = (output || [])
|
|
677
|
+
.filter((e) => e != null)
|
|
678
|
+
.map((entry) => {
|
|
839
679
|
if (entry === null) {
|
|
840
680
|
return null;
|
|
841
681
|
}
|
|
@@ -843,7 +683,7 @@ var deserializeAws_restJson1BooleanArray = function (output, context) {
|
|
|
843
683
|
});
|
|
844
684
|
return retVal;
|
|
845
685
|
};
|
|
846
|
-
|
|
686
|
+
const deserializeAws_restJson1ColumnMetadata = (output, context) => {
|
|
847
687
|
return {
|
|
848
688
|
arrayBaseColumnType: __expectInt32(output.arrayBaseColumnType),
|
|
849
689
|
isAutoIncrement: __expectBoolean(output.isAutoIncrement),
|
|
@@ -861,10 +701,10 @@ var deserializeAws_restJson1ColumnMetadata = function (output, context) {
|
|
|
861
701
|
typeName: __expectString(output.typeName),
|
|
862
702
|
};
|
|
863
703
|
};
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
.filter(
|
|
867
|
-
.map(
|
|
704
|
+
const deserializeAws_restJson1DoubleArray = (output, context) => {
|
|
705
|
+
const retVal = (output || [])
|
|
706
|
+
.filter((e) => e != null)
|
|
707
|
+
.map((entry) => {
|
|
868
708
|
if (entry === null) {
|
|
869
709
|
return null;
|
|
870
710
|
}
|
|
@@ -872,7 +712,7 @@ var deserializeAws_restJson1DoubleArray = function (output, context) {
|
|
|
872
712
|
});
|
|
873
713
|
return retVal;
|
|
874
714
|
};
|
|
875
|
-
|
|
715
|
+
const deserializeAws_restJson1Field = (output, context) => {
|
|
876
716
|
if (output.arrayValue != null) {
|
|
877
717
|
return {
|
|
878
718
|
arrayValue: deserializeAws_restJson1ArrayValue(__expectUnion(output.arrayValue), context),
|
|
@@ -900,10 +740,10 @@ var deserializeAws_restJson1Field = function (output, context) {
|
|
|
900
740
|
}
|
|
901
741
|
return { $unknown: Object.entries(output)[0] };
|
|
902
742
|
};
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
.filter(
|
|
906
|
-
.map(
|
|
743
|
+
const deserializeAws_restJson1FieldList = (output, context) => {
|
|
744
|
+
const retVal = (output || [])
|
|
745
|
+
.filter((e) => e != null)
|
|
746
|
+
.map((entry) => {
|
|
907
747
|
if (entry === null) {
|
|
908
748
|
return null;
|
|
909
749
|
}
|
|
@@ -911,10 +751,10 @@ var deserializeAws_restJson1FieldList = function (output, context) {
|
|
|
911
751
|
});
|
|
912
752
|
return retVal;
|
|
913
753
|
};
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
.filter(
|
|
917
|
-
.map(
|
|
754
|
+
const deserializeAws_restJson1LongArray = (output, context) => {
|
|
755
|
+
const retVal = (output || [])
|
|
756
|
+
.filter((e) => e != null)
|
|
757
|
+
.map((entry) => {
|
|
918
758
|
if (entry === null) {
|
|
919
759
|
return null;
|
|
920
760
|
}
|
|
@@ -922,10 +762,10 @@ var deserializeAws_restJson1LongArray = function (output, context) {
|
|
|
922
762
|
});
|
|
923
763
|
return retVal;
|
|
924
764
|
};
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
.filter(
|
|
928
|
-
.map(
|
|
765
|
+
const deserializeAws_restJson1Metadata = (output, context) => {
|
|
766
|
+
const retVal = (output || [])
|
|
767
|
+
.filter((e) => e != null)
|
|
768
|
+
.map((entry) => {
|
|
929
769
|
if (entry === null) {
|
|
930
770
|
return null;
|
|
931
771
|
}
|
|
@@ -933,15 +773,15 @@ var deserializeAws_restJson1Metadata = function (output, context) {
|
|
|
933
773
|
});
|
|
934
774
|
return retVal;
|
|
935
775
|
};
|
|
936
|
-
|
|
776
|
+
const deserializeAws_restJson1_Record = (output, context) => {
|
|
937
777
|
return {
|
|
938
778
|
values: output.values != null ? deserializeAws_restJson1Row(output.values, context) : undefined,
|
|
939
779
|
};
|
|
940
780
|
};
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
.filter(
|
|
944
|
-
.map(
|
|
781
|
+
const deserializeAws_restJson1Records = (output, context) => {
|
|
782
|
+
const retVal = (output || [])
|
|
783
|
+
.filter((e) => e != null)
|
|
784
|
+
.map((entry) => {
|
|
945
785
|
if (entry === null) {
|
|
946
786
|
return null;
|
|
947
787
|
}
|
|
@@ -949,7 +789,7 @@ var deserializeAws_restJson1Records = function (output, context) {
|
|
|
949
789
|
});
|
|
950
790
|
return retVal;
|
|
951
791
|
};
|
|
952
|
-
|
|
792
|
+
const deserializeAws_restJson1ResultFrame = (output, context) => {
|
|
953
793
|
return {
|
|
954
794
|
records: output.records != null ? deserializeAws_restJson1Records(output.records, context) : undefined,
|
|
955
795
|
resultSetMetadata: output.resultSetMetadata != null
|
|
@@ -957,16 +797,16 @@ var deserializeAws_restJson1ResultFrame = function (output, context) {
|
|
|
957
797
|
: undefined,
|
|
958
798
|
};
|
|
959
799
|
};
|
|
960
|
-
|
|
800
|
+
const deserializeAws_restJson1ResultSetMetadata = (output, context) => {
|
|
961
801
|
return {
|
|
962
802
|
columnCount: __expectLong(output.columnCount),
|
|
963
803
|
columnMetadata: output.columnMetadata != null ? deserializeAws_restJson1Metadata(output.columnMetadata, context) : undefined,
|
|
964
804
|
};
|
|
965
805
|
};
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
.filter(
|
|
969
|
-
.map(
|
|
806
|
+
const deserializeAws_restJson1Row = (output, context) => {
|
|
807
|
+
const retVal = (output || [])
|
|
808
|
+
.filter((e) => e != null)
|
|
809
|
+
.map((entry) => {
|
|
970
810
|
if (entry === null) {
|
|
971
811
|
return null;
|
|
972
812
|
}
|
|
@@ -974,10 +814,10 @@ var deserializeAws_restJson1Row = function (output, context) {
|
|
|
974
814
|
});
|
|
975
815
|
return retVal;
|
|
976
816
|
};
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
.filter(
|
|
980
|
-
.map(
|
|
817
|
+
const deserializeAws_restJson1SqlRecords = (output, context) => {
|
|
818
|
+
const retVal = (output || [])
|
|
819
|
+
.filter((e) => e != null)
|
|
820
|
+
.map((entry) => {
|
|
981
821
|
if (entry === null) {
|
|
982
822
|
return null;
|
|
983
823
|
}
|
|
@@ -985,16 +825,16 @@ var deserializeAws_restJson1SqlRecords = function (output, context) {
|
|
|
985
825
|
});
|
|
986
826
|
return retVal;
|
|
987
827
|
};
|
|
988
|
-
|
|
828
|
+
const deserializeAws_restJson1SqlStatementResult = (output, context) => {
|
|
989
829
|
return {
|
|
990
830
|
numberOfRecordsUpdated: __expectLong(output.numberOfRecordsUpdated),
|
|
991
831
|
resultFrame: output.resultFrame != null ? deserializeAws_restJson1ResultFrame(output.resultFrame, context) : undefined,
|
|
992
832
|
};
|
|
993
833
|
};
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
.filter(
|
|
997
|
-
.map(
|
|
834
|
+
const deserializeAws_restJson1SqlStatementResults = (output, context) => {
|
|
835
|
+
const retVal = (output || [])
|
|
836
|
+
.filter((e) => e != null)
|
|
837
|
+
.map((entry) => {
|
|
998
838
|
if (entry === null) {
|
|
999
839
|
return null;
|
|
1000
840
|
}
|
|
@@ -1002,10 +842,10 @@ var deserializeAws_restJson1SqlStatementResults = function (output, context) {
|
|
|
1002
842
|
});
|
|
1003
843
|
return retVal;
|
|
1004
844
|
};
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
.filter(
|
|
1008
|
-
.map(
|
|
845
|
+
const deserializeAws_restJson1StringArray = (output, context) => {
|
|
846
|
+
const retVal = (output || [])
|
|
847
|
+
.filter((e) => e != null)
|
|
848
|
+
.map((entry) => {
|
|
1009
849
|
if (entry === null) {
|
|
1010
850
|
return null;
|
|
1011
851
|
}
|
|
@@ -1013,20 +853,20 @@ var deserializeAws_restJson1StringArray = function (output, context) {
|
|
|
1013
853
|
});
|
|
1014
854
|
return retVal;
|
|
1015
855
|
};
|
|
1016
|
-
|
|
856
|
+
const deserializeAws_restJson1StructValue = (output, context) => {
|
|
1017
857
|
return {
|
|
1018
858
|
attributes: output.attributes != null ? deserializeAws_restJson1ArrayValueList(output.attributes, context) : undefined,
|
|
1019
859
|
};
|
|
1020
860
|
};
|
|
1021
|
-
|
|
861
|
+
const deserializeAws_restJson1UpdateResult = (output, context) => {
|
|
1022
862
|
return {
|
|
1023
863
|
generatedFields: output.generatedFields != null ? deserializeAws_restJson1FieldList(output.generatedFields, context) : undefined,
|
|
1024
864
|
};
|
|
1025
865
|
};
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
.filter(
|
|
1029
|
-
.map(
|
|
866
|
+
const deserializeAws_restJson1UpdateResults = (output, context) => {
|
|
867
|
+
const retVal = (output || [])
|
|
868
|
+
.filter((e) => e != null)
|
|
869
|
+
.map((entry) => {
|
|
1030
870
|
if (entry === null) {
|
|
1031
871
|
return null;
|
|
1032
872
|
}
|
|
@@ -1034,7 +874,7 @@ var deserializeAws_restJson1UpdateResults = function (output, context) {
|
|
|
1034
874
|
});
|
|
1035
875
|
return retVal;
|
|
1036
876
|
};
|
|
1037
|
-
|
|
877
|
+
const deserializeAws_restJson1Value = (output, context) => {
|
|
1038
878
|
if (output.arrayValues != null) {
|
|
1039
879
|
return {
|
|
1040
880
|
arrayValues: deserializeAws_restJson1ArrayValueList(output.arrayValues, context),
|
|
@@ -1073,44 +913,39 @@ var deserializeAws_restJson1Value = function (output, context) {
|
|
|
1073
913
|
}
|
|
1074
914
|
return { $unknown: Object.entries(output)[0] };
|
|
1075
915
|
};
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
});
|
|
1084
|
-
};
|
|
1085
|
-
var collectBody = function (streamBody, context) {
|
|
1086
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
916
|
+
const deserializeMetadata = (output) => ({
|
|
917
|
+
httpStatusCode: output.statusCode,
|
|
918
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
919
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
920
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
921
|
+
});
|
|
922
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1087
923
|
if (streamBody instanceof Uint8Array) {
|
|
1088
924
|
return Promise.resolve(streamBody);
|
|
1089
925
|
}
|
|
1090
926
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1091
927
|
};
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
var cleanValue = rawValue;
|
|
928
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
929
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
930
|
+
value !== null &&
|
|
931
|
+
value !== "" &&
|
|
932
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
933
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
934
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
935
|
+
if (encoded.length) {
|
|
936
|
+
return JSON.parse(encoded);
|
|
937
|
+
}
|
|
938
|
+
return {};
|
|
939
|
+
});
|
|
940
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
941
|
+
const value = await parseBody(errorBody, context);
|
|
942
|
+
value.message = value.message ?? value.Message;
|
|
943
|
+
return value;
|
|
944
|
+
};
|
|
945
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
946
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
947
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
948
|
+
let cleanValue = rawValue;
|
|
1114
949
|
if (typeof cleanValue === "number") {
|
|
1115
950
|
cleanValue = cleanValue.toString();
|
|
1116
951
|
}
|
|
@@ -1125,7 +960,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1125
960
|
}
|
|
1126
961
|
return cleanValue;
|
|
1127
962
|
};
|
|
1128
|
-
|
|
963
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1129
964
|
if (headerKey !== undefined) {
|
|
1130
965
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1131
966
|
}
|