@aws-sdk/client-rds-data 3.141.0 → 3.142.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 +11 -0
- package/dist-cjs/protocols/Aws_restJson1.js +82 -130
- package/dist-es/protocols/Aws_restJson1.js +101 -131
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -166,15 +166,14 @@ const deserializeAws_restJson1BatchExecuteStatementCommand = async (output, cont
|
|
|
166
166
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
167
167
|
return deserializeAws_restJson1BatchExecuteStatementCommandError(output, context);
|
|
168
168
|
}
|
|
169
|
-
const contents = {
|
|
169
|
+
const contents = map({
|
|
170
170
|
$metadata: deserializeMetadata(output),
|
|
171
|
-
|
|
172
|
-
};
|
|
171
|
+
});
|
|
173
172
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
174
|
-
if (data.updateResults
|
|
173
|
+
if (data.updateResults != null) {
|
|
175
174
|
contents.updateResults = deserializeAws_restJson1UpdateResults(data.updateResults, context);
|
|
176
175
|
}
|
|
177
|
-
return
|
|
176
|
+
return contents;
|
|
178
177
|
};
|
|
179
178
|
exports.deserializeAws_restJson1BatchExecuteStatementCommand = deserializeAws_restJson1BatchExecuteStatementCommand;
|
|
180
179
|
const deserializeAws_restJson1BatchExecuteStatementCommandError = async (output, context) => {
|
|
@@ -182,7 +181,6 @@ const deserializeAws_restJson1BatchExecuteStatementCommandError = async (output,
|
|
|
182
181
|
...output,
|
|
183
182
|
body: await parseBody(output.body, context),
|
|
184
183
|
};
|
|
185
|
-
let response;
|
|
186
184
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
187
185
|
switch (errorCode) {
|
|
188
186
|
case "AccessDeniedException":
|
|
@@ -205,29 +203,26 @@ const deserializeAws_restJson1BatchExecuteStatementCommandError = async (output,
|
|
|
205
203
|
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
206
204
|
default:
|
|
207
205
|
const parsedBody = parsedOutput.body;
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
$metadata,
|
|
206
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
207
|
+
output,
|
|
208
|
+
parsedBody,
|
|
209
|
+
exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
|
|
210
|
+
errorCode,
|
|
214
211
|
});
|
|
215
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
216
212
|
}
|
|
217
213
|
};
|
|
218
214
|
const deserializeAws_restJson1BeginTransactionCommand = async (output, context) => {
|
|
219
215
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
220
216
|
return deserializeAws_restJson1BeginTransactionCommandError(output, context);
|
|
221
217
|
}
|
|
222
|
-
const contents = {
|
|
218
|
+
const contents = map({
|
|
223
219
|
$metadata: deserializeMetadata(output),
|
|
224
|
-
|
|
225
|
-
};
|
|
220
|
+
});
|
|
226
221
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
227
|
-
if (data.transactionId
|
|
222
|
+
if (data.transactionId != null) {
|
|
228
223
|
contents.transactionId = (0, smithy_client_1.expectString)(data.transactionId);
|
|
229
224
|
}
|
|
230
|
-
return
|
|
225
|
+
return contents;
|
|
231
226
|
};
|
|
232
227
|
exports.deserializeAws_restJson1BeginTransactionCommand = deserializeAws_restJson1BeginTransactionCommand;
|
|
233
228
|
const deserializeAws_restJson1BeginTransactionCommandError = async (output, context) => {
|
|
@@ -235,7 +230,6 @@ const deserializeAws_restJson1BeginTransactionCommandError = async (output, cont
|
|
|
235
230
|
...output,
|
|
236
231
|
body: await parseBody(output.body, context),
|
|
237
232
|
};
|
|
238
|
-
let response;
|
|
239
233
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
240
234
|
switch (errorCode) {
|
|
241
235
|
case "AccessDeniedException":
|
|
@@ -258,29 +252,26 @@ const deserializeAws_restJson1BeginTransactionCommandError = async (output, cont
|
|
|
258
252
|
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
259
253
|
default:
|
|
260
254
|
const parsedBody = parsedOutput.body;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
$metadata,
|
|
255
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
256
|
+
output,
|
|
257
|
+
parsedBody,
|
|
258
|
+
exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
|
|
259
|
+
errorCode,
|
|
267
260
|
});
|
|
268
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
269
261
|
}
|
|
270
262
|
};
|
|
271
263
|
const deserializeAws_restJson1CommitTransactionCommand = async (output, context) => {
|
|
272
264
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
273
265
|
return deserializeAws_restJson1CommitTransactionCommandError(output, context);
|
|
274
266
|
}
|
|
275
|
-
const contents = {
|
|
267
|
+
const contents = map({
|
|
276
268
|
$metadata: deserializeMetadata(output),
|
|
277
|
-
|
|
278
|
-
};
|
|
269
|
+
});
|
|
279
270
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
280
|
-
if (data.transactionStatus
|
|
271
|
+
if (data.transactionStatus != null) {
|
|
281
272
|
contents.transactionStatus = (0, smithy_client_1.expectString)(data.transactionStatus);
|
|
282
273
|
}
|
|
283
|
-
return
|
|
274
|
+
return contents;
|
|
284
275
|
};
|
|
285
276
|
exports.deserializeAws_restJson1CommitTransactionCommand = deserializeAws_restJson1CommitTransactionCommand;
|
|
286
277
|
const deserializeAws_restJson1CommitTransactionCommandError = async (output, context) => {
|
|
@@ -288,7 +279,6 @@ const deserializeAws_restJson1CommitTransactionCommandError = async (output, con
|
|
|
288
279
|
...output,
|
|
289
280
|
body: await parseBody(output.body, context),
|
|
290
281
|
};
|
|
291
|
-
let response;
|
|
292
282
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
293
283
|
switch (errorCode) {
|
|
294
284
|
case "AccessDeniedException":
|
|
@@ -314,29 +304,26 @@ const deserializeAws_restJson1CommitTransactionCommandError = async (output, con
|
|
|
314
304
|
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
315
305
|
default:
|
|
316
306
|
const parsedBody = parsedOutput.body;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
$metadata,
|
|
307
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
308
|
+
output,
|
|
309
|
+
parsedBody,
|
|
310
|
+
exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
|
|
311
|
+
errorCode,
|
|
323
312
|
});
|
|
324
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
325
313
|
}
|
|
326
314
|
};
|
|
327
315
|
const deserializeAws_restJson1ExecuteSqlCommand = async (output, context) => {
|
|
328
316
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
329
317
|
return deserializeAws_restJson1ExecuteSqlCommandError(output, context);
|
|
330
318
|
}
|
|
331
|
-
const contents = {
|
|
319
|
+
const contents = map({
|
|
332
320
|
$metadata: deserializeMetadata(output),
|
|
333
|
-
|
|
334
|
-
};
|
|
321
|
+
});
|
|
335
322
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
336
|
-
if (data.sqlStatementResults
|
|
323
|
+
if (data.sqlStatementResults != null) {
|
|
337
324
|
contents.sqlStatementResults = deserializeAws_restJson1SqlStatementResults(data.sqlStatementResults, context);
|
|
338
325
|
}
|
|
339
|
-
return
|
|
326
|
+
return contents;
|
|
340
327
|
};
|
|
341
328
|
exports.deserializeAws_restJson1ExecuteSqlCommand = deserializeAws_restJson1ExecuteSqlCommand;
|
|
342
329
|
const deserializeAws_restJson1ExecuteSqlCommandError = async (output, context) => {
|
|
@@ -344,7 +331,6 @@ const deserializeAws_restJson1ExecuteSqlCommandError = async (output, context) =
|
|
|
344
331
|
...output,
|
|
345
332
|
body: await parseBody(output.body, context),
|
|
346
333
|
};
|
|
347
|
-
let response;
|
|
348
334
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
349
335
|
switch (errorCode) {
|
|
350
336
|
case "AccessDeniedException":
|
|
@@ -364,45 +350,38 @@ const deserializeAws_restJson1ExecuteSqlCommandError = async (output, context) =
|
|
|
364
350
|
throw await deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context);
|
|
365
351
|
default:
|
|
366
352
|
const parsedBody = parsedOutput.body;
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
$metadata,
|
|
353
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
354
|
+
output,
|
|
355
|
+
parsedBody,
|
|
356
|
+
exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
|
|
357
|
+
errorCode,
|
|
373
358
|
});
|
|
374
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
375
359
|
}
|
|
376
360
|
};
|
|
377
361
|
const deserializeAws_restJson1ExecuteStatementCommand = async (output, context) => {
|
|
378
362
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
379
363
|
return deserializeAws_restJson1ExecuteStatementCommandError(output, context);
|
|
380
364
|
}
|
|
381
|
-
const contents = {
|
|
365
|
+
const contents = map({
|
|
382
366
|
$metadata: deserializeMetadata(output),
|
|
383
|
-
|
|
384
|
-
formattedRecords: undefined,
|
|
385
|
-
generatedFields: undefined,
|
|
386
|
-
numberOfRecordsUpdated: undefined,
|
|
387
|
-
records: undefined,
|
|
388
|
-
};
|
|
367
|
+
});
|
|
389
368
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
390
|
-
if (data.columnMetadata
|
|
369
|
+
if (data.columnMetadata != null) {
|
|
391
370
|
contents.columnMetadata = deserializeAws_restJson1Metadata(data.columnMetadata, context);
|
|
392
371
|
}
|
|
393
|
-
if (data.formattedRecords
|
|
372
|
+
if (data.formattedRecords != null) {
|
|
394
373
|
contents.formattedRecords = (0, smithy_client_1.expectString)(data.formattedRecords);
|
|
395
374
|
}
|
|
396
|
-
if (data.generatedFields
|
|
375
|
+
if (data.generatedFields != null) {
|
|
397
376
|
contents.generatedFields = deserializeAws_restJson1FieldList(data.generatedFields, context);
|
|
398
377
|
}
|
|
399
|
-
if (data.numberOfRecordsUpdated
|
|
378
|
+
if (data.numberOfRecordsUpdated != null) {
|
|
400
379
|
contents.numberOfRecordsUpdated = (0, smithy_client_1.expectLong)(data.numberOfRecordsUpdated);
|
|
401
380
|
}
|
|
402
|
-
if (data.records
|
|
381
|
+
if (data.records != null) {
|
|
403
382
|
contents.records = deserializeAws_restJson1SqlRecords(data.records, context);
|
|
404
383
|
}
|
|
405
|
-
return
|
|
384
|
+
return contents;
|
|
406
385
|
};
|
|
407
386
|
exports.deserializeAws_restJson1ExecuteStatementCommand = deserializeAws_restJson1ExecuteStatementCommand;
|
|
408
387
|
const deserializeAws_restJson1ExecuteStatementCommandError = async (output, context) => {
|
|
@@ -410,7 +389,6 @@ const deserializeAws_restJson1ExecuteStatementCommandError = async (output, cont
|
|
|
410
389
|
...output,
|
|
411
390
|
body: await parseBody(output.body, context),
|
|
412
391
|
};
|
|
413
|
-
let response;
|
|
414
392
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
415
393
|
switch (errorCode) {
|
|
416
394
|
case "AccessDeniedException":
|
|
@@ -433,29 +411,26 @@ const deserializeAws_restJson1ExecuteStatementCommandError = async (output, cont
|
|
|
433
411
|
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
434
412
|
default:
|
|
435
413
|
const parsedBody = parsedOutput.body;
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
$metadata,
|
|
414
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
415
|
+
output,
|
|
416
|
+
parsedBody,
|
|
417
|
+
exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
|
|
418
|
+
errorCode,
|
|
442
419
|
});
|
|
443
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
444
420
|
}
|
|
445
421
|
};
|
|
446
422
|
const deserializeAws_restJson1RollbackTransactionCommand = async (output, context) => {
|
|
447
423
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
448
424
|
return deserializeAws_restJson1RollbackTransactionCommandError(output, context);
|
|
449
425
|
}
|
|
450
|
-
const contents = {
|
|
426
|
+
const contents = map({
|
|
451
427
|
$metadata: deserializeMetadata(output),
|
|
452
|
-
|
|
453
|
-
};
|
|
428
|
+
});
|
|
454
429
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
455
|
-
if (data.transactionStatus
|
|
430
|
+
if (data.transactionStatus != null) {
|
|
456
431
|
contents.transactionStatus = (0, smithy_client_1.expectString)(data.transactionStatus);
|
|
457
432
|
}
|
|
458
|
-
return
|
|
433
|
+
return contents;
|
|
459
434
|
};
|
|
460
435
|
exports.deserializeAws_restJson1RollbackTransactionCommand = deserializeAws_restJson1RollbackTransactionCommand;
|
|
461
436
|
const deserializeAws_restJson1RollbackTransactionCommandError = async (output, context) => {
|
|
@@ -463,7 +438,6 @@ const deserializeAws_restJson1RollbackTransactionCommandError = async (output, c
|
|
|
463
438
|
...output,
|
|
464
439
|
body: await parseBody(output.body, context),
|
|
465
440
|
};
|
|
466
|
-
let response;
|
|
467
441
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
468
442
|
switch (errorCode) {
|
|
469
443
|
case "AccessDeniedException":
|
|
@@ -489,20 +463,19 @@ const deserializeAws_restJson1RollbackTransactionCommandError = async (output, c
|
|
|
489
463
|
throw await deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context);
|
|
490
464
|
default:
|
|
491
465
|
const parsedBody = parsedOutput.body;
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
$metadata,
|
|
466
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
467
|
+
output,
|
|
468
|
+
parsedBody,
|
|
469
|
+
exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
|
|
470
|
+
errorCode,
|
|
498
471
|
});
|
|
499
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
500
472
|
}
|
|
501
473
|
};
|
|
474
|
+
const map = smithy_client_1.map;
|
|
502
475
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
503
|
-
const contents = {};
|
|
476
|
+
const contents = map({});
|
|
504
477
|
const data = parsedOutput.body;
|
|
505
|
-
if (data.message
|
|
478
|
+
if (data.message != null) {
|
|
506
479
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
507
480
|
}
|
|
508
481
|
const exception = new models_0_1.AccessDeniedException({
|
|
@@ -512,9 +485,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
512
485
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
513
486
|
};
|
|
514
487
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
515
|
-
const contents = {};
|
|
488
|
+
const contents = map({});
|
|
516
489
|
const data = parsedOutput.body;
|
|
517
|
-
if (data.message
|
|
490
|
+
if (data.message != null) {
|
|
518
491
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
519
492
|
}
|
|
520
493
|
const exception = new models_0_1.BadRequestException({
|
|
@@ -524,9 +497,9 @@ const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput,
|
|
|
524
497
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
525
498
|
};
|
|
526
499
|
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
527
|
-
const contents = {};
|
|
500
|
+
const contents = map({});
|
|
528
501
|
const data = parsedOutput.body;
|
|
529
|
-
if (data.message
|
|
502
|
+
if (data.message != null) {
|
|
530
503
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
531
504
|
}
|
|
532
505
|
const exception = new models_0_1.ForbiddenException({
|
|
@@ -536,7 +509,7 @@ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput,
|
|
|
536
509
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
537
510
|
};
|
|
538
511
|
const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
|
|
539
|
-
const contents = {};
|
|
512
|
+
const contents = map({});
|
|
540
513
|
const data = parsedOutput.body;
|
|
541
514
|
const exception = new models_0_1.InternalServerErrorException({
|
|
542
515
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -545,9 +518,9 @@ const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (pars
|
|
|
545
518
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
546
519
|
};
|
|
547
520
|
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
548
|
-
const contents = {};
|
|
521
|
+
const contents = map({});
|
|
549
522
|
const data = parsedOutput.body;
|
|
550
|
-
if (data.message
|
|
523
|
+
if (data.message != null) {
|
|
551
524
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
552
525
|
}
|
|
553
526
|
const exception = new models_0_1.NotFoundException({
|
|
@@ -557,7 +530,7 @@ const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, c
|
|
|
557
530
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
558
531
|
};
|
|
559
532
|
const deserializeAws_restJson1ServiceUnavailableErrorResponse = async (parsedOutput, context) => {
|
|
560
|
-
const contents = {};
|
|
533
|
+
const contents = map({});
|
|
561
534
|
const data = parsedOutput.body;
|
|
562
535
|
const exception = new models_0_1.ServiceUnavailableError({
|
|
563
536
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -566,12 +539,12 @@ const deserializeAws_restJson1ServiceUnavailableErrorResponse = async (parsedOut
|
|
|
566
539
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
567
540
|
};
|
|
568
541
|
const deserializeAws_restJson1StatementTimeoutExceptionResponse = async (parsedOutput, context) => {
|
|
569
|
-
const contents = {};
|
|
542
|
+
const contents = map({});
|
|
570
543
|
const data = parsedOutput.body;
|
|
571
|
-
if (data.dbConnectionId
|
|
544
|
+
if (data.dbConnectionId != null) {
|
|
572
545
|
contents.dbConnectionId = (0, smithy_client_1.expectLong)(data.dbConnectionId);
|
|
573
546
|
}
|
|
574
|
-
if (data.message
|
|
547
|
+
if (data.message != null) {
|
|
575
548
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
576
549
|
}
|
|
577
550
|
const exception = new models_0_1.StatementTimeoutException({
|
|
@@ -584,9 +557,6 @@ const serializeAws_restJson1ArrayOfArray = (input, context) => {
|
|
|
584
557
|
return input
|
|
585
558
|
.filter((e) => e != null)
|
|
586
559
|
.map((entry) => {
|
|
587
|
-
if (entry === null) {
|
|
588
|
-
return null;
|
|
589
|
-
}
|
|
590
560
|
return serializeAws_restJson1ArrayValue(entry, context);
|
|
591
561
|
});
|
|
592
562
|
};
|
|
@@ -604,9 +574,6 @@ const serializeAws_restJson1BooleanArray = (input, context) => {
|
|
|
604
574
|
return input
|
|
605
575
|
.filter((e) => e != null)
|
|
606
576
|
.map((entry) => {
|
|
607
|
-
if (entry === null) {
|
|
608
|
-
return null;
|
|
609
|
-
}
|
|
610
577
|
return entry;
|
|
611
578
|
});
|
|
612
579
|
};
|
|
@@ -614,9 +581,6 @@ const serializeAws_restJson1DoubleArray = (input, context) => {
|
|
|
614
581
|
return input
|
|
615
582
|
.filter((e) => e != null)
|
|
616
583
|
.map((entry) => {
|
|
617
|
-
if (entry === null) {
|
|
618
|
-
return null;
|
|
619
|
-
}
|
|
620
584
|
return (0, smithy_client_1.serializeFloat)(entry);
|
|
621
585
|
});
|
|
622
586
|
};
|
|
@@ -636,9 +600,6 @@ const serializeAws_restJson1LongArray = (input, context) => {
|
|
|
636
600
|
return input
|
|
637
601
|
.filter((e) => e != null)
|
|
638
602
|
.map((entry) => {
|
|
639
|
-
if (entry === null) {
|
|
640
|
-
return null;
|
|
641
|
-
}
|
|
642
603
|
return entry;
|
|
643
604
|
});
|
|
644
605
|
};
|
|
@@ -659,9 +620,6 @@ const serializeAws_restJson1SqlParameterSets = (input, context) => {
|
|
|
659
620
|
return input
|
|
660
621
|
.filter((e) => e != null)
|
|
661
622
|
.map((entry) => {
|
|
662
|
-
if (entry === null) {
|
|
663
|
-
return null;
|
|
664
|
-
}
|
|
665
623
|
return serializeAws_restJson1SqlParametersList(entry, context);
|
|
666
624
|
});
|
|
667
625
|
};
|
|
@@ -669,9 +627,6 @@ const serializeAws_restJson1SqlParametersList = (input, context) => {
|
|
|
669
627
|
return input
|
|
670
628
|
.filter((e) => e != null)
|
|
671
629
|
.map((entry) => {
|
|
672
|
-
if (entry === null) {
|
|
673
|
-
return null;
|
|
674
|
-
}
|
|
675
630
|
return serializeAws_restJson1SqlParameter(entry, context);
|
|
676
631
|
});
|
|
677
632
|
};
|
|
@@ -679,9 +634,6 @@ const serializeAws_restJson1StringArray = (input, context) => {
|
|
|
679
634
|
return input
|
|
680
635
|
.filter((e) => e != null)
|
|
681
636
|
.map((entry) => {
|
|
682
|
-
if (entry === null) {
|
|
683
|
-
return null;
|
|
684
|
-
}
|
|
685
637
|
return entry;
|
|
686
638
|
});
|
|
687
639
|
};
|
|
@@ -697,27 +649,27 @@ const deserializeAws_restJson1ArrayOfArray = (output, context) => {
|
|
|
697
649
|
return retVal;
|
|
698
650
|
};
|
|
699
651
|
const deserializeAws_restJson1ArrayValue = (output, context) => {
|
|
700
|
-
if (output.arrayValues
|
|
652
|
+
if (output.arrayValues != null) {
|
|
701
653
|
return {
|
|
702
654
|
arrayValues: deserializeAws_restJson1ArrayOfArray(output.arrayValues, context),
|
|
703
655
|
};
|
|
704
656
|
}
|
|
705
|
-
if (output.booleanValues
|
|
657
|
+
if (output.booleanValues != null) {
|
|
706
658
|
return {
|
|
707
659
|
booleanValues: deserializeAws_restJson1BooleanArray(output.booleanValues, context),
|
|
708
660
|
};
|
|
709
661
|
}
|
|
710
|
-
if (output.doubleValues
|
|
662
|
+
if (output.doubleValues != null) {
|
|
711
663
|
return {
|
|
712
664
|
doubleValues: deserializeAws_restJson1DoubleArray(output.doubleValues, context),
|
|
713
665
|
};
|
|
714
666
|
}
|
|
715
|
-
if (output.longValues
|
|
667
|
+
if (output.longValues != null) {
|
|
716
668
|
return {
|
|
717
669
|
longValues: deserializeAws_restJson1LongArray(output.longValues, context),
|
|
718
670
|
};
|
|
719
671
|
}
|
|
720
|
-
if (output.stringValues
|
|
672
|
+
if (output.stringValues != null) {
|
|
721
673
|
return {
|
|
722
674
|
stringValues: deserializeAws_restJson1StringArray(output.stringValues, context),
|
|
723
675
|
};
|
|
@@ -776,12 +728,12 @@ const deserializeAws_restJson1DoubleArray = (output, context) => {
|
|
|
776
728
|
return retVal;
|
|
777
729
|
};
|
|
778
730
|
const deserializeAws_restJson1Field = (output, context) => {
|
|
779
|
-
if (output.arrayValue
|
|
731
|
+
if (output.arrayValue != null) {
|
|
780
732
|
return {
|
|
781
733
|
arrayValue: deserializeAws_restJson1ArrayValue((0, smithy_client_1.expectUnion)(output.arrayValue), context),
|
|
782
734
|
};
|
|
783
735
|
}
|
|
784
|
-
if (output.blobValue
|
|
736
|
+
if (output.blobValue != null) {
|
|
785
737
|
return {
|
|
786
738
|
blobValue: context.base64Decoder(output.blobValue),
|
|
787
739
|
};
|
|
@@ -938,7 +890,7 @@ const deserializeAws_restJson1UpdateResults = (output, context) => {
|
|
|
938
890
|
return retVal;
|
|
939
891
|
};
|
|
940
892
|
const deserializeAws_restJson1Value = (output, context) => {
|
|
941
|
-
if (output.arrayValues
|
|
893
|
+
if (output.arrayValues != null) {
|
|
942
894
|
return {
|
|
943
895
|
arrayValues: deserializeAws_restJson1ArrayValueList(output.arrayValues, context),
|
|
944
896
|
};
|
|
@@ -949,7 +901,7 @@ const deserializeAws_restJson1Value = (output, context) => {
|
|
|
949
901
|
if ((0, smithy_client_1.expectBoolean)(output.bitValue) !== undefined) {
|
|
950
902
|
return { bitValue: (0, smithy_client_1.expectBoolean)(output.bitValue) };
|
|
951
903
|
}
|
|
952
|
-
if (output.blobValue
|
|
904
|
+
if (output.blobValue != null) {
|
|
953
905
|
return {
|
|
954
906
|
blobValue: context.base64Decoder(output.blobValue),
|
|
955
907
|
};
|
|
@@ -969,7 +921,7 @@ const deserializeAws_restJson1Value = (output, context) => {
|
|
|
969
921
|
if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
|
|
970
922
|
return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
|
|
971
923
|
}
|
|
972
|
-
if (output.structValue
|
|
924
|
+
if (output.structValue != null) {
|
|
973
925
|
return {
|
|
974
926
|
structValue: deserializeAws_restJson1StructValue(output.structValue, context),
|
|
975
927
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
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, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
|
|
3
|
+
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
4
|
import { AccessDeniedException, ArrayValue, BadRequestException, Field, ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableError, StatementTimeoutException, } from "../models/models_0";
|
|
5
5
|
import { RDSDataServiceException as __BaseException } from "../models/RDSDataServiceException";
|
|
6
6
|
export var serializeAws_restJson1BatchExecuteStatementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -159,24 +159,23 @@ export var deserializeAws_restJson1BatchExecuteStatementCommand = function (outp
|
|
|
159
159
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
160
160
|
return [2, deserializeAws_restJson1BatchExecuteStatementCommandError(output, context)];
|
|
161
161
|
}
|
|
162
|
-
contents = {
|
|
162
|
+
contents = map({
|
|
163
163
|
$metadata: deserializeMetadata(output),
|
|
164
|
-
|
|
165
|
-
};
|
|
164
|
+
});
|
|
166
165
|
_a = __expectNonNull;
|
|
167
166
|
_b = __expectObject;
|
|
168
167
|
return [4, parseBody(output.body, context)];
|
|
169
168
|
case 1:
|
|
170
169
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
171
|
-
if (data.updateResults
|
|
170
|
+
if (data.updateResults != null) {
|
|
172
171
|
contents.updateResults = deserializeAws_restJson1UpdateResults(data.updateResults, context);
|
|
173
172
|
}
|
|
174
|
-
return [2,
|
|
173
|
+
return [2, contents];
|
|
175
174
|
}
|
|
176
175
|
});
|
|
177
176
|
}); };
|
|
178
177
|
var deserializeAws_restJson1BatchExecuteStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
179
|
-
var parsedOutput, _a,
|
|
178
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
180
179
|
var _c;
|
|
181
180
|
return __generator(this, function (_d) {
|
|
182
181
|
switch (_d.label) {
|
|
@@ -217,14 +216,14 @@ var deserializeAws_restJson1BatchExecuteStatementCommandError = function (output
|
|
|
217
216
|
case 13: throw _d.sent();
|
|
218
217
|
case 14:
|
|
219
218
|
parsedBody = parsedOutput.body;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
$metadata: $metadata,
|
|
219
|
+
throwDefaultError({
|
|
220
|
+
output: output,
|
|
221
|
+
parsedBody: parsedBody,
|
|
222
|
+
exceptionCtor: __BaseException,
|
|
223
|
+
errorCode: errorCode,
|
|
226
224
|
});
|
|
227
|
-
|
|
225
|
+
_d.label = 15;
|
|
226
|
+
case 15: return [2];
|
|
228
227
|
}
|
|
229
228
|
});
|
|
230
229
|
}); };
|
|
@@ -236,24 +235,23 @@ export var deserializeAws_restJson1BeginTransactionCommand = function (output, c
|
|
|
236
235
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
237
236
|
return [2, deserializeAws_restJson1BeginTransactionCommandError(output, context)];
|
|
238
237
|
}
|
|
239
|
-
contents = {
|
|
238
|
+
contents = map({
|
|
240
239
|
$metadata: deserializeMetadata(output),
|
|
241
|
-
|
|
242
|
-
};
|
|
240
|
+
});
|
|
243
241
|
_a = __expectNonNull;
|
|
244
242
|
_b = __expectObject;
|
|
245
243
|
return [4, parseBody(output.body, context)];
|
|
246
244
|
case 1:
|
|
247
245
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
248
|
-
if (data.transactionId
|
|
246
|
+
if (data.transactionId != null) {
|
|
249
247
|
contents.transactionId = __expectString(data.transactionId);
|
|
250
248
|
}
|
|
251
|
-
return [2,
|
|
249
|
+
return [2, contents];
|
|
252
250
|
}
|
|
253
251
|
});
|
|
254
252
|
}); };
|
|
255
253
|
var deserializeAws_restJson1BeginTransactionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
256
|
-
var parsedOutput, _a,
|
|
254
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
257
255
|
var _c;
|
|
258
256
|
return __generator(this, function (_d) {
|
|
259
257
|
switch (_d.label) {
|
|
@@ -294,14 +292,14 @@ var deserializeAws_restJson1BeginTransactionCommandError = function (output, con
|
|
|
294
292
|
case 13: throw _d.sent();
|
|
295
293
|
case 14:
|
|
296
294
|
parsedBody = parsedOutput.body;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
$metadata: $metadata,
|
|
295
|
+
throwDefaultError({
|
|
296
|
+
output: output,
|
|
297
|
+
parsedBody: parsedBody,
|
|
298
|
+
exceptionCtor: __BaseException,
|
|
299
|
+
errorCode: errorCode,
|
|
303
300
|
});
|
|
304
|
-
|
|
301
|
+
_d.label = 15;
|
|
302
|
+
case 15: return [2];
|
|
305
303
|
}
|
|
306
304
|
});
|
|
307
305
|
}); };
|
|
@@ -313,24 +311,23 @@ export var deserializeAws_restJson1CommitTransactionCommand = function (output,
|
|
|
313
311
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
314
312
|
return [2, deserializeAws_restJson1CommitTransactionCommandError(output, context)];
|
|
315
313
|
}
|
|
316
|
-
contents = {
|
|
314
|
+
contents = map({
|
|
317
315
|
$metadata: deserializeMetadata(output),
|
|
318
|
-
|
|
319
|
-
};
|
|
316
|
+
});
|
|
320
317
|
_a = __expectNonNull;
|
|
321
318
|
_b = __expectObject;
|
|
322
319
|
return [4, parseBody(output.body, context)];
|
|
323
320
|
case 1:
|
|
324
321
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
325
|
-
if (data.transactionStatus
|
|
322
|
+
if (data.transactionStatus != null) {
|
|
326
323
|
contents.transactionStatus = __expectString(data.transactionStatus);
|
|
327
324
|
}
|
|
328
|
-
return [2,
|
|
325
|
+
return [2, contents];
|
|
329
326
|
}
|
|
330
327
|
});
|
|
331
328
|
}); };
|
|
332
329
|
var deserializeAws_restJson1CommitTransactionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
333
|
-
var parsedOutput, _a,
|
|
330
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
334
331
|
var _c;
|
|
335
332
|
return __generator(this, function (_d) {
|
|
336
333
|
switch (_d.label) {
|
|
@@ -375,14 +372,14 @@ var deserializeAws_restJson1CommitTransactionCommandError = function (output, co
|
|
|
375
372
|
case 15: throw _d.sent();
|
|
376
373
|
case 16:
|
|
377
374
|
parsedBody = parsedOutput.body;
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
$metadata: $metadata,
|
|
375
|
+
throwDefaultError({
|
|
376
|
+
output: output,
|
|
377
|
+
parsedBody: parsedBody,
|
|
378
|
+
exceptionCtor: __BaseException,
|
|
379
|
+
errorCode: errorCode,
|
|
384
380
|
});
|
|
385
|
-
|
|
381
|
+
_d.label = 17;
|
|
382
|
+
case 17: return [2];
|
|
386
383
|
}
|
|
387
384
|
});
|
|
388
385
|
}); };
|
|
@@ -394,24 +391,23 @@ export var deserializeAws_restJson1ExecuteSqlCommand = function (output, context
|
|
|
394
391
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
395
392
|
return [2, deserializeAws_restJson1ExecuteSqlCommandError(output, context)];
|
|
396
393
|
}
|
|
397
|
-
contents = {
|
|
394
|
+
contents = map({
|
|
398
395
|
$metadata: deserializeMetadata(output),
|
|
399
|
-
|
|
400
|
-
};
|
|
396
|
+
});
|
|
401
397
|
_a = __expectNonNull;
|
|
402
398
|
_b = __expectObject;
|
|
403
399
|
return [4, parseBody(output.body, context)];
|
|
404
400
|
case 1:
|
|
405
401
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
406
|
-
if (data.sqlStatementResults
|
|
402
|
+
if (data.sqlStatementResults != null) {
|
|
407
403
|
contents.sqlStatementResults = deserializeAws_restJson1SqlStatementResults(data.sqlStatementResults, context);
|
|
408
404
|
}
|
|
409
|
-
return [2,
|
|
405
|
+
return [2, contents];
|
|
410
406
|
}
|
|
411
407
|
});
|
|
412
408
|
}); };
|
|
413
409
|
var deserializeAws_restJson1ExecuteSqlCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
414
|
-
var parsedOutput, _a,
|
|
410
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
415
411
|
var _c;
|
|
416
412
|
return __generator(this, function (_d) {
|
|
417
413
|
switch (_d.label) {
|
|
@@ -448,14 +444,14 @@ var deserializeAws_restJson1ExecuteSqlCommandError = function (output, context)
|
|
|
448
444
|
case 11: throw _d.sent();
|
|
449
445
|
case 12:
|
|
450
446
|
parsedBody = parsedOutput.body;
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
$metadata: $metadata,
|
|
447
|
+
throwDefaultError({
|
|
448
|
+
output: output,
|
|
449
|
+
parsedBody: parsedBody,
|
|
450
|
+
exceptionCtor: __BaseException,
|
|
451
|
+
errorCode: errorCode,
|
|
457
452
|
});
|
|
458
|
-
|
|
453
|
+
_d.label = 13;
|
|
454
|
+
case 13: return [2];
|
|
459
455
|
}
|
|
460
456
|
});
|
|
461
457
|
}); };
|
|
@@ -467,40 +463,35 @@ export var deserializeAws_restJson1ExecuteStatementCommand = function (output, c
|
|
|
467
463
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
468
464
|
return [2, deserializeAws_restJson1ExecuteStatementCommandError(output, context)];
|
|
469
465
|
}
|
|
470
|
-
contents = {
|
|
466
|
+
contents = map({
|
|
471
467
|
$metadata: deserializeMetadata(output),
|
|
472
|
-
|
|
473
|
-
formattedRecords: undefined,
|
|
474
|
-
generatedFields: undefined,
|
|
475
|
-
numberOfRecordsUpdated: undefined,
|
|
476
|
-
records: undefined,
|
|
477
|
-
};
|
|
468
|
+
});
|
|
478
469
|
_a = __expectNonNull;
|
|
479
470
|
_b = __expectObject;
|
|
480
471
|
return [4, parseBody(output.body, context)];
|
|
481
472
|
case 1:
|
|
482
473
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
483
|
-
if (data.columnMetadata
|
|
474
|
+
if (data.columnMetadata != null) {
|
|
484
475
|
contents.columnMetadata = deserializeAws_restJson1Metadata(data.columnMetadata, context);
|
|
485
476
|
}
|
|
486
|
-
if (data.formattedRecords
|
|
477
|
+
if (data.formattedRecords != null) {
|
|
487
478
|
contents.formattedRecords = __expectString(data.formattedRecords);
|
|
488
479
|
}
|
|
489
|
-
if (data.generatedFields
|
|
480
|
+
if (data.generatedFields != null) {
|
|
490
481
|
contents.generatedFields = deserializeAws_restJson1FieldList(data.generatedFields, context);
|
|
491
482
|
}
|
|
492
|
-
if (data.numberOfRecordsUpdated
|
|
483
|
+
if (data.numberOfRecordsUpdated != null) {
|
|
493
484
|
contents.numberOfRecordsUpdated = __expectLong(data.numberOfRecordsUpdated);
|
|
494
485
|
}
|
|
495
|
-
if (data.records
|
|
486
|
+
if (data.records != null) {
|
|
496
487
|
contents.records = deserializeAws_restJson1SqlRecords(data.records, context);
|
|
497
488
|
}
|
|
498
|
-
return [2,
|
|
489
|
+
return [2, contents];
|
|
499
490
|
}
|
|
500
491
|
});
|
|
501
492
|
}); };
|
|
502
493
|
var deserializeAws_restJson1ExecuteStatementCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
503
|
-
var parsedOutput, _a,
|
|
494
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
504
495
|
var _c;
|
|
505
496
|
return __generator(this, function (_d) {
|
|
506
497
|
switch (_d.label) {
|
|
@@ -541,14 +532,14 @@ var deserializeAws_restJson1ExecuteStatementCommandError = function (output, con
|
|
|
541
532
|
case 13: throw _d.sent();
|
|
542
533
|
case 14:
|
|
543
534
|
parsedBody = parsedOutput.body;
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
$metadata: $metadata,
|
|
535
|
+
throwDefaultError({
|
|
536
|
+
output: output,
|
|
537
|
+
parsedBody: parsedBody,
|
|
538
|
+
exceptionCtor: __BaseException,
|
|
539
|
+
errorCode: errorCode,
|
|
550
540
|
});
|
|
551
|
-
|
|
541
|
+
_d.label = 15;
|
|
542
|
+
case 15: return [2];
|
|
552
543
|
}
|
|
553
544
|
});
|
|
554
545
|
}); };
|
|
@@ -560,24 +551,23 @@ export var deserializeAws_restJson1RollbackTransactionCommand = function (output
|
|
|
560
551
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
561
552
|
return [2, deserializeAws_restJson1RollbackTransactionCommandError(output, context)];
|
|
562
553
|
}
|
|
563
|
-
contents = {
|
|
554
|
+
contents = map({
|
|
564
555
|
$metadata: deserializeMetadata(output),
|
|
565
|
-
|
|
566
|
-
};
|
|
556
|
+
});
|
|
567
557
|
_a = __expectNonNull;
|
|
568
558
|
_b = __expectObject;
|
|
569
559
|
return [4, parseBody(output.body, context)];
|
|
570
560
|
case 1:
|
|
571
561
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
572
|
-
if (data.transactionStatus
|
|
562
|
+
if (data.transactionStatus != null) {
|
|
573
563
|
contents.transactionStatus = __expectString(data.transactionStatus);
|
|
574
564
|
}
|
|
575
|
-
return [2,
|
|
565
|
+
return [2, contents];
|
|
576
566
|
}
|
|
577
567
|
});
|
|
578
568
|
}); };
|
|
579
569
|
var deserializeAws_restJson1RollbackTransactionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
580
|
-
var parsedOutput, _a,
|
|
570
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
581
571
|
var _c;
|
|
582
572
|
return __generator(this, function (_d) {
|
|
583
573
|
switch (_d.label) {
|
|
@@ -622,23 +612,24 @@ var deserializeAws_restJson1RollbackTransactionCommandError = function (output,
|
|
|
622
612
|
case 15: throw _d.sent();
|
|
623
613
|
case 16:
|
|
624
614
|
parsedBody = parsedOutput.body;
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
$metadata: $metadata,
|
|
615
|
+
throwDefaultError({
|
|
616
|
+
output: output,
|
|
617
|
+
parsedBody: parsedBody,
|
|
618
|
+
exceptionCtor: __BaseException,
|
|
619
|
+
errorCode: errorCode,
|
|
631
620
|
});
|
|
632
|
-
|
|
621
|
+
_d.label = 17;
|
|
622
|
+
case 17: return [2];
|
|
633
623
|
}
|
|
634
624
|
});
|
|
635
625
|
}); };
|
|
626
|
+
var map = __map;
|
|
636
627
|
var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
637
628
|
var contents, data, exception;
|
|
638
629
|
return __generator(this, function (_a) {
|
|
639
|
-
contents = {};
|
|
630
|
+
contents = map({});
|
|
640
631
|
data = parsedOutput.body;
|
|
641
|
-
if (data.message
|
|
632
|
+
if (data.message != null) {
|
|
642
633
|
contents.message = __expectString(data.message);
|
|
643
634
|
}
|
|
644
635
|
exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -648,9 +639,9 @@ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutp
|
|
|
648
639
|
var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
649
640
|
var contents, data, exception;
|
|
650
641
|
return __generator(this, function (_a) {
|
|
651
|
-
contents = {};
|
|
642
|
+
contents = map({});
|
|
652
643
|
data = parsedOutput.body;
|
|
653
|
-
if (data.message
|
|
644
|
+
if (data.message != null) {
|
|
654
645
|
contents.message = __expectString(data.message);
|
|
655
646
|
}
|
|
656
647
|
exception = new BadRequestException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -660,9 +651,9 @@ var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput
|
|
|
660
651
|
var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
661
652
|
var contents, data, exception;
|
|
662
653
|
return __generator(this, function (_a) {
|
|
663
|
-
contents = {};
|
|
654
|
+
contents = map({});
|
|
664
655
|
data = parsedOutput.body;
|
|
665
|
-
if (data.message
|
|
656
|
+
if (data.message != null) {
|
|
666
657
|
contents.message = __expectString(data.message);
|
|
667
658
|
}
|
|
668
659
|
exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -672,7 +663,7 @@ var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput,
|
|
|
672
663
|
var deserializeAws_restJson1InternalServerErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
673
664
|
var contents, data, exception;
|
|
674
665
|
return __generator(this, function (_a) {
|
|
675
|
-
contents = {};
|
|
666
|
+
contents = map({});
|
|
676
667
|
data = parsedOutput.body;
|
|
677
668
|
exception = new InternalServerErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
678
669
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
@@ -681,9 +672,9 @@ var deserializeAws_restJson1InternalServerErrorExceptionResponse = function (par
|
|
|
681
672
|
var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
682
673
|
var contents, data, exception;
|
|
683
674
|
return __generator(this, function (_a) {
|
|
684
|
-
contents = {};
|
|
675
|
+
contents = map({});
|
|
685
676
|
data = parsedOutput.body;
|
|
686
|
-
if (data.message
|
|
677
|
+
if (data.message != null) {
|
|
687
678
|
contents.message = __expectString(data.message);
|
|
688
679
|
}
|
|
689
680
|
exception = new NotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -693,7 +684,7 @@ var deserializeAws_restJson1NotFoundExceptionResponse = function (parsedOutput,
|
|
|
693
684
|
var deserializeAws_restJson1ServiceUnavailableErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
694
685
|
var contents, data, exception;
|
|
695
686
|
return __generator(this, function (_a) {
|
|
696
|
-
contents = {};
|
|
687
|
+
contents = map({});
|
|
697
688
|
data = parsedOutput.body;
|
|
698
689
|
exception = new ServiceUnavailableError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
699
690
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
@@ -702,12 +693,12 @@ var deserializeAws_restJson1ServiceUnavailableErrorResponse = function (parsedOu
|
|
|
702
693
|
var deserializeAws_restJson1StatementTimeoutExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
703
694
|
var contents, data, exception;
|
|
704
695
|
return __generator(this, function (_a) {
|
|
705
|
-
contents = {};
|
|
696
|
+
contents = map({});
|
|
706
697
|
data = parsedOutput.body;
|
|
707
|
-
if (data.dbConnectionId
|
|
698
|
+
if (data.dbConnectionId != null) {
|
|
708
699
|
contents.dbConnectionId = __expectLong(data.dbConnectionId);
|
|
709
700
|
}
|
|
710
|
-
if (data.message
|
|
701
|
+
if (data.message != null) {
|
|
711
702
|
contents.message = __expectString(data.message);
|
|
712
703
|
}
|
|
713
704
|
exception = new StatementTimeoutException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -718,9 +709,6 @@ var serializeAws_restJson1ArrayOfArray = function (input, context) {
|
|
|
718
709
|
return input
|
|
719
710
|
.filter(function (e) { return e != null; })
|
|
720
711
|
.map(function (entry) {
|
|
721
|
-
if (entry === null) {
|
|
722
|
-
return null;
|
|
723
|
-
}
|
|
724
712
|
return serializeAws_restJson1ArrayValue(entry, context);
|
|
725
713
|
});
|
|
726
714
|
};
|
|
@@ -738,9 +726,6 @@ var serializeAws_restJson1BooleanArray = function (input, context) {
|
|
|
738
726
|
return input
|
|
739
727
|
.filter(function (e) { return e != null; })
|
|
740
728
|
.map(function (entry) {
|
|
741
|
-
if (entry === null) {
|
|
742
|
-
return null;
|
|
743
|
-
}
|
|
744
729
|
return entry;
|
|
745
730
|
});
|
|
746
731
|
};
|
|
@@ -748,9 +733,6 @@ var serializeAws_restJson1DoubleArray = function (input, context) {
|
|
|
748
733
|
return input
|
|
749
734
|
.filter(function (e) { return e != null; })
|
|
750
735
|
.map(function (entry) {
|
|
751
|
-
if (entry === null) {
|
|
752
|
-
return null;
|
|
753
|
-
}
|
|
754
736
|
return __serializeFloat(entry);
|
|
755
737
|
});
|
|
756
738
|
};
|
|
@@ -770,9 +752,6 @@ var serializeAws_restJson1LongArray = function (input, context) {
|
|
|
770
752
|
return input
|
|
771
753
|
.filter(function (e) { return e != null; })
|
|
772
754
|
.map(function (entry) {
|
|
773
|
-
if (entry === null) {
|
|
774
|
-
return null;
|
|
775
|
-
}
|
|
776
755
|
return entry;
|
|
777
756
|
});
|
|
778
757
|
};
|
|
@@ -786,9 +765,6 @@ var serializeAws_restJson1SqlParameterSets = function (input, context) {
|
|
|
786
765
|
return input
|
|
787
766
|
.filter(function (e) { return e != null; })
|
|
788
767
|
.map(function (entry) {
|
|
789
|
-
if (entry === null) {
|
|
790
|
-
return null;
|
|
791
|
-
}
|
|
792
768
|
return serializeAws_restJson1SqlParametersList(entry, context);
|
|
793
769
|
});
|
|
794
770
|
};
|
|
@@ -796,9 +772,6 @@ var serializeAws_restJson1SqlParametersList = function (input, context) {
|
|
|
796
772
|
return input
|
|
797
773
|
.filter(function (e) { return e != null; })
|
|
798
774
|
.map(function (entry) {
|
|
799
|
-
if (entry === null) {
|
|
800
|
-
return null;
|
|
801
|
-
}
|
|
802
775
|
return serializeAws_restJson1SqlParameter(entry, context);
|
|
803
776
|
});
|
|
804
777
|
};
|
|
@@ -806,9 +779,6 @@ var serializeAws_restJson1StringArray = function (input, context) {
|
|
|
806
779
|
return input
|
|
807
780
|
.filter(function (e) { return e != null; })
|
|
808
781
|
.map(function (entry) {
|
|
809
|
-
if (entry === null) {
|
|
810
|
-
return null;
|
|
811
|
-
}
|
|
812
782
|
return entry;
|
|
813
783
|
});
|
|
814
784
|
};
|
|
@@ -824,27 +794,27 @@ var deserializeAws_restJson1ArrayOfArray = function (output, context) {
|
|
|
824
794
|
return retVal;
|
|
825
795
|
};
|
|
826
796
|
var deserializeAws_restJson1ArrayValue = function (output, context) {
|
|
827
|
-
if (output.arrayValues
|
|
797
|
+
if (output.arrayValues != null) {
|
|
828
798
|
return {
|
|
829
799
|
arrayValues: deserializeAws_restJson1ArrayOfArray(output.arrayValues, context),
|
|
830
800
|
};
|
|
831
801
|
}
|
|
832
|
-
if (output.booleanValues
|
|
802
|
+
if (output.booleanValues != null) {
|
|
833
803
|
return {
|
|
834
804
|
booleanValues: deserializeAws_restJson1BooleanArray(output.booleanValues, context),
|
|
835
805
|
};
|
|
836
806
|
}
|
|
837
|
-
if (output.doubleValues
|
|
807
|
+
if (output.doubleValues != null) {
|
|
838
808
|
return {
|
|
839
809
|
doubleValues: deserializeAws_restJson1DoubleArray(output.doubleValues, context),
|
|
840
810
|
};
|
|
841
811
|
}
|
|
842
|
-
if (output.longValues
|
|
812
|
+
if (output.longValues != null) {
|
|
843
813
|
return {
|
|
844
814
|
longValues: deserializeAws_restJson1LongArray(output.longValues, context),
|
|
845
815
|
};
|
|
846
816
|
}
|
|
847
|
-
if (output.stringValues
|
|
817
|
+
if (output.stringValues != null) {
|
|
848
818
|
return {
|
|
849
819
|
stringValues: deserializeAws_restJson1StringArray(output.stringValues, context),
|
|
850
820
|
};
|
|
@@ -903,12 +873,12 @@ var deserializeAws_restJson1DoubleArray = function (output, context) {
|
|
|
903
873
|
return retVal;
|
|
904
874
|
};
|
|
905
875
|
var deserializeAws_restJson1Field = function (output, context) {
|
|
906
|
-
if (output.arrayValue
|
|
876
|
+
if (output.arrayValue != null) {
|
|
907
877
|
return {
|
|
908
878
|
arrayValue: deserializeAws_restJson1ArrayValue(__expectUnion(output.arrayValue), context),
|
|
909
879
|
};
|
|
910
880
|
}
|
|
911
|
-
if (output.blobValue
|
|
881
|
+
if (output.blobValue != null) {
|
|
912
882
|
return {
|
|
913
883
|
blobValue: context.base64Decoder(output.blobValue),
|
|
914
884
|
};
|
|
@@ -1065,7 +1035,7 @@ var deserializeAws_restJson1UpdateResults = function (output, context) {
|
|
|
1065
1035
|
return retVal;
|
|
1066
1036
|
};
|
|
1067
1037
|
var deserializeAws_restJson1Value = function (output, context) {
|
|
1068
|
-
if (output.arrayValues
|
|
1038
|
+
if (output.arrayValues != null) {
|
|
1069
1039
|
return {
|
|
1070
1040
|
arrayValues: deserializeAws_restJson1ArrayValueList(output.arrayValues, context),
|
|
1071
1041
|
};
|
|
@@ -1076,7 +1046,7 @@ var deserializeAws_restJson1Value = function (output, context) {
|
|
|
1076
1046
|
if (__expectBoolean(output.bitValue) !== undefined) {
|
|
1077
1047
|
return { bitValue: __expectBoolean(output.bitValue) };
|
|
1078
1048
|
}
|
|
1079
|
-
if (output.blobValue
|
|
1049
|
+
if (output.blobValue != null) {
|
|
1080
1050
|
return {
|
|
1081
1051
|
blobValue: context.base64Decoder(output.blobValue),
|
|
1082
1052
|
};
|
|
@@ -1096,7 +1066,7 @@ var deserializeAws_restJson1Value = function (output, context) {
|
|
|
1096
1066
|
if (__expectString(output.stringValue) !== undefined) {
|
|
1097
1067
|
return { stringValue: __expectString(output.stringValue) };
|
|
1098
1068
|
}
|
|
1099
|
-
if (output.structValue
|
|
1069
|
+
if (output.structValue != null) {
|
|
1100
1070
|
return {
|
|
1101
1071
|
structValue: deserializeAws_restJson1StructValue(output.structValue, context),
|
|
1102
1072
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-rds-data",
|
|
3
3
|
"description": "AWS SDK for JavaScript Rds Data Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.142.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.142.0",
|
|
22
22
|
"@aws-sdk/config-resolver": "3.130.0",
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.142.0",
|
|
24
24
|
"@aws-sdk/fetch-http-handler": "3.131.0",
|
|
25
25
|
"@aws-sdk/hash-node": "3.127.0",
|
|
26
26
|
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"@aws-sdk/node-config-provider": "3.127.0",
|
|
37
37
|
"@aws-sdk/node-http-handler": "3.127.0",
|
|
38
38
|
"@aws-sdk/protocol-http": "3.127.0",
|
|
39
|
-
"@aws-sdk/smithy-client": "3.
|
|
39
|
+
"@aws-sdk/smithy-client": "3.142.0",
|
|
40
40
|
"@aws-sdk/types": "3.127.0",
|
|
41
41
|
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
44
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
46
|
+
"@aws-sdk/util-defaults-mode-browser": "3.142.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-node": "3.142.0",
|
|
48
48
|
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
49
49
|
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
50
50
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|