@aws-sdk/client-rds-data 3.312.0 → 3.316.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.
@@ -12,15 +12,15 @@ const se_BatchExecuteStatementCommand = async (input, context) => {
12
12
  };
13
13
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchExecute";
14
14
  let body;
15
- body = JSON.stringify({
16
- ...(input.database != null && { database: input.database }),
17
- ...(input.parameterSets != null && { parameterSets: se_SqlParameterSets(input.parameterSets, context) }),
18
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
19
- ...(input.schema != null && { schema: input.schema }),
20
- ...(input.secretArn != null && { secretArn: input.secretArn }),
21
- ...(input.sql != null && { sql: input.sql }),
22
- ...(input.transactionId != null && { transactionId: input.transactionId }),
23
- });
15
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ database: [],
17
+ parameterSets: (_) => se_SqlParameterSets(_, context),
18
+ resourceArn: [],
19
+ schema: [],
20
+ secretArn: [],
21
+ sql: [],
22
+ transactionId: [],
23
+ }));
24
24
  return new protocol_http_1.HttpRequest({
25
25
  protocol,
26
26
  hostname,
@@ -39,12 +39,12 @@ const se_BeginTransactionCommand = async (input, context) => {
39
39
  };
40
40
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BeginTransaction";
41
41
  let body;
42
- body = JSON.stringify({
43
- ...(input.database != null && { database: input.database }),
44
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
45
- ...(input.schema != null && { schema: input.schema }),
46
- ...(input.secretArn != null && { secretArn: input.secretArn }),
47
- });
42
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
43
+ database: [],
44
+ resourceArn: [],
45
+ schema: [],
46
+ secretArn: [],
47
+ }));
48
48
  return new protocol_http_1.HttpRequest({
49
49
  protocol,
50
50
  hostname,
@@ -63,11 +63,11 @@ const se_CommitTransactionCommand = async (input, context) => {
63
63
  };
64
64
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CommitTransaction";
65
65
  let body;
66
- body = JSON.stringify({
67
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
68
- ...(input.secretArn != null && { secretArn: input.secretArn }),
69
- ...(input.transactionId != null && { transactionId: input.transactionId }),
70
- });
66
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
67
+ resourceArn: [],
68
+ secretArn: [],
69
+ transactionId: [],
70
+ }));
71
71
  return new protocol_http_1.HttpRequest({
72
72
  protocol,
73
73
  hostname,
@@ -86,13 +86,13 @@ const se_ExecuteSqlCommand = async (input, context) => {
86
86
  };
87
87
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ExecuteSql";
88
88
  let body;
89
- body = JSON.stringify({
90
- ...(input.awsSecretStoreArn != null && { awsSecretStoreArn: input.awsSecretStoreArn }),
91
- ...(input.database != null && { database: input.database }),
92
- ...(input.dbClusterOrInstanceArn != null && { dbClusterOrInstanceArn: input.dbClusterOrInstanceArn }),
93
- ...(input.schema != null && { schema: input.schema }),
94
- ...(input.sqlStatements != null && { sqlStatements: input.sqlStatements }),
95
- });
89
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
90
+ awsSecretStoreArn: [],
91
+ database: [],
92
+ dbClusterOrInstanceArn: [],
93
+ schema: [],
94
+ sqlStatements: [],
95
+ }));
96
96
  return new protocol_http_1.HttpRequest({
97
97
  protocol,
98
98
  hostname,
@@ -111,19 +111,19 @@ const se_ExecuteStatementCommand = async (input, context) => {
111
111
  };
112
112
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Execute";
113
113
  let body;
114
- body = JSON.stringify({
115
- ...(input.continueAfterTimeout != null && { continueAfterTimeout: input.continueAfterTimeout }),
116
- ...(input.database != null && { database: input.database }),
117
- ...(input.formatRecordsAs != null && { formatRecordsAs: input.formatRecordsAs }),
118
- ...(input.includeResultMetadata != null && { includeResultMetadata: input.includeResultMetadata }),
119
- ...(input.parameters != null && { parameters: se_SqlParametersList(input.parameters, context) }),
120
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
121
- ...(input.resultSetOptions != null && { resultSetOptions: se_ResultSetOptions(input.resultSetOptions, context) }),
122
- ...(input.schema != null && { schema: input.schema }),
123
- ...(input.secretArn != null && { secretArn: input.secretArn }),
124
- ...(input.sql != null && { sql: input.sql }),
125
- ...(input.transactionId != null && { transactionId: input.transactionId }),
126
- });
114
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
115
+ continueAfterTimeout: [],
116
+ database: [],
117
+ formatRecordsAs: [],
118
+ includeResultMetadata: [],
119
+ parameters: (_) => se_SqlParametersList(_, context),
120
+ resourceArn: [],
121
+ resultSetOptions: (_) => (0, smithy_client_1._json)(_),
122
+ schema: [],
123
+ secretArn: [],
124
+ sql: [],
125
+ transactionId: [],
126
+ }));
127
127
  return new protocol_http_1.HttpRequest({
128
128
  protocol,
129
129
  hostname,
@@ -142,11 +142,11 @@ const se_RollbackTransactionCommand = async (input, context) => {
142
142
  };
143
143
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RollbackTransaction";
144
144
  let body;
145
- body = JSON.stringify({
146
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
147
- ...(input.secretArn != null && { secretArn: input.secretArn }),
148
- ...(input.transactionId != null && { transactionId: input.transactionId }),
149
- });
145
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
146
+ resourceArn: [],
147
+ secretArn: [],
148
+ transactionId: [],
149
+ }));
150
150
  return new protocol_http_1.HttpRequest({
151
151
  protocol,
152
152
  hostname,
@@ -162,13 +162,14 @@ const de_BatchExecuteStatementCommand = async (output, context) => {
162
162
  if (output.statusCode !== 200 && output.statusCode >= 300) {
163
163
  return de_BatchExecuteStatementCommandError(output, context);
164
164
  }
165
- const contents = map({
165
+ const contents = (0, smithy_client_1.map)({
166
166
  $metadata: deserializeMetadata(output),
167
167
  });
168
168
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
169
- if (data.updateResults != null) {
170
- contents.updateResults = de_UpdateResults(data.updateResults, context);
171
- }
169
+ const doc = (0, smithy_client_1.take)(data, {
170
+ updateResults: (_) => de_UpdateResults(_, context),
171
+ });
172
+ Object.assign(contents, doc);
172
173
  return contents;
173
174
  };
174
175
  exports.de_BatchExecuteStatementCommand = de_BatchExecuteStatementCommand;
@@ -199,10 +200,9 @@ const de_BatchExecuteStatementCommandError = async (output, context) => {
199
200
  throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
200
201
  default:
201
202
  const parsedBody = parsedOutput.body;
202
- (0, smithy_client_1.throwDefaultError)({
203
+ return throwDefaultError({
203
204
  output,
204
205
  parsedBody,
205
- exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
206
206
  errorCode,
207
207
  });
208
208
  }
@@ -211,13 +211,14 @@ const de_BeginTransactionCommand = async (output, context) => {
211
211
  if (output.statusCode !== 200 && output.statusCode >= 300) {
212
212
  return de_BeginTransactionCommandError(output, context);
213
213
  }
214
- const contents = map({
214
+ const contents = (0, smithy_client_1.map)({
215
215
  $metadata: deserializeMetadata(output),
216
216
  });
217
217
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
218
- if (data.transactionId != null) {
219
- contents.transactionId = (0, smithy_client_1.expectString)(data.transactionId);
220
- }
218
+ const doc = (0, smithy_client_1.take)(data, {
219
+ transactionId: smithy_client_1.expectString,
220
+ });
221
+ Object.assign(contents, doc);
221
222
  return contents;
222
223
  };
223
224
  exports.de_BeginTransactionCommand = de_BeginTransactionCommand;
@@ -248,10 +249,9 @@ const de_BeginTransactionCommandError = async (output, context) => {
248
249
  throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
249
250
  default:
250
251
  const parsedBody = parsedOutput.body;
251
- (0, smithy_client_1.throwDefaultError)({
252
+ return throwDefaultError({
252
253
  output,
253
254
  parsedBody,
254
- exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
255
255
  errorCode,
256
256
  });
257
257
  }
@@ -260,13 +260,14 @@ const de_CommitTransactionCommand = async (output, context) => {
260
260
  if (output.statusCode !== 200 && output.statusCode >= 300) {
261
261
  return de_CommitTransactionCommandError(output, context);
262
262
  }
263
- const contents = map({
263
+ const contents = (0, smithy_client_1.map)({
264
264
  $metadata: deserializeMetadata(output),
265
265
  });
266
266
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
267
- if (data.transactionStatus != null) {
268
- contents.transactionStatus = (0, smithy_client_1.expectString)(data.transactionStatus);
269
- }
267
+ const doc = (0, smithy_client_1.take)(data, {
268
+ transactionStatus: smithy_client_1.expectString,
269
+ });
270
+ Object.assign(contents, doc);
270
271
  return contents;
271
272
  };
272
273
  exports.de_CommitTransactionCommand = de_CommitTransactionCommand;
@@ -300,10 +301,9 @@ const de_CommitTransactionCommandError = async (output, context) => {
300
301
  throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
301
302
  default:
302
303
  const parsedBody = parsedOutput.body;
303
- (0, smithy_client_1.throwDefaultError)({
304
+ return throwDefaultError({
304
305
  output,
305
306
  parsedBody,
306
- exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
307
307
  errorCode,
308
308
  });
309
309
  }
@@ -312,13 +312,14 @@ const de_ExecuteSqlCommand = async (output, context) => {
312
312
  if (output.statusCode !== 200 && output.statusCode >= 300) {
313
313
  return de_ExecuteSqlCommandError(output, context);
314
314
  }
315
- const contents = map({
315
+ const contents = (0, smithy_client_1.map)({
316
316
  $metadata: deserializeMetadata(output),
317
317
  });
318
318
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
319
- if (data.sqlStatementResults != null) {
320
- contents.sqlStatementResults = de_SqlStatementResults(data.sqlStatementResults, context);
321
- }
319
+ const doc = (0, smithy_client_1.take)(data, {
320
+ sqlStatementResults: (_) => de_SqlStatementResults(_, context),
321
+ });
322
+ Object.assign(contents, doc);
322
323
  return contents;
323
324
  };
324
325
  exports.de_ExecuteSqlCommand = de_ExecuteSqlCommand;
@@ -346,10 +347,9 @@ const de_ExecuteSqlCommandError = async (output, context) => {
346
347
  throw await de_ServiceUnavailableErrorRes(parsedOutput, context);
347
348
  default:
348
349
  const parsedBody = parsedOutput.body;
349
- (0, smithy_client_1.throwDefaultError)({
350
+ return throwDefaultError({
350
351
  output,
351
352
  parsedBody,
352
- exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
353
353
  errorCode,
354
354
  });
355
355
  }
@@ -358,25 +358,18 @@ const de_ExecuteStatementCommand = async (output, context) => {
358
358
  if (output.statusCode !== 200 && output.statusCode >= 300) {
359
359
  return de_ExecuteStatementCommandError(output, context);
360
360
  }
361
- const contents = map({
361
+ const contents = (0, smithy_client_1.map)({
362
362
  $metadata: deserializeMetadata(output),
363
363
  });
364
364
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
365
- if (data.columnMetadata != null) {
366
- contents.columnMetadata = de_Metadata(data.columnMetadata, context);
367
- }
368
- if (data.formattedRecords != null) {
369
- contents.formattedRecords = (0, smithy_client_1.expectString)(data.formattedRecords);
370
- }
371
- if (data.generatedFields != null) {
372
- contents.generatedFields = de_FieldList(data.generatedFields, context);
373
- }
374
- if (data.numberOfRecordsUpdated != null) {
375
- contents.numberOfRecordsUpdated = (0, smithy_client_1.expectLong)(data.numberOfRecordsUpdated);
376
- }
377
- if (data.records != null) {
378
- contents.records = de_SqlRecords(data.records, context);
379
- }
365
+ const doc = (0, smithy_client_1.take)(data, {
366
+ columnMetadata: smithy_client_1._json,
367
+ formattedRecords: smithy_client_1.expectString,
368
+ generatedFields: (_) => de_FieldList(_, context),
369
+ numberOfRecordsUpdated: smithy_client_1.expectLong,
370
+ records: (_) => de_SqlRecords(_, context),
371
+ });
372
+ Object.assign(contents, doc);
380
373
  return contents;
381
374
  };
382
375
  exports.de_ExecuteStatementCommand = de_ExecuteStatementCommand;
@@ -407,10 +400,9 @@ const de_ExecuteStatementCommandError = async (output, context) => {
407
400
  throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
408
401
  default:
409
402
  const parsedBody = parsedOutput.body;
410
- (0, smithy_client_1.throwDefaultError)({
403
+ return throwDefaultError({
411
404
  output,
412
405
  parsedBody,
413
- exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
414
406
  errorCode,
415
407
  });
416
408
  }
@@ -419,13 +411,14 @@ const de_RollbackTransactionCommand = async (output, context) => {
419
411
  if (output.statusCode !== 200 && output.statusCode >= 300) {
420
412
  return de_RollbackTransactionCommandError(output, context);
421
413
  }
422
- const contents = map({
414
+ const contents = (0, smithy_client_1.map)({
423
415
  $metadata: deserializeMetadata(output),
424
416
  });
425
417
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
426
- if (data.transactionStatus != null) {
427
- contents.transactionStatus = (0, smithy_client_1.expectString)(data.transactionStatus);
428
- }
418
+ const doc = (0, smithy_client_1.take)(data, {
419
+ transactionStatus: smithy_client_1.expectString,
420
+ });
421
+ Object.assign(contents, doc);
429
422
  return contents;
430
423
  };
431
424
  exports.de_RollbackTransactionCommand = de_RollbackTransactionCommand;
@@ -459,21 +452,21 @@ const de_RollbackTransactionCommandError = async (output, context) => {
459
452
  throw await de_StatementTimeoutExceptionRes(parsedOutput, context);
460
453
  default:
461
454
  const parsedBody = parsedOutput.body;
462
- (0, smithy_client_1.throwDefaultError)({
455
+ return throwDefaultError({
463
456
  output,
464
457
  parsedBody,
465
- exceptionCtor: RDSDataServiceException_1.RDSDataServiceException,
466
458
  errorCode,
467
459
  });
468
460
  }
469
461
  };
470
- const map = smithy_client_1.map;
462
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(RDSDataServiceException_1.RDSDataServiceException);
471
463
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
472
- const contents = map({});
464
+ const contents = (0, smithy_client_1.map)({});
473
465
  const data = parsedOutput.body;
474
- if (data.message != null) {
475
- contents.message = (0, smithy_client_1.expectString)(data.message);
476
- }
466
+ const doc = (0, smithy_client_1.take)(data, {
467
+ message: smithy_client_1.expectString,
468
+ });
469
+ Object.assign(contents, doc);
477
470
  const exception = new models_0_1.AccessDeniedException({
478
471
  $metadata: deserializeMetadata(parsedOutput),
479
472
  ...contents,
@@ -481,11 +474,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
481
474
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
482
475
  };
483
476
  const de_BadRequestExceptionRes = async (parsedOutput, context) => {
484
- const contents = map({});
477
+ const contents = (0, smithy_client_1.map)({});
485
478
  const data = parsedOutput.body;
486
- if (data.message != null) {
487
- contents.message = (0, smithy_client_1.expectString)(data.message);
488
- }
479
+ const doc = (0, smithy_client_1.take)(data, {
480
+ message: smithy_client_1.expectString,
481
+ });
482
+ Object.assign(contents, doc);
489
483
  const exception = new models_0_1.BadRequestException({
490
484
  $metadata: deserializeMetadata(parsedOutput),
491
485
  ...contents,
@@ -493,11 +487,12 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
493
487
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
494
488
  };
495
489
  const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
496
- const contents = map({});
490
+ const contents = (0, smithy_client_1.map)({});
497
491
  const data = parsedOutput.body;
498
- if (data.message != null) {
499
- contents.message = (0, smithy_client_1.expectString)(data.message);
500
- }
492
+ const doc = (0, smithy_client_1.take)(data, {
493
+ message: smithy_client_1.expectString,
494
+ });
495
+ Object.assign(contents, doc);
501
496
  const exception = new models_0_1.ForbiddenException({
502
497
  $metadata: deserializeMetadata(parsedOutput),
503
498
  ...contents,
@@ -505,8 +500,10 @@ const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
505
500
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
506
501
  };
507
502
  const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
508
- const contents = map({});
503
+ const contents = (0, smithy_client_1.map)({});
509
504
  const data = parsedOutput.body;
505
+ const doc = (0, smithy_client_1.take)(data, {});
506
+ Object.assign(contents, doc);
510
507
  const exception = new models_0_1.InternalServerErrorException({
511
508
  $metadata: deserializeMetadata(parsedOutput),
512
509
  ...contents,
@@ -514,11 +511,12 @@ const de_InternalServerErrorExceptionRes = async (parsedOutput, context) => {
514
511
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
515
512
  };
516
513
  const de_NotFoundExceptionRes = async (parsedOutput, context) => {
517
- const contents = map({});
514
+ const contents = (0, smithy_client_1.map)({});
518
515
  const data = parsedOutput.body;
519
- if (data.message != null) {
520
- contents.message = (0, smithy_client_1.expectString)(data.message);
521
- }
516
+ const doc = (0, smithy_client_1.take)(data, {
517
+ message: smithy_client_1.expectString,
518
+ });
519
+ Object.assign(contents, doc);
522
520
  const exception = new models_0_1.NotFoundException({
523
521
  $metadata: deserializeMetadata(parsedOutput),
524
522
  ...contents,
@@ -526,8 +524,10 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
526
524
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
527
525
  };
528
526
  const de_ServiceUnavailableErrorRes = async (parsedOutput, context) => {
529
- const contents = map({});
527
+ const contents = (0, smithy_client_1.map)({});
530
528
  const data = parsedOutput.body;
529
+ const doc = (0, smithy_client_1.take)(data, {});
530
+ Object.assign(contents, doc);
531
531
  const exception = new models_0_1.ServiceUnavailableError({
532
532
  $metadata: deserializeMetadata(parsedOutput),
533
533
  ...contents,
@@ -535,14 +535,13 @@ const de_ServiceUnavailableErrorRes = async (parsedOutput, context) => {
535
535
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
536
536
  };
537
537
  const de_StatementTimeoutExceptionRes = async (parsedOutput, context) => {
538
- const contents = map({});
538
+ const contents = (0, smithy_client_1.map)({});
539
539
  const data = parsedOutput.body;
540
- if (data.dbConnectionId != null) {
541
- contents.dbConnectionId = (0, smithy_client_1.expectLong)(data.dbConnectionId);
542
- }
543
- if (data.message != null) {
544
- contents.message = (0, smithy_client_1.expectString)(data.message);
545
- }
540
+ const doc = (0, smithy_client_1.take)(data, {
541
+ dbConnectionId: smithy_client_1.expectLong,
542
+ message: smithy_client_1.expectString,
543
+ });
544
+ Object.assign(contents, doc);
546
545
  const exception = new models_0_1.StatementTimeoutException({
547
546
  $metadata: deserializeMetadata(parsedOutput),
548
547
  ...contents,
@@ -559,20 +558,13 @@ const se_ArrayOfArray = (input, context) => {
559
558
  const se_ArrayValue = (input, context) => {
560
559
  return models_0_1.ArrayValue.visit(input, {
561
560
  arrayValues: (value) => ({ arrayValues: se_ArrayOfArray(value, context) }),
562
- booleanValues: (value) => ({ booleanValues: se_BooleanArray(value, context) }),
561
+ booleanValues: (value) => ({ booleanValues: (0, smithy_client_1._json)(value) }),
563
562
  doubleValues: (value) => ({ doubleValues: se_DoubleArray(value, context) }),
564
- longValues: (value) => ({ longValues: se_LongArray(value, context) }),
565
- stringValues: (value) => ({ stringValues: se_StringArray(value, context) }),
563
+ longValues: (value) => ({ longValues: (0, smithy_client_1._json)(value) }),
564
+ stringValues: (value) => ({ stringValues: (0, smithy_client_1._json)(value) }),
566
565
  _: (name, value) => ({ name: value }),
567
566
  });
568
567
  };
569
- const se_BooleanArray = (input, context) => {
570
- return input
571
- .filter((e) => e != null)
572
- .map((entry) => {
573
- return entry;
574
- });
575
- };
576
568
  const se_DoubleArray = (input, context) => {
577
569
  return input
578
570
  .filter((e) => e != null)
@@ -592,25 +584,12 @@ const se_Field = (input, context) => {
592
584
  _: (name, value) => ({ name: value }),
593
585
  });
594
586
  };
595
- const se_LongArray = (input, context) => {
596
- return input
597
- .filter((e) => e != null)
598
- .map((entry) => {
599
- return entry;
600
- });
601
- };
602
- const se_ResultSetOptions = (input, context) => {
603
- return {
604
- ...(input.decimalReturnType != null && { decimalReturnType: input.decimalReturnType }),
605
- ...(input.longReturnType != null && { longReturnType: input.longReturnType }),
606
- };
607
- };
608
587
  const se_SqlParameter = (input, context) => {
609
- return {
610
- ...(input.name != null && { name: input.name }),
611
- ...(input.typeHint != null && { typeHint: input.typeHint }),
612
- ...(input.value != null && { value: se_Field(input.value, context) }),
613
- };
588
+ return (0, smithy_client_1.take)(input, {
589
+ name: [],
590
+ typeHint: [],
591
+ value: (_) => se_Field(_, context),
592
+ });
614
593
  };
615
594
  const se_SqlParameterSets = (input, context) => {
616
595
  return input
@@ -626,20 +605,10 @@ const se_SqlParametersList = (input, context) => {
626
605
  return se_SqlParameter(entry, context);
627
606
  });
628
607
  };
629
- const se_StringArray = (input, context) => {
630
- return input
631
- .filter((e) => e != null)
632
- .map((entry) => {
633
- return entry;
634
- });
635
- };
636
608
  const de_ArrayOfArray = (output, context) => {
637
609
  const retVal = (output || [])
638
610
  .filter((e) => e != null)
639
611
  .map((entry) => {
640
- if (entry === null) {
641
- return null;
642
- }
643
612
  return de_ArrayValue((0, smithy_client_1.expectUnion)(entry), context);
644
613
  });
645
614
  return retVal;
@@ -652,7 +621,7 @@ const de_ArrayValue = (output, context) => {
652
621
  }
653
622
  if (output.booleanValues != null) {
654
623
  return {
655
- booleanValues: de_BooleanArray(output.booleanValues, context),
624
+ booleanValues: (0, smithy_client_1._json)(output.booleanValues),
656
625
  };
657
626
  }
658
627
  if (output.doubleValues != null) {
@@ -662,12 +631,12 @@ const de_ArrayValue = (output, context) => {
662
631
  }
663
632
  if (output.longValues != null) {
664
633
  return {
665
- longValues: de_LongArray(output.longValues, context),
634
+ longValues: (0, smithy_client_1._json)(output.longValues),
666
635
  };
667
636
  }
668
637
  if (output.stringValues != null) {
669
638
  return {
670
- stringValues: de_StringArray(output.stringValues, context),
639
+ stringValues: (0, smithy_client_1._json)(output.stringValues),
671
640
  };
672
641
  }
673
642
  return { $unknown: Object.entries(output)[0] };
@@ -676,49 +645,14 @@ const de_ArrayValueList = (output, context) => {
676
645
  const retVal = (output || [])
677
646
  .filter((e) => e != null)
678
647
  .map((entry) => {
679
- if (entry === null) {
680
- return null;
681
- }
682
648
  return de_Value((0, smithy_client_1.expectUnion)(entry), context);
683
649
  });
684
650
  return retVal;
685
651
  };
686
- const de_BooleanArray = (output, context) => {
687
- const retVal = (output || [])
688
- .filter((e) => e != null)
689
- .map((entry) => {
690
- if (entry === null) {
691
- return null;
692
- }
693
- return (0, smithy_client_1.expectBoolean)(entry);
694
- });
695
- return retVal;
696
- };
697
- const de_ColumnMetadata = (output, context) => {
698
- return {
699
- arrayBaseColumnType: (0, smithy_client_1.expectInt32)(output.arrayBaseColumnType),
700
- isAutoIncrement: (0, smithy_client_1.expectBoolean)(output.isAutoIncrement),
701
- isCaseSensitive: (0, smithy_client_1.expectBoolean)(output.isCaseSensitive),
702
- isCurrency: (0, smithy_client_1.expectBoolean)(output.isCurrency),
703
- isSigned: (0, smithy_client_1.expectBoolean)(output.isSigned),
704
- label: (0, smithy_client_1.expectString)(output.label),
705
- name: (0, smithy_client_1.expectString)(output.name),
706
- nullable: (0, smithy_client_1.expectInt32)(output.nullable),
707
- precision: (0, smithy_client_1.expectInt32)(output.precision),
708
- scale: (0, smithy_client_1.expectInt32)(output.scale),
709
- schemaName: (0, smithy_client_1.expectString)(output.schemaName),
710
- tableName: (0, smithy_client_1.expectString)(output.tableName),
711
- type: (0, smithy_client_1.expectInt32)(output.type),
712
- typeName: (0, smithy_client_1.expectString)(output.typeName),
713
- };
714
- };
715
652
  const de_DoubleArray = (output, context) => {
716
653
  const retVal = (output || [])
717
654
  .filter((e) => e != null)
718
655
  .map((entry) => {
719
- if (entry === null) {
720
- return null;
721
- }
722
656
  return (0, smithy_client_1.limitedParseDouble)(entry);
723
657
  });
724
658
  return retVal;
@@ -755,70 +689,33 @@ const de_FieldList = (output, context) => {
755
689
  const retVal = (output || [])
756
690
  .filter((e) => e != null)
757
691
  .map((entry) => {
758
- if (entry === null) {
759
- return null;
760
- }
761
692
  return de_Field((0, smithy_client_1.expectUnion)(entry), context);
762
693
  });
763
694
  return retVal;
764
695
  };
765
- const de_LongArray = (output, context) => {
766
- const retVal = (output || [])
767
- .filter((e) => e != null)
768
- .map((entry) => {
769
- if (entry === null) {
770
- return null;
771
- }
772
- return (0, smithy_client_1.expectLong)(entry);
773
- });
774
- return retVal;
775
- };
776
- const de_Metadata = (output, context) => {
777
- const retVal = (output || [])
778
- .filter((e) => e != null)
779
- .map((entry) => {
780
- if (entry === null) {
781
- return null;
782
- }
783
- return de_ColumnMetadata(entry, context);
784
- });
785
- return retVal;
786
- };
787
696
  const de__Record = (output, context) => {
788
- return {
789
- values: output.values != null ? de_Row(output.values, context) : undefined,
790
- };
697
+ return (0, smithy_client_1.take)(output, {
698
+ values: (_) => de_Row(_, context),
699
+ });
791
700
  };
792
701
  const de_Records = (output, context) => {
793
702
  const retVal = (output || [])
794
703
  .filter((e) => e != null)
795
704
  .map((entry) => {
796
- if (entry === null) {
797
- return null;
798
- }
799
705
  return de__Record(entry, context);
800
706
  });
801
707
  return retVal;
802
708
  };
803
709
  const de_ResultFrame = (output, context) => {
804
- return {
805
- records: output.records != null ? de_Records(output.records, context) : undefined,
806
- resultSetMetadata: output.resultSetMetadata != null ? de_ResultSetMetadata(output.resultSetMetadata, context) : undefined,
807
- };
808
- };
809
- const de_ResultSetMetadata = (output, context) => {
810
- return {
811
- columnCount: (0, smithy_client_1.expectLong)(output.columnCount),
812
- columnMetadata: output.columnMetadata != null ? de_Metadata(output.columnMetadata, context) : undefined,
813
- };
710
+ return (0, smithy_client_1.take)(output, {
711
+ records: (_) => de_Records(_, context),
712
+ resultSetMetadata: smithy_client_1._json,
713
+ });
814
714
  };
815
715
  const de_Row = (output, context) => {
816
716
  const retVal = (output || [])
817
717
  .filter((e) => e != null)
818
718
  .map((entry) => {
819
- if (entry === null) {
820
- return null;
821
- }
822
719
  return de_Value((0, smithy_client_1.expectUnion)(entry), context);
823
720
  });
824
721
  return retVal;
@@ -827,58 +724,38 @@ const de_SqlRecords = (output, context) => {
827
724
  const retVal = (output || [])
828
725
  .filter((e) => e != null)
829
726
  .map((entry) => {
830
- if (entry === null) {
831
- return null;
832
- }
833
727
  return de_FieldList(entry, context);
834
728
  });
835
729
  return retVal;
836
730
  };
837
731
  const de_SqlStatementResult = (output, context) => {
838
- return {
839
- numberOfRecordsUpdated: (0, smithy_client_1.expectLong)(output.numberOfRecordsUpdated),
840
- resultFrame: output.resultFrame != null ? de_ResultFrame(output.resultFrame, context) : undefined,
841
- };
732
+ return (0, smithy_client_1.take)(output, {
733
+ numberOfRecordsUpdated: smithy_client_1.expectLong,
734
+ resultFrame: (_) => de_ResultFrame(_, context),
735
+ });
842
736
  };
843
737
  const de_SqlStatementResults = (output, context) => {
844
738
  const retVal = (output || [])
845
739
  .filter((e) => e != null)
846
740
  .map((entry) => {
847
- if (entry === null) {
848
- return null;
849
- }
850
741
  return de_SqlStatementResult(entry, context);
851
742
  });
852
743
  return retVal;
853
744
  };
854
- const de_StringArray = (output, context) => {
855
- const retVal = (output || [])
856
- .filter((e) => e != null)
857
- .map((entry) => {
858
- if (entry === null) {
859
- return null;
860
- }
861
- return (0, smithy_client_1.expectString)(entry);
862
- });
863
- return retVal;
864
- };
865
745
  const de_StructValue = (output, context) => {
866
- return {
867
- attributes: output.attributes != null ? de_ArrayValueList(output.attributes, context) : undefined,
868
- };
746
+ return (0, smithy_client_1.take)(output, {
747
+ attributes: (_) => de_ArrayValueList(_, context),
748
+ });
869
749
  };
870
750
  const de_UpdateResult = (output, context) => {
871
- return {
872
- generatedFields: output.generatedFields != null ? de_FieldList(output.generatedFields, context) : undefined,
873
- };
751
+ return (0, smithy_client_1.take)(output, {
752
+ generatedFields: (_) => de_FieldList(_, context),
753
+ });
874
754
  };
875
755
  const de_UpdateResults = (output, context) => {
876
756
  const retVal = (output || [])
877
757
  .filter((e) => e != null)
878
758
  .map((entry) => {
879
- if (entry === null) {
880
- return null;
881
- }
882
759
  return de_UpdateResult(entry, context);
883
760
  });
884
761
  return retVal;