@aws-sdk/client-timestream-query 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,132 +7,93 @@ const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const TimestreamQueryServiceException_1 = require("../models/TimestreamQueryServiceException");
9
9
  const se_CancelQueryCommand = async (input, context) => {
10
- const headers = {
11
- "content-type": "application/x-amz-json-1.0",
12
- "x-amz-target": "Timestream_20181101.CancelQuery",
13
- };
10
+ const headers = sharedHeaders("CancelQuery");
14
11
  let body;
15
- body = JSON.stringify(se_CancelQueryRequest(input, context));
12
+ body = JSON.stringify((0, smithy_client_1._json)(input));
16
13
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
14
  };
18
15
  exports.se_CancelQueryCommand = se_CancelQueryCommand;
19
16
  const se_CreateScheduledQueryCommand = async (input, context) => {
20
- const headers = {
21
- "content-type": "application/x-amz-json-1.0",
22
- "x-amz-target": "Timestream_20181101.CreateScheduledQuery",
23
- };
17
+ const headers = sharedHeaders("CreateScheduledQuery");
24
18
  let body;
25
19
  body = JSON.stringify(se_CreateScheduledQueryRequest(input, context));
26
20
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
27
21
  };
28
22
  exports.se_CreateScheduledQueryCommand = se_CreateScheduledQueryCommand;
