@aws-sdk/client-timestream-write 3.310.0 → 3.315.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.
@@ -7,192 +7,135 @@ const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const TimestreamWriteServiceException_1 = require("../models/TimestreamWriteServiceException");
9
9
  const se_CreateBatchLoadTaskCommand = async (input, context) => {
10
- const headers = {
11
- "content-type": "application/x-amz-json-1.0",
12
- "x-amz-target": "Timestream_20181101.CreateBatchLoadTask",
13
- };
10
+ const headers = sharedHeaders("CreateBatchLoadTask");
14
11
  let body;
15
12
  body = JSON.stringify(se_CreateBatchLoadTaskRequest(input, context));
16
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
14
  };
18
15
  exports.se_CreateBatchLoadTaskCommand = se_CreateBatchLoadTaskCommand;
19
16
  const se_CreateDatabaseCommand = async (input, context) => {
20
- const headers = {
21
- "content-type": "application/x-amz-json-1.0",
22
- "x-amz-target": "Timestream_20181101.CreateDatabase",
23
- };
17
+ const headers = sharedHeaders("CreateDatabase");
24
18
  let body;
25
- body = JSON.stringify(se_CreateDatabaseRequest(input, context));
19
+ body = JSON.stringify((0, smithy_client_1._json)(input));
26
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
21
  };
28
22
  exports.se_CreateDatabaseCommand = se_CreateDatabaseCommand;
29
23
  const se_CreateTableCommand = async (input, context) => {
30
- const headers = {
31
- "content-type": "application/x-amz-json-1.0",
32
- "x-amz-target": "Timestream_20181101.CreateTable",
33
- };
24
+ const headers = sharedHeaders("CreateTable");
34
25
  let body;
35
- body = JSON.stringify(se_CreateTableRequest(input, context));
26
+ body = JSON.stringify((0, smithy_client_1._json)(input));
36
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
28
  };
38
29
  exports.se_CreateTableCommand = se_CreateTableCommand;
39
30
  const se_DeleteDatabaseCommand = async (input, context) => {
40
- const headers = {
41
- "content-type": "application/x-amz-json-1.0",
42
- "x-amz-target": "Timestream_20181101.DeleteDatabase",
43
- };
31
+ const headers = sharedHeaders("DeleteDatabase");
44
32
  let body;
45
- body = JSON.stringify(se_DeleteDatabaseRequest(input, context));
33
+ body = JSON.stringify((0, smithy_client_1._json)(input));
46
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
35
  };
48
36
  exports.se_DeleteDatabaseCommand = se_DeleteDatabaseCommand;
49
37
  const se_DeleteTableCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-amz-json-1.0",
52
- "x-amz-target": "Timestream_20181101.DeleteTable",
53
- };
38
+ const headers = sharedHeaders("DeleteTable");
54
39
  let body;
55
- body = JSON.stringify(se_DeleteTableRequest(input, context));
40
+ body = JSON.stringify((0, smithy_client_1._json)(input));
56
41
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
42
  };
58
43
  exports.se_DeleteTableCommand = se_DeleteTableCommand;
59
44
  const se_DescribeBatchLoadTaskCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.0",
62
- "x-amz-target": "Timestream_20181101.DescribeBatchLoadTask",
63
- };
45
+ const headers = sharedHeaders("DescribeBatchLoadTask");
64
46
  let body;
65
- body = JSON.stringify(se_DescribeBatchLoadTaskRequest(input, context));
47
+ body = JSON.stringify((0, smithy_client_1._json)(input));
66
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
49
  };
68
50
  exports.se_DescribeBatchLoadTaskCommand = se_DescribeBatchLoadTaskCommand;
69
51
  const se_DescribeDatabaseCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "Timestream_20181101.DescribeDatabase",
73
- };
52
+ const headers = sharedHeaders("DescribeDatabase");
74
53
  let body;
75
- body = JSON.stringify(se_DescribeDatabaseRequest(input, context));
54
+ body = JSON.stringify((0, smithy_client_1._json)(input));
76
55
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
56
  };
78
57
  exports.se_DescribeDatabaseCommand = se_DescribeDatabaseCommand;
79
58
  const se_DescribeEndpointsCommand = async (input, context) => {
80
- const headers = {
81
- "content-type": "application/x-amz-json-1.0",
82
- "x-amz-target": "Timestream_20181101.DescribeEndpoints",
83
- };
59
+ const headers = sharedHeaders("DescribeEndpoints");
84
60
  let body;
85
- body = JSON.stringify(se_DescribeEndpointsRequest(input, context));
61
+ body = JSON.stringify((0, smithy_client_1._json)(input));
86
62
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
87
63
  };
88
64
  exports.se_DescribeEndpointsCommand = se_DescribeEndpointsCommand;
89
65
  const se_DescribeTableCommand = async (input, context) => {
90
- const headers = {
91
- "content-type": "application/x-amz-json-1.0",
92
- "x-amz-target": "Timestream_20181101.DescribeTable",
93
- };
66
+ const headers = sharedHeaders("DescribeTable");
94
67
  let body;
95
- body = JSON.stringify(se_DescribeTableRequest(input, context));
68
+ body = JSON.stringify((0, smithy_client_1._json)(input));
96
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
97
70
  };
98
71
  exports.se_DescribeTableCommand = se_DescribeTableCommand;
99
72
  const se_ListBatchLoadTasksCommand = async (input, context) => {
100
- const headers = {
101
- "content-type": "application/x-amz-json-1.0",
102
- "x-amz-target": "Timestream_20181101.ListBatchLoadTasks",
103
- };
73
+ const headers = sharedHeaders("ListBatchLoadTasks");
104
74
  let body;
105
- body = JSON.stringify(se_ListBatchLoadTasksRequest(input, context));
75
+ body = JSON.stringify((0, smithy_client_1._json)(input));
106
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
77
  };
108
78
  exports.se_ListBatchLoadTasksCommand = se_ListBatchLoadTasksCommand;
109
79
  const se_ListDatabasesCommand = async (input, context) => {
110
- const headers = {
111
- "content-type": "application/x-amz-json-1.0",
112
- "x-amz-target": "Timestream_20181101.ListDatabases",
113
- };
80
+ const headers = sharedHeaders("ListDatabases");
114
81
  let body;
115
- body = JSON.stringify(se_ListDatabasesRequest(input, context));
82
+ body = JSON.stringify((0, smithy_client_1._json)(input));
116
83
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
117
84
  };
118
85
  exports.se_ListDatabasesCommand = se_ListDatabasesCommand;
119
86
  const se_ListTablesCommand = async (input, context) => {
120
- const headers = {
121
- "content-type": "application/x-amz-json-1.0",
122
- "x-amz-target": "Timestream_20181101.ListTables",
123
- };
87
+ const headers = sharedHeaders("ListTables");
124
88
  let body;
125
- body = JSON.stringify(se_ListTablesRequest(input, context));
89
+ body = JSON.stringify((0, smithy_client_1._json)(input));
126
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
91
  };
128
92
  exports.se_ListTablesCommand = se_ListTablesCommand;
129
93
  const se_ListTagsForResourceCommand = async (input, context) => {
130
- const headers = {
131
- "content-type": "application/x-amz-json-1.0",
132
- "x-amz-target": "Timestream_20181101.ListTagsForResource",
133
- };
94
+ const headers = sharedHeaders("ListTagsForResource");
134
95
  let body;
135
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
96
+ body = JSON.stringify((0, smithy_client_1._json)(input));
136
97
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
98
  };
138
99
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
139
100
  const se_ResumeBatchLoadTaskCommand = async (input, context) => {
140
- const headers = {
141
- "content-type": "application/x-amz-json-1.0",
142
- "x-amz-target": "Timestream_20181101.ResumeBatchLoadTask",
143
- };
101
+ const headers = sharedHeaders("ResumeBatchLoadTask");
144
102
  let body;
145
- body = JSON.stringify(se_ResumeBatchLoadTaskRequest(input, context));
103
+ body = JSON.stringify((0, smithy_client_1._json)(input));
146
104
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
105
  };
148
106
  exports.se_ResumeBatchLoadTaskCommand = se_ResumeBatchLoadTaskCommand;
149
107
  const se_TagResourceCommand = async (input, context) => {
150
- const headers = {
151
- "content-type": "application/x-amz-json-1.0",
152
- "x-amz-target": "Timestream_20181101.TagResource",
153
- };
108
+ const headers = sharedHeaders("TagResource");
154
109
  let body;
155
- body = JSON.stringify(se_TagResourceRequest(input, context));
110
+ body = JSON.stringify((0, smithy_client_1._json)(input));
156
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
112
  };
158
113
  exports.se_TagResourceCommand = se_TagResourceCommand;
159
114
  const se_UntagResourceCommand = async (input, context) => {
160
- const headers = {
161
- "content-type": "application/x-amz-json-1.0",
162
- "x-amz-target": "Timestream_20181101.UntagResource",
163
- };
115
+ const headers = sharedHeaders("UntagResource");
164
116
  let body;
165
- body = JSON.stringify(se_UntagResourceRequest(input, context));
117
+ body = JSON.stringify((0, smithy_client_1._json)(input));
166
118
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
167
119
  };
