@aws-sdk/client-redshift-data 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/RedshiftData.js +42 -49
- package/dist-es/RedshiftDataClient.js +22 -28
- package/dist-es/commands/BatchExecuteStatementCommand.js +21 -28
- package/dist-es/commands/CancelStatementCommand.js +21 -28
- package/dist-es/commands/DescribeStatementCommand.js +21 -28
- package/dist-es/commands/DescribeTableCommand.js +21 -28
- package/dist-es/commands/ExecuteStatementCommand.js +21 -28
- package/dist-es/commands/GetStatementResultCommand.js +21 -28
- package/dist-es/commands/ListDatabasesCommand.js +21 -28
- package/dist-es/commands/ListSchemasCommand.js +21 -28
- package/dist-es/commands/ListStatementsCommand.js +21 -28
- package/dist-es/commands/ListTablesCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/RedshiftDataServiceException.js +5 -10
- package/dist-es/models/models_0.js +166 -117
- package/dist-es/pagination/DescribeTablePaginator.js +25 -68
- package/dist-es/pagination/GetStatementResultPaginator.js +24 -67
- package/dist-es/pagination/ListDatabasesPaginator.js +25 -68
- package/dist-es/pagination/ListSchemasPaginator.js +25 -68
- package/dist-es/pagination/ListStatementsPaginator.js +25 -68
- package/dist-es/pagination/ListTablesPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +747 -916
- 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,830 +1,684 @@
|
|
|
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, expectNumber as __expectNumber, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { ActiveStatementsExceededException, BatchExecuteStatementException, DatabaseConnectionException, ExecuteStatementException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
5
4
|
import { RedshiftDataServiceException as __BaseException } from "../models/RedshiftDataServiceException";
|
|
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
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
body
|
|
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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
var deserializeAws_json1_1ListDatabasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
493
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
494
|
-
var _c;
|
|
495
|
-
return __generator(this, function (_d) {
|
|
496
|
-
switch (_d.label) {
|
|
497
|
-
case 0:
|
|
498
|
-
_a = [__assign({}, output)];
|
|
499
|
-
_c = {};
|
|
500
|
-
return [4, parseErrorBody(output.body, context)];
|
|
501
|
-
case 1:
|
|
502
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
503
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
504
|
-
_b = errorCode;
|
|
505
|
-
switch (_b) {
|
|
506
|
-
case "DatabaseConnectionException": return [3, 2];
|
|
507
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
|
|
508
|
-
case "InternalServerException": return [3, 4];
|
|
509
|
-
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
|
|
510
|
-
case "ValidationException": return [3, 6];
|
|
511
|
-
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
512
|
-
}
|
|
513
|
-
return [3, 8];
|
|
514
|
-
case 2: return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
|
|
515
|
-
case 3: throw _d.sent();
|
|
516
|
-
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
517
|
-
case 5: throw _d.sent();
|
|
518
|
-
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
519
|
-
case 7: throw _d.sent();
|
|
520
|
-
case 8:
|
|
521
|
-
parsedBody = parsedOutput.body;
|
|
522
|
-
throwDefaultError({
|
|
523
|
-
output: output,
|
|
524
|
-
parsedBody: parsedBody,
|
|
525
|
-
exceptionCtor: __BaseException,
|
|
526
|
-
errorCode: errorCode,
|
|
527
|
-
});
|
|
528
|
-
_d.label = 9;
|
|
529
|
-
case 9: return [2];
|
|
530
|
-
}
|
|
531
|
-
});
|
|
532
|
-
}); };
|
|
533
|
-
export var deserializeAws_json1_1ListSchemasCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
534
|
-
var data, contents, response;
|
|
535
|
-
return __generator(this, function (_a) {
|
|
536
|
-
switch (_a.label) {
|
|
537
|
-
case 0:
|
|
538
|
-
if (output.statusCode >= 300) {
|
|
539
|
-
return [2, deserializeAws_json1_1ListSchemasCommandError(output, context)];
|
|
540
|
-
}
|
|
541
|
-
return [4, parseBody(output.body, context)];
|
|
542
|
-
case 1:
|
|
543
|
-
data = _a.sent();
|
|
544
|
-
contents = {};
|
|
545
|
-
contents = deserializeAws_json1_1ListSchemasResponse(data, context);
|
|
546
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
547
|
-
return [2, Promise.resolve(response)];
|
|
548
|
-
}
|
|
549
|
-
});
|
|
550
|
-
}); };
|
|
551
|
-
var deserializeAws_json1_1ListSchemasCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
552
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
553
|
-
var _c;
|
|
554
|
-
return __generator(this, function (_d) {
|
|
555
|
-
switch (_d.label) {
|
|
556
|
-
case 0:
|
|
557
|
-
_a = [__assign({}, output)];
|
|
558
|
-
_c = {};
|
|
559
|
-
return [4, parseErrorBody(output.body, context)];
|
|
560
|
-
case 1:
|
|
561
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
562
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
563
|
-
_b = errorCode;
|
|
564
|
-
switch (_b) {
|
|
565
|
-
case "DatabaseConnectionException": return [3, 2];
|
|
566
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
|
|
567
|
-
case "InternalServerException": return [3, 4];
|
|
568
|
-
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
|
|
569
|
-
case "ValidationException": return [3, 6];
|
|
570
|
-
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
571
|
-
}
|
|
572
|
-
return [3, 8];
|
|
573
|
-
case 2: return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
|
|
574
|
-
case 3: throw _d.sent();
|
|
575
|
-
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
576
|
-
case 5: throw _d.sent();
|
|
577
|
-
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
578
|
-
case 7: throw _d.sent();
|
|
579
|
-
case 8:
|
|
580
|
-
parsedBody = parsedOutput.body;
|
|
581
|
-
throwDefaultError({
|
|
582
|
-
output: output,
|
|
583
|
-
parsedBody: parsedBody,
|
|
584
|
-
exceptionCtor: __BaseException,
|
|
585
|
-
errorCode: errorCode,
|
|
586
|
-
});
|
|
587
|
-
_d.label = 9;
|
|
588
|
-
case 9: return [2];
|
|
589
|
-
}
|
|
590
|
-
});
|
|
591
|
-
}); };
|
|
592
|
-
export var deserializeAws_json1_1ListStatementsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
593
|
-
var data, contents, response;
|
|
594
|
-
return __generator(this, function (_a) {
|
|
595
|
-
switch (_a.label) {
|
|
596
|
-
case 0:
|
|
597
|
-
if (output.statusCode >= 300) {
|
|
598
|
-
return [2, deserializeAws_json1_1ListStatementsCommandError(output, context)];
|
|
599
|
-
}
|
|
600
|
-
return [4, parseBody(output.body, context)];
|
|
601
|
-
case 1:
|
|
602
|
-
data = _a.sent();
|
|
603
|
-
contents = {};
|
|
604
|
-
contents = deserializeAws_json1_1ListStatementsResponse(data, context);
|
|
605
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
606
|
-
return [2, Promise.resolve(response)];
|
|
607
|
-
}
|
|
608
|
-
});
|
|
609
|
-
}); };
|
|
610
|
-
var deserializeAws_json1_1ListStatementsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
611
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
612
|
-
var _c;
|
|
613
|
-
return __generator(this, function (_d) {
|
|
614
|
-
switch (_d.label) {
|
|
615
|
-
case 0:
|
|
616
|
-
_a = [__assign({}, output)];
|
|
617
|
-
_c = {};
|
|
618
|
-
return [4, parseErrorBody(output.body, context)];
|
|
619
|
-
case 1:
|
|
620
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
621
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
622
|
-
_b = errorCode;
|
|
623
|
-
switch (_b) {
|
|
624
|
-
case "InternalServerException": return [3, 2];
|
|
625
|
-
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 2];
|
|
626
|
-
case "ValidationException": return [3, 4];
|
|
627
|
-
case "com.amazonaws.redshiftdata#ValidationException": return [3, 4];
|
|
628
|
-
}
|
|
629
|
-
return [3, 6];
|
|
630
|
-
case 2: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
631
|
-
case 3: throw _d.sent();
|
|
632
|
-
case 4: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
633
|
-
case 5: throw _d.sent();
|
|
634
|
-
case 6:
|
|
635
|
-
parsedBody = parsedOutput.body;
|
|
636
|
-
throwDefaultError({
|
|
637
|
-
output: output,
|
|
638
|
-
parsedBody: parsedBody,
|
|
639
|
-
exceptionCtor: __BaseException,
|
|
640
|
-
errorCode: errorCode,
|
|
641
|
-
});
|
|
642
|
-
_d.label = 7;
|
|
643
|
-
case 7: return [2];
|
|
644
|
-
}
|
|
645
|
-
});
|
|
646
|
-
}); };
|
|
647
|
-
export var deserializeAws_json1_1ListTablesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
648
|
-
var data, contents, response;
|
|
649
|
-
return __generator(this, function (_a) {
|
|
650
|
-
switch (_a.label) {
|
|
651
|
-
case 0:
|
|
652
|
-
if (output.statusCode >= 300) {
|
|
653
|
-
return [2, deserializeAws_json1_1ListTablesCommandError(output, context)];
|
|
654
|
-
}
|
|
655
|
-
return [4, parseBody(output.body, context)];
|
|
656
|
-
case 1:
|
|
657
|
-
data = _a.sent();
|
|
658
|
-
contents = {};
|
|
659
|
-
contents = deserializeAws_json1_1ListTablesResponse(data, context);
|
|
660
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
661
|
-
return [2, Promise.resolve(response)];
|
|
662
|
-
}
|
|
663
|
-
});
|
|
664
|
-
}); };
|
|
665
|
-
var deserializeAws_json1_1ListTablesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
666
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
667
|
-
var _c;
|
|
668
|
-
return __generator(this, function (_d) {
|
|
669
|
-
switch (_d.label) {
|
|
670
|
-
case 0:
|
|
671
|
-
_a = [__assign({}, output)];
|
|
672
|
-
_c = {};
|
|
673
|
-
return [4, parseErrorBody(output.body, context)];
|
|
674
|
-
case 1:
|
|
675
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
676
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
677
|
-
_b = errorCode;
|
|
678
|
-
switch (_b) {
|
|
679
|
-
case "DatabaseConnectionException": return [3, 2];
|
|
680
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException": return [3, 2];
|
|
681
|
-
case "InternalServerException": return [3, 4];
|
|
682
|
-
case "com.amazonaws.redshiftdata#InternalServerException": return [3, 4];
|
|
683
|
-
case "ValidationException": return [3, 6];
|
|
684
|
-
case "com.amazonaws.redshiftdata#ValidationException": return [3, 6];
|
|
685
|
-
}
|
|
686
|
-
return [3, 8];
|
|
687
|
-
case 2: return [4, deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context)];
|
|
688
|
-
case 3: throw _d.sent();
|
|
689
|
-
case 4: return [4, deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)];
|
|
690
|
-
case 5: throw _d.sent();
|
|
691
|
-
case 6: return [4, deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)];
|
|
692
|
-
case 7: throw _d.sent();
|
|
693
|
-
case 8:
|
|
694
|
-
parsedBody = parsedOutput.body;
|
|
695
|
-
throwDefaultError({
|
|
696
|
-
output: output,
|
|
697
|
-
parsedBody: parsedBody,
|
|
698
|
-
exceptionCtor: __BaseException,
|
|
699
|
-
errorCode: errorCode,
|
|
700
|
-
});
|
|
701
|
-
_d.label = 9;
|
|
702
|
-
case 9: return [2];
|
|
703
|
-
}
|
|
704
|
-
});
|
|
705
|
-
}); };
|
|
706
|
-
var deserializeAws_json1_1ActiveStatementsExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
707
|
-
var body, deserialized, exception;
|
|
708
|
-
return __generator(this, function (_a) {
|
|
709
|
-
body = parsedOutput.body;
|
|
710
|
-
deserialized = deserializeAws_json1_1ActiveStatementsExceededException(body, context);
|
|
711
|
-
exception = new ActiveStatementsExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
712
|
-
return [2, __decorateServiceException(exception, body)];
|
|
5
|
+
export const serializeAws_json1_1BatchExecuteStatementCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.1",
|
|
8
|
+
"x-amz-target": "RedshiftData.BatchExecuteStatement",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_1BatchExecuteStatementInput(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_1CancelStatementCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.1",
|
|
17
|
+
"x-amz-target": "RedshiftData.CancelStatement",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_1CancelStatementRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_1DescribeStatementCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "RedshiftData.DescribeStatement",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1DescribeStatementRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const serializeAws_json1_1DescribeTableCommand = async (input, context) => {
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/x-amz-json-1.1",
|
|
35
|
+
"x-amz-target": "RedshiftData.DescribeTable",
|
|
36
|
+
};
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(serializeAws_json1_1DescribeTableRequest(input, context));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_json1_1ExecuteStatementCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "RedshiftData.ExecuteStatement",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1ExecuteStatementInput(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
export const serializeAws_json1_1GetStatementResultCommand = async (input, context) => {
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/x-amz-json-1.1",
|
|
53
|
+
"x-amz-target": "RedshiftData.GetStatementResult",
|
|
54
|
+
};
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(serializeAws_json1_1GetStatementResultRequest(input, context));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const serializeAws_json1_1ListDatabasesCommand = async (input, context) => {
|
|
60
|
+
const headers = {
|
|
61
|
+
"content-type": "application/x-amz-json-1.1",
|
|
62
|
+
"x-amz-target": "RedshiftData.ListDatabases",
|
|
63
|
+
};
|
|
64
|
+
let body;
|
|
65
|
+
body = JSON.stringify(serializeAws_json1_1ListDatabasesRequest(input, context));
|
|
66
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
|
+
};
|
|
68
|
+
export const serializeAws_json1_1ListSchemasCommand = async (input, context) => {
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/x-amz-json-1.1",
|
|
71
|
+
"x-amz-target": "RedshiftData.ListSchemas",
|
|
72
|
+
};
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify(serializeAws_json1_1ListSchemasRequest(input, context));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
export const serializeAws_json1_1ListStatementsCommand = async (input, context) => {
|
|
78
|
+
const headers = {
|
|
79
|
+
"content-type": "application/x-amz-json-1.1",
|
|
80
|
+
"x-amz-target": "RedshiftData.ListStatements",
|
|
81
|
+
};
|
|
82
|
+
let body;
|
|
83
|
+
body = JSON.stringify(serializeAws_json1_1ListStatementsRequest(input, context));
|
|
84
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
|
+
};
|
|
86
|
+
export const serializeAws_json1_1ListTablesCommand = async (input, context) => {
|
|
87
|
+
const headers = {
|
|
88
|
+
"content-type": "application/x-amz-json-1.1",
|
|
89
|
+
"x-amz-target": "RedshiftData.ListTables",
|
|
90
|
+
};
|
|
91
|
+
let body;
|
|
92
|
+
body = JSON.stringify(serializeAws_json1_1ListTablesRequest(input, context));
|
|
93
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
+
};
|
|
95
|
+
export const deserializeAws_json1_1BatchExecuteStatementCommand = async (output, context) => {
|
|
96
|
+
if (output.statusCode >= 300) {
|
|
97
|
+
return deserializeAws_json1_1BatchExecuteStatementCommandError(output, context);
|
|
98
|
+
}
|
|
99
|
+
const data = await parseBody(output.body, context);
|
|
100
|
+
let contents = {};
|
|
101
|
+
contents = deserializeAws_json1_1BatchExecuteStatementOutput(data, context);
|
|
102
|
+
const response = {
|
|
103
|
+
$metadata: deserializeMetadata(output),
|
|
104
|
+
...contents,
|
|
105
|
+
};
|
|
106
|
+
return Promise.resolve(response);
|
|
107
|
+
};
|
|
108
|
+
const deserializeAws_json1_1BatchExecuteStatementCommandError = async (output, context) => {
|
|
109
|
+
const parsedOutput = {
|
|
110
|
+
...output,
|
|
111
|
+
body: await parseErrorBody(output.body, context),
|
|
112
|
+
};
|
|
113
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
114
|
+
switch (errorCode) {
|
|
115
|
+
case "ActiveStatementsExceededException":
|
|
116
|
+
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
117
|
+
throw await deserializeAws_json1_1ActiveStatementsExceededExceptionResponse(parsedOutput, context);
|
|
118
|
+
case "BatchExecuteStatementException":
|
|
119
|
+
case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
|
|
120
|
+
throw await deserializeAws_json1_1BatchExecuteStatementExceptionResponse(parsedOutput, context);
|
|
121
|
+
case "ValidationException":
|
|
122
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
123
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
124
|
+
default:
|
|
125
|
+
const parsedBody = parsedOutput.body;
|
|
126
|
+
throwDefaultError({
|
|
127
|
+
output,
|
|
128
|
+
parsedBody,
|
|
129
|
+
exceptionCtor: __BaseException,
|
|
130
|
+
errorCode,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
export const deserializeAws_json1_1CancelStatementCommand = async (output, context) => {
|
|
135
|
+
if (output.statusCode >= 300) {
|
|
136
|
+
return deserializeAws_json1_1CancelStatementCommandError(output, context);
|
|
137
|
+
}
|
|
138
|
+
const data = await parseBody(output.body, context);
|
|
139
|
+
let contents = {};
|
|
140
|
+
contents = deserializeAws_json1_1CancelStatementResponse(data, context);
|
|
141
|
+
const response = {
|
|
142
|
+
$metadata: deserializeMetadata(output),
|
|
143
|
+
...contents,
|
|
144
|
+
};
|
|
145
|
+
return Promise.resolve(response);
|
|
146
|
+
};
|
|
147
|
+
const deserializeAws_json1_1CancelStatementCommandError = async (output, context) => {
|
|
148
|
+
const parsedOutput = {
|
|
149
|
+
...output,
|
|
150
|
+
body: await parseErrorBody(output.body, context),
|
|
151
|
+
};
|
|
152
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
153
|
+
switch (errorCode) {
|
|
154
|
+
case "DatabaseConnectionException":
|
|
155
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
156
|
+
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
157
|
+
case "InternalServerException":
|
|
158
|
+
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
159
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
160
|
+
case "ResourceNotFoundException":
|
|
161
|
+
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
162
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
163
|
+
case "ValidationException":
|
|
164
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
165
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
166
|
+
default:
|
|
167
|
+
const parsedBody = parsedOutput.body;
|
|
168
|
+
throwDefaultError({
|
|
169
|
+
output,
|
|
170
|
+
parsedBody,
|
|
171
|
+
exceptionCtor: __BaseException,
|
|
172
|
+
errorCode,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
export const deserializeAws_json1_1DescribeStatementCommand = async (output, context) => {
|
|
177
|
+
if (output.statusCode >= 300) {
|
|
178
|
+
return deserializeAws_json1_1DescribeStatementCommandError(output, context);
|
|
179
|
+
}
|
|
180
|
+
const data = await parseBody(output.body, context);
|
|
181
|
+
let contents = {};
|
|
182
|
+
contents = deserializeAws_json1_1DescribeStatementResponse(data, context);
|
|
183
|
+
const response = {
|
|
184
|
+
$metadata: deserializeMetadata(output),
|
|
185
|
+
...contents,
|
|
186
|
+
};
|
|
187
|
+
return Promise.resolve(response);
|
|
188
|
+
};
|
|
189
|
+
const deserializeAws_json1_1DescribeStatementCommandError = async (output, context) => {
|
|
190
|
+
const parsedOutput = {
|
|
191
|
+
...output,
|
|
192
|
+
body: await parseErrorBody(output.body, context),
|
|
193
|
+
};
|
|
194
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
195
|
+
switch (errorCode) {
|
|
196
|
+
case "InternalServerException":
|
|
197
|
+
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
198
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
199
|
+
case "ResourceNotFoundException":
|
|
200
|
+
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
201
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
202
|
+
case "ValidationException":
|
|
203
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
204
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
205
|
+
default:
|
|
206
|
+
const parsedBody = parsedOutput.body;
|
|
207
|
+
throwDefaultError({
|
|
208
|
+
output,
|
|
209
|
+
parsedBody,
|
|
210
|
+
exceptionCtor: __BaseException,
|
|
211
|
+
errorCode,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
export const deserializeAws_json1_1DescribeTableCommand = async (output, context) => {
|
|
216
|
+
if (output.statusCode >= 300) {
|
|
217
|
+
return deserializeAws_json1_1DescribeTableCommandError(output, context);
|
|
218
|
+
}
|
|
219
|
+
const data = await parseBody(output.body, context);
|
|
220
|
+
let contents = {};
|
|
221
|
+
contents = deserializeAws_json1_1DescribeTableResponse(data, context);
|
|
222
|
+
const response = {
|
|
223
|
+
$metadata: deserializeMetadata(output),
|
|
224
|
+
...contents,
|
|
225
|
+
};
|
|
226
|
+
return Promise.resolve(response);
|
|
227
|
+
};
|
|
228
|
+
const deserializeAws_json1_1DescribeTableCommandError = async (output, context) => {
|
|
229
|
+
const parsedOutput = {
|
|
230
|
+
...output,
|
|
231
|
+
body: await parseErrorBody(output.body, context),
|
|
232
|
+
};
|
|
233
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
234
|
+
switch (errorCode) {
|
|
235
|
+
case "DatabaseConnectionException":
|
|
236
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
237
|
+
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
238
|
+
case "InternalServerException":
|
|
239
|
+
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
240
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
241
|
+
case "ValidationException":
|
|
242
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
243
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
244
|
+
default:
|
|
245
|
+
const parsedBody = parsedOutput.body;
|
|
246
|
+
throwDefaultError({
|
|
247
|
+
output,
|
|
248
|
+
parsedBody,
|
|
249
|
+
exceptionCtor: __BaseException,
|
|
250
|
+
errorCode,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
export const deserializeAws_json1_1ExecuteStatementCommand = async (output, context) => {
|
|
255
|
+
if (output.statusCode >= 300) {
|
|
256
|
+
return deserializeAws_json1_1ExecuteStatementCommandError(output, context);
|
|
257
|
+
}
|
|
258
|
+
const data = await parseBody(output.body, context);
|
|
259
|
+
let contents = {};
|
|
260
|
+
contents = deserializeAws_json1_1ExecuteStatementOutput(data, context);
|
|
261
|
+
const response = {
|
|
262
|
+
$metadata: deserializeMetadata(output),
|
|
263
|
+
...contents,
|
|
264
|
+
};
|
|
265
|
+
return Promise.resolve(response);
|
|
266
|
+
};
|
|
267
|
+
const deserializeAws_json1_1ExecuteStatementCommandError = async (output, context) => {
|
|
268
|
+
const parsedOutput = {
|
|
269
|
+
...output,
|
|
270
|
+
body: await parseErrorBody(output.body, context),
|
|
271
|
+
};
|
|
272
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
273
|
+
switch (errorCode) {
|
|
274
|
+
case "ActiveStatementsExceededException":
|
|
275
|
+
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
276
|
+
throw await deserializeAws_json1_1ActiveStatementsExceededExceptionResponse(parsedOutput, context);
|
|
277
|
+
case "ExecuteStatementException":
|
|
278
|
+
case "com.amazonaws.redshiftdata#ExecuteStatementException":
|
|
279
|
+
throw await deserializeAws_json1_1ExecuteStatementExceptionResponse(parsedOutput, context);
|
|
280
|
+
case "ValidationException":
|
|
281
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
282
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
283
|
+
default:
|
|
284
|
+
const parsedBody = parsedOutput.body;
|
|
285
|
+
throwDefaultError({
|
|
286
|
+
output,
|
|
287
|
+
parsedBody,
|
|
288
|
+
exceptionCtor: __BaseException,
|
|
289
|
+
errorCode,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
export const deserializeAws_json1_1GetStatementResultCommand = async (output, context) => {
|
|
294
|
+
if (output.statusCode >= 300) {
|
|
295
|
+
return deserializeAws_json1_1GetStatementResultCommandError(output, context);
|
|
296
|
+
}
|
|
297
|
+
const data = await parseBody(output.body, context);
|
|
298
|
+
let contents = {};
|
|
299
|
+
contents = deserializeAws_json1_1GetStatementResultResponse(data, context);
|
|
300
|
+
const response = {
|
|
301
|
+
$metadata: deserializeMetadata(output),
|
|
302
|
+
...contents,
|
|
303
|
+
};
|
|
304
|
+
return Promise.resolve(response);
|
|
305
|
+
};
|
|
306
|
+
const deserializeAws_json1_1GetStatementResultCommandError = async (output, context) => {
|
|
307
|
+
const parsedOutput = {
|
|
308
|
+
...output,
|
|
309
|
+
body: await parseErrorBody(output.body, context),
|
|
310
|
+
};
|
|
311
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
312
|
+
switch (errorCode) {
|
|
313
|
+
case "InternalServerException":
|
|
314
|
+
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
315
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
316
|
+
case "ResourceNotFoundException":
|
|
317
|
+
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
318
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
319
|
+
case "ValidationException":
|
|
320
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
321
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
322
|
+
default:
|
|
323
|
+
const parsedBody = parsedOutput.body;
|
|
324
|
+
throwDefaultError({
|
|
325
|
+
output,
|
|
326
|
+
parsedBody,
|
|
327
|
+
exceptionCtor: __BaseException,
|
|
328
|
+
errorCode,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
export const deserializeAws_json1_1ListDatabasesCommand = async (output, context) => {
|
|
333
|
+
if (output.statusCode >= 300) {
|
|
334
|
+
return deserializeAws_json1_1ListDatabasesCommandError(output, context);
|
|
335
|
+
}
|
|
336
|
+
const data = await parseBody(output.body, context);
|
|
337
|
+
let contents = {};
|
|
338
|
+
contents = deserializeAws_json1_1ListDatabasesResponse(data, context);
|
|
339
|
+
const response = {
|
|
340
|
+
$metadata: deserializeMetadata(output),
|
|
341
|
+
...contents,
|
|
342
|
+
};
|
|
343
|
+
return Promise.resolve(response);
|
|
344
|
+
};
|
|
345
|
+
const deserializeAws_json1_1ListDatabasesCommandError = async (output, context) => {
|
|
346
|
+
const parsedOutput = {
|
|
347
|
+
...output,
|
|
348
|
+
body: await parseErrorBody(output.body, context),
|
|
349
|
+
};
|
|
350
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
351
|
+
switch (errorCode) {
|
|
352
|
+
case "DatabaseConnectionException":
|
|
353
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
354
|
+
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
355
|
+
case "InternalServerException":
|
|
356
|
+
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
357
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
358
|
+
case "ValidationException":
|
|
359
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
360
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
361
|
+
default:
|
|
362
|
+
const parsedBody = parsedOutput.body;
|
|
363
|
+
throwDefaultError({
|
|
364
|
+
output,
|
|
365
|
+
parsedBody,
|
|
366
|
+
exceptionCtor: __BaseException,
|
|
367
|
+
errorCode,
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
export const deserializeAws_json1_1ListSchemasCommand = async (output, context) => {
|
|
372
|
+
if (output.statusCode >= 300) {
|
|
373
|
+
return deserializeAws_json1_1ListSchemasCommandError(output, context);
|
|
374
|
+
}
|
|
375
|
+
const data = await parseBody(output.body, context);
|
|
376
|
+
let contents = {};
|
|
377
|
+
contents = deserializeAws_json1_1ListSchemasResponse(data, context);
|
|
378
|
+
const response = {
|
|
379
|
+
$metadata: deserializeMetadata(output),
|
|
380
|
+
...contents,
|
|
381
|
+
};
|
|
382
|
+
return Promise.resolve(response);
|
|
383
|
+
};
|
|
384
|
+
const deserializeAws_json1_1ListSchemasCommandError = async (output, context) => {
|
|
385
|
+
const parsedOutput = {
|
|
386
|
+
...output,
|
|
387
|
+
body: await parseErrorBody(output.body, context),
|
|
388
|
+
};
|
|
389
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
390
|
+
switch (errorCode) {
|
|
391
|
+
case "DatabaseConnectionException":
|
|
392
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
393
|
+
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
394
|
+
case "InternalServerException":
|
|
395
|
+
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
396
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
397
|
+
case "ValidationException":
|
|
398
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
399
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
400
|
+
default:
|
|
401
|
+
const parsedBody = parsedOutput.body;
|
|
402
|
+
throwDefaultError({
|
|
403
|
+
output,
|
|
404
|
+
parsedBody,
|
|
405
|
+
exceptionCtor: __BaseException,
|
|
406
|
+
errorCode,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
export const deserializeAws_json1_1ListStatementsCommand = async (output, context) => {
|
|
411
|
+
if (output.statusCode >= 300) {
|
|
412
|
+
return deserializeAws_json1_1ListStatementsCommandError(output, context);
|
|
413
|
+
}
|
|
414
|
+
const data = await parseBody(output.body, context);
|
|
415
|
+
let contents = {};
|
|
416
|
+
contents = deserializeAws_json1_1ListStatementsResponse(data, context);
|
|
417
|
+
const response = {
|
|
418
|
+
$metadata: deserializeMetadata(output),
|
|
419
|
+
...contents,
|
|
420
|
+
};
|
|
421
|
+
return Promise.resolve(response);
|
|
422
|
+
};
|
|
423
|
+
const deserializeAws_json1_1ListStatementsCommandError = async (output, context) => {
|
|
424
|
+
const parsedOutput = {
|
|
425
|
+
...output,
|
|
426
|
+
body: await parseErrorBody(output.body, context),
|
|
427
|
+
};
|
|
428
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
429
|
+
switch (errorCode) {
|
|
430
|
+
case "InternalServerException":
|
|
431
|
+
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
432
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
433
|
+
case "ValidationException":
|
|
434
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
435
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
436
|
+
default:
|
|
437
|
+
const parsedBody = parsedOutput.body;
|
|
438
|
+
throwDefaultError({
|
|
439
|
+
output,
|
|
440
|
+
parsedBody,
|
|
441
|
+
exceptionCtor: __BaseException,
|
|
442
|
+
errorCode,
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
export const deserializeAws_json1_1ListTablesCommand = async (output, context) => {
|
|
447
|
+
if (output.statusCode >= 300) {
|
|
448
|
+
return deserializeAws_json1_1ListTablesCommandError(output, context);
|
|
449
|
+
}
|
|
450
|
+
const data = await parseBody(output.body, context);
|
|
451
|
+
let contents = {};
|
|
452
|
+
contents = deserializeAws_json1_1ListTablesResponse(data, context);
|
|
453
|
+
const response = {
|
|
454
|
+
$metadata: deserializeMetadata(output),
|
|
455
|
+
...contents,
|
|
456
|
+
};
|
|
457
|
+
return Promise.resolve(response);
|
|
458
|
+
};
|
|
459
|
+
const deserializeAws_json1_1ListTablesCommandError = async (output, context) => {
|
|
460
|
+
const parsedOutput = {
|
|
461
|
+
...output,
|
|
462
|
+
body: await parseErrorBody(output.body, context),
|
|
463
|
+
};
|
|
464
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
465
|
+
switch (errorCode) {
|
|
466
|
+
case "DatabaseConnectionException":
|
|
467
|
+
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
468
|
+
throw await deserializeAws_json1_1DatabaseConnectionExceptionResponse(parsedOutput, context);
|
|
469
|
+
case "InternalServerException":
|
|
470
|
+
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
471
|
+
throw await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context);
|
|
472
|
+
case "ValidationException":
|
|
473
|
+
case "com.amazonaws.redshiftdata#ValidationException":
|
|
474
|
+
throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
|
|
475
|
+
default:
|
|
476
|
+
const parsedBody = parsedOutput.body;
|
|
477
|
+
throwDefaultError({
|
|
478
|
+
output,
|
|
479
|
+
parsedBody,
|
|
480
|
+
exceptionCtor: __BaseException,
|
|
481
|
+
errorCode,
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
const deserializeAws_json1_1ActiveStatementsExceededExceptionResponse = async (parsedOutput, context) => {
|
|
486
|
+
const body = parsedOutput.body;
|
|
487
|
+
const deserialized = deserializeAws_json1_1ActiveStatementsExceededException(body, context);
|
|
488
|
+
const exception = new ActiveStatementsExceededException({
|
|
489
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
490
|
+
...deserialized,
|
|
713
491
|
});
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
492
|
+
return __decorateServiceException(exception, body);
|
|
493
|
+
};
|
|
494
|
+
const deserializeAws_json1_1BatchExecuteStatementExceptionResponse = async (parsedOutput, context) => {
|
|
495
|
+
const body = parsedOutput.body;
|
|
496
|
+
const deserialized = deserializeAws_json1_1BatchExecuteStatementException(body, context);
|
|
497
|
+
const exception = new BatchExecuteStatementException({
|
|
498
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
499
|
+
...deserialized,
|
|
722
500
|
});
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
501
|
+
return __decorateServiceException(exception, body);
|
|
502
|
+
};
|
|
503
|
+
const deserializeAws_json1_1DatabaseConnectionExceptionResponse = async (parsedOutput, context) => {
|
|
504
|
+
const body = parsedOutput.body;
|
|
505
|
+
const deserialized = deserializeAws_json1_1DatabaseConnectionException(body, context);
|
|
506
|
+
const exception = new DatabaseConnectionException({
|
|
507
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
508
|
+
...deserialized,
|
|
731
509
|
});
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
510
|
+
return __decorateServiceException(exception, body);
|
|
511
|
+
};
|
|
512
|
+
const deserializeAws_json1_1ExecuteStatementExceptionResponse = async (parsedOutput, context) => {
|
|
513
|
+
const body = parsedOutput.body;
|
|
514
|
+
const deserialized = deserializeAws_json1_1ExecuteStatementException(body, context);
|
|
515
|
+
const exception = new ExecuteStatementException({
|
|
516
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
517
|
+
...deserialized,
|
|
740
518
|
});
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
519
|
+
return __decorateServiceException(exception, body);
|
|
520
|
+
};
|
|
521
|
+
const deserializeAws_json1_1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
522
|
+
const body = parsedOutput.body;
|
|
523
|
+
const deserialized = deserializeAws_json1_1InternalServerException(body, context);
|
|
524
|
+
const exception = new InternalServerException({
|
|
525
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
526
|
+
...deserialized,
|
|
749
527
|
});
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
528
|
+
return __decorateServiceException(exception, body);
|
|
529
|
+
};
|
|
530
|
+
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
531
|
+
const body = parsedOutput.body;
|
|
532
|
+
const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
533
|
+
const exception = new ResourceNotFoundException({
|
|
534
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
535
|
+
...deserialized,
|
|
758
536
|
});
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
537
|
+
return __decorateServiceException(exception, body);
|
|
538
|
+
};
|
|
539
|
+
const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
540
|
+
const body = parsedOutput.body;
|
|
541
|
+
const deserialized = deserializeAws_json1_1ValidationException(body, context);
|
|
542
|
+
const exception = new ValidationException({
|
|
543
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
544
|
+
...deserialized,
|
|
767
545
|
});
|
|
768
|
-
|
|
769
|
-
var serializeAws_json1_1BatchExecuteStatementInput = function (input, context) {
|
|
770
|
-
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier })), (input.Database != null && { Database: input.Database })), (input.DbUser != null && { DbUser: input.DbUser })), (input.SecretArn != null && { SecretArn: input.SecretArn })), (input.Sqls != null && { Sqls: serializeAws_json1_1SqlList(input.Sqls, context) })), (input.StatementName != null && { StatementName: input.StatementName })), (input.WithEvent != null && { WithEvent: input.WithEvent })), (input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }));
|
|
546
|
+
return __decorateServiceException(exception, body);
|
|
771
547
|
};
|
|
772
|
-
|
|
773
|
-
return
|
|
548
|
+
const serializeAws_json1_1BatchExecuteStatementInput = (input, context) => {
|
|
549
|
+
return {
|
|
550
|
+
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
551
|
+
...(input.Database != null && { Database: input.Database }),
|
|
552
|
+
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
553
|
+
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
554
|
+
...(input.Sqls != null && { Sqls: serializeAws_json1_1SqlList(input.Sqls, context) }),
|
|
555
|
+
...(input.StatementName != null && { StatementName: input.StatementName }),
|
|
556
|
+
...(input.WithEvent != null && { WithEvent: input.WithEvent }),
|
|
557
|
+
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
558
|
+
};
|
|
774
559
|
};
|
|
775
|
-
|
|
776
|
-
return
|
|
560
|
+
const serializeAws_json1_1CancelStatementRequest = (input, context) => {
|
|
561
|
+
return {
|
|
562
|
+
...(input.Id != null && { Id: input.Id }),
|
|
563
|
+
};
|
|
777
564
|
};
|
|
778
|
-
|
|
779
|
-
return
|
|
565
|
+
const serializeAws_json1_1DescribeStatementRequest = (input, context) => {
|
|
566
|
+
return {
|
|
567
|
+
...(input.Id != null && { Id: input.Id }),
|
|
568
|
+
};
|
|
780
569
|
};
|
|
781
|
-
|
|
782
|
-
return
|
|
570
|
+
const serializeAws_json1_1DescribeTableRequest = (input, context) => {
|
|
571
|
+
return {
|
|
572
|
+
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
573
|
+
...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
574
|
+
...(input.Database != null && { Database: input.Database }),
|
|
575
|
+
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
576
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
577
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
578
|
+
...(input.Schema != null && { Schema: input.Schema }),
|
|
579
|
+
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
580
|
+
...(input.Table != null && { Table: input.Table }),
|
|
581
|
+
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
582
|
+
};
|
|
783
583
|
};
|
|
784
|
-
|
|
785
|
-
return
|
|
584
|
+
const serializeAws_json1_1ExecuteStatementInput = (input, context) => {
|
|
585
|
+
return {
|
|
586
|
+
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
587
|
+
...(input.Database != null && { Database: input.Database }),
|
|
588
|
+
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
589
|
+
...(input.Parameters != null && { Parameters: serializeAws_json1_1SqlParametersList(input.Parameters, context) }),
|
|
590
|
+
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
591
|
+
...(input.Sql != null && { Sql: input.Sql }),
|
|
592
|
+
...(input.StatementName != null && { StatementName: input.StatementName }),
|
|
593
|
+
...(input.WithEvent != null && { WithEvent: input.WithEvent }),
|
|
594
|
+
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
595
|
+
};
|
|
786
596
|
};
|
|
787
|
-
|
|
788
|
-
return
|
|
597
|
+
const serializeAws_json1_1GetStatementResultRequest = (input, context) => {
|
|
598
|
+
return {
|
|
599
|
+
...(input.Id != null && { Id: input.Id }),
|
|
600
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
601
|
+
};
|
|
789
602
|
};
|
|
790
|
-
|
|
791
|
-
return
|
|
603
|
+
const serializeAws_json1_1ListDatabasesRequest = (input, context) => {
|
|
604
|
+
return {
|
|
605
|
+
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
606
|
+
...(input.Database != null && { Database: input.Database }),
|
|
607
|
+
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
608
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
609
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
610
|
+
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
611
|
+
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
612
|
+
};
|
|
792
613
|
};
|
|
793
|
-
|
|
794
|
-
return
|
|
614
|
+
const serializeAws_json1_1ListSchemasRequest = (input, context) => {
|
|
615
|
+
return {
|
|
616
|
+
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
617
|
+
...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
618
|
+
...(input.Database != null && { Database: input.Database }),
|
|
619
|
+
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
620
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
621
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
622
|
+
...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }),
|
|
623
|
+
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
624
|
+
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
625
|
+
};
|
|
795
626
|
};
|
|
796
|
-
|
|
797
|
-
return
|
|
627
|
+
const serializeAws_json1_1ListStatementsRequest = (input, context) => {
|
|
628
|
+
return {
|
|
629
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
630
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
631
|
+
...(input.RoleLevel != null && { RoleLevel: input.RoleLevel }),
|
|
632
|
+
...(input.StatementName != null && { StatementName: input.StatementName }),
|
|
633
|
+
...(input.Status != null && { Status: input.Status }),
|
|
634
|
+
};
|
|
798
635
|
};
|
|
799
|
-
|
|
636
|
+
const serializeAws_json1_1ListTablesRequest = (input, context) => {
|
|
637
|
+
return {
|
|
638
|
+
...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }),
|
|
639
|
+
...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }),
|
|
640
|
+
...(input.Database != null && { Database: input.Database }),
|
|
641
|
+
...(input.DbUser != null && { DbUser: input.DbUser }),
|
|
642
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
643
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
644
|
+
...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }),
|
|
645
|
+
...(input.SecretArn != null && { SecretArn: input.SecretArn }),
|
|
646
|
+
...(input.TablePattern != null && { TablePattern: input.TablePattern }),
|
|
647
|
+
...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }),
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
const serializeAws_json1_1SqlList = (input, context) => {
|
|
800
651
|
return input
|
|
801
|
-
.filter(
|
|
802
|
-
.map(
|
|
652
|
+
.filter((e) => e != null)
|
|
653
|
+
.map((entry) => {
|
|
803
654
|
return entry;
|
|
804
655
|
});
|
|
805
656
|
};
|
|
806
|
-
|
|
807
|
-
return
|
|
657
|
+
const serializeAws_json1_1SqlParameter = (input, context) => {
|
|
658
|
+
return {
|
|
659
|
+
...(input.name != null && { name: input.name }),
|
|
660
|
+
...(input.value != null && { value: input.value }),
|
|
661
|
+
};
|
|
808
662
|
};
|
|
809
|
-
|
|
663
|
+
const serializeAws_json1_1SqlParametersList = (input, context) => {
|
|
810
664
|
return input
|
|
811
|
-
.filter(
|
|
812
|
-
.map(
|
|
665
|
+
.filter((e) => e != null)
|
|
666
|
+
.map((entry) => {
|
|
813
667
|
return serializeAws_json1_1SqlParameter(entry, context);
|
|
814
668
|
});
|
|
815
669
|
};
|
|
816
|
-
|
|
670
|
+
const deserializeAws_json1_1ActiveStatementsExceededException = (output, context) => {
|
|
817
671
|
return {
|
|
818
672
|
Message: __expectString(output.Message),
|
|
819
673
|
};
|
|
820
674
|
};
|
|
821
|
-
|
|
675
|
+
const deserializeAws_json1_1BatchExecuteStatementException = (output, context) => {
|
|
822
676
|
return {
|
|
823
677
|
Message: __expectString(output.Message),
|
|
824
678
|
StatementId: __expectString(output.StatementId),
|
|
825
679
|
};
|
|
826
680
|
};
|
|
827
|
-
|
|
681
|
+
const deserializeAws_json1_1BatchExecuteStatementOutput = (output, context) => {
|
|
828
682
|
return {
|
|
829
683
|
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
830
684
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
@@ -835,15 +689,15 @@ var deserializeAws_json1_1BatchExecuteStatementOutput = function (output, contex
|
|
|
835
689
|
WorkgroupName: __expectString(output.WorkgroupName),
|
|
836
690
|
};
|
|
837
691
|
};
|
|
838
|
-
|
|
692
|
+
const deserializeAws_json1_1CancelStatementResponse = (output, context) => {
|
|
839
693
|
return {
|
|
840
694
|
Status: __expectBoolean(output.Status),
|
|
841
695
|
};
|
|
842
696
|
};
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
.filter(
|
|
846
|
-
.map(
|
|
697
|
+
const deserializeAws_json1_1ColumnList = (output, context) => {
|
|
698
|
+
const retVal = (output || [])
|
|
699
|
+
.filter((e) => e != null)
|
|
700
|
+
.map((entry) => {
|
|
847
701
|
if (entry === null) {
|
|
848
702
|
return null;
|
|
849
703
|
}
|
|
@@ -851,7 +705,7 @@ var deserializeAws_json1_1ColumnList = function (output, context) {
|
|
|
851
705
|
});
|
|
852
706
|
return retVal;
|
|
853
707
|
};
|
|
854
|
-
|
|
708
|
+
const deserializeAws_json1_1ColumnMetadata = (output, context) => {
|
|
855
709
|
return {
|
|
856
710
|
columnDefault: __expectString(output.columnDefault),
|
|
857
711
|
isCaseSensitive: __expectBoolean(output.isCaseSensitive),
|
|
@@ -868,10 +722,10 @@ var deserializeAws_json1_1ColumnMetadata = function (output, context) {
|
|
|
868
722
|
typeName: __expectString(output.typeName),
|
|
869
723
|
};
|
|
870
724
|
};
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
.filter(
|
|
874
|
-
.map(
|
|
725
|
+
const deserializeAws_json1_1ColumnMetadataList = (output, context) => {
|
|
726
|
+
const retVal = (output || [])
|
|
727
|
+
.filter((e) => e != null)
|
|
728
|
+
.map((entry) => {
|
|
875
729
|
if (entry === null) {
|
|
876
730
|
return null;
|
|
877
731
|
}
|
|
@@ -879,15 +733,15 @@ var deserializeAws_json1_1ColumnMetadataList = function (output, context) {
|
|
|
879
733
|
});
|
|
880
734
|
return retVal;
|
|
881
735
|
};
|
|
882
|
-
|
|
736
|
+
const deserializeAws_json1_1DatabaseConnectionException = (output, context) => {
|
|
883
737
|
return {
|
|
884
738
|
Message: __expectString(output.Message),
|
|
885
739
|
};
|
|
886
740
|
};
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
.filter(
|
|
890
|
-
.map(
|
|
741
|
+
const deserializeAws_json1_1DatabaseList = (output, context) => {
|
|
742
|
+
const retVal = (output || [])
|
|
743
|
+
.filter((e) => e != null)
|
|
744
|
+
.map((entry) => {
|
|
891
745
|
if (entry === null) {
|
|
892
746
|
return null;
|
|
893
747
|
}
|
|
@@ -895,7 +749,7 @@ var deserializeAws_json1_1DatabaseList = function (output, context) {
|
|
|
895
749
|
});
|
|
896
750
|
return retVal;
|
|
897
751
|
};
|
|
898
|
-
|
|
752
|
+
const deserializeAws_json1_1DescribeStatementResponse = (output, context) => {
|
|
899
753
|
return {
|
|
900
754
|
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
901
755
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
@@ -920,20 +774,20 @@ var deserializeAws_json1_1DescribeStatementResponse = function (output, context)
|
|
|
920
774
|
WorkgroupName: __expectString(output.WorkgroupName),
|
|
921
775
|
};
|
|
922
776
|
};
|
|
923
|
-
|
|
777
|
+
const deserializeAws_json1_1DescribeTableResponse = (output, context) => {
|
|
924
778
|
return {
|
|
925
779
|
ColumnList: output.ColumnList != null ? deserializeAws_json1_1ColumnList(output.ColumnList, context) : undefined,
|
|
926
780
|
NextToken: __expectString(output.NextToken),
|
|
927
781
|
TableName: __expectString(output.TableName),
|
|
928
782
|
};
|
|
929
783
|
};
|
|
930
|
-
|
|
784
|
+
const deserializeAws_json1_1ExecuteStatementException = (output, context) => {
|
|
931
785
|
return {
|
|
932
786
|
Message: __expectString(output.Message),
|
|
933
787
|
StatementId: __expectString(output.StatementId),
|
|
934
788
|
};
|
|
935
789
|
};
|
|
936
|
-
|
|
790
|
+
const deserializeAws_json1_1ExecuteStatementOutput = (output, context) => {
|
|
937
791
|
return {
|
|
938
792
|
ClusterIdentifier: __expectString(output.ClusterIdentifier),
|
|
939
793
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
@@ -944,7 +798,7 @@ var deserializeAws_json1_1ExecuteStatementOutput = function (output, context) {
|
|
|
944
798
|
WorkgroupName: __expectString(output.WorkgroupName),
|
|
945
799
|
};
|
|
946
800
|
};
|
|
947
|
-
|
|
801
|
+
const deserializeAws_json1_1Field = (output, context) => {
|
|
948
802
|
if (output.blobValue != null) {
|
|
949
803
|
return {
|
|
950
804
|
blobValue: context.base64Decoder(output.blobValue),
|
|
@@ -967,10 +821,10 @@ var deserializeAws_json1_1Field = function (output, context) {
|
|
|
967
821
|
}
|
|
968
822
|
return { $unknown: Object.entries(output)[0] };
|
|
969
823
|
};
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
.filter(
|
|
973
|
-
.map(
|
|
824
|
+
const deserializeAws_json1_1FieldList = (output, context) => {
|
|
825
|
+
const retVal = (output || [])
|
|
826
|
+
.filter((e) => e != null)
|
|
827
|
+
.map((entry) => {
|
|
974
828
|
if (entry === null) {
|
|
975
829
|
return null;
|
|
976
830
|
}
|
|
@@ -978,7 +832,7 @@ var deserializeAws_json1_1FieldList = function (output, context) {
|
|
|
978
832
|
});
|
|
979
833
|
return retVal;
|
|
980
834
|
};
|
|
981
|
-
|
|
835
|
+
const deserializeAws_json1_1GetStatementResultResponse = (output, context) => {
|
|
982
836
|
return {
|
|
983
837
|
ColumnMetadata: output.ColumnMetadata != null
|
|
984
838
|
? deserializeAws_json1_1ColumnMetadataList(output.ColumnMetadata, context)
|
|
@@ -988,45 +842,45 @@ var deserializeAws_json1_1GetStatementResultResponse = function (output, context
|
|
|
988
842
|
TotalNumRows: __expectLong(output.TotalNumRows),
|
|
989
843
|
};
|
|
990
844
|
};
|
|
991
|
-
|
|
845
|
+
const deserializeAws_json1_1InternalServerException = (output, context) => {
|
|
992
846
|
return {
|
|
993
847
|
Message: __expectString(output.Message),
|
|
994
848
|
};
|
|
995
849
|
};
|
|
996
|
-
|
|
850
|
+
const deserializeAws_json1_1ListDatabasesResponse = (output, context) => {
|
|
997
851
|
return {
|
|
998
852
|
Databases: output.Databases != null ? deserializeAws_json1_1DatabaseList(output.Databases, context) : undefined,
|
|
999
853
|
NextToken: __expectString(output.NextToken),
|
|
1000
854
|
};
|
|
1001
855
|
};
|
|
1002
|
-
|
|
856
|
+
const deserializeAws_json1_1ListSchemasResponse = (output, context) => {
|
|
1003
857
|
return {
|
|
1004
858
|
NextToken: __expectString(output.NextToken),
|
|
1005
859
|
Schemas: output.Schemas != null ? deserializeAws_json1_1SchemaList(output.Schemas, context) : undefined,
|
|
1006
860
|
};
|
|
1007
861
|
};
|
|
1008
|
-
|
|
862
|
+
const deserializeAws_json1_1ListStatementsResponse = (output, context) => {
|
|
1009
863
|
return {
|
|
1010
864
|
NextToken: __expectString(output.NextToken),
|
|
1011
865
|
Statements: output.Statements != null ? deserializeAws_json1_1StatementList(output.Statements, context) : undefined,
|
|
1012
866
|
};
|
|
1013
867
|
};
|
|
1014
|
-
|
|
868
|
+
const deserializeAws_json1_1ListTablesResponse = (output, context) => {
|
|
1015
869
|
return {
|
|
1016
870
|
NextToken: __expectString(output.NextToken),
|
|
1017
871
|
Tables: output.Tables != null ? deserializeAws_json1_1TableList(output.Tables, context) : undefined,
|
|
1018
872
|
};
|
|
1019
873
|
};
|
|
1020
|
-
|
|
874
|
+
const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
|
|
1021
875
|
return {
|
|
1022
876
|
Message: __expectString(output.Message),
|
|
1023
877
|
ResourceId: __expectString(output.ResourceId),
|
|
1024
878
|
};
|
|
1025
879
|
};
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
.filter(
|
|
1029
|
-
.map(
|
|
880
|
+
const deserializeAws_json1_1SchemaList = (output, context) => {
|
|
881
|
+
const retVal = (output || [])
|
|
882
|
+
.filter((e) => e != null)
|
|
883
|
+
.map((entry) => {
|
|
1030
884
|
if (entry === null) {
|
|
1031
885
|
return null;
|
|
1032
886
|
}
|
|
@@ -1034,16 +888,16 @@ var deserializeAws_json1_1SchemaList = function (output, context) {
|
|
|
1034
888
|
});
|
|
1035
889
|
return retVal;
|
|
1036
890
|
};
|
|
1037
|
-
|
|
891
|
+
const deserializeAws_json1_1SqlParameter = (output, context) => {
|
|
1038
892
|
return {
|
|
1039
893
|
name: __expectString(output.name),
|
|
1040
894
|
value: __expectString(output.value),
|
|
1041
895
|
};
|
|
1042
896
|
};
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
.filter(
|
|
1046
|
-
.map(
|
|
897
|
+
const deserializeAws_json1_1SqlParametersList = (output, context) => {
|
|
898
|
+
const retVal = (output || [])
|
|
899
|
+
.filter((e) => e != null)
|
|
900
|
+
.map((entry) => {
|
|
1047
901
|
if (entry === null) {
|
|
1048
902
|
return null;
|
|
1049
903
|
}
|
|
@@ -1051,10 +905,10 @@ var deserializeAws_json1_1SqlParametersList = function (output, context) {
|
|
|
1051
905
|
});
|
|
1052
906
|
return retVal;
|
|
1053
907
|
};
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
.filter(
|
|
1057
|
-
.map(
|
|
908
|
+
const deserializeAws_json1_1SqlRecords = (output, context) => {
|
|
909
|
+
const retVal = (output || [])
|
|
910
|
+
.filter((e) => e != null)
|
|
911
|
+
.map((entry) => {
|
|
1058
912
|
if (entry === null) {
|
|
1059
913
|
return null;
|
|
1060
914
|
}
|
|
@@ -1062,7 +916,7 @@ var deserializeAws_json1_1SqlRecords = function (output, context) {
|
|
|
1062
916
|
});
|
|
1063
917
|
return retVal;
|
|
1064
918
|
};
|
|
1065
|
-
|
|
919
|
+
const deserializeAws_json1_1StatementData = (output, context) => {
|
|
1066
920
|
return {
|
|
1067
921
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
1068
922
|
Id: __expectString(output.Id),
|
|
@@ -1078,10 +932,10 @@ var deserializeAws_json1_1StatementData = function (output, context) {
|
|
|
1078
932
|
UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
|
|
1079
933
|
};
|
|
1080
934
|
};
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
.filter(
|
|
1084
|
-
.map(
|
|
935
|
+
const deserializeAws_json1_1StatementList = (output, context) => {
|
|
936
|
+
const retVal = (output || [])
|
|
937
|
+
.filter((e) => e != null)
|
|
938
|
+
.map((entry) => {
|
|
1085
939
|
if (entry === null) {
|
|
1086
940
|
return null;
|
|
1087
941
|
}
|
|
@@ -1089,10 +943,10 @@ var deserializeAws_json1_1StatementList = function (output, context) {
|
|
|
1089
943
|
});
|
|
1090
944
|
return retVal;
|
|
1091
945
|
};
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
.filter(
|
|
1095
|
-
.map(
|
|
946
|
+
const deserializeAws_json1_1StatementStringList = (output, context) => {
|
|
947
|
+
const retVal = (output || [])
|
|
948
|
+
.filter((e) => e != null)
|
|
949
|
+
.map((entry) => {
|
|
1096
950
|
if (entry === null) {
|
|
1097
951
|
return null;
|
|
1098
952
|
}
|
|
@@ -1100,7 +954,7 @@ var deserializeAws_json1_1StatementStringList = function (output, context) {
|
|
|
1100
954
|
});
|
|
1101
955
|
return retVal;
|
|
1102
956
|
};
|
|
1103
|
-
|
|
957
|
+
const deserializeAws_json1_1SubStatementData = (output, context) => {
|
|
1104
958
|
return {
|
|
1105
959
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
1106
960
|
Duration: __expectLong(output.Duration),
|
|
@@ -1115,10 +969,10 @@ var deserializeAws_json1_1SubStatementData = function (output, context) {
|
|
|
1115
969
|
UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
|
|
1116
970
|
};
|
|
1117
971
|
};
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
.filter(
|
|
1121
|
-
.map(
|
|
972
|
+
const deserializeAws_json1_1SubStatementList = (output, context) => {
|
|
973
|
+
const retVal = (output || [])
|
|
974
|
+
.filter((e) => e != null)
|
|
975
|
+
.map((entry) => {
|
|
1122
976
|
if (entry === null) {
|
|
1123
977
|
return null;
|
|
1124
978
|
}
|
|
@@ -1126,10 +980,10 @@ var deserializeAws_json1_1SubStatementList = function (output, context) {
|
|
|
1126
980
|
});
|
|
1127
981
|
return retVal;
|
|
1128
982
|
};
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
.filter(
|
|
1132
|
-
.map(
|
|
983
|
+
const deserializeAws_json1_1TableList = (output, context) => {
|
|
984
|
+
const retVal = (output || [])
|
|
985
|
+
.filter((e) => e != null)
|
|
986
|
+
.map((entry) => {
|
|
1133
987
|
if (entry === null) {
|
|
1134
988
|
return null;
|
|
1135
989
|
}
|
|
@@ -1137,87 +991,64 @@ var deserializeAws_json1_1TableList = function (output, context) {
|
|
|
1137
991
|
});
|
|
1138
992
|
return retVal;
|
|
1139
993
|
};
|
|
1140
|
-
|
|
994
|
+
const deserializeAws_json1_1TableMember = (output, context) => {
|
|
1141
995
|
return {
|
|
1142
996
|
name: __expectString(output.name),
|
|
1143
997
|
schema: __expectString(output.schema),
|
|
1144
998
|
type: __expectString(output.type),
|
|
1145
999
|
};
|
|
1146
1000
|
};
|
|
1147
|
-
|
|
1001
|
+
const deserializeAws_json1_1ValidationException = (output, context) => {
|
|
1148
1002
|
return {
|
|
1149
1003
|
Message: __expectString(output.Message),
|
|
1150
1004
|
};
|
|
1151
1005
|
};
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
});
|
|
1160
|
-
};
|
|
1161
|
-
var collectBody = function (streamBody, context) {
|
|
1162
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1006
|
+
const deserializeMetadata = (output) => ({
|
|
1007
|
+
httpStatusCode: output.statusCode,
|
|
1008
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1009
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1010
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1011
|
+
});
|
|
1012
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1163
1013
|
if (streamBody instanceof Uint8Array) {
|
|
1164
1014
|
return Promise.resolve(streamBody);
|
|
1165
1015
|
}
|
|
1166
1016
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1167
1017
|
};
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
};
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
if (resolvedHostname !== undefined) {
|
|
1187
|
-
contents.hostname = resolvedHostname;
|
|
1188
|
-
}
|
|
1189
|
-
if (body !== undefined) {
|
|
1190
|
-
contents.body = body;
|
|
1191
|
-
}
|
|
1192
|
-
return [2, new __HttpRequest(contents)];
|
|
1193
|
-
}
|
|
1194
|
-
});
|
|
1195
|
-
}); };
|
|
1196
|
-
var parseBody = function (streamBody, context) {
|
|
1197
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1198
|
-
if (encoded.length) {
|
|
1199
|
-
return JSON.parse(encoded);
|
|
1200
|
-
}
|
|
1201
|
-
return {};
|
|
1202
|
-
});
|
|
1018
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1019
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1020
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1021
|
+
const contents = {
|
|
1022
|
+
protocol,
|
|
1023
|
+
hostname,
|
|
1024
|
+
port,
|
|
1025
|
+
method: "POST",
|
|
1026
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1027
|
+
headers,
|
|
1028
|
+
};
|
|
1029
|
+
if (resolvedHostname !== undefined) {
|
|
1030
|
+
contents.hostname = resolvedHostname;
|
|
1031
|
+
}
|
|
1032
|
+
if (body !== undefined) {
|
|
1033
|
+
contents.body = body;
|
|
1034
|
+
}
|
|
1035
|
+
return new __HttpRequest(contents);
|
|
1203
1036
|
};
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1220
|
-
var cleanValue = rawValue;
|
|
1037
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1038
|
+
if (encoded.length) {
|
|
1039
|
+
return JSON.parse(encoded);
|
|
1040
|
+
}
|
|
1041
|
+
return {};
|
|
1042
|
+
});
|
|
1043
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1044
|
+
const value = await parseBody(errorBody, context);
|
|
1045
|
+
value.message = value.message ?? value.Message;
|
|
1046
|
+
return value;
|
|
1047
|
+
};
|
|
1048
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1049
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1050
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1051
|
+
let cleanValue = rawValue;
|
|
1221
1052
|
if (typeof cleanValue === "number") {
|
|
1222
1053
|
cleanValue = cleanValue.toString();
|
|
1223
1054
|
}
|
|
@@ -1232,7 +1063,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1232
1063
|
}
|
|
1233
1064
|
return cleanValue;
|
|
1234
1065
|
};
|
|
1235
|
-
|
|
1066
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1236
1067
|
if (headerKey !== undefined) {
|
|
1237
1068
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1238
1069
|
}
|