29
23
  const se_DeleteScheduledQueryCommand = async (input, context) => {
30
- const headers = {
31
- "content-type": "application/x-amz-json-1.0",
32
- "x-amz-target": "Timestream_20181101.DeleteScheduledQuery",
33
- };
24
+ const headers = sharedHeaders("DeleteScheduledQuery");
34
25
  let body;
35
- body = JSON.stringify(se_DeleteScheduledQueryRequest(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_DeleteScheduledQueryCommand = se_DeleteScheduledQueryCommand;
39
30
  const se_DescribeEndpointsCommand = async (input, context) => {
40
- const headers = {
41
- "content-type": "application/x-amz-json-1.0",
42
- "x-amz-target": "Timestream_20181101.DescribeEndpoints",
43
- };
31
+ const headers = sharedHeaders("DescribeEndpoints");
44
32
  let body;
45
- body = JSON.stringify(se_DescribeEndpointsRequest(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_DescribeEndpointsCommand = se_DescribeEndpointsCommand;
49
37
  const se_DescribeScheduledQueryCommand = async (input, context) => {
50
- const headers = {
51
- "content-type": "application/x-amz-json-1.0",
52
- "x-amz-target": "Timestream_20181101.DescribeScheduledQuery",
53
- };
38
+ const headers = sharedHeaders("DescribeScheduledQuery");
54
39
  let body;
55
- body = JSON.stringify(se_DescribeScheduledQueryRequest(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_DescribeScheduledQueryCommand = se_DescribeScheduledQueryCommand;
59
44
  const se_ExecuteScheduledQueryCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.0",
62
- "x-amz-target": "Timestream_20181101.ExecuteScheduledQuery",
63
- };
45
+ const headers = sharedHeaders("ExecuteScheduledQuery");
64
46
  let body;
65
47
  body = JSON.stringify(se_ExecuteScheduledQueryRequest(input, context));
66
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
49
  };
68
50
  exports.se_ExecuteScheduledQueryCommand = se_ExecuteScheduledQueryCommand;
69
51
  const se_ListScheduledQueriesCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "Timestream_20181101.ListScheduledQueries",
73
- };
52
+ const headers = sharedHeaders("ListScheduledQueries");
74
53
  let body;
75
- body = JSON.stringify(se_ListScheduledQueriesRequest(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_ListScheduledQueriesCommand = se_ListScheduledQueriesCommand;
79
58
  const se_ListTagsForResourceCommand = async (input, context) => {
80
- const headers = {
81
- "content-type": "application/x-amz-json-1.0",
82
- "x-amz-target": "Timestream_20181101.ListTagsForResource",
83
- };
59
+ const headers = sharedHeaders("ListTagsForResource");
84
60
  let body;
85
- body = JSON.stringify(se_ListTagsForResourceRequest(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_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
89
65
  const se_PrepareQueryCommand = async (input, context) => {
90
- const headers = {
91
- "content-type": "application/x-amz-json-1.0",
92
- "x-amz-target": "Timestream_20181101.PrepareQuery",
93
- };
66
+ const headers = sharedHeaders("PrepareQuery");
94
67
  let body;
95
- body = JSON.stringify(se_PrepareQueryRequest(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_PrepareQueryCommand = se_PrepareQueryCommand;
99
72
  const se_QueryCommand = async (input, context) => {
100
- const headers = {
101
- "content-type": "application/x-amz-json-1.0",
102
- "x-amz-target": "Timestream_20181101.Query",
103
- };
73
+ const headers = sharedHeaders("Query");
104
74
  let body;
105
75
  body = JSON.stringify(se_QueryRequest(input, context));
106
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
77
  };
108
78
  exports.se_QueryCommand = se_QueryCommand;
109
79
  const se_TagResourceCommand = async (input, context) => {
110
- const headers = {
111
- "content-type": "application/x-amz-json-1.0",
112
- "x-amz-target": "Timestream_20181101.TagResource",
113
- };
80
+ const headers = sharedHeaders("TagResource");
114
81
  let body;
115
- body = JSON.stringify(se_TagResourceRequest(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_TagResourceCommand = se_TagResourceCommand;
119
86
  const se_UntagResourceCommand = async (input, context) => {
120
- const headers = {
121
- "content-type": "application/x-amz-json-1.0",
122
- "x-amz-target": "Timestream_20181101.UntagResource",
123
- };
87
+ const headers = sharedHeaders("UntagResource");
124
88
  let body;
125
- body = JSON.stringify(se_UntagResourceRequest(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_UntagResourceCommand = se_UntagResourceCommand;
129
93
  const se_UpdateScheduledQueryCommand = async (input, context) => {
130
- const headers = {
131
- "content-type": "application/x-amz-json-1.0",
132
- "x-amz-target": "Timestream_20181101.UpdateScheduledQuery",
133
- };
94
+ const headers = sharedHeaders("UpdateScheduledQuery");
134
95
  let body;
135
- body = JSON.stringify(se_UpdateScheduledQueryRequest(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_UpdateScheduledQueryCommand = se_UpdateScheduledQueryCommand;
@@ -142,12 +103,12 @@ const de_CancelQueryCommand = async (output, context) => {
142
103
  }
143
104
  const data = await parseBody(output.body, context);
144
105
  let contents = {};
145
- contents = de_CancelQueryResponse(data, context);
106
+ contents = (0, smithy_client_1._json)(data);
146
107
  const response = {
147
108
  $metadata: deserializeMetadata(output),
148
109
  ...contents,
149
110
  };
150
- return Promise.resolve(response);
111
+ return response;
151
112
  };
152
113
  exports.de_CancelQueryCommand = de_CancelQueryCommand;
153
114
  const de_CancelQueryCommandError = async (output, context) => {
@@ -174,10 +135,9 @@ const de_CancelQueryCommandError = async (output, context) => {
174
135
  throw await de_ValidationExceptionRes(parsedOutput, context);
175
136
  default:
176
137
  const parsedBody = parsedOutput.body;
177
- (0, smithy_client_1.throwDefaultError)({
138
+ return throwDefaultError({
178
139
  output,
179
140
  parsedBody,
180
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
181
141
  errorCode,
182
142
  });
183
143
  }
@@ -188,12 +148,12 @@ const de_CreateScheduledQueryCommand = async (output, context) => {
188
148
  }
189
149
  const data = await parseBody(output.body, context);
190
150
  let contents = {};
191
- contents = de_CreateScheduledQueryResponse(data, context);
151
+ contents = (0, smithy_client_1._json)(data);
192
152
  const response = {
193
153
  $metadata: deserializeMetadata(output),
194
154
  ...contents,
195
155
  };
196
- return Promise.resolve(response);
156
+ return response;
197
157
  };
198
158
  exports.de_CreateScheduledQueryCommand = de_CreateScheduledQueryCommand;
199
159
  const de_CreateScheduledQueryCommandError = async (output, context) => {
@@ -226,10 +186,9 @@ const de_CreateScheduledQueryCommandError = async (output, context) => {
226
186
  throw await de_ValidationExceptionRes(parsedOutput, context);
227
187
  default:
228
188
  const parsedBody = parsedOutput.body;
229
- (0, smithy_client_1.throwDefaultError)({
189
+ return throwDefaultError({
230
190
  output,
231
191
  parsedBody,
232
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
233
192
  errorCode,
234
193
  });
235
194
  }
@@ -242,7 +201,7 @@ const de_DeleteScheduledQueryCommand = async (output, context) => {
242
201
  const response = {
243
202
  $metadata: deserializeMetadata(output),
244
203
  };
245
- return Promise.resolve(response);
204
+ return response;
246
205
  };
247
206
  exports.de_DeleteScheduledQueryCommand = de_DeleteScheduledQueryCommand;
248
207
  const de_DeleteScheduledQueryCommandError = async (output, context) => {
@@ -272,10 +231,9 @@ const de_DeleteScheduledQueryCommandError = async (output, context) => {
272
231
  throw await de_ValidationExceptionRes(parsedOutput, context);
273
232
  default:
274
233
  const parsedBody = parsedOutput.body;
275
- (0, smithy_client_1.throwDefaultError)({
234
+ return throwDefaultError({
276
235
  output,
277
236
  parsedBody,
278
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
279
237
  errorCode,
280
238
  });
281
239
  }
@@ -286,12 +244,12 @@ const de_DescribeEndpointsCommand = async (output, context) => {
286
244
  }
287
245
  const data = await parseBody(output.body, context);
288
246
  let contents = {};
289
- contents = de_DescribeEndpointsResponse(data, context);
247
+ contents = (0, smithy_client_1._json)(data);
290
248
  const response = {
291
249
  $metadata: deserializeMetadata(output),
292
250
  ...contents,
293
251
  };
294
- return Promise.resolve(response);
252
+ return response;
295
253
  };
296
254
  exports.de_DescribeEndpointsCommand = de_DescribeEndpointsCommand;
297
255
  const de_DescribeEndpointsCommandError = async (output, context) => {
@@ -312,10 +270,9 @@ const de_DescribeEndpointsCommandError = async (output, context) => {
312
270
  throw await de_ValidationExceptionRes(parsedOutput, context);
313
271
  default:
314
272
  const parsedBody = parsedOutput.body;
315
- (0, smithy_client_1.throwDefaultError)({
273
+ return throwDefaultError({
316
274
  output,
317
275
  parsedBody,
318
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
319
276
  errorCode,
320
277
  });
321
278
  }
@@ -331,7 +288,7 @@ const de_DescribeScheduledQueryCommand = async (output, context) => {
331
288
  $metadata: deserializeMetadata(output),
332
289
  ...contents,
333
290
  };
334
- return Promise.resolve(response);
291
+ return response;
335
292
  };
336
293
  exports.de_DescribeScheduledQueryCommand = de_DescribeScheduledQueryCommand;
337
294
  const de_DescribeScheduledQueryCommandError = async (output, context) => {
@@ -361,10 +318,9 @@ const de_DescribeScheduledQueryCommandError = async (output, context) => {
361
318
  throw await de_ValidationExceptionRes(parsedOutput, context);
362
319
  default:
363
320
  const parsedBody = parsedOutput.body;
364
- (0, smithy_client_1.throwDefaultError)({
321
+ return throwDefaultError({
365
322
  output,
366
323
  parsedBody,
367
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
368
324
  errorCode,
369
325
  });
370
326
  }
@@ -377,7 +333,7 @@ const de_ExecuteScheduledQueryCommand = async (output, context) => {
377
333
  const response = {
378
334
  $metadata: deserializeMetadata(output),
379
335
  };
380
- return Promise.resolve(response);
336
+ return response;
381
337
  };
382
338
  exports.de_ExecuteScheduledQueryCommand = de_ExecuteScheduledQueryCommand;
383
339
  const de_ExecuteScheduledQueryCommandError = async (output, context) => {
@@ -407,10 +363,9 @@ const de_ExecuteScheduledQueryCommandError = async (output, context) => {
407
363
  throw await de_ValidationExceptionRes(parsedOutput, context);
408
364
  default:
409
365
  const parsedBody = parsedOutput.body;
410
- (0, smithy_client_1.throwDefaultError)({
366
+ return throwDefaultError({
411
367
  output,
412
368
  parsedBody,
413
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
414
369
  errorCode,
415
370
  });
416
371
  }
@@ -426,7 +381,7 @@ const de_ListScheduledQueriesCommand = async (output, context) => {
426
381
  $metadata: deserializeMetadata(output),
427
382
  ...contents,
428
383
  };
429
- return Promise.resolve(response);
384
+ return response;
430
385
  };
431
386
  exports.de_ListScheduledQueriesCommand = de_ListScheduledQueriesCommand;
432
387
  const de_ListScheduledQueriesCommandError = async (output, context) => {
@@ -453,10 +408,9 @@ const de_ListScheduledQueriesCommandError = async (output, context) => {
453
408
  throw await de_ValidationExceptionRes(parsedOutput, context);
454
409
  default:
455
410
  const parsedBody = parsedOutput.body;
456
- (0, smithy_client_1.throwDefaultError)({
411
+ return throwDefaultError({
457
412
  output,
458
413
  parsedBody,
459
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
460
414
  errorCode,
461
415
  });
462
416
  }
@@ -467,12 +421,12 @@ const de_ListTagsForResourceCommand = async (output, context) => {
467
421
  }
468
422
  const data = await parseBody(output.body, context);
469
423
  let contents = {};
470
- contents = de_ListTagsForResourceResponse(data, context);
424
+ contents = (0, smithy_client_1._json)(data);
471
425
  const response = {
472
426
  $metadata: deserializeMetadata(output),
473
427
  ...contents,
474
428
  };
475
- return Promise.resolve(response);
429
+ return response;
476
430
  };
477
431
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
478
432
  const de_ListTagsForResourceCommandError = async (output, context) => {
@@ -496,10 +450,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
496
450
  throw await de_ValidationExceptionRes(parsedOutput, context);
497
451
  default:
498
452
  const parsedBody = parsedOutput.body;
499
- (0, smithy_client_1.throwDefaultError)({
453
+ return throwDefaultError({
500
454
  output,
501
455
  parsedBody,
502
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
503
456
  errorCode,
504
457
  });
505
458
  }
@@ -515,7 +468,7 @@ const de_PrepareQueryCommand = async (output, context) => {
515
468
  $metadata: deserializeMetadata(output),
516
469
  ...contents,
517
470
  };
518
- return Promise.resolve(response);
471
+ return response;
519
472
  };
520
473
  exports.de_PrepareQueryCommand = de_PrepareQueryCommand;
521
474
  const de_PrepareQueryCommandError = async (output, context) => {
@@ -542,10 +495,9 @@ const de_PrepareQueryCommandError = async (output, context) => {
542
495
  throw await de_ValidationExceptionRes(parsedOutput, context);
543
496
  default:
544
497
  const parsedBody = parsedOutput.body;
545
- (0, smithy_client_1.throwDefaultError)({
498
+ return throwDefaultError({
546
499
  output,
547
500
  parsedBody,
548
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
549
501
  errorCode,
550
502
  });
551
503
  }
@@ -561,7 +513,7 @@ const de_QueryCommand = async (output, context) => {
561
513
  $metadata: deserializeMetadata(output),
562
514
  ...contents,
563
515
  };
564
- return Promise.resolve(response);
516
+ return response;
565
517
  };
566
518
  exports.de_QueryCommand = de_QueryCommand;
567
519
  const de_QueryCommandError = async (output, context) => {
@@ -594,10 +546,9 @@ const de_QueryCommandError = async (output, context) => {
594
546
  throw await de_ValidationExceptionRes(parsedOutput, context);
595
547
  default:
596
548
  const parsedBody = parsedOutput.body;
597
- (0, smithy_client_1.throwDefaultError)({
549
+ return throwDefaultError({
598
550
  output,
599
551
  parsedBody,
600
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
601
552
  errorCode,
602
553
  });
603
554
  }
@@ -608,12 +559,12 @@ const de_TagResourceCommand = async (output, context) => {
608
559
  }
609
560
  const data = await parseBody(output.body, context);
610
561
  let contents = {};
611
- contents = de_TagResourceResponse(data, context);
562
+ contents = (0, smithy_client_1._json)(data);
612
563
  const response = {
613
564
  $metadata: deserializeMetadata(output),
614
565
  ...contents,
615
566
  };
616
- return Promise.resolve(response);
567
+ return response;
617
568
  };
618
569
  exports.de_TagResourceCommand = de_TagResourceCommand;
619
570
  const de_TagResourceCommandError = async (output, context) => {
@@ -640,10 +591,9 @@ const de_TagResourceCommandError = async (output, context) => {
640
591
  throw await de_ValidationExceptionRes(parsedOutput, context);
641
592
  default:
642
593
  const parsedBody = parsedOutput.body;
643
- (0, smithy_client_1.throwDefaultError)({
594
+ return throwDefaultError({
644
595
  output,
645
596
  parsedBody,
646
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
647
597
  errorCode,
648
598
  });
649
599
  }
@@ -654,12 +604,12 @@ const de_UntagResourceCommand = async (output, context) => {
654
604
  }
655
605
  const data = await parseBody(output.body, context);
656
606
  let contents = {};
657
- contents = de_UntagResourceResponse(data, context);
607
+ contents = (0, smithy_client_1._json)(data);
658
608
  const response = {
659
609
  $metadata: deserializeMetadata(output),
660
610
  ...contents,
661
611
  };
662
- return Promise.resolve(response);
612
+ return response;
663
613
  };
664
614
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
665
615
  const de_UntagResourceCommandError = async (output, context) => {
@@ -683,10 +633,9 @@ const de_UntagResourceCommandError = async (output, context) => {
683
633
  throw await de_ValidationExceptionRes(parsedOutput, context);
684
634
  default:
685
635
  const parsedBody = parsedOutput.body;
686
- (0, smithy_client_1.throwDefaultError)({
636
+ return throwDefaultError({
687
637
  output,
688
638
  parsedBody,
689
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
690
639
  errorCode,
691
640
  });
692
641
  }
@@ -699,7 +648,7 @@ const de_UpdateScheduledQueryCommand = async (output, context) => {
699
648
  const response = {
700
649
  $metadata: deserializeMetadata(output),
701
650
  };
702
- return Promise.resolve(response);
651
+ return response;
703
652
  };
704
653
  exports.de_UpdateScheduledQueryCommand = de_UpdateScheduledQueryCommand;
705
654
  const de_UpdateScheduledQueryCommandError = async (output, context) => {
@@ -729,17 +678,16 @@ const de_UpdateScheduledQueryCommandError = async (output, context) => {
729
678
  throw await de_ValidationExceptionRes(parsedOutput, context);
730
679
  default:
731
680
  const parsedBody = parsedOutput.body;
732
- (0, smithy_client_1.throwDefaultError)({
681
+ return throwDefaultError({
733
682
  output,
734
683
  parsedBody,
735
- exceptionCtor: TimestreamQueryServiceException_1.TimestreamQueryServiceException,
736
684
  errorCode,
737
685
  });
738
686
  }
739
687
  };
740
688
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
741
689
  const body = parsedOutput.body;
742
- const deserialized = de_AccessDeniedException(body, context);
690
+ const deserialized = (0, smithy_client_1._json)(body);
743
691
  const exception = new models_0_1.AccessDeniedException({
744
692
  $metadata: deserializeMetadata(parsedOutput),
745
693
  ...deserialized,
@@ -748,7 +696,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
748
696
  };
749
697
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
750
698
  const body = parsedOutput.body;
751
- const deserialized = de_ConflictException(body, context);
699
+ const deserialized = (0, smithy_client_1._json)(body);
752
700
  const exception = new models_0_1.ConflictException({
753
701
  $metadata: deserializeMetadata(parsedOutput),
754
702
  ...deserialized,
@@ -757,7 +705,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
757
705
  };
758
706
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
759
707
  const body = parsedOutput.body;
760
- const deserialized = de_InternalServerException(body, context);
708
+ const deserialized = (0, smithy_client_1._json)(body);
761
709
  const exception = new models_0_1.InternalServerException({
762
710
  $metadata: deserializeMetadata(parsedOutput),
763
711
  ...deserialized,
@@ -766,7 +714,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
766
714
  };
767
715
  const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
768
716
  const body = parsedOutput.body;
769
- const deserialized = de_InvalidEndpointException(body, context);
717
+ const deserialized = (0, smithy_client_1._json)(body);
770
718
  const exception = new models_0_1.InvalidEndpointException({
771
719
  $metadata: deserializeMetadata(parsedOutput),
772
720
  ...deserialized,
@@ -775,7 +723,7 @@ const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
775
723
  };
776
724
  const de_QueryExecutionExceptionRes = async (parsedOutput, context) => {
777
725
  const body = parsedOutput.body;
778
- const deserialized = de_QueryExecutionException(body, context);
726
+ const deserialized = (0, smithy_client_1._json)(body);
779
727
  const exception = new models_0_1.QueryExecutionException({
780
728
  $metadata: deserializeMetadata(parsedOutput),
781
729
  ...deserialized,
@@ -784,7 +732,7 @@ const de_QueryExecutionExceptionRes = async (parsedOutput, context) => {
784
732
  };
785
733
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
786
734
  const body = parsedOutput.body;
787
- const deserialized = de_ResourceNotFoundException(body, context);
735
+ const deserialized = (0, smithy_client_1._json)(body);
788
736
  const exception = new models_0_1.ResourceNotFoundException({
789
737
  $metadata: deserializeMetadata(parsedOutput),
790
738
  ...deserialized,
@@ -793,7 +741,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
793
741
  };
794
742
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
795
743
  const body = parsedOutput.body;
796
- const deserialized = de_ServiceQuotaExceededException(body, context);
744
+ const deserialized = (0, smithy_client_1._json)(body);
797
745
  const exception = new models_0_1.ServiceQuotaExceededException({
798
746
  $metadata: deserializeMetadata(parsedOutput),
799
747
  ...deserialized,
@@ -802,7 +750,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
802
750
  };
803
751
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
804
752
  const body = parsedOutput.body;
805
- const deserialized = de_ThrottlingException(body, context);
753
+ const deserialized = (0, smithy_client_1._json)(body);
806
754
  const exception = new models_0_1.ThrottlingException({
807
755
  $metadata: deserializeMetadata(parsedOutput),
808
756
  ...deserialized,
@@ -811,725 +759,230 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
811
759
  };
812
760
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
813
761
  const body = parsedOutput.body;
814
- const deserialized = de_ValidationException(body, context);
762
+ const deserialized = (0, smithy_client_1._json)(body);
815
763
  const exception = new models_0_1.ValidationException({
816
764
  $metadata: deserializeMetadata(parsedOutput),
817
765
  ...deserialized,
818
766
  });
819
767
  return (0, smithy_client_1.decorateServiceException)(exception, body);
820
768
  };
821
- const se_CancelQueryRequest = (input, context) => {
822
- return {
823
- ...(input.QueryId != null && { QueryId: input.QueryId }),
824
- };
825
- };
826
769
  const se_CreateScheduledQueryRequest = (input, context) => {
827
- return {
828
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
829
- ...(input.ErrorReportConfiguration != null && {
830
- ErrorReportConfiguration: se_ErrorReportConfiguration(input.ErrorReportConfiguration, context),
831
- }),
832
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
833
- ...(input.Name != null && { Name: input.Name }),
834
- ...(input.NotificationConfiguration != null && {
835
- NotificationConfiguration: se_NotificationConfiguration(input.NotificationConfiguration, context),
836
- }),
837
- ...(input.QueryString != null && { QueryString: input.QueryString }),
838
- ...(input.ScheduleConfiguration != null && {
839
- ScheduleConfiguration: se_ScheduleConfiguration(input.ScheduleConfiguration, context),
840
- }),
841
- ...(input.ScheduledQueryExecutionRoleArn != null && {
842
- ScheduledQueryExecutionRoleArn: input.ScheduledQueryExecutionRoleArn,
843
- }),
844
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
845
- ...(input.TargetConfiguration != null && {
846
- TargetConfiguration: se_TargetConfiguration(input.TargetConfiguration, context),
847
- }),
848
- };
849
- };
850
- const se_DeleteScheduledQueryRequest = (input, context) => {
851
- return {
852
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
853
- };
854
- };
855
- const se_DescribeEndpointsRequest = (input, context) => {
856
- return {};
857
- };
858
- const se_DescribeScheduledQueryRequest = (input, context) => {
859
- return {
860
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
861
- };
862
- };
863
- const se_DimensionMapping = (input, context) => {
864
- return {
865
- ...(input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType }),
866
- ...(input.Name != null && { Name: input.Name }),
867
- };
868
- };
869
- const se_DimensionMappingList = (input, context) => {
870
- return input
871
- .filter((e) => e != null)
872
- .map((entry) => {
873
- return se_DimensionMapping(entry, context);
770
+ return (0, smithy_client_1.take)(input, {
771
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
772
+ ErrorReportConfiguration: smithy_client_1._json,
773
+ KmsKeyId: [],
774
+ Name: [],
775
+ NotificationConfiguration: smithy_client_1._json,
776
+ QueryString: [],
777
+ ScheduleConfiguration: smithy_client_1._json,
778
+ ScheduledQueryExecutionRoleArn: [],
779
+ Tags: smithy_client_1._json,
780
+ TargetConfiguration: smithy_client_1._json,
874
781
  });
875
782
  };
876
- const se_ErrorReportConfiguration = (input, context) => {
877
- return {
878
- ...(input.S3Configuration != null && { S3Configuration: se_S3Configuration(input.S3Configuration, context) }),
879
- };
880
- };
881
783
  const se_ExecuteScheduledQueryRequest = (input, context) => {
882
- return {
883
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
884
- ...(input.InvocationTime != null && { InvocationTime: Math.round(input.InvocationTime.getTime() / 1000) }),
885
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
886
- };
887
- };
888
- const se_ListScheduledQueriesRequest = (input, context) => {
889
- return {
890
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
891
- ...(input.NextToken != null && { NextToken: input.NextToken }),
892
- };
893
- };
894
- const se_ListTagsForResourceRequest = (input, context) => {
895
- return {
896
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
897
- ...(input.NextToken != null && { NextToken: input.NextToken }),
898
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
899
- };
900
- };
901
- const se_MixedMeasureMapping = (input, context) => {
902
- return {
903
- ...(input.MeasureName != null && { MeasureName: input.MeasureName }),
904
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
905
- ...(input.MultiMeasureAttributeMappings != null && {
906
- MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
907
- }),
908
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
909
- ...(input.TargetMeasureName != null && { TargetMeasureName: input.TargetMeasureName }),
910
- };
911
- };
912
- const se_MixedMeasureMappingList = (input, context) => {
913
- return input
914
- .filter((e) => e != null)
915
- .map((entry) => {
916
- return se_MixedMeasureMapping(entry, context);
917
- });
918
- };
919
- const se_MultiMeasureAttributeMapping = (input, context) => {
920
- return {
921
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
922
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
923
- ...(input.TargetMultiMeasureAttributeName != null && {
924
- TargetMultiMeasureAttributeName: input.TargetMultiMeasureAttributeName,
925
- }),
926
- };
927
- };
928
- const se_MultiMeasureAttributeMappingList = (input, context) => {
929
- return input
930
- .filter((e) => e != null)
931
- .map((entry) => {
932
- return se_MultiMeasureAttributeMapping(entry, context);
784
+ return (0, smithy_client_1.take)(input, {
785
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
786
+ InvocationTime: (_) => Math.round(_.getTime() / 1000),
787
+ ScheduledQueryArn: [],
933
788
  });
934
789
  };
935
- const se_MultiMeasureMappings = (input, context) => {
936
- return {
937
- ...(input.MultiMeasureAttributeMappings != null && {
938
- MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
939
- }),
940
- ...(input.TargetMultiMeasureName != null && { TargetMultiMeasureName: input.TargetMultiMeasureName }),
941
- };
942
- };
943
- const se_NotificationConfiguration = (input, context) => {
944
- return {
945
- ...(input.SnsConfiguration != null && { SnsConfiguration: se_SnsConfiguration(input.SnsConfiguration, context) }),
946
- };
947
- };
948
- const se_PrepareQueryRequest = (input, context) => {
949
- return {
950
- ...(input.QueryString != null && { QueryString: input.QueryString }),
951
- ...(input.ValidateOnly != null && { ValidateOnly: input.ValidateOnly }),
952
- };
953
- };
954
790
  const se_QueryRequest = (input, context) => {
955
- return {
956
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
957
- ...(input.MaxRows != null && { MaxRows: input.MaxRows }),
958
- ...(input.NextToken != null && { NextToken: input.NextToken }),
959
- ...(input.QueryString != null && { QueryString: input.QueryString }),
960
- };
961
- };
962
- const se_S3Configuration = (input, context) => {
963
- return {
964
- ...(input.BucketName != null && { BucketName: input.BucketName }),
965
- ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }),
966
- ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }),
967
- };
968
- };
969
- const se_ScheduleConfiguration = (input, context) => {
970
- return {
971
- ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
972
- };
973
- };
974
- const se_SnsConfiguration = (input, context) => {
975
- return {
976
- ...(input.TopicArn != null && { TopicArn: input.TopicArn }),
977
- };
978
- };
979
- const se_Tag = (input, context) => {
980
- return {
981
- ...(input.Key != null && { Key: input.Key }),
982
- ...(input.Value != null && { Value: input.Value }),
983
- };
984
- };
985
- const se_TagKeyList = (input, context) => {
986
- return input
987
- .filter((e) => e != null)
988
- .map((entry) => {
989
- return entry;
990
- });
991
- };
992
- const se_TagList = (input, context) => {
993
- return input
994
- .filter((e) => e != null)
995
- .map((entry) => {
996
- return se_Tag(entry, context);
791
+ return (0, smithy_client_1.take)(input, {
792
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
793
+ MaxRows: [],
794
+ NextToken: [],
795
+ QueryString: [],
997
796
  });
998
797
  };
999
- const se_TagResourceRequest = (input, context) => {
1000
- return {
1001
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1002
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1003
- };
1004
- };
1005
- const se_TargetConfiguration = (input, context) => {
1006
- return {
1007
- ...(input.TimestreamConfiguration != null && {
1008
- TimestreamConfiguration: se_TimestreamConfiguration(input.TimestreamConfiguration, context),
1009
- }),
1010
- };
1011
- };
1012
- const se_TimestreamConfiguration = (input, context) => {
1013
- return {
1014
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1015
- ...(input.DimensionMappings != null && {
1016
- DimensionMappings: se_DimensionMappingList(input.DimensionMappings, context),
1017
- }),
1018
- ...(input.MeasureNameColumn != null && { MeasureNameColumn: input.MeasureNameColumn }),
1019
- ...(input.MixedMeasureMappings != null && {
1020
- MixedMeasureMappings: se_MixedMeasureMappingList(input.MixedMeasureMappings, context),
1021
- }),
1022
- ...(input.MultiMeasureMappings != null && {
1023
- MultiMeasureMappings: se_MultiMeasureMappings(input.MultiMeasureMappings, context),
1024
- }),
1025
- ...(input.TableName != null && { TableName: input.TableName }),
1026
- ...(input.TimeColumn != null && { TimeColumn: input.TimeColumn }),
1027
- };
1028
- };
1029
- const se_UntagResourceRequest = (input, context) => {
1030
- return {
1031
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1032
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1033
- };
1034
- };
1035
- const se_UpdateScheduledQueryRequest = (input, context) => {
1036
- return {
1037
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
1038
- ...(input.State != null && { State: input.State }),
1039
- };
1040
- };
1041
- const de_AccessDeniedException = (output, context) => {
1042
- return {
1043
- Message: (0, smithy_client_1.expectString)(output.Message),
1044
- };
1045
- };
1046
- const de_CancelQueryResponse = (output, context) => {
1047
- return {
1048
- CancellationMessage: (0, smithy_client_1.expectString)(output.CancellationMessage),
1049
- };
1050
- };
1051
798
  const de_ColumnInfo = (output, context) => {
1052
- return {
1053
- Name: (0, smithy_client_1.expectString)(output.Name),
1054
- Type: output.Type != null ? de_Type(output.Type, context) : undefined,
1055
- };
799
+ return (0, smithy_client_1.take)(output, {
800
+ Name: smithy_client_1.expectString,
801
+ Type: (_) => de_Type(_, context),
802
+ });
1056
803
  };
1057
804
  const de_ColumnInfoList = (output, context) => {
1058
805
  const retVal = (output || [])
1059
806
  .filter((e) => e != null)
1060
807
  .map((entry) => {
1061
- if (entry === null) {
1062
- return null;
1063
- }
1064
808
  return de_ColumnInfo(entry, context);
1065
809
  });
1066
810
  return retVal;
1067
811
  };
1068
- const de_ConflictException = (output, context) => {
1069
- return {
1070
- Message: (0, smithy_client_1.expectString)(output.Message),
1071
- };
1072
- };
1073
- const de_CreateScheduledQueryResponse = (output, context) => {
1074
- return {
1075
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1076
- };
1077
- };
1078
812
  const de_Datum = (output, context) => {
1079
- return {
1080
- ArrayValue: output.ArrayValue != null ? de_DatumList(output.ArrayValue, context) : undefined,
1081
- NullValue: (0, smithy_client_1.expectBoolean)(output.NullValue),
1082
- RowValue: output.RowValue != null ? de_Row(output.RowValue, context) : undefined,
1083
- ScalarValue: (0, smithy_client_1.expectString)(output.ScalarValue),
1084
- TimeSeriesValue: output.TimeSeriesValue != null ? de_TimeSeriesDataPointList(output.TimeSeriesValue, context) : undefined,
1085
- };
813
+ return (0, smithy_client_1.take)(output, {
814
+ ArrayValue: (_) => de_DatumList(_, context),
815
+ NullValue: smithy_client_1.expectBoolean,
816
+ RowValue: (_) => de_Row(_, context),
817
+ ScalarValue: smithy_client_1.expectString,
818
+ TimeSeriesValue: (_) => de_TimeSeriesDataPointList(_, context),
819
+ });
1086
820
  };
1087
821
  const de_DatumList = (output, context) => {
1088
822
  const retVal = (output || [])
1089
823
  .filter((e) => e != null)
1090
824
  .map((entry) => {
1091
- if (entry === null) {
1092
- return null;
1093
- }
1094
825
  return de_Datum(entry, context);
1095
826
  });
1096
827
  return retVal;
1097
828
  };
1098
- const de_DescribeEndpointsResponse = (output, context) => {
1099
- return {
1100
- Endpoints: output.Endpoints != null ? de_Endpoints(output.Endpoints, context) : undefined,
1101
- };
1102
- };
1103
829
  const de_DescribeScheduledQueryResponse = (output, context) => {
1104
- return {
1105
- ScheduledQuery: output.ScheduledQuery != null ? de_ScheduledQueryDescription(output.ScheduledQuery, context) : undefined,
1106
- };
1107
- };
1108
- const de_DimensionMapping = (output, context) => {
1109
- return {
1110
- DimensionValueType: (0, smithy_client_1.expectString)(output.DimensionValueType),
1111
- Name: (0, smithy_client_1.expectString)(output.Name),
1112
- };
1113
- };
1114
- const de_DimensionMappingList = (output, context) => {
1115
- const retVal = (output || [])
1116
- .filter((e) => e != null)
1117
- .map((entry) => {
1118
- if (entry === null) {
1119
- return null;
1120
- }
1121
- return de_DimensionMapping(entry, context);
1122
- });
1123
- return retVal;
1124
- };
1125
- const de_Endpoint = (output, context) => {
1126
- return {
1127
- Address: (0, smithy_client_1.expectString)(output.Address),
1128
- CachePeriodInMinutes: (0, smithy_client_1.expectLong)(output.CachePeriodInMinutes),
1129
- };
1130
- };
1131
- const de_Endpoints = (output, context) => {
1132
- const retVal = (output || [])
1133
- .filter((e) => e != null)
1134
- .map((entry) => {
1135
- if (entry === null) {
1136
- return null;
1137
- }
1138
- return de_Endpoint(entry, context);
830
+ return (0, smithy_client_1.take)(output, {
831
+ ScheduledQuery: (_) => de_ScheduledQueryDescription(_, context),
1139
832
  });
1140
- return retVal;
1141
- };
1142
- const de_ErrorReportConfiguration = (output, context) => {
1143
- return {
1144
- S3Configuration: output.S3Configuration != null ? de_S3Configuration(output.S3Configuration, context) : undefined,
1145
- };
1146
- };
1147
- const de_ErrorReportLocation = (output, context) => {
1148
- return {
1149
- S3ReportLocation: output.S3ReportLocation != null ? de_S3ReportLocation(output.S3ReportLocation, context) : undefined,
1150
- };
1151
- };
1152
- const de_ExecutionStats = (output, context) => {
1153
- return {
1154
- BytesMetered: (0, smithy_client_1.expectLong)(output.BytesMetered),
1155
- DataWrites: (0, smithy_client_1.expectLong)(output.DataWrites),
1156
- ExecutionTimeInMillis: (0, smithy_client_1.expectLong)(output.ExecutionTimeInMillis),
1157
- QueryResultRows: (0, smithy_client_1.expectLong)(output.QueryResultRows),
1158
- RecordsIngested: (0, smithy_client_1.expectLong)(output.RecordsIngested),
1159
- };
1160
- };
1161
- const de_InternalServerException = (output, context) => {
1162
- return {
1163
- Message: (0, smithy_client_1.expectString)(output.Message),
1164
- };
1165
- };
1166
- const de_InvalidEndpointException = (output, context) => {
1167
- return {
1168
- Message: (0, smithy_client_1.expectString)(output.Message),
1169
- };
1170
833
  };
1171
834
  const de_ListScheduledQueriesResponse = (output, context) => {
1172
- return {
1173
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1174
- ScheduledQueries: output.ScheduledQueries != null ? de_ScheduledQueryList(output.ScheduledQueries, context) : undefined,
1175
- };
1176
- };
1177
- const de_ListTagsForResourceResponse = (output, context) => {
1178
- return {
1179
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1180
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1181
- };
1182
- };
1183
- const de_MixedMeasureMapping = (output, context) => {
1184
- return {
1185
- MeasureName: (0, smithy_client_1.expectString)(output.MeasureName),
1186
- MeasureValueType: (0, smithy_client_1.expectString)(output.MeasureValueType),
1187
- MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings != null
1188
- ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
1189
- : undefined,
1190
- SourceColumn: (0, smithy_client_1.expectString)(output.SourceColumn),
1191
- TargetMeasureName: (0, smithy_client_1.expectString)(output.TargetMeasureName),
1192
- };
1193
- };
1194
- const de_MixedMeasureMappingList = (output, context) => {
1195
- const retVal = (output || [])
1196
- .filter((e) => e != null)
1197
- .map((entry) => {
1198
- if (entry === null) {
1199
- return null;
1200
- }
1201
- return de_MixedMeasureMapping(entry, context);
835
+ return (0, smithy_client_1.take)(output, {
836
+ NextToken: smithy_client_1.expectString,
837
+ ScheduledQueries: (_) => de_ScheduledQueryList(_, context),
1202
838
  });
1203
- return retVal;
1204
- };
1205
- const de_MultiMeasureAttributeMapping = (output, context) => {
1206
- return {
1207
- MeasureValueType: (0, smithy_client_1.expectString)(output.MeasureValueType),
1208
- SourceColumn: (0, smithy_client_1.expectString)(output.SourceColumn),
1209
- TargetMultiMeasureAttributeName: (0, smithy_client_1.expectString)(output.TargetMultiMeasureAttributeName),
1210
- };
1211
- };
1212
- const de_MultiMeasureAttributeMappingList = (output, context) => {
1213
- const retVal = (output || [])
1214
- .filter((e) => e != null)
1215
- .map((entry) => {
1216
- if (entry === null) {
1217
- return null;
1218
- }
1219
- return de_MultiMeasureAttributeMapping(entry, context);
1220
- });
1221
- return retVal;
1222
- };
1223
- const de_MultiMeasureMappings = (output, context) => {
1224
- return {
1225
- MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings != null
1226
- ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
1227
- : undefined,
1228
- TargetMultiMeasureName: (0, smithy_client_1.expectString)(output.TargetMultiMeasureName),
1229
- };
1230
- };
1231
- const de_NotificationConfiguration = (output, context) => {
1232
- return {
1233
- SnsConfiguration: output.SnsConfiguration != null ? de_SnsConfiguration(output.SnsConfiguration, context) : undefined,
1234
- };
1235
839
  };
1236
840
  const de_ParameterMapping = (output, context) => {
1237
- return {
1238
- Name: (0, smithy_client_1.expectString)(output.Name),
1239
- Type: output.Type != null ? de_Type(output.Type, context) : undefined,
1240
- };
841
+ return (0, smithy_client_1.take)(output, {
842
+ Name: smithy_client_1.expectString,
843
+ Type: (_) => de_Type(_, context),
844
+ });
1241
845
  };
1242
846
  const de_ParameterMappingList = (output, context) => {
1243
847
  const retVal = (output || [])
1244
848
  .filter((e) => e != null)
1245
849
  .map((entry) => {
1246
- if (entry === null) {
1247
- return null;
1248
- }
1249
850
  return de_ParameterMapping(entry, context);
1250
851
  });
1251
852
  return retVal;
1252
853
  };
1253
854
  const de_PrepareQueryResponse = (output, context) => {
1254
- return {
1255
- Columns: output.Columns != null ? de_SelectColumnList(output.Columns, context) : undefined,
1256
- Parameters: output.Parameters != null ? de_ParameterMappingList(output.Parameters, context) : undefined,
1257
- QueryString: (0, smithy_client_1.expectString)(output.QueryString),
1258
- };
1259
- };
1260
- const de_QueryExecutionException = (output, context) => {
1261
- return {
1262
- Message: (0, smithy_client_1.expectString)(output.Message),
1263
- };
855
+ return (0, smithy_client_1.take)(output, {
856
+ Columns: (_) => de_SelectColumnList(_, context),
857
+ Parameters: (_) => de_ParameterMappingList(_, context),
858
+ QueryString: smithy_client_1.expectString,
859
+ });
1264
860
  };
1265
861
  const de_QueryResponse = (output, context) => {
1266
- return {
1267
- ColumnInfo: output.ColumnInfo != null ? de_ColumnInfoList(output.ColumnInfo, context) : undefined,
1268
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1269
- QueryId: (0, smithy_client_1.expectString)(output.QueryId),
1270
- QueryStatus: output.QueryStatus != null ? de_QueryStatus(output.QueryStatus, context) : undefined,
1271
- Rows: output.Rows != null ? de_RowList(output.Rows, context) : undefined,
1272
- };
862
+ return (0, smithy_client_1.take)(output, {
863
+ ColumnInfo: (_) => de_ColumnInfoList(_, context),
864
+ NextToken: smithy_client_1.expectString,
865
+ QueryId: smithy_client_1.expectString,
866
+ QueryStatus: (_) => de_QueryStatus(_, context),
867
+ Rows: (_) => de_RowList(_, context),
868
+ });
1273
869
  };
1274
870
  const de_QueryStatus = (output, context) => {
1275
- return {
1276
- CumulativeBytesMetered: (0, smithy_client_1.expectLong)(output.CumulativeBytesMetered),
1277
- CumulativeBytesScanned: (0, smithy_client_1.expectLong)(output.CumulativeBytesScanned),
1278
- ProgressPercentage: (0, smithy_client_1.limitedParseDouble)(output.ProgressPercentage),
1279
- };
1280
- };
1281
- const de_ResourceNotFoundException = (output, context) => {
1282
- return {
1283
- Message: (0, smithy_client_1.expectString)(output.Message),
1284
- ScheduledQueryArn: (0, smithy_client_1.expectString)(output.ScheduledQueryArn),
1285
- };
871
+ return (0, smithy_client_1.take)(output, {
872
+ CumulativeBytesMetered: smithy_client_1.expectLong,
873
+ CumulativeBytesScanned: smithy_client_1.expectLong,
874
+ ProgressPercentage: smithy_client_1.limitedParseDouble,
875
+ });
1286
876
  };
1287
877
  const de_Row = (output, context) => {
1288
- return {
1289
- Data: output.Data != null ? de_DatumList(output.Data, context) : undefined,
1290
- };
878
+ return (0, smithy_client_1.take)(output, {
879
+ Data: (_) => de_DatumList(_, context),
880
+ });
1291
881
  };
1292
882
  const de_RowList = (output, context) => {
1293
883
  const retVal = (output || [])
1294
884
  .filter((e) => e != null)
1295
885
  .map((entry) => {
1296
- if (entry === null) {
1297
- return null;
1298
- }
1299
886
  return de_Row(entry, context);
1300
887
  });
1301
888
  return retVal;
1302
889
  };
1303
- const de_S3Configuration = (output, context) => {
1304
- return {
1305
- BucketName: (0, smithy_client_1.expectString)(output.BucketName),
1306
- EncryptionOption: (0, smithy_client_1.expectString)(output.EncryptionOption),
1307
- ObjectKeyPrefix: (0, smithy_client_1.expectString)(output.ObjectKeyPrefix),
1308
- };
1309
- };
1310
- const de_S3ReportLocation = (output, context) => {
1311
- return {
1312
- BucketName: (0, smithy_client_1.expectString)(output.BucketName),
1313
- ObjectKey: (0, smithy_client_1.expectString)(output.ObjectKey),
1314
- };
1315
- };
1316
- const de_ScheduleConfiguration = (output, context) => {
1317
- return {
1318
- ScheduleExpression: (0, smithy_client_1.expectString)(output.ScheduleExpression),
1319
- };
1320
- };
1321
890
  const de_ScheduledQuery = (output, context) => {
1322
- return {
1323
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1324
- CreationTime: output.CreationTime != null
1325
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1326
- : undefined,
1327
- ErrorReportConfiguration: output.ErrorReportConfiguration != null
1328
- ? de_ErrorReportConfiguration(output.ErrorReportConfiguration, context)
1329
- : undefined,
1330
- LastRunStatus: (0, smithy_client_1.expectString)(output.LastRunStatus),
1331
- Name: (0, smithy_client_1.expectString)(output.Name),
1332
- NextInvocationTime: output.NextInvocationTime != null
1333
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.NextInvocationTime)))
1334
- : undefined,
1335
- PreviousInvocationTime: output.PreviousInvocationTime != null
1336
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.PreviousInvocationTime)))
1337
- : undefined,
1338
- State: (0, smithy_client_1.expectString)(output.State),
1339
- TargetDestination: output.TargetDestination != null ? de_TargetDestination(output.TargetDestination, context) : undefined,
1340
- };
891
+ return (0, smithy_client_1.take)(output, {
892
+ Arn: smithy_client_1.expectString,
893
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
894
+ ErrorReportConfiguration: smithy_client_1._json,
895
+ LastRunStatus: smithy_client_1.expectString,
896
+ Name: smithy_client_1.expectString,
897
+ NextInvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
898
+ PreviousInvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
899
+ State: smithy_client_1.expectString,
900
+ TargetDestination: smithy_client_1._json,
901
+ });
1341
902
  };
1342
903
  const de_ScheduledQueryDescription = (output, context) => {
1343
- return {
1344
- Arn: (0, smithy_client_1.expectString)(output.Arn),
1345
- CreationTime: output.CreationTime != null
1346
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreationTime)))
1347
- : undefined,
1348
- ErrorReportConfiguration: output.ErrorReportConfiguration != null
1349
- ? de_ErrorReportConfiguration(output.ErrorReportConfiguration, context)
1350
- : undefined,
1351
- KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
1352
- LastRunSummary: output.LastRunSummary != null ? de_ScheduledQueryRunSummary(output.LastRunSummary, context) : undefined,
1353
- Name: (0, smithy_client_1.expectString)(output.Name),
1354
- NextInvocationTime: output.NextInvocationTime != null
1355
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.NextInvocationTime)))
1356
- : undefined,
1357
- NotificationConfiguration: output.NotificationConfiguration != null
1358
- ? de_NotificationConfiguration(output.NotificationConfiguration, context)
1359
- : undefined,
1360
- PreviousInvocationTime: output.PreviousInvocationTime != null
1361
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.PreviousInvocationTime)))
1362
- : undefined,
1363
- QueryString: (0, smithy_client_1.expectString)(output.QueryString),
1364
- RecentlyFailedRuns: output.RecentlyFailedRuns != null
1365
- ? de_ScheduledQueryRunSummaryList(output.RecentlyFailedRuns, context)
1366
- : undefined,
1367
- ScheduleConfiguration: output.ScheduleConfiguration != null
1368
- ? de_ScheduleConfiguration(output.ScheduleConfiguration, context)
1369
- : undefined,
1370
- ScheduledQueryExecutionRoleArn: (0, smithy_client_1.expectString)(output.ScheduledQueryExecutionRoleArn),
1371
- State: (0, smithy_client_1.expectString)(output.State),
1372
- TargetConfiguration: output.TargetConfiguration != null ? de_TargetConfiguration(output.TargetConfiguration, context) : undefined,
1373
- };
904
+ return (0, smithy_client_1.take)(output, {
905
+ Arn: smithy_client_1.expectString,
906
+ CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
907
+ ErrorReportConfiguration: smithy_client_1._json,
908
+ KmsKeyId: smithy_client_1.expectString,
909
+ LastRunSummary: (_) => de_ScheduledQueryRunSummary(_, context),
910
+ Name: smithy_client_1.expectString,
911
+ NextInvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
912
+ NotificationConfiguration: smithy_client_1._json,
913
+ PreviousInvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
914
+ QueryString: smithy_client_1.expectString,
915
+ RecentlyFailedRuns: (_) => de_ScheduledQueryRunSummaryList(_, context),
916
+ ScheduleConfiguration: smithy_client_1._json,
917
+ ScheduledQueryExecutionRoleArn: smithy_client_1.expectString,
918
+ State: smithy_client_1.expectString,
919
+ TargetConfiguration: smithy_client_1._json,
920
+ });
1374
921
  };
1375
922
  const de_ScheduledQueryList = (output, context) => {
1376
923
  const retVal = (output || [])
1377
924
  .filter((e) => e != null)
1378
925
  .map((entry) => {
1379
- if (entry === null) {
1380
- return null;
1381
- }
1382
926
  return de_ScheduledQuery(entry, context);
1383
927
  });
1384
928
  return retVal;
1385
929
  };
1386
930
  const de_ScheduledQueryRunSummary = (output, context) => {
1387
- return {
1388
- ErrorReportLocation: output.ErrorReportLocation != null ? de_ErrorReportLocation(output.ErrorReportLocation, context) : undefined,
1389
- ExecutionStats: output.ExecutionStats != null ? de_ExecutionStats(output.ExecutionStats, context) : undefined,
1390
- FailureReason: (0, smithy_client_1.expectString)(output.FailureReason),
1391
- InvocationTime: output.InvocationTime != null
1392
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.InvocationTime)))
1393
- : undefined,
1394
- RunStatus: (0, smithy_client_1.expectString)(output.RunStatus),
1395
- TriggerTime: output.TriggerTime != null
1396
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.TriggerTime)))
1397
- : undefined,
1398
- };
931
+ return (0, smithy_client_1.take)(output, {
932
+ ErrorReportLocation: smithy_client_1._json,
933
+ ExecutionStats: smithy_client_1._json,
934
+ FailureReason: smithy_client_1.expectString,
935
+ InvocationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
936
+ RunStatus: smithy_client_1.expectString,
937
+ TriggerTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
938
+ });
1399
939
  };
1400
940
  const de_ScheduledQueryRunSummaryList = (output, context) => {
1401
941
  const retVal = (output || [])
1402
942
  .filter((e) => e != null)
1403
943
  .map((entry) => {
1404
- if (entry === null) {
1405
- return null;
1406
- }
1407
944
  return de_ScheduledQueryRunSummary(entry, context);
1408
945
  });
1409
946
  return retVal;
1410
947
  };
1411
948
  const de_SelectColumn = (output, context) => {
1412
- return {
1413
- Aliased: (0, smithy_client_1.expectBoolean)(output.Aliased),
1414
- DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
1415
- Name: (0, smithy_client_1.expectString)(output.Name),
1416
- TableName: (0, smithy_client_1.expectString)(output.TableName),
1417
- Type: output.Type != null ? de_Type(output.Type, context) : undefined,
1418
- };
949
+ return (0, smithy_client_1.take)(output, {
950
+ Aliased: smithy_client_1.expectBoolean,
951
+ DatabaseName: smithy_client_1.expectString,
952
+ Name: smithy_client_1.expectString,
953
+ TableName: smithy_client_1.expectString,
954
+ Type: (_) => de_Type(_, context),
955
+ });
1419
956
  };
1420
957
  const de_SelectColumnList = (output, context) => {
1421
958
  const retVal = (output || [])
1422
959
  .filter((e) => e != null)
1423
960
  .map((entry) => {
1424
- if (entry === null) {
1425
- return null;
1426
- }
1427
961
  return de_SelectColumn(entry, context);
1428
962
  });
1429
963
  return retVal;
1430
964
  };
1431
- const de_ServiceQuotaExceededException = (output, context) => {
1432
- return {
1433
- Message: (0, smithy_client_1.expectString)(output.Message),
1434
- };
1435
- };
1436
- const de_SnsConfiguration = (output, context) => {
1437
- return {
1438
- TopicArn: (0, smithy_client_1.expectString)(output.TopicArn),
1439
- };
1440
- };
1441
- const de_Tag = (output, context) => {
1442
- return {
1443
- Key: (0, smithy_client_1.expectString)(output.Key),
1444
- Value: (0, smithy_client_1.expectString)(output.Value),
1445
- };
1446
- };
1447
- const de_TagList = (output, context) => {
1448
- const retVal = (output || [])
1449
- .filter((e) => e != null)
1450
- .map((entry) => {
1451
- if (entry === null) {
1452
- return null;
1453
- }
1454
- return de_Tag(entry, context);
1455
- });
1456
- return retVal;
1457
- };
1458
- const de_TagResourceResponse = (output, context) => {
1459
- return {};
1460
- };
1461
- const de_TargetConfiguration = (output, context) => {
1462
- return {
1463
- TimestreamConfiguration: output.TimestreamConfiguration != null
1464
- ? de_TimestreamConfiguration(output.TimestreamConfiguration, context)
1465
- : undefined,
1466
- };
1467
- };
1468
- const de_TargetDestination = (output, context) => {
1469
- return {
1470
- TimestreamDestination: output.TimestreamDestination != null
1471
- ? de_TimestreamDestination(output.TimestreamDestination, context)
1472
- : undefined,
1473
- };
1474
- };
1475
- const de_ThrottlingException = (output, context) => {
1476
- return {
1477
- Message: (0, smithy_client_1.expectString)(output.Message),
1478
- };
1479
- };
1480
965
  const de_TimeSeriesDataPoint = (output, context) => {
1481
- return {
1482
- Time: (0, smithy_client_1.expectString)(output.Time),
1483
- Value: output.Value != null ? de_Datum(output.Value, context) : undefined,
1484
- };
966
+ return (0, smithy_client_1.take)(output, {
967
+ Time: smithy_client_1.expectString,
968
+ Value: (_) => de_Datum(_, context),
969
+ });
1485
970
  };
1486
971
  const de_TimeSeriesDataPointList = (output, context) => {
1487
972
  const retVal = (output || [])
1488
973
  .filter((e) => e != null)
1489
974
  .map((entry) => {
1490
- if (entry === null) {
1491
- return null;
1492
- }
1493
975
  return de_TimeSeriesDataPoint(entry, context);
1494
976
  });
1495
977
  return retVal;
1496
978
  };
1497
- const de_TimestreamConfiguration = (output, context) => {
1498
- return {
1499
- DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
1500
- DimensionMappings: output.DimensionMappings != null ? de_DimensionMappingList(output.DimensionMappings, context) : undefined,
1501
- MeasureNameColumn: (0, smithy_client_1.expectString)(output.MeasureNameColumn),
1502
- MixedMeasureMappings: output.MixedMeasureMappings != null
1503
- ? de_MixedMeasureMappingList(output.MixedMeasureMappings, context)
1504
- : undefined,
1505
- MultiMeasureMappings: output.MultiMeasureMappings != null ? de_MultiMeasureMappings(output.MultiMeasureMappings, context) : undefined,
1506
- TableName: (0, smithy_client_1.expectString)(output.TableName),
1507
- TimeColumn: (0, smithy_client_1.expectString)(output.TimeColumn),
1508
- };
1509
- };
1510
- const de_TimestreamDestination = (output, context) => {
1511
- return {
1512
- DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
1513
- TableName: (0, smithy_client_1.expectString)(output.TableName),
1514
- };
1515
- };
1516
979
  const de_Type = (output, context) => {
1517
- return {
1518
- ArrayColumnInfo: output.ArrayColumnInfo != null ? de_ColumnInfo(output.ArrayColumnInfo, context) : undefined,
1519
- RowColumnInfo: output.RowColumnInfo != null ? de_ColumnInfoList(output.RowColumnInfo, context) : undefined,
1520
- ScalarType: (0, smithy_client_1.expectString)(output.ScalarType),
1521
- TimeSeriesMeasureValueColumnInfo: output.TimeSeriesMeasureValueColumnInfo != null
1522
- ? de_ColumnInfo(output.TimeSeriesMeasureValueColumnInfo, context)
1523
- : undefined,
1524
- };
1525
- };
1526
- const de_UntagResourceResponse = (output, context) => {
1527
- return {};
1528
- };
1529
- const de_ValidationException = (output, context) => {
1530
- return {
1531
- Message: (0, smithy_client_1.expectString)(output.Message),
1532
- };
980
+ return (0, smithy_client_1.take)(output, {
981
+ ArrayColumnInfo: (_) => de_ColumnInfo(_, context),
982
+ RowColumnInfo: (_) => de_ColumnInfoList(_, context),
983
+ ScalarType: smithy_client_1.expectString,
984
+ TimeSeriesMeasureValueColumnInfo: (_) => de_ColumnInfo(_, context),
985
+ });
1533
986
  };
1534
987
  const deserializeMetadata = (output) => ({
1535
988
  httpStatusCode: output.statusCode,
@@ -1544,6 +997,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1544
997
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1545
998
  };
1546
999
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1000
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(TimestreamQueryServiceException_1.TimestreamQueryServiceException);
1547
1001
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1548
1002
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1549
1003
  const contents = {
@@ -1562,6 +1016,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1562
1016
  }
1563
1017
  return new protocol_http_1.HttpRequest(contents);
1564
1018
  };
1019
+ function sharedHeaders(operation) {
1020
+ return {
1021
+ "content-type": "application/x-amz-json-1.0",
1022
+ "x-amz-target": `Timestream_20181101.${operation}`,
1023
+ };
1024
+ }
1565
1025
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1566
1026
  if (encoded.length) {
1567
1027
  return JSON.parse(encoded);