168
120
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
169
121
  const se_UpdateDatabaseCommand = async (input, context) => {
170
- const headers = {
171
- "content-type": "application/x-amz-json-1.0",
172
- "x-amz-target": "Timestream_20181101.UpdateDatabase",
173
- };
122
+ const headers = sharedHeaders("UpdateDatabase");
174
123
  let body;
175
- body = JSON.stringify(se_UpdateDatabaseRequest(input, context));
124
+ body = JSON.stringify((0, smithy_client_1._json)(input));
176
125
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
177
126
  };
178
127
  exports.se_UpdateDatabaseCommand = se_UpdateDatabaseCommand;
179
128
  const se_UpdateTableCommand = async (input, context) => {
180
- const headers = {
181
- "content-type": "application/x-amz-json-1.0",
182
- "x-amz-target": "Timestream_20181101.UpdateTable",
183
- };
129
+ const headers = sharedHeaders("UpdateTable");
184
130
  let body;
185
- body = JSON.stringify(se_UpdateTableRequest(input, context));
131
+ body = JSON.stringify((0, smithy_client_1._json)(input));
186
132
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
187
133
  };
188
134
  exports.se_UpdateTableCommand = se_UpdateTableCommand;
189
135
  const se_WriteRecordsCommand = async (input, context) => {
190
- const headers = {
191
- "content-type": "application/x-amz-json-1.0",
192
- "x-amz-target": "Timestream_20181101.WriteRecords",
193
- };
136
+ const headers = sharedHeaders("WriteRecords");
194
137
  let body;
195
- body = JSON.stringify(se_WriteRecordsRequest(input, context));
138
+ body = JSON.stringify((0, smithy_client_1._json)(input));
196
139
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
140
  };
198
141
  exports.se_WriteRecordsCommand = se_WriteRecordsCommand;
@@ -202,12 +145,12 @@ const de_CreateBatchLoadTaskCommand = async (output, context) => {
202
145
  }
203
146
  const data = await parseBody(output.body, context);
204
147
  let contents = {};
205
- contents = de_CreateBatchLoadTaskResponse(data, context);
148
+ contents = (0, smithy_client_1._json)(data);
206
149
  const response = {
207
150
  $metadata: deserializeMetadata(output),
208
151
  ...contents,
209
152
  };
210
- return Promise.resolve(response);
153
+ return response;
211
154
  };
212
155
  exports.de_CreateBatchLoadTaskCommand = de_CreateBatchLoadTaskCommand;
213
156
  const de_CreateBatchLoadTaskCommandError = async (output, context) => {
@@ -243,10 +186,9 @@ const de_CreateBatchLoadTaskCommandError = async (output, context) => {
243
186
  throw await de_ValidationExceptionRes(parsedOutput, context);
244
187
  default:
245
188
  const parsedBody = parsedOutput.body;
246
- (0, smithy_client_1.throwDefaultError)({
189
+ return throwDefaultError({
247
190
  output,
248
191
  parsedBody,
249
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
250
192
  errorCode,
251
193
  });
252
194
  }
@@ -262,7 +204,7 @@ const de_CreateDatabaseCommand = async (output, context) => {
262
204
  $metadata: deserializeMetadata(output),
263
205
  ...contents,
264
206
  };
265
- return Promise.resolve(response);
207
+ return response;
266
208
  };
267
209
  exports.de_CreateDatabaseCommand = de_CreateDatabaseCommand;
268
210
  const de_CreateDatabaseCommandError = async (output, context) => {
@@ -295,10 +237,9 @@ const de_CreateDatabaseCommandError = async (output, context) => {
295
237
  throw await de_ValidationExceptionRes(parsedOutput, context);
296
238
  default:
297
239
  const parsedBody = parsedOutput.body;
298
- (0, smithy_client_1.throwDefaultError)({
240
+ return throwDefaultError({
299
241
  output,
300
242
  parsedBody,
301
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
302
243
  errorCode,
303
244
  });
304
245
  }
@@ -314,7 +255,7 @@ const de_CreateTableCommand = async (output, context) => {
314
255
  $metadata: deserializeMetadata(output),
315
256
  ...contents,
316
257
  };
317
- return Promise.resolve(response);
258
+ return response;
318
259
  };
319
260
  exports.de_CreateTableCommand = de_CreateTableCommand;
320
261
  const de_CreateTableCommandError = async (output, context) => {
@@ -350,10 +291,9 @@ const de_CreateTableCommandError = async (output, context) => {
350
291
  throw await de_ValidationExceptionRes(parsedOutput, context);
351
292
  default:
352
293
  const parsedBody = parsedOutput.body;
353
- (0, smithy_client_1.throwDefaultError)({
294
+ return throwDefaultError({
354
295
  output,
355
296
  parsedBody,
356
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
357
297
  errorCode,
358
298
  });
359
299
  }
@@ -366,7 +306,7 @@ const de_DeleteDatabaseCommand = async (output, context) => {
366
306
  const response = {
367
307
  $metadata: deserializeMetadata(output),
368
308
  };
369
- return Promise.resolve(response);
309
+ return response;
370
310
  };
371
311
  exports.de_DeleteDatabaseCommand = de_DeleteDatabaseCommand;
372
312
  const de_DeleteDatabaseCommandError = async (output, context) => {
@@ -396,10 +336,9 @@ const de_DeleteDatabaseCommandError = async (output, context) => {
396
336
  throw await de_ValidationExceptionRes(parsedOutput, context);
397
337
  default:
398
338
  const parsedBody = parsedOutput.body;
399
- (0, smithy_client_1.throwDefaultError)({
339
+ return throwDefaultError({
400
340
  output,
401
341
  parsedBody,
402
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
403
342
  errorCode,
404
343
  });
405
344
  }
@@ -412,7 +351,7 @@ const de_DeleteTableCommand = async (output, context) => {
412
351
  const response = {
413
352
  $metadata: deserializeMetadata(output),
414
353
  };
415
- return Promise.resolve(response);
354
+ return response;
416
355
  };
417
356
  exports.de_DeleteTableCommand = de_DeleteTableCommand;
418
357
  const de_DeleteTableCommandError = async (output, context) => {
@@ -442,10 +381,9 @@ const de_DeleteTableCommandError = async (output, context) => {
442
381
  throw await de_ValidationExceptionRes(parsedOutput, context);
443
382
  default:
444
383
  const parsedBody = parsedOutput.body;
445
- (0, smithy_client_1.throwDefaultError)({
384
+ return throwDefaultError({
446
385
  output,
447
386
  parsedBody,
448
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
449
387
  errorCode,
450
388
  });
451
389
  }
@@ -461,7 +399,7 @@ const de_DescribeBatchLoadTaskCommand = async (output, context) => {
461
399
  $metadata: deserializeMetadata(output),
462
400
  ...contents,
463
401
  };
464
- return Promise.resolve(response);
402
+ return response;
465
403
  };
466
404
  exports.de_DescribeBatchLoadTaskCommand = de_DescribeBatchLoadTaskCommand;
467
405
  const de_DescribeBatchLoadTaskCommandError = async (output, context) => {
@@ -488,10 +426,9 @@ const de_DescribeBatchLoadTaskCommandError = async (output, context) => {
488
426
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
489
427
  default:
490
428
  const parsedBody = parsedOutput.body;
491
- (0, smithy_client_1.throwDefaultError)({
429
+ return throwDefaultError({
492
430
  output,
493
431
  parsedBody,
494
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
495
432
  errorCode,
496
433
  });
497
434
  }
@@ -507,7 +444,7 @@ const de_DescribeDatabaseCommand = async (output, context) => {
507
444
  $metadata: deserializeMetadata(output),
508
445
  ...contents,
509
446
  };
510
- return Promise.resolve(response);
447
+ return response;
511
448
  };
512
449
  exports.de_DescribeDatabaseCommand = de_DescribeDatabaseCommand;
513
450
  const de_DescribeDatabaseCommandError = async (output, context) => {
@@ -537,10 +474,9 @@ const de_DescribeDatabaseCommandError = async (output, context) => {
537
474
  throw await de_ValidationExceptionRes(parsedOutput, context);
538
475
  default:
539
476
  const parsedBody = parsedOutput.body;
540
- (0, smithy_client_1.throwDefaultError)({
477
+ return throwDefaultError({
541
478
  output,
542
479
  parsedBody,
543
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
544
480
  errorCode,
545
481
  });
546
482
  }
@@ -551,12 +487,12 @@ const de_DescribeEndpointsCommand = async (output, context) => {
551
487
  }
552
488
  const data = await parseBody(output.body, context);
553
489
  let contents = {};
554
- contents = de_DescribeEndpointsResponse(data, context);
490
+ contents = (0, smithy_client_1._json)(data);
555
491
  const response = {
556
492
  $metadata: deserializeMetadata(output),
557
493
  ...contents,
558
494
  };
559
- return Promise.resolve(response);
495
+ return response;
560
496
  };
561
497
  exports.de_DescribeEndpointsCommand = de_DescribeEndpointsCommand;
562
498
  const de_DescribeEndpointsCommandError = async (output, context) => {
@@ -577,10 +513,9 @@ const de_DescribeEndpointsCommandError = async (output, context) => {
577
513
  throw await de_ValidationExceptionRes(parsedOutput, context);
578
514
  default:
579
515
  const parsedBody = parsedOutput.body;
580
- (0, smithy_client_1.throwDefaultError)({
516
+ return throwDefaultError({
581
517
  output,
582
518
  parsedBody,
583
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
584
519
  errorCode,
585
520
  });
586
521
  }
@@ -596,7 +531,7 @@ const de_DescribeTableCommand = async (output, context) => {
596
531
  $metadata: deserializeMetadata(output),
597
532
  ...contents,
598
533
  };
599
- return Promise.resolve(response);
534
+ return response;
600
535
  };
601
536
  exports.de_DescribeTableCommand = de_DescribeTableCommand;
602
537
  const de_DescribeTableCommandError = async (output, context) => {
@@ -626,10 +561,9 @@ const de_DescribeTableCommandError = async (output, context) => {
626
561
  throw await de_ValidationExceptionRes(parsedOutput, context);
627
562
  default:
628
563
  const parsedBody = parsedOutput.body;
629
- (0, smithy_client_1.throwDefaultError)({
564
+ return throwDefaultError({
630
565
  output,
631
566
  parsedBody,
632
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
633
567
  errorCode,
634
568
  });
635
569
  }
@@ -645,7 +579,7 @@ const de_ListBatchLoadTasksCommand = async (output, context) => {
645
579
  $metadata: deserializeMetadata(output),
646
580
  ...contents,
647
581
  };
648
- return Promise.resolve(response);
582
+ return response;
649
583
  };
650
584
  exports.de_ListBatchLoadTasksCommand = de_ListBatchLoadTasksCommand;
651
585
  const de_ListBatchLoadTasksCommandError = async (output, context) => {
@@ -672,10 +606,9 @@ const de_ListBatchLoadTasksCommandError = async (output, context) => {
672
606
  throw await de_ValidationExceptionRes(parsedOutput, context);
673
607
  default:
674
608
  const parsedBody = parsedOutput.body;
675
- (0, smithy_client_1.throwDefaultError)({
609
+ return throwDefaultError({
676
610
  output,
677
611
  parsedBody,
678
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
679
612
  errorCode,
680
613
  });
681
614
  }
@@ -691,7 +624,7 @@ const de_ListDatabasesCommand = async (output, context) => {
691
624
  $metadata: deserializeMetadata(output),
692
625
  ...contents,
693
626
  };
694
- return Promise.resolve(response);
627
+ return response;
695
628
  };
696
629
  exports.de_ListDatabasesCommand = de_ListDatabasesCommand;
697
630
  const de_ListDatabasesCommandError = async (output, context) => {
@@ -718,10 +651,9 @@ const de_ListDatabasesCommandError = async (output, context) => {
718
651
  throw await de_ValidationExceptionRes(parsedOutput, context);
719
652
  default:
720
653
  const parsedBody = parsedOutput.body;
721
- (0, smithy_client_1.throwDefaultError)({
654
+ return throwDefaultError({
722
655
  output,
723
656
  parsedBody,
724
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
725
657
  errorCode,
726
658
  });
727
659
  }
@@ -737,7 +669,7 @@ const de_ListTablesCommand = async (output, context) => {
737
669
  $metadata: deserializeMetadata(output),
738
670
  ...contents,
739
671
  };
740
- return Promise.resolve(response);
672
+ return response;
741
673
  };
742
674
  exports.de_ListTablesCommand = de_ListTablesCommand;
743
675
  const de_ListTablesCommandError = async (output, context) => {
@@ -767,10 +699,9 @@ const de_ListTablesCommandError = async (output, context) => {
767
699
  throw await de_ValidationExceptionRes(parsedOutput, context);
768
700
  default:
769
701
  const parsedBody = parsedOutput.body;
770
- (0, smithy_client_1.throwDefaultError)({
702
+ return throwDefaultError({
771
703
  output,
772
704
  parsedBody,
773
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
774
705
  errorCode,
775
706
  });
776
707
  }
@@ -781,12 +712,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
781
712
  }
782
713
  const data = await parseBody(output.body, context);
783
714
  let contents = {};
784
- contents = de_ListTagsForResourceResponse(data, context);
715
+ contents = (0, smithy_client_1._json)(data);
785
716
  const response = {
786
717
  $metadata: deserializeMetadata(output),
787
718
  ...contents,
788
719
  };
789
- return Promise.resolve(response);
720
+ return response;
790
721
  };
791
722
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
792
723
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -810,10 +741,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
810
741
  throw await de_ValidationExceptionRes(parsedOutput, context);
811
742
  default:
812
743
  const parsedBody = parsedOutput.body;
813
- (0, smithy_client_1.throwDefaultError)({
744
+ return throwDefaultError({
814
745
  output,
815
746
  parsedBody,
816
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
817
747
  errorCode,
818
748
  });
819
749
  }
@@ -824,12 +754,12 @@ const de_ResumeBatchLoadTaskCommand = async (output, context) => {
824
754
  }
825
755
  const data = await parseBody(output.body, context);
826
756
  let contents = {};
827
- contents = de_ResumeBatchLoadTaskResponse(data, context);
757
+ contents = (0, smithy_client_1._json)(data);
828
758
  const response = {
829
759
  $metadata: deserializeMetadata(output),
830
760
  ...contents,
831
761
  };
832
- return Promise.resolve(response);
762
+ return response;
833
763
  };
834
764
  exports.de_ResumeBatchLoadTaskCommand = de_ResumeBatchLoadTaskCommand;
835
765
  const de_ResumeBatchLoadTaskCommandError = async (output, context) => {
@@ -859,10 +789,9 @@ const de_ResumeBatchLoadTaskCommandError = async (output, context) => {
859
789
  throw await de_ValidationExceptionRes(parsedOutput, context);
860
790
  default:
861
791
  const parsedBody = parsedOutput.body;
862
- (0, smithy_client_1.throwDefaultError)({
792
+ return throwDefaultError({
863
793
  output,
864
794
  parsedBody,
865
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
866
795
  errorCode,
867
796
  });
868
797
  }
@@ -873,12 +802,12 @@ const de_TagResourceCommand = async (output, context) => {
873
802
  }
874
803
  const data = await parseBody(output.body, context);
875
804
  let contents = {};
876
- contents = de_TagResourceResponse(data, context);
805
+ contents = (0, smithy_client_1._json)(data);
877
806
  const response = {
878
807
  $metadata: deserializeMetadata(output),
879
808
  ...contents,
880
809
  };
881
- return Promise.resolve(response);
810
+ return response;
882
811
  };
883
812
  exports.de_TagResourceCommand = de_TagResourceCommand;
884
813
  const de_TagResourceCommandError = async (output, context) => {
@@ -905,10 +834,9 @@ const de_TagResourceCommandError = async (output, context) => {
905
834
  throw await de_ValidationExceptionRes(parsedOutput, context);
906
835
  default:
907
836
  const parsedBody = parsedOutput.body;
908
- (0, smithy_client_1.throwDefaultError)({
837
+ return throwDefaultError({
909
838
  output,
910
839
  parsedBody,
911
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
912
840
  errorCode,
913
841
  });
914
842
  }
@@ -919,12 +847,12 @@ const de_UntagResourceCommand = async (output, context) => {
919
847
  }
920
848
  const data = await parseBody(output.body, context);
921
849
  let contents = {};
922
- contents = de_UntagResourceResponse(data, context);
850
+ contents = (0, smithy_client_1._json)(data);
923
851
  const response = {
924
852
  $metadata: deserializeMetadata(output),
925
853
  ...contents,
926
854
  };
927
- return Promise.resolve(response);
855
+ return response;
928
856
  };
929
857
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
930
858
  const de_UntagResourceCommandError = async (output, context) => {
@@ -951,10 +879,9 @@ const de_UntagResourceCommandError = async (output, context) => {
951
879
  throw await de_ValidationExceptionRes(parsedOutput, context);
952
880
  default:
953
881
  const parsedBody = parsedOutput.body;
954
- (0, smithy_client_1.throwDefaultError)({
882
+ return throwDefaultError({
955
883
  output,
956
884
  parsedBody,
957
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
958
885
  errorCode,
959
886
  });
960
887
  }
@@ -970,7 +897,7 @@ const de_UpdateDatabaseCommand = async (output, context) => {
970
897
  $metadata: deserializeMetadata(output),
971
898
  ...contents,
972
899
  };
973
- return Promise.resolve(response);
900
+ return response;
974
901
  };
975
902
  exports.de_UpdateDatabaseCommand = de_UpdateDatabaseCommand;
976
903
  const de_UpdateDatabaseCommandError = async (output, context) => {
@@ -1003,10 +930,9 @@ const de_UpdateDatabaseCommandError = async (output, context) => {
1003
930
  throw await de_ValidationExceptionRes(parsedOutput, context);
1004
931
  default:
1005
932
  const parsedBody = parsedOutput.body;
1006
- (0, smithy_client_1.throwDefaultError)({
933
+ return throwDefaultError({
1007
934
  output,
1008
935
  parsedBody,
1009
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
1010
936
  errorCode,
1011
937
  });
1012
938
  }
@@ -1022,7 +948,7 @@ const de_UpdateTableCommand = async (output, context) => {
1022
948
  $metadata: deserializeMetadata(output),
1023
949
  ...contents,
1024
950
  };
1025
- return Promise.resolve(response);
951
+ return response;
1026
952
  };
1027
953
  exports.de_UpdateTableCommand = de_UpdateTableCommand;
1028
954
  const de_UpdateTableCommandError = async (output, context) => {
@@ -1052,10 +978,9 @@ const de_UpdateTableCommandError = async (output, context) => {
1052
978
  throw await de_ValidationExceptionRes(parsedOutput, context);
1053
979
  default:
1054
980
  const parsedBody = parsedOutput.body;
1055
- (0, smithy_client_1.throwDefaultError)({
981
+ return throwDefaultError({
1056
982
  output,
1057
983
  parsedBody,
1058
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
1059
984
  errorCode,
1060
985
  });
1061
986
  }
@@ -1066,12 +991,12 @@ const de_WriteRecordsCommand = async (output, context) => {
1066
991
  }
1067
992
  const data = await parseBody(output.body, context);
1068
993
  let contents = {};
1069
- contents = de_WriteRecordsResponse(data, context);
994
+ contents = (0, smithy_client_1._json)(data);
1070
995
  const response = {
1071
996
  $metadata: deserializeMetadata(output),
1072
997
  ...contents,
1073
998
  };
1074
- return Promise.resolve(response);
999
+ return response;
1075
1000
  };
1076
1001
  exports.de_WriteRecordsCommand = de_WriteRecordsCommand;
1077
1002
  const de_WriteRecordsCommandError = async (output, context) => {
@@ -1104,17 +1029,16 @@ const de_WriteRecordsCommandError = async (output, context) => {
1104
1029
  throw await de_ValidationExceptionRes(parsedOutput, context);
1105
1030
  default:
1106
1031
  const parsedBody = parsedOutput.body;
1107
- (0, smithy_client_1.throwDefaultError)({
1032
+ return throwDefaultError({
1108
1033
  output,
1109
1034
  parsedBody,
1110
- exceptionCtor: TimestreamWriteServiceException_1.TimestreamWriteServiceException,
1111
1035
  errorCode,
1112
1036
  });
1113
1037
  }
1114
1038
  };
1115
1039
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1116
1040
  const body = parsedOutput.body;
1117
- const deserialized = de_AccessDeniedException(body, context);
1041
+ const deserialized = (0, smithy_client_1._json)(body);
1118
1042
  const exception = new models_0_1.AccessDeniedException({
1119
1043
  $metadata: deserializeMetadata(parsedOutput),
1120
1044
  ...deserialized,
@@ -1123,7 +1047,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1123
1047
  };
1124
1048
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1125
1049
  const body = parsedOutput.body;
1126
- const deserialized = de_ConflictException(body, context);
1050
+ const deserialized = (0, smithy_client_1._json)(body);
1127
1051
  const exception = new models_0_1.ConflictException({
1128
1052
  $metadata: deserializeMetadata(parsedOutput),
1129
1053
  ...deserialized,
@@ -1132,7 +1056,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1132
1056
  };
1133
1057
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1134
1058
  const body = parsedOutput.body;
1135
- const deserialized = de_InternalServerException(body, context);
1059
+ const deserialized = (0, smithy_client_1._json)(body);
1136
1060
  const exception = new models_0_1.InternalServerException({
1137
1061
  $metadata: deserializeMetadata(parsedOutput),
1138
1062
  ...deserialized,
@@ -1141,7 +1065,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1141
1065
  };
1142
1066
  const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
1143
1067
  const body = parsedOutput.body;
1144
- const deserialized = de_InvalidEndpointException(body, context);
1068
+ const deserialized = (0, smithy_client_1._json)(body);
1145
1069
  const exception = new models_0_1.InvalidEndpointException({
1146
1070
  $metadata: deserializeMetadata(parsedOutput),
1147
1071
  ...deserialized,
@@ -1150,7 +1074,7 @@ const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
1150
1074
  };
1151
1075
  const de_RejectedRecordsExceptionRes = async (parsedOutput, context) => {
1152
1076
  const body = parsedOutput.body;
1153
- const deserialized = de_RejectedRecordsException(body, context);
1077
+ const deserialized = (0, smithy_client_1._json)(body);
1154
1078
  const exception = new models_0_1.RejectedRecordsException({
1155
1079
  $metadata: deserializeMetadata(parsedOutput),
1156
1080
  ...deserialized,
@@ -1159,7 +1083,7 @@ const de_RejectedRecordsExceptionRes = async (parsedOutput, context) => {
1159
1083
  };
1160
1084
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1161
1085
  const body = parsedOutput.body;
1162
- const deserialized = de_ResourceNotFoundException(body, context);
1086
+ const deserialized = (0, smithy_client_1._json)(body);
1163
1087
  const exception = new models_0_1.ResourceNotFoundException({
1164
1088
  $metadata: deserializeMetadata(parsedOutput),
1165
1089
  ...deserialized,
@@ -1168,7 +1092,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1168
1092
  };
1169
1093
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1170
1094
  const body = parsedOutput.body;
1171
- const deserialized = de_ServiceQuotaExceededException(body, context);
1095
+ const deserialized = (0, smithy_client_1._json)(body);
1172
1096
  const exception = new models_0_1.ServiceQuotaExceededException({
1173
1097
  $metadata: deserializeMetadata(parsedOutput),
1174
1098
  ...deserialized,
@@ -1177,7 +1101,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1177
1101
  };
1178
1102
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1179
1103
  const body = parsedOutput.body;
1180
- const deserialized = de_ThrottlingException(body, context);
1104
+ const deserialized = (0, smithy_client_1._json)(body);
1181
1105
  const exception = new models_0_1.ThrottlingException({
1182
1106
  $metadata: deserializeMetadata(parsedOutput),
1183
1107
  ...deserialized,
@@ -1186,7 +1110,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1186
1110
  };
1187
1111
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1188
1112
  const body = parsedOutput.body;
1189
- const deserialized = de_ValidationException(body, context);
1113
+ const deserialized = (0, smithy_client_1._json)(body);
1190
1114
  const exception = new models_0_1.ValidationException({
1191
1115
  $metadata: deserializeMetadata(parsedOutput),
1192
1116
  ...deserialized,
@@ -1194,826 +1118,142 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
1194
1118
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1195
1119
  };
1196
1120
  const se_CreateBatchLoadTaskRequest = (input, context) => {
1197
- return {
1198
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
1199
- ...(input.DataModelConfiguration != null && {
1200
- DataModelConfiguration: se_DataModelConfiguration(input.DataModelConfiguration, context),
1201
- }),
1202
- ...(input.DataSourceConfiguration != null && {
1203
- DataSourceConfiguration: se_DataSourceConfiguration(input.DataSourceConfiguration, context),
1204
- }),
1205
- ...(input.RecordVersion != null && { RecordVersion: input.RecordVersion }),
1206
- ...(input.ReportConfiguration != null && {
1207
- ReportConfiguration: se_ReportConfiguration(input.ReportConfiguration, context),
1208
- }),
1209
- ...(input.TargetDatabaseName != null && { TargetDatabaseName: input.TargetDatabaseName }),
1210
- ...(input.TargetTableName != null && { TargetTableName: input.TargetTableName }),
1211
- };
1212
- };
1213
- const se_CreateDatabaseRequest = (input, context) => {
1214
- return {
1215
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1216
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
1217
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1218
- };
1219
- };
1220
- const se_CreateTableRequest = (input, context) => {
1221
- return {
1222
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1223
- ...(input.MagneticStoreWriteProperties != null && {
1224
- MagneticStoreWriteProperties: se_MagneticStoreWriteProperties(input.MagneticStoreWriteProperties, context),
1225
- }),
1226
- ...(input.RetentionProperties != null && {
1227
- RetentionProperties: se_RetentionProperties(input.RetentionProperties, context),
1228
- }),
1229
- ...(input.TableName != null && { TableName: input.TableName }),
1230
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1231
- };
1232
- };
1233
- const se_CsvConfiguration = (input, context) => {
1234
- return {
1235
- ...(input.ColumnSeparator != null && { ColumnSeparator: input.ColumnSeparator }),
1236
- ...(input.EscapeChar != null && { EscapeChar: input.EscapeChar }),
1237
- ...(input.NullValue != null && { NullValue: input.NullValue }),
1238
- ...(input.QuoteChar != null && { QuoteChar: input.QuoteChar }),
1239
- ...(input.TrimWhiteSpace != null && { TrimWhiteSpace: input.TrimWhiteSpace }),
1240
- };
1241
- };
1242
- const se_DataModel = (input, context) => {
1243
- return {
1244
- ...(input.DimensionMappings != null && {
1245
- DimensionMappings: se_DimensionMappings(input.DimensionMappings, context),
1246
- }),
1247
- ...(input.MeasureNameColumn != null && { MeasureNameColumn: input.MeasureNameColumn }),
1248
- ...(input.MixedMeasureMappings != null && {
1249
- MixedMeasureMappings: se_MixedMeasureMappingList(input.MixedMeasureMappings, context),
1250
- }),
1251
- ...(input.MultiMeasureMappings != null && {
1252
- MultiMeasureMappings: se_MultiMeasureMappings(input.MultiMeasureMappings, context),
1253
- }),
1254
- ...(input.TimeColumn != null && { TimeColumn: input.TimeColumn }),
1255
- ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }),
1256
- };
1257
- };
1258
- const se_DataModelConfiguration = (input, context) => {
1259
- return {
1260
- ...(input.DataModel != null && { DataModel: se_DataModel(input.DataModel, context) }),
1261
- ...(input.DataModelS3Configuration != null && {
1262
- DataModelS3Configuration: se_DataModelS3Configuration(input.DataModelS3Configuration, context),
1263
- }),
1264
- };
1265
- };
1266
- const se_DataModelS3Configuration = (input, context) => {
1267
- return {
1268
- ...(input.BucketName != null && { BucketName: input.BucketName }),
1269
- ...(input.ObjectKey != null && { ObjectKey: input.ObjectKey }),
1270
- };
1271
- };
1272
- const se_DataSourceConfiguration = (input, context) => {
1273
- return {
1274
- ...(input.CsvConfiguration != null && { CsvConfiguration: se_CsvConfiguration(input.CsvConfiguration, context) }),
1275
- ...(input.DataFormat != null && { DataFormat: input.DataFormat }),
1276
- ...(input.DataSourceS3Configuration != null && {
1277
- DataSourceS3Configuration: se_DataSourceS3Configuration(input.DataSourceS3Configuration, context),
1278
- }),
1279
- };
1280
- };
1281
- const se_DataSourceS3Configuration = (input, context) => {
1282
- return {
1283
- ...(input.BucketName != null && { BucketName: input.BucketName }),
1284
- ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }),
1285
- };
1286
- };
1287
- const se_DeleteDatabaseRequest = (input, context) => {
1288
- return {
1289
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1290
- };
1291
- };
1292
- const se_DeleteTableRequest = (input, context) => {
1293
- return {
1294
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1295
- ...(input.TableName != null && { TableName: input.TableName }),
1296
- };
1297
- };
1298
- const se_DescribeBatchLoadTaskRequest = (input, context) => {
1299
- return {
1300
- ...(input.TaskId != null && { TaskId: input.TaskId }),
1301
- };
1302
- };
1303
- const se_DescribeDatabaseRequest = (input, context) => {
1304
- return {
1305
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1306
- };
1307
- };
1308
- const se_DescribeEndpointsRequest = (input, context) => {
1309
- return {};
1310
- };
1311
- const se_DescribeTableRequest = (input, context) => {
1312
- return {
1313
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1314
- ...(input.TableName != null && { TableName: input.TableName }),
1315
- };
1316
- };
1317
- const se_Dimension = (input, context) => {
1318
- return {
1319
- ...(input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType }),
1320
- ...(input.Name != null && { Name: input.Name }),
1321
- ...(input.Value != null && { Value: input.Value }),
1322
- };
1323
- };
1324
- const se_DimensionMapping = (input, context) => {
1325
- return {
1326
- ...(input.DestinationColumn != null && { DestinationColumn: input.DestinationColumn }),
1327
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
1328
- };
1329
- };
1330
- const se_DimensionMappings = (input, context) => {
1331
- return input
1332
- .filter((e) => e != null)
1333
- .map((entry) => {
1334
- return se_DimensionMapping(entry, context);
1121
+ return (0, smithy_client_1.take)(input, {
1122
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
1123
+ DataModelConfiguration: smithy_client_1._json,
1124
+ DataSourceConfiguration: smithy_client_1._json,
1125
+ RecordVersion: [],
1126
+ ReportConfiguration: smithy_client_1._json,
1127
+ TargetDatabaseName: [],
1128
+ TargetTableName: [],
1335
1129
  });
1336
1130
  };
1337
- const se_Dimensions = (input, context) => {
1338
- return input
1339
- .filter((e) => e != null)
1340
- .map((entry) => {
1341
- return se_Dimension(entry, context);
1342
- });
1343
- };
1344
- const se_ListBatchLoadTasksRequest = (input, context) => {
1345
- return {
1346
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1347
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1348
- ...(input.TaskStatus != null && { TaskStatus: input.TaskStatus }),
1349
- };
1350
- };
1351
- const se_ListDatabasesRequest = (input, context) => {
1352
- return {
1353
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1354
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1355
- };
1356
- };
1357
- const se_ListTablesRequest = (input, context) => {
1358
- return {
1359
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1360
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1361
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1362
- };
1363
- };
1364
- const se_ListTagsForResourceRequest = (input, context) => {
1365
- return {
1366
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1367
- };
1368
- };
1369
- const se_MagneticStoreRejectedDataLocation = (input, context) => {
1370
- return {
1371
- ...(input.S3Configuration != null && { S3Configuration: se_S3Configuration(input.S3Configuration, context) }),
1372
- };
1373
- };
1374
- const se_MagneticStoreWriteProperties = (input, context) => {
1375
- return {
1376
- ...(input.EnableMagneticStoreWrites != null && { EnableMagneticStoreWrites: input.EnableMagneticStoreWrites }),
1377
- ...(input.MagneticStoreRejectedDataLocation != null && {
1378
- MagneticStoreRejectedDataLocation: se_MagneticStoreRejectedDataLocation(input.MagneticStoreRejectedDataLocation, context),
1379
- }),
1380
- };
1381
- };
1382
- const se_MeasureValue = (input, context) => {
1383
- return {
1384
- ...(input.Name != null && { Name: input.Name }),
1385
- ...(input.Type != null && { Type: input.Type }),
1386
- ...(input.Value != null && { Value: input.Value }),
1387
- };
1388
- };
1389
- const se_MeasureValues = (input, context) => {
1390
- return input
1391
- .filter((e) => e != null)
1392
- .map((entry) => {
1393
- return se_MeasureValue(entry, context);
1394
- });
1395
- };
1396
- const se_MixedMeasureMapping = (input, context) => {
1397
- return {
1398
- ...(input.MeasureName != null && { MeasureName: input.MeasureName }),
1399
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
1400
- ...(input.MultiMeasureAttributeMappings != null && {
1401
- MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
1402
- }),
1403
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
1404
- ...(input.TargetMeasureName != null && { TargetMeasureName: input.TargetMeasureName }),
1405
- };
1406
- };
1407
- const se_MixedMeasureMappingList = (input, context) => {
1408
- return input
1409
- .filter((e) => e != null)
1410
- .map((entry) => {
1411
- return se_MixedMeasureMapping(entry, context);
1412
- });
1413
- };
1414
- const se_MultiMeasureAttributeMapping = (input, context) => {
1415
- return {
1416
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
1417
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
1418
- ...(input.TargetMultiMeasureAttributeName != null && {
1419
- TargetMultiMeasureAttributeName: input.TargetMultiMeasureAttributeName,
1420
- }),
1421
- };
1422
- };
1423
- const se_MultiMeasureAttributeMappingList = (input, context) => {
1424
- return input
1425
- .filter((e) => e != null)
1426
- .map((entry) => {
1427
- return se_MultiMeasureAttributeMapping(entry, context);
1428
- });
1429
- };
1430
- const se_MultiMeasureMappings = (input, context) => {
1431
- return {
1432
- ...(input.MultiMeasureAttributeMappings != null && {
1433
- MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
1434
- }),
1435
- ...(input.TargetMultiMeasureName != null && { TargetMultiMeasureName: input.TargetMultiMeasureName }),
1436
- };
1437
- };
1438
- const se__Record = (input, context) => {
1439
- return {
1440
- ...(input.Dimensions != null && { Dimensions: se_Dimensions(input.Dimensions, context) }),
1441
- ...(input.MeasureName != null && { MeasureName: input.MeasureName }),
1442
- ...(input.MeasureValue != null && { MeasureValue: input.MeasureValue }),
1443
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
1444
- ...(input.MeasureValues != null && { MeasureValues: se_MeasureValues(input.MeasureValues, context) }),
1445
- ...(input.Time != null && { Time: input.Time }),
1446
- ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }),
1447
- ...(input.Version != null && { Version: input.Version }),
1448
- };
1449
- };
1450
- const se_Records = (input, context) => {
1451
- return input
1452
- .filter((e) => e != null)
1453
- .map((entry) => {
1454
- return se__Record(entry, context);
1455
- });
1456
- };
1457
- const se_ReportConfiguration = (input, context) => {
1458
- return {
1459
- ...(input.ReportS3Configuration != null && {
1460
- ReportS3Configuration: se_ReportS3Configuration(input.ReportS3Configuration, context),
1461
- }),
1462
- };
1463
- };
1464
- const se_ReportS3Configuration = (input, context) => {
1465
- return {
1466
- ...(input.BucketName != null && { BucketName: input.BucketName }),
1467
- ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }),
1468
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
1469
- ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }),
1470
- };
1471
- };
1472
- const se_ResumeBatchLoadTaskRequest = (input, context) => {
1473
- return {
1474
- ...(input.TaskId != null && { TaskId: input.TaskId }),
1475
- };
1476
- };
1477
- const se_RetentionProperties = (input, context) => {
1478
- return {
1479
- ...(input.MagneticStoreRetentionPeriodInDays != null && {
1480
- MagneticStoreRetentionPeriodInDays: input.MagneticStoreRetentionPeriodInDays,
1481
- }),
1482
- ...(input.MemoryStoreRetentionPeriodInHours != null && {
1483
- MemoryStoreRetentionPeriodInHours: input.MemoryStoreRetentionPeriodInHours,
1484
- }),
1485
- };
1486
- };
1487
- const se_S3Configuration = (input, context) => {
1488
- return {
1489
- ...(input.BucketName != null && { BucketName: input.BucketName }),
1490
- ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }),
1491
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
1492
- ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }),
1493
- };
1494
- };
1495
- const se_Tag = (input, context) => {
1496
- return {
1497
- ...(input.Key != null && { Key: input.Key }),
1498
- ...(input.Value != null && { Value: input.Value }),
1499
- };
1500
- };
1501
- const se_TagKeyList = (input, context) => {
1502
- return input
1503
- .filter((e) => e != null)
1504
- .map((entry) => {
1505
- return entry;
1506
- });
1507
- };
1508
- const se_TagList = (input, context) => {
1509
- return input
1510
- .filter((e) => e != null)
1511
- .map((entry) => {
1512
- return se_Tag(entry, context);
1513
- });
1514
- };
1515
- const se_TagResourceRequest = (input, context) => {
1516
- return {
1517
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1518
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1519
- };
1520
- };
1521
- const se_UntagResourceRequest = (input, context) => {
1522
- return {
1523
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1524
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1525
- };
1526
- };
1527
- const se_UpdateDatabaseRequest = (input, context) => {
1528
- return {
1529
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1530
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
1531
- };
1532
- };
1533
- const se_UpdateTableRequest = (input, context) => {
1534
- return {
1535
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1536
- ...(input.MagneticStoreWriteProperties != null && {
1537
- MagneticStoreWriteProperties: se_MagneticStoreWriteProperties(input.MagneticStoreWriteProperties, context),
1538
- }),
1539
- ...(input.RetentionProperties != null && {
1540
- RetentionProperties: se_RetentionProperties(input.RetentionProperties, context),
1541
- }),
1542
- ...(input.TableName != null && { TableName: input.TableName }),
1543
- };
1544
- };
1545
- const se_WriteRecordsRequest = (input, context) => {
1546
- return {
1547
- ...(input.CommonAttributes != null && { CommonAttributes: se__Record(input.CommonAttributes, context) }),
1548
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1549
- ...(input.Records != null && { Records: se_Records(input.Records, context) }),
1550
- ...(input.TableName != null && { TableName: input.TableName }),
1551
- };
1552
- };
1553
- const de_AccessDeniedException = (output, context) => {
1554
- return {
1555
- Message: (0, smithy_client_1.expectString)(output.Message),
1556
- };
1557
- };
1558
- const de_BatchLoadProgressReport = (output, context) => {
1559
- return {
1560
- BytesMetered: (0, smithy_client_1.expectLong)(output.BytesMetered),
1561
- FileFailures: (0, smithy_client_1.expectLong)(output.FileFailures),
1562
- ParseFailures: (0, smithy_client_1.expectLong)(output.ParseFailures),
1563
- RecordIngestionFailures: (0, smithy_client_1.expectLong)(output.RecordIngestionFailures),
1564
- RecordsIngested: (0, smithy_client_1.expectLong)(output.RecordsIngested),
1565
- RecordsProcessed: (0, smithy_client_1.expectLong)(output.RecordsProcessed),
1566
- };
1567
- };
1568
1131
  const de_BatchLoadTask = (output, context) => {
1569
- return {
1570
- CreationTime: output.CreationTime != null
1571
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1572
- : undefined,
1573
- DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
1574
- LastUpdatedTime: output.LastUpdatedTime != null
1575
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTime)))
1576
- : undefined,
1577
- ResumableUntil: output.ResumableUntil != null
1578
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ResumableUntil)))
1579
- : undefined,
1580
- TableName: (0, smithy_client_1.expectString)(output.TableName),
1581
- TaskId: (0, smithy_client_1.expectString)(output.TaskId),
1582
- TaskStatus: (0, smithy_client_1.expectString)(output.TaskStatus),
1583
- };
1132
+ return (0, smithy_client_1.take)(output, {
1133
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1134
+ DatabaseName: smithy_client_1.expectString,
1135
+ LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1136
+ ResumableUntil: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1137
+ TableName: smithy_client_1.expectString,
1138
+ TaskId: smithy_client_1.expectString,
1139
+ TaskStatus: smithy_client_1.expectString,
1140
+ });
1584
1141
  };
1585
1142
  const de_BatchLoadTaskDescription = (output, context) => {
1586
- return {
1587
- CreationTime: output.CreationTime != null
1588
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1589
- : undefined,
1590
- DataModelConfiguration: output.DataModelConfiguration != null
1591
- ? de_DataModelConfiguration(output.DataModelConfiguration, context)
1592
- : undefined,
1593
- DataSourceConfiguration: output.DataSourceConfiguration != null
1594
- ? de_DataSourceConfiguration(output.DataSourceConfiguration, context)
1595
- : undefined,
1596
- ErrorMessage: (0, smithy_client_1.expectString)(output.ErrorMessage),
1597
- LastUpdatedTime: output.LastUpdatedTime != null
1598
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTime)))
1599
- : undefined,
1600
- ProgressReport: output.ProgressReport != null ? de_BatchLoadProgressReport(output.ProgressReport, context) : undefined,
1601
- RecordVersion: (0, smithy_client_1.expectLong)(output.RecordVersion),
1602
- ReportConfiguration: output.ReportConfiguration != null ? de_ReportConfiguration(output.ReportConfiguration, context) : undefined,
1603
- ResumableUntil: output.ResumableUntil != null
1604
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ResumableUntil)))
1605
- : undefined,
1606
- TargetDatabaseName: (0, smithy_client_1.expectString)(output.TargetDatabaseName),
1607
- TargetTableName: (0, smithy_client_1.expectString)(output.TargetTableName),
1608
- TaskId: (0, smithy_client_1.expectString)(output.TaskId),
1609
- TaskStatus: (0, smithy_client_1.expectString)(output.TaskStatus),
1610
- };
1143
+ return (0, smithy_client_1.take)(output, {
1144
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1145
+ DataModelConfiguration: smithy_client_1._json,
1146
+ DataSourceConfiguration: smithy_client_1._json,
1147
+ ErrorMessage: smithy_client_1.expectString,
1148
+ LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1149
+ ProgressReport: smithy_client_1._json,
1150
+ RecordVersion: smithy_client_1.expectLong,
1151
+ ReportConfiguration: smithy_client_1._json,
1152
+ ResumableUntil: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1153
+ TargetDatabaseName: smithy_client_1.expectString,
1154
+ TargetTableName: smithy_client_1.expectString,
1155
+ TaskId: smithy_client_1.expectString,
1156
+ TaskStatus: smithy_client_1.expectString,
1157
+ });
1611
1158
  };
1612
1159
  const de_BatchLoadTaskList = (output, context) => {
1613
1160
  const retVal = (output || [])
1614
1161
  .filter((e) => e != null)
1615
1162
  .map((entry) => {
1616
- if (entry === null) {
1617
- return null;
1618
- }
1619
1163
  return de_BatchLoadTask(entry, context);
1620
1164
  });
1621
1165
  return retVal;
1622
1166
  };
1623
- const de_ConflictException = (output, context) => {
1624
- return {
1625
- Message: (0, smithy_client_1.expectString)(output.Message),
1626
- };
1627
- };
1628
- const de_CreateBatchLoadTaskResponse = (output, context) => {
1629
- return {
1630
- TaskId: (0, smithy_client_1.expectString)(output.TaskId),
1631
- };
1632
- };
1633
1167
  const de_CreateDatabaseResponse = (output, context) => {
1634
- return {
1635
- Database: output.Database != null ? de_Database(output.Database, context) : undefined,
1636
- };
1168
+ return (0, smithy_client_1.take)(output, {
1169
+ Database: (_) => de_Database(_, context),
1170
+ });
1637
1171
  };
1638
1172
  const de_CreateTableResponse = (output, context) => {
1639
- return {
1640
- Table: output.Table != null ? de_Table(output.Table, context) : undefined,
1641
- };
1642
- };
1643
- const de_CsvConfiguration = (output, context) => {
1644
- return {
1645
- ColumnSeparator: (0, smithy_client_1.expectString)(output.ColumnSeparator),
1646
- EscapeChar: (0, smithy_client_1.expectString)(output.EscapeChar),
1647
- NullValue: (0, smithy_client_1.expectString)(output.NullValue),
1648
- QuoteChar: (0, smithy_client_1.expectString)(output.QuoteChar),
1649
- TrimWhiteSpace: (0, smithy_client_1.expectBoolean)(output.TrimWhiteSpace),
1650
- };
1173
+ return (0, smithy_client_1.take)(output, {
1174
+ Table: (_) => de_Table(_, context),
1175
+ });
1651
1176
  };
1652
1177
  const de_Database = (output, context) => {
1653
- return {
1654
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1655
- CreationTime: output.CreationTime != null
1656
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1657
- : undefined,
1658
- DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
1659
- KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
1660
- LastUpdatedTime: output.LastUpdatedTime != null
1661
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTime)))
1662
- : undefined,
1663
- TableCount: (0, smithy_client_1.expectLong)(output.TableCount),
1664
- };
1178
+ return (0, smithy_client_1.take)(output, {
1179
+ Arn: smithy_client_1.expectString,
1180
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1181
+ DatabaseName: smithy_client_1.expectString,
1182
+ KmsKeyId: smithy_client_1.expectString,
1183
+ LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1184
+ TableCount: smithy_client_1.expectLong,
1185
+ });
1665
1186
  };
1666
1187
  const de_DatabaseList = (output, context) => {
1667
1188
  const retVal = (output || [])
1668
1189
  .filter((e) => e != null)
1669
1190
  .map((entry) => {
1670
- if (entry === null) {
1671
- return null;
1672
- }
1673
1191
  return de_Database(entry, context);
1674
1192
  });
1675
1193
  return retVal;
1676
1194
  };
1677
- const de_DataModel = (output, context) => {
1678
- return {
1679
- DimensionMappings: output.DimensionMappings != null ? de_DimensionMappings(output.DimensionMappings, context) : undefined,
1680
- MeasureNameColumn: (0, smithy_client_1.expectString)(output.MeasureNameColumn),
1681
- MixedMeasureMappings: output.MixedMeasureMappings != null
1682
- ? de_MixedMeasureMappingList(output.MixedMeasureMappings, context)
1683
- : undefined,
1684
- MultiMeasureMappings: output.MultiMeasureMappings != null ? de_MultiMeasureMappings(output.MultiMeasureMappings, context) : undefined,
1685
- TimeColumn: (0, smithy_client_1.expectString)(output.TimeColumn),
1686
- TimeUnit: (0, smithy_client_1.expectString)(output.TimeUnit),
1687
- };
1688
- };
1689
- const de_DataModelConfiguration = (output, context) => {
1690
- return {
1691
- DataModel: output.DataModel != null ? de_DataModel(output.DataModel, context) : undefined,
1692
- DataModelS3Configuration: output.DataModelS3Configuration != null
1693
- ? de_DataModelS3Configuration(output.DataModelS3Configuration, context)
1694
- : undefined,
1695
- };
1696
- };
1697
- const de_DataModelS3Configuration = (output, context) => {
1698
- return {
1699
- BucketName: (0, smithy_client_1.expectString)(output.BucketName),
1700
- ObjectKey: (0, smithy_client_1.expectString)(output.ObjectKey),
1701
- };
1702
- };
1703
- const de_DataSourceConfiguration = (output, context) => {
1704
- return {
1705
- CsvConfiguration: output.CsvConfiguration != null ? de_CsvConfiguration(output.CsvConfiguration, context) : undefined,
1706
- DataFormat: (0, smithy_client_1.expectString)(output.DataFormat),
1707
- DataSourceS3Configuration: output.DataSourceS3Configuration != null
1708
- ? de_DataSourceS3Configuration(output.DataSourceS3Configuration, context)
1709
- : undefined,
1710
- };
1711
- };
1712
- const de_DataSourceS3Configuration = (output, context) => {
1713
- return {
1714
- BucketName: (0, smithy_client_1.expectString)(output.BucketName),
1715
- ObjectKeyPrefix: (0, smithy_client_1.expectString)(output.ObjectKeyPrefix),
1716
- };
1717
- };
1718
1195
  const de_DescribeBatchLoadTaskResponse = (output, context) => {
1719
- return {
1720
- BatchLoadTaskDescription: output.BatchLoadTaskDescription != null
1721
- ? de_BatchLoadTaskDescription(output.BatchLoadTaskDescription, context)
1722
- : undefined,
1723
- };
1196
+ return (0, smithy_client_1.take)(output, {
1197
+ BatchLoadTaskDescription: (_) => de_BatchLoadTaskDescription(_, context),
1198
+ });
1724
1199
  };
1725
1200
  const de_DescribeDatabaseResponse = (output, context) => {
1726
- return {
1727
- Database: output.Database != null ? de_Database(output.Database, context) : undefined,
1728
- };
1729
- };
1730
- const de_DescribeEndpointsResponse = (output, context) => {
1731
- return {
1732
- Endpoints: output.Endpoints != null ? de_Endpoints(output.Endpoints, context) : undefined,
1733
- };
1734
- };
1735
- const de_DescribeTableResponse = (output, context) => {
1736
- return {
1737
- Table: output.Table != null ? de_Table(output.Table, context) : undefined,
1738
- };
1739
- };
1740
- const de_DimensionMapping = (output, context) => {
1741
- return {
1742
- DestinationColumn: (0, smithy_client_1.expectString)(output.DestinationColumn),
1743
- SourceColumn: (0, smithy_client_1.expectString)(output.SourceColumn),
1744
- };
1745
- };
1746
- const de_DimensionMappings = (output, context) => {
1747
- const retVal = (output || [])
1748
- .filter((e) => e != null)
1749
- .map((entry) => {
1750
- if (entry === null) {
1751
- return null;
1752
- }
1753
- return de_DimensionMapping(entry, context);
1201
+ return (0, smithy_client_1.take)(output, {
1202
+ Database: (_) => de_Database(_, context),
1754
1203
  });
1755
- return retVal;
1756
- };
1757
- const de_Endpoint = (output, context) => {
1758
- return {
1759
- Address: (0, smithy_client_1.expectString)(output.Address),
1760
- CachePeriodInMinutes: (0, smithy_client_1.expectLong)(output.CachePeriodInMinutes),
1761
- };
1762
1204
  };
1763
- const de_Endpoints = (output, context) => {
1764
- const retVal = (output || [])
1765
- .filter((e) => e != null)
1766
- .map((entry) => {
1767
- if (entry === null) {
1768
- return null;
1769
- }
1770
- return de_Endpoint(entry, context);
1205
+ const de_DescribeTableResponse = (output, context) => {
1206
+ return (0, smithy_client_1.take)(output, {
1207
+ Table: (_) => de_Table(_, context),
1771
1208
  });
1772
- return retVal;
1773
- };
1774
- const de_InternalServerException = (output, context) => {
1775
- return {
1776
- Message: (0, smithy_client_1.expectString)(output.Message),
1777
- };
1778
- };
1779
- const de_InvalidEndpointException = (output, context) => {
1780
- return {
1781
- Message: (0, smithy_client_1.expectString)(output.Message),
1782
- };
1783
1209
  };
1784
1210
  const de_ListBatchLoadTasksResponse = (output, context) => {
1785
- return {
1786
- BatchLoadTasks: output.BatchLoadTasks != null ? de_BatchLoadTaskList(output.BatchLoadTasks, context) : undefined,
1787
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1788
- };
1789
- };
1790
- const de_ListDatabasesResponse = (output, context) => {
1791
- return {
1792
- Databases: output.Databases != null ? de_DatabaseList(output.Databases, context) : undefined,
1793
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1794
- };
1795
- };
1796
- const de_ListTablesResponse = (output, context) => {
1797
- return {
1798
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1799
- Tables: output.Tables != null ? de_TableList(output.Tables, context) : undefined,
1800
- };
1801
- };
1802
- const de_ListTagsForResourceResponse = (output, context) => {
1803
- return {
1804
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1805
- };
1806
- };
1807
- const de_MagneticStoreRejectedDataLocation = (output, context) => {
1808
- return {
1809
- S3Configuration: output.S3Configuration != null ? de_S3Configuration(output.S3Configuration, context) : undefined,
1810
- };
1811
- };
1812
- const de_MagneticStoreWriteProperties = (output, context) => {
1813
- return {
1814
- EnableMagneticStoreWrites: (0, smithy_client_1.expectBoolean)(output.EnableMagneticStoreWrites),
1815
- MagneticStoreRejectedDataLocation: output.MagneticStoreRejectedDataLocation != null
1816
- ? de_MagneticStoreRejectedDataLocation(output.MagneticStoreRejectedDataLocation, context)
1817
- : undefined,
1818
- };
1819
- };
1820
- const de_MixedMeasureMapping = (output, context) => {
1821
- return {
1822
- MeasureName: (0, smithy_client_1.expectString)(output.MeasureName),
1823
- MeasureValueType: (0, smithy_client_1.expectString)(output.MeasureValueType),
1824
- MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings != null
1825
- ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
1826
- : undefined,
1827
- SourceColumn: (0, smithy_client_1.expectString)(output.SourceColumn),
1828
- TargetMeasureName: (0, smithy_client_1.expectString)(output.TargetMeasureName),
1829
- };
1830
- };
1831
- const de_MixedMeasureMappingList = (output, context) => {
1832
- const retVal = (output || [])
1833
- .filter((e) => e != null)
1834
- .map((entry) => {
1835
- if (entry === null) {
1836
- return null;
1837
- }
1838
- return de_MixedMeasureMapping(entry, context);
1211
+ return (0, smithy_client_1.take)(output, {
1212
+ BatchLoadTasks: (_) => de_BatchLoadTaskList(_, context),
1213
+ NextToken: smithy_client_1.expectString,
1839
1214
  });
1840
- return retVal;
1841
- };
1842
- const de_MultiMeasureAttributeMapping = (output, context) => {
1843
- return {
1844
- MeasureValueType: (0, smithy_client_1.expectString)(output.MeasureValueType),
1845
- SourceColumn: (0, smithy_client_1.expectString)(output.SourceColumn),
1846
- TargetMultiMeasureAttributeName: (0, smithy_client_1.expectString)(output.TargetMultiMeasureAttributeName),
1847
- };
1848
1215
  };
1849
- const de_MultiMeasureAttributeMappingList = (output, context) => {
1850
- const retVal = (output || [])
1851
- .filter((e) => e != null)
1852
- .map((entry) => {
1853
- if (entry === null) {
1854
- return null;
1855
- }
1856
- return de_MultiMeasureAttributeMapping(entry, context);
1216
+ const de_ListDatabasesResponse = (output, context) => {
1217
+ return (0, smithy_client_1.take)(output, {
1218
+ Databases: (_) => de_DatabaseList(_, context),
1219
+ NextToken: smithy_client_1.expectString,
1857
1220
  });
1858
- return retVal;
1859
- };
1860
- const de_MultiMeasureMappings = (output, context) => {
1861
- return {
1862
- MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings != null
1863
- ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
1864
- : undefined,
1865
- TargetMultiMeasureName: (0, smithy_client_1.expectString)(output.TargetMultiMeasureName),
1866
- };
1867
1221
  };
1868
- const de_RecordsIngested = (output, context) => {
1869
- return {
1870
- MagneticStore: (0, smithy_client_1.expectInt32)(output.MagneticStore),
1871
- MemoryStore: (0, smithy_client_1.expectInt32)(output.MemoryStore),
1872
- Total: (0, smithy_client_1.expectInt32)(output.Total),
1873
- };
1874
- };
1875
- const de_RejectedRecord = (output, context) => {
1876
- return {
1877
- ExistingVersion: (0, smithy_client_1.expectLong)(output.ExistingVersion),
1878
- Reason: (0, smithy_client_1.expectString)(output.Reason),
1879
- RecordIndex: (0, smithy_client_1.expectInt32)(output.RecordIndex),
1880
- };
1881
- };
1882
- const de_RejectedRecords = (output, context) => {
1883
- const retVal = (output || [])
1884
- .filter((e) => e != null)
1885
- .map((entry) => {
1886
- if (entry === null) {
1887
- return null;
1888
- }
1889
- return de_RejectedRecord(entry, context);
1222
+ const de_ListTablesResponse = (output, context) => {
1223
+ return (0, smithy_client_1.take)(output, {
1224
+ NextToken: smithy_client_1.expectString,
1225
+ Tables: (_) => de_TableList(_, context),
1890
1226
  });
1891
- return retVal;
1892
- };
1893
- const de_RejectedRecordsException = (output, context) => {
1894
- return {
1895
- Message: (0, smithy_client_1.expectString)(output.Message),
1896
- RejectedRecords: output.RejectedRecords != null ? de_RejectedRecords(output.RejectedRecords, context) : undefined,
1897
- };
1898
- };
1899
- const de_ReportConfiguration = (output, context) => {
1900
- return {
1901
- ReportS3Configuration: output.ReportS3Configuration != null
1902
- ? de_ReportS3Configuration(output.ReportS3Configuration, context)
1903
- : undefined,
1904
- };
1905
- };
1906
- const de_ReportS3Configuration = (output, context) => {
1907
- return {
1908
- BucketName: (0, smithy_client_1.expectString)(output.BucketName),
1909
- EncryptionOption: (0, smithy_client_1.expectString)(output.EncryptionOption),
1910
- KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
1911
- ObjectKeyPrefix: (0, smithy_client_1.expectString)(output.ObjectKeyPrefix),
1912
- };
1913
- };
1914
- const de_ResourceNotFoundException = (output, context) => {
1915
- return {
1916
- Message: (0, smithy_client_1.expectString)(output.Message),
1917
- };
1918
- };
1919
- const de_ResumeBatchLoadTaskResponse = (output, context) => {
1920
- return {};
1921
- };
1922
- const de_RetentionProperties = (output, context) => {
1923
- return {
1924
- MagneticStoreRetentionPeriodInDays: (0, smithy_client_1.expectLong)(output.MagneticStoreRetentionPeriodInDays),
1925
- MemoryStoreRetentionPeriodInHours: (0, smithy_client_1.expectLong)(output.MemoryStoreRetentionPeriodInHours),
1926
- };
1927
- };
1928
- const de_S3Configuration = (output, context) => {
1929
- return {
1930
- BucketName: (0, smithy_client_1.expectString)(output.BucketName),
1931
- EncryptionOption: (0, smithy_client_1.expectString)(output.EncryptionOption),
1932
- KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
1933
- ObjectKeyPrefix: (0, smithy_client_1.expectString)(output.ObjectKeyPrefix),
1934
- };
1935
- };
1936
- const de_ServiceQuotaExceededException = (output, context) => {
1937
- return {
1938
- Message: (0, smithy_client_1.expectString)(output.Message),
1939
- };
1940
1227
  };
1941
1228
  const de_Table = (output, context) => {
1942
- return {
1943
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1944
- CreationTime: output.CreationTime != null
1945
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1946
- : undefined,
1947
- DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
1948
- LastUpdatedTime: output.LastUpdatedTime != null
1949
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTime)))
1950
- : undefined,
1951
- MagneticStoreWriteProperties: output.MagneticStoreWriteProperties != null
1952
- ? de_MagneticStoreWriteProperties(output.MagneticStoreWriteProperties, context)
1953
- : undefined,
1954
- RetentionProperties: output.RetentionProperties != null ? de_RetentionProperties(output.RetentionProperties, context) : undefined,
1955
- TableName: (0, smithy_client_1.expectString)(output.TableName),
1956
- TableStatus: (0, smithy_client_1.expectString)(output.TableStatus),
1957
- };
1229
+ return (0, smithy_client_1.take)(output, {
1230
+ Arn: smithy_client_1.expectString,
1231
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1232
+ DatabaseName: smithy_client_1.expectString,
1233
+ LastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1234
+ MagneticStoreWriteProperties: smithy_client_1._json,
1235
+ RetentionProperties: smithy_client_1._json,
1236
+ TableName: smithy_client_1.expectString,
1237
+ TableStatus: smithy_client_1.expectString,
1238
+ });
1958
1239
  };
1959
1240
  const de_TableList = (output, context) => {
1960
1241
  const retVal = (output || [])
1961
1242
  .filter((e) => e != null)
1962
1243
  .map((entry) => {
1963
- if (entry === null) {
1964
- return null;
1965
- }
1966
1244
  return de_Table(entry, context);
1967
1245
  });
1968
1246
  return retVal;
1969
1247
  };
1970
- const de_Tag = (output, context) => {
1971
- return {
1972
- Key: (0, smithy_client_1.expectString)(output.Key),
1973
- Value: (0, smithy_client_1.expectString)(output.Value),
1974
- };
1975
- };
1976
- const de_TagList = (output, context) => {
1977
- const retVal = (output || [])
1978
- .filter((e) => e != null)
1979
- .map((entry) => {
1980
- if (entry === null) {
1981
- return null;
1982
- }
1983
- return de_Tag(entry, context);
1984
- });
1985
- return retVal;
1986
- };
1987
- const de_TagResourceResponse = (output, context) => {
1988
- return {};
1989
- };
1990
- const de_ThrottlingException = (output, context) => {
1991
- return {
1992
- Message: (0, smithy_client_1.expectString)(output.Message),
1993
- };
1994
- };
1995
- const de_UntagResourceResponse = (output, context) => {
1996
- return {};
1997
- };
1998
1248
  const de_UpdateDatabaseResponse = (output, context) => {
1999
- return {
2000
- Database: output.Database != null ? de_Database(output.Database, context) : undefined,
2001
- };
1249
+ return (0, smithy_client_1.take)(output, {
1250
+ Database: (_) => de_Database(_, context),
1251
+ });
2002
1252
  };
2003
1253
  const de_UpdateTableResponse = (output, context) => {
2004
- return {
2005
- Table: output.Table != null ? de_Table(output.Table, context) : undefined,
2006
- };
2007
- };
2008
- const de_ValidationException = (output, context) => {
2009
- return {
2010
- Message: (0, smithy_client_1.expectString)(output.Message),
2011
- };
2012
- };
2013
- const de_WriteRecordsResponse = (output, context) => {
2014
- return {
2015
- RecordsIngested: output.RecordsIngested != null ? de_RecordsIngested(output.RecordsIngested, context) : undefined,
2016
- };
1254
+ return (0, smithy_client_1.take)(output, {
1255
+ Table: (_) => de_Table(_, context),
1256
+ });
2017
1257
  };
2018
1258
  const deserializeMetadata = (output) => ({
2019
1259
  httpStatusCode: output.statusCode,
@@ -2028,6 +1268,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2028
1268
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2029
1269
  };
2030
1270
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1271
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(TimestreamWriteServiceException_1.TimestreamWriteServiceException);
2031
1272
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2032
1273
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2033
1274
  const contents = {
@@ -2046,6 +1287,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
2046
1287
  }
2047
1288
  return new protocol_http_1.HttpRequest(contents);
2048
1289
  };
1290
+ function sharedHeaders(operation) {
1291
+ return {
1292
+ "content-type": "application/x-amz-json-1.0",
1293
+ "x-amz-target": `Timestream_20181101.${operation}`,
1294
+ };
1295
+ }
2049
1296
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2050
1297
  if (encoded.length) {
2051
1298
  return JSON.parse(encoded);