@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.
@@ -1,123 +1,84 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, InvalidEndpointException, QueryExecutionException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  import { TimestreamQueryServiceException as __BaseException } from "../models/TimestreamQueryServiceException";
6
6
  export const se_CancelQueryCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.0",
9
- "x-amz-target": "Timestream_20181101.CancelQuery",
10
- };
7
+ const headers = sharedHeaders("CancelQuery");
11
8
  let body;
12
- body = JSON.stringify(se_CancelQueryRequest(input, context));
9
+ body = JSON.stringify(_json(input));
13
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
11
  };
15
12
  export const se_CreateScheduledQueryCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.0",
18
- "x-amz-target": "Timestream_20181101.CreateScheduledQuery",
19
- };
13
+ const headers = sharedHeaders("CreateScheduledQuery");
20
14
  let body;
21
15
  body = JSON.stringify(se_CreateScheduledQueryRequest(input, context));
22
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
17
  };
24
18
  export const se_DeleteScheduledQueryCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.0",
27
- "x-amz-target": "Timestream_20181101.DeleteScheduledQuery",
28
- };
19
+ const headers = sharedHeaders("DeleteScheduledQuery");
29
20
  let body;
30
- body = JSON.stringify(se_DeleteScheduledQueryRequest(input, context));
21
+ body = JSON.stringify(_json(input));
31
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
23
  };
33
24
  export const se_DescribeEndpointsCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.0",
36
- "x-amz-target": "Timestream_20181101.DescribeEndpoints",
37
- };
25
+ const headers = sharedHeaders("DescribeEndpoints");
38
26
  let body;
39
- body = JSON.stringify(se_DescribeEndpointsRequest(input, context));
27
+ body = JSON.stringify(_json(input));
40
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
29
  };
42
30
  export const se_DescribeScheduledQueryCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.0",
45
- "x-amz-target": "Timestream_20181101.DescribeScheduledQuery",
46
- };
31
+ const headers = sharedHeaders("DescribeScheduledQuery");
47
32
  let body;
48
- body = JSON.stringify(se_DescribeScheduledQueryRequest(input, context));
33
+ body = JSON.stringify(_json(input));
49
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
35
  };
51
36
  export const se_ExecuteScheduledQueryCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.0",
54
- "x-amz-target": "Timestream_20181101.ExecuteScheduledQuery",
55
- };
37
+ const headers = sharedHeaders("ExecuteScheduledQuery");
56
38
  let body;
57
39
  body = JSON.stringify(se_ExecuteScheduledQueryRequest(input, context));
58
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
41
  };
60
42
  export const se_ListScheduledQueriesCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.0",
63
- "x-amz-target": "Timestream_20181101.ListScheduledQueries",
64
- };
43
+ const headers = sharedHeaders("ListScheduledQueries");
65
44
  let body;
66
- body = JSON.stringify(se_ListScheduledQueriesRequest(input, context));
45
+ body = JSON.stringify(_json(input));
67
46
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
47
  };
69
48
  export const se_ListTagsForResourceCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "Timestream_20181101.ListTagsForResource",
73
- };
49
+ const headers = sharedHeaders("ListTagsForResource");
74
50
  let body;
75
- body = JSON.stringify(se_ListTagsForResourceRequest(input, context));
51
+ body = JSON.stringify(_json(input));
76
52
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
53
  };
78
54
  export const se_PrepareQueryCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.0",
81
- "x-amz-target": "Timestream_20181101.PrepareQuery",
82
- };
55
+ const headers = sharedHeaders("PrepareQuery");
83
56
  let body;
84
- body = JSON.stringify(se_PrepareQueryRequest(input, context));
57
+ body = JSON.stringify(_json(input));
85
58
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
59
  };
87
60
  export const se_QueryCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.0",
90
- "x-amz-target": "Timestream_20181101.Query",
91
- };
61
+ const headers = sharedHeaders("Query");
92
62
  let body;
93
63
  body = JSON.stringify(se_QueryRequest(input, context));
94
64
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
65
  };
96
66
  export const se_TagResourceCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.0",
99
- "x-amz-target": "Timestream_20181101.TagResource",
100
- };
67
+ const headers = sharedHeaders("TagResource");
101
68
  let body;
102
- body = JSON.stringify(se_TagResourceRequest(input, context));
69
+ body = JSON.stringify(_json(input));
103
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
71
  };
105
72
  export const se_UntagResourceCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.0",
108
- "x-amz-target": "Timestream_20181101.UntagResource",
109
- };
73
+ const headers = sharedHeaders("UntagResource");
110
74
  let body;
111
- body = JSON.stringify(se_UntagResourceRequest(input, context));
75
+ body = JSON.stringify(_json(input));
112
76
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
77
  };
114
78
  export const se_UpdateScheduledQueryCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.0",
117
- "x-amz-target": "Timestream_20181101.UpdateScheduledQuery",
118
- };
79
+ const headers = sharedHeaders("UpdateScheduledQuery");
119
80
  let body;
120
- body = JSON.stringify(se_UpdateScheduledQueryRequest(input, context));
81
+ body = JSON.stringify(_json(input));
121
82
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
83
  };
123
84
  export const de_CancelQueryCommand = async (output, context) => {
@@ -126,12 +87,12 @@ export const de_CancelQueryCommand = async (output, context) => {
126
87
  }
127
88
  const data = await parseBody(output.body, context);
128
89
  let contents = {};
129
- contents = de_CancelQueryResponse(data, context);
90
+ contents = _json(data);
130
91
  const response = {
131
92
  $metadata: deserializeMetadata(output),
132
93
  ...contents,
133
94
  };
134
- return Promise.resolve(response);
95
+ return response;
135
96
  };
136
97
  const de_CancelQueryCommandError = async (output, context) => {
137
98
  const parsedOutput = {
@@ -157,10 +118,9 @@ const de_CancelQueryCommandError = async (output, context) => {
157
118
  throw await de_ValidationExceptionRes(parsedOutput, context);
158
119
  default:
159
120
  const parsedBody = parsedOutput.body;
160
- throwDefaultError({
121
+ return throwDefaultError({
161
122
  output,
162
123
  parsedBody,
163
- exceptionCtor: __BaseException,
164
124
  errorCode,
165
125
  });
166
126
  }
@@ -171,12 +131,12 @@ export const de_CreateScheduledQueryCommand = async (output, context) => {
171
131
  }
172
132
  const data = await parseBody(output.body, context);
173
133
  let contents = {};
174
- contents = de_CreateScheduledQueryResponse(data, context);
134
+ contents = _json(data);
175
135
  const response = {
176
136
  $metadata: deserializeMetadata(output),
177
137
  ...contents,
178
138
  };
179
- return Promise.resolve(response);
139
+ return response;
180
140
  };
181
141
  const de_CreateScheduledQueryCommandError = async (output, context) => {
182
142
  const parsedOutput = {
@@ -208,10 +168,9 @@ const de_CreateScheduledQueryCommandError = async (output, context) => {
208
168
  throw await de_ValidationExceptionRes(parsedOutput, context);
209
169
  default:
210
170
  const parsedBody = parsedOutput.body;
211
- throwDefaultError({
171
+ return throwDefaultError({
212
172
  output,
213
173
  parsedBody,
214
- exceptionCtor: __BaseException,
215
174
  errorCode,
216
175
  });
217
176
  }
@@ -224,7 +183,7 @@ export const de_DeleteScheduledQueryCommand = async (output, context) => {
224
183
  const response = {
225
184
  $metadata: deserializeMetadata(output),
226
185
  };
227
- return Promise.resolve(response);
186
+ return response;
228
187
  };
229
188
  const de_DeleteScheduledQueryCommandError = async (output, context) => {
230
189
  const parsedOutput = {
@@ -253,10 +212,9 @@ const de_DeleteScheduledQueryCommandError = async (output, context) => {
253
212
  throw await de_ValidationExceptionRes(parsedOutput, context);
254
213
  default:
255
214
  const parsedBody = parsedOutput.body;
256
- throwDefaultError({
215
+ return throwDefaultError({
257
216
  output,
258
217
  parsedBody,
259
- exceptionCtor: __BaseException,
260
218
  errorCode,
261
219
  });
262
220
  }
@@ -267,12 +225,12 @@ export const de_DescribeEndpointsCommand = async (output, context) => {
267
225
  }
268
226
  const data = await parseBody(output.body, context);
269
227
  let contents = {};
270
- contents = de_DescribeEndpointsResponse(data, context);
228
+ contents = _json(data);
271
229
  const response = {
272
230
  $metadata: deserializeMetadata(output),
273
231
  ...contents,
274
232
  };
275
- return Promise.resolve(response);
233
+ return response;
276
234
  };
277
235
  const de_DescribeEndpointsCommandError = async (output, context) => {
278
236
  const parsedOutput = {
@@ -292,10 +250,9 @@ const de_DescribeEndpointsCommandError = async (output, context) => {
292
250
  throw await de_ValidationExceptionRes(parsedOutput, context);
293
251
  default:
294
252
  const parsedBody = parsedOutput.body;
295
- throwDefaultError({
253
+ return throwDefaultError({
296
254
  output,
297
255
  parsedBody,
298
- exceptionCtor: __BaseException,
299
256
  errorCode,
300
257
  });
301
258
  }
@@ -311,7 +268,7 @@ export const de_DescribeScheduledQueryCommand = async (output, context) => {
311
268
  $metadata: deserializeMetadata(output),
312
269
  ...contents,
313
270
  };
314
- return Promise.resolve(response);
271
+ return response;
315
272
  };
316
273
  const de_DescribeScheduledQueryCommandError = async (output, context) => {
317
274
  const parsedOutput = {
@@ -340,10 +297,9 @@ const de_DescribeScheduledQueryCommandError = async (output, context) => {
340
297
  throw await de_ValidationExceptionRes(parsedOutput, context);
341
298
  default:
342
299
  const parsedBody = parsedOutput.body;
343
- throwDefaultError({
300
+ return throwDefaultError({
344
301
  output,
345
302
  parsedBody,
346
- exceptionCtor: __BaseException,
347
303
  errorCode,
348
304
  });
349
305
  }
@@ -356,7 +312,7 @@ export const de_ExecuteScheduledQueryCommand = async (output, context) => {
356
312
  const response = {
357
313
  $metadata: deserializeMetadata(output),
358
314
  };
359
- return Promise.resolve(response);
315
+ return response;
360
316
  };
361
317
  const de_ExecuteScheduledQueryCommandError = async (output, context) => {
362
318
  const parsedOutput = {
@@ -385,10 +341,9 @@ const de_ExecuteScheduledQueryCommandError = async (output, context) => {
385
341
  throw await de_ValidationExceptionRes(parsedOutput, context);
386
342
  default:
387
343
  const parsedBody = parsedOutput.body;
388
- throwDefaultError({
344
+ return throwDefaultError({
389
345
  output,
390
346
  parsedBody,
391
- exceptionCtor: __BaseException,
392
347
  errorCode,
393
348
  });
394
349
  }
@@ -404,7 +359,7 @@ export const de_ListScheduledQueriesCommand = async (output, context) => {
404
359
  $metadata: deserializeMetadata(output),
405
360
  ...contents,
406
361
  };
407
- return Promise.resolve(response);
362
+ return response;
408
363
  };
409
364
  const de_ListScheduledQueriesCommandError = async (output, context) => {
410
365
  const parsedOutput = {
@@ -430,10 +385,9 @@ const de_ListScheduledQueriesCommandError = async (output, context) => {
430
385
  throw await de_ValidationExceptionRes(parsedOutput, context);
431
386
  default:
432
387
  const parsedBody = parsedOutput.body;
433
- throwDefaultError({
388
+ return throwDefaultError({
434
389
  output,
435
390
  parsedBody,
436
- exceptionCtor: __BaseException,
437
391
  errorCode,
438
392
  });
439
393
  }
@@ -444,12 +398,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
444
398
  }
445
399
  const data = await parseBody(output.body, context);
446
400
  let contents = {};
447
- contents = de_ListTagsForResourceResponse(data, context);
401
+ contents = _json(data);
448
402
  const response = {
449
403
  $metadata: deserializeMetadata(output),
450
404
  ...contents,
451
405
  };
452
- return Promise.resolve(response);
406
+ return response;
453
407
  };
454
408
  const de_ListTagsForResourceCommandError = async (output, context) => {
455
409
  const parsedOutput = {
@@ -472,10 +426,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
472
426
  throw await de_ValidationExceptionRes(parsedOutput, context);
473
427
  default:
474
428
  const parsedBody = parsedOutput.body;
475
- throwDefaultError({
429
+ return throwDefaultError({
476
430
  output,
477
431
  parsedBody,
478
- exceptionCtor: __BaseException,
479
432
  errorCode,
480
433
  });
481
434
  }
@@ -491,7 +444,7 @@ export const de_PrepareQueryCommand = async (output, context) => {
491
444
  $metadata: deserializeMetadata(output),
492
445
  ...contents,
493
446
  };
494
- return Promise.resolve(response);
447
+ return response;
495
448
  };
496
449
  const de_PrepareQueryCommandError = async (output, context) => {
497
450
  const parsedOutput = {
@@ -517,10 +470,9 @@ const de_PrepareQueryCommandError = async (output, context) => {
517
470
  throw await de_ValidationExceptionRes(parsedOutput, context);
518
471
  default:
519
472
  const parsedBody = parsedOutput.body;
520
- throwDefaultError({
473
+ return throwDefaultError({
521
474
  output,
522
475
  parsedBody,
523
- exceptionCtor: __BaseException,
524
476
  errorCode,
525
477
  });
526
478
  }
@@ -536,7 +488,7 @@ export const de_QueryCommand = async (output, context) => {
536
488
  $metadata: deserializeMetadata(output),
537
489
  ...contents,
538
490
  };
539
- return Promise.resolve(response);
491
+ return response;
540
492
  };
541
493
  const de_QueryCommandError = async (output, context) => {
542
494
  const parsedOutput = {
@@ -568,10 +520,9 @@ const de_QueryCommandError = async (output, context) => {
568
520
  throw await de_ValidationExceptionRes(parsedOutput, context);
569
521
  default:
570
522
  const parsedBody = parsedOutput.body;
571
- throwDefaultError({
523
+ return throwDefaultError({
572
524
  output,
573
525
  parsedBody,
574
- exceptionCtor: __BaseException,
575
526
  errorCode,
576
527
  });
577
528
  }
@@ -582,12 +533,12 @@ export const de_TagResourceCommand = async (output, context) => {
582
533
  }
583
534
  const data = await parseBody(output.body, context);
584
535
  let contents = {};
585
- contents = de_TagResourceResponse(data, context);
536
+ contents = _json(data);
586
537
  const response = {
587
538
  $metadata: deserializeMetadata(output),
588
539
  ...contents,
589
540
  };
590
- return Promise.resolve(response);
541
+ return response;
591
542
  };
592
543
  const de_TagResourceCommandError = async (output, context) => {
593
544
  const parsedOutput = {
@@ -613,10 +564,9 @@ const de_TagResourceCommandError = async (output, context) => {
613
564
  throw await de_ValidationExceptionRes(parsedOutput, context);
614
565
  default:
615
566
  const parsedBody = parsedOutput.body;
616
- throwDefaultError({
567
+ return throwDefaultError({
617
568
  output,
618
569
  parsedBody,
619
- exceptionCtor: __BaseException,
620
570
  errorCode,
621
571
  });
622
572
  }
@@ -627,12 +577,12 @@ export const de_UntagResourceCommand = async (output, context) => {
627
577
  }
628
578
  const data = await parseBody(output.body, context);
629
579
  let contents = {};
630
- contents = de_UntagResourceResponse(data, context);
580
+ contents = _json(data);
631
581
  const response = {
632
582
  $metadata: deserializeMetadata(output),
633
583
  ...contents,
634
584
  };
635
- return Promise.resolve(response);
585
+ return response;
636
586
  };
637
587
  const de_UntagResourceCommandError = async (output, context) => {
638
588
  const parsedOutput = {
@@ -655,10 +605,9 @@ const de_UntagResourceCommandError = async (output, context) => {
655
605
  throw await de_ValidationExceptionRes(parsedOutput, context);
656
606
  default:
657
607
  const parsedBody = parsedOutput.body;
658
- throwDefaultError({
608
+ return throwDefaultError({
659
609
  output,
660
610
  parsedBody,
661
- exceptionCtor: __BaseException,
662
611
  errorCode,
663
612
  });
664
613
  }
@@ -671,7 +620,7 @@ export const de_UpdateScheduledQueryCommand = async (output, context) => {
671
620
  const response = {
672
621
  $metadata: deserializeMetadata(output),
673
622
  };
674
- return Promise.resolve(response);
623
+ return response;
675
624
  };
676
625
  const de_UpdateScheduledQueryCommandError = async (output, context) => {
677
626
  const parsedOutput = {
@@ -700,17 +649,16 @@ const de_UpdateScheduledQueryCommandError = async (output, context) => {
700
649
  throw await de_ValidationExceptionRes(parsedOutput, context);
701
650
  default:
702
651
  const parsedBody = parsedOutput.body;
703
- throwDefaultError({
652
+ return throwDefaultError({
704
653
  output,
705
654
  parsedBody,
706
- exceptionCtor: __BaseException,
707
655
  errorCode,
708
656
  });
709
657
  }
710
658
  };
711
659
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
712
660
  const body = parsedOutput.body;
713
- const deserialized = de_AccessDeniedException(body, context);
661
+ const deserialized = _json(body);
714
662
  const exception = new AccessDeniedException({
715
663
  $metadata: deserializeMetadata(parsedOutput),
716
664
  ...deserialized,
@@ -719,7 +667,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
719
667
  };
720
668
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
721
669
  const body = parsedOutput.body;
722
- const deserialized = de_ConflictException(body, context);
670
+ const deserialized = _json(body);
723
671
  const exception = new ConflictException({
724
672
  $metadata: deserializeMetadata(parsedOutput),
725
673
  ...deserialized,
@@ -728,7 +676,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
728
676
  };
729
677
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
730
678
  const body = parsedOutput.body;
731
- const deserialized = de_InternalServerException(body, context);
679
+ const deserialized = _json(body);
732
680
  const exception = new InternalServerException({
733
681
  $metadata: deserializeMetadata(parsedOutput),
734
682
  ...deserialized,
@@ -737,7 +685,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
737
685
  };
738
686
  const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
739
687
  const body = parsedOutput.body;
740
- const deserialized = de_InvalidEndpointException(body, context);
688
+ const deserialized = _json(body);
741
689
  const exception = new InvalidEndpointException({
742
690
  $metadata: deserializeMetadata(parsedOutput),
743
691
  ...deserialized,
@@ -746,7 +694,7 @@ const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
746
694
  };
747
695
  const de_QueryExecutionExceptionRes = async (parsedOutput, context) => {
748
696
  const body = parsedOutput.body;
749
- const deserialized = de_QueryExecutionException(body, context);
697
+ const deserialized = _json(body);
750
698
  const exception = new QueryExecutionException({
751
699
  $metadata: deserializeMetadata(parsedOutput),
752
700
  ...deserialized,
@@ -755,7 +703,7 @@ const de_QueryExecutionExceptionRes = async (parsedOutput, context) => {
755
703
  };
756
704
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
757
705
  const body = parsedOutput.body;
758
- const deserialized = de_ResourceNotFoundException(body, context);
706
+ const deserialized = _json(body);
759
707
  const exception = new ResourceNotFoundException({
760
708
  $metadata: deserializeMetadata(parsedOutput),
761
709
  ...deserialized,
@@ -764,7 +712,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
764
712
  };
765
713
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
766
714
  const body = parsedOutput.body;
767
- const deserialized = de_ServiceQuotaExceededException(body, context);
715
+ const deserialized = _json(body);
768
716
  const exception = new ServiceQuotaExceededException({
769
717
  $metadata: deserializeMetadata(parsedOutput),
770
718
  ...deserialized,
@@ -773,7 +721,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
773
721
  };
774
722
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
775
723
  const body = parsedOutput.body;
776
- const deserialized = de_ThrottlingException(body, context);
724
+ const deserialized = _json(body);
777
725
  const exception = new ThrottlingException({
778
726
  $metadata: deserializeMetadata(parsedOutput),
779
727
  ...deserialized,
@@ -782,725 +730,230 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
782
730
  };
783
731
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
784
732
  const body = parsedOutput.body;
785
- const deserialized = de_ValidationException(body, context);
733
+ const deserialized = _json(body);
786
734
  const exception = new ValidationException({
787
735
  $metadata: deserializeMetadata(parsedOutput),
788
736
  ...deserialized,
789
737
  });
790
738
  return __decorateServiceException(exception, body);
791
739
  };
792
- const se_CancelQueryRequest = (input, context) => {
793
- return {
794
- ...(input.QueryId != null && { QueryId: input.QueryId }),
795
- };
796
- };
797
740
  const se_CreateScheduledQueryRequest = (input, context) => {
798
- return {
799
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
800
- ...(input.ErrorReportConfiguration != null && {
801
- ErrorReportConfiguration: se_ErrorReportConfiguration(input.ErrorReportConfiguration, context),
802
- }),
803
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
804
- ...(input.Name != null && { Name: input.Name }),
805
- ...(input.NotificationConfiguration != null && {
806
- NotificationConfiguration: se_NotificationConfiguration(input.NotificationConfiguration, context),
807
- }),
808
- ...(input.QueryString != null && { QueryString: input.QueryString }),
809
- ...(input.ScheduleConfiguration != null && {
810
- ScheduleConfiguration: se_ScheduleConfiguration(input.ScheduleConfiguration, context),
811
- }),
812
- ...(input.ScheduledQueryExecutionRoleArn != null && {
813
- ScheduledQueryExecutionRoleArn: input.ScheduledQueryExecutionRoleArn,
814
- }),
815
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
816
- ...(input.TargetConfiguration != null && {
817
- TargetConfiguration: se_TargetConfiguration(input.TargetConfiguration, context),
818
- }),
819
- };
820
- };
821
- const se_DeleteScheduledQueryRequest = (input, context) => {
822
- return {
823
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
824
- };
825
- };
826
- const se_DescribeEndpointsRequest = (input, context) => {
827
- return {};
828
- };
829
- const se_DescribeScheduledQueryRequest = (input, context) => {
830
- return {
831
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
832
- };
833
- };
834
- const se_DimensionMapping = (input, context) => {
835
- return {
836
- ...(input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType }),
837
- ...(input.Name != null && { Name: input.Name }),
838
- };
839
- };
840
- const se_DimensionMappingList = (input, context) => {
841
- return input
842
- .filter((e) => e != null)
843
- .map((entry) => {
844
- return se_DimensionMapping(entry, context);
741
+ return take(input, {
742
+ ClientToken: (_) => _ ?? generateIdempotencyToken(),
743
+ ErrorReportConfiguration: _json,
744
+ KmsKeyId: [],
745
+ Name: [],
746
+ NotificationConfiguration: _json,
747
+ QueryString: [],
748
+ ScheduleConfiguration: _json,
749
+ ScheduledQueryExecutionRoleArn: [],
750
+ Tags: _json,
751
+ TargetConfiguration: _json,
845
752
  });
846
753
  };
847
- const se_ErrorReportConfiguration = (input, context) => {
848
- return {
849
- ...(input.S3Configuration != null && { S3Configuration: se_S3Configuration(input.S3Configuration, context) }),
850
- };
851
- };
852
754
  const se_ExecuteScheduledQueryRequest = (input, context) => {
853
- return {
854
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
855
- ...(input.InvocationTime != null && { InvocationTime: Math.round(input.InvocationTime.getTime() / 1000) }),
856
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
857
- };
858
- };
859
- const se_ListScheduledQueriesRequest = (input, context) => {
860
- return {
861
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
862
- ...(input.NextToken != null && { NextToken: input.NextToken }),
863
- };
864
- };
865
- const se_ListTagsForResourceRequest = (input, context) => {
866
- return {
867
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
868
- ...(input.NextToken != null && { NextToken: input.NextToken }),
869
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
870
- };
871
- };
872
- const se_MixedMeasureMapping = (input, context) => {
873
- return {
874
- ...(input.MeasureName != null && { MeasureName: input.MeasureName }),
875
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
876
- ...(input.MultiMeasureAttributeMappings != null && {
877
- MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
878
- }),
879
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
880
- ...(input.TargetMeasureName != null && { TargetMeasureName: input.TargetMeasureName }),
881
- };
882
- };
883
- const se_MixedMeasureMappingList = (input, context) => {
884
- return input
885
- .filter((e) => e != null)
886
- .map((entry) => {
887
- return se_MixedMeasureMapping(entry, context);
888
- });
889
- };
890
- const se_MultiMeasureAttributeMapping = (input, context) => {
891
- return {
892
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
893
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
894
- ...(input.TargetMultiMeasureAttributeName != null && {
895
- TargetMultiMeasureAttributeName: input.TargetMultiMeasureAttributeName,
896
- }),
897
- };
898
- };
899
- const se_MultiMeasureAttributeMappingList = (input, context) => {
900
- return input
901
- .filter((e) => e != null)
902
- .map((entry) => {
903
- return se_MultiMeasureAttributeMapping(entry, context);
755
+ return take(input, {
756
+ ClientToken: (_) => _ ?? generateIdempotencyToken(),
757
+ InvocationTime: (_) => Math.round(_.getTime() / 1000),
758
+ ScheduledQueryArn: [],
904
759
  });
905
760
  };
906
- const se_MultiMeasureMappings = (input, context) => {
907
- return {
908
- ...(input.MultiMeasureAttributeMappings != null && {
909
- MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
910
- }),
911
- ...(input.TargetMultiMeasureName != null && { TargetMultiMeasureName: input.TargetMultiMeasureName }),
912
- };
913
- };
914
- const se_NotificationConfiguration = (input, context) => {
915
- return {
916
- ...(input.SnsConfiguration != null && { SnsConfiguration: se_SnsConfiguration(input.SnsConfiguration, context) }),
917
- };
918
- };
919
- const se_PrepareQueryRequest = (input, context) => {
920
- return {
921
- ...(input.QueryString != null && { QueryString: input.QueryString }),
922
- ...(input.ValidateOnly != null && { ValidateOnly: input.ValidateOnly }),
923
- };
924
- };
925
761
  const se_QueryRequest = (input, context) => {
926
- return {
927
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
928
- ...(input.MaxRows != null && { MaxRows: input.MaxRows }),
929
- ...(input.NextToken != null && { NextToken: input.NextToken }),
930
- ...(input.QueryString != null && { QueryString: input.QueryString }),
931
- };
932
- };
933
- const se_S3Configuration = (input, context) => {
934
- return {
935
- ...(input.BucketName != null && { BucketName: input.BucketName }),
936
- ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }),
937
- ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }),
938
- };
939
- };
940
- const se_ScheduleConfiguration = (input, context) => {
941
- return {
942
- ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
943
- };
944
- };
945
- const se_SnsConfiguration = (input, context) => {
946
- return {
947
- ...(input.TopicArn != null && { TopicArn: input.TopicArn }),
948
- };
949
- };
950
- const se_Tag = (input, context) => {
951
- return {
952
- ...(input.Key != null && { Key: input.Key }),
953
- ...(input.Value != null && { Value: input.Value }),
954
- };
955
- };
956
- const se_TagKeyList = (input, context) => {
957
- return input
958
- .filter((e) => e != null)
959
- .map((entry) => {
960
- return entry;
961
- });
962
- };
963
- const se_TagList = (input, context) => {
964
- return input
965
- .filter((e) => e != null)
966
- .map((entry) => {
967
- return se_Tag(entry, context);
762
+ return take(input, {
763
+ ClientToken: (_) => _ ?? generateIdempotencyToken(),
764
+ MaxRows: [],
765
+ NextToken: [],
766
+ QueryString: [],
968
767
  });
969
768
  };
970
- const se_TagResourceRequest = (input, context) => {
971
- return {
972
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
973
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
974
- };
975
- };
976
- const se_TargetConfiguration = (input, context) => {
977
- return {
978
- ...(input.TimestreamConfiguration != null && {
979
- TimestreamConfiguration: se_TimestreamConfiguration(input.TimestreamConfiguration, context),
980
- }),
981
- };
982
- };
983
- const se_TimestreamConfiguration = (input, context) => {
984
- return {
985
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
986
- ...(input.DimensionMappings != null && {
987
- DimensionMappings: se_DimensionMappingList(input.DimensionMappings, context),
988
- }),
989
- ...(input.MeasureNameColumn != null && { MeasureNameColumn: input.MeasureNameColumn }),
990
- ...(input.MixedMeasureMappings != null && {
991
- MixedMeasureMappings: se_MixedMeasureMappingList(input.MixedMeasureMappings, context),
992
- }),
993
- ...(input.MultiMeasureMappings != null && {
994
- MultiMeasureMappings: se_MultiMeasureMappings(input.MultiMeasureMappings, context),
995
- }),
996
- ...(input.TableName != null && { TableName: input.TableName }),
997
- ...(input.TimeColumn != null && { TimeColumn: input.TimeColumn }),
998
- };
999
- };
1000
- const se_UntagResourceRequest = (input, context) => {
1001
- return {
1002
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1003
- ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }),
1004
- };
1005
- };
1006
- const se_UpdateScheduledQueryRequest = (input, context) => {
1007
- return {
1008
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
1009
- ...(input.State != null && { State: input.State }),
1010
- };
1011
- };
1012
- const de_AccessDeniedException = (output, context) => {
1013
- return {
1014
- Message: __expectString(output.Message),
1015
- };
1016
- };
1017
- const de_CancelQueryResponse = (output, context) => {
1018
- return {
1019
- CancellationMessage: __expectString(output.CancellationMessage),
1020
- };
1021
- };
1022
769
  const de_ColumnInfo = (output, context) => {
1023
- return {
1024
- Name: __expectString(output.Name),
1025
- Type: output.Type != null ? de_Type(output.Type, context) : undefined,
1026
- };
770
+ return take(output, {
771
+ Name: __expectString,
772
+ Type: (_) => de_Type(_, context),
773
+ });
1027
774
  };
1028
775
  const de_ColumnInfoList = (output, context) => {
1029
776
  const retVal = (output || [])
1030
777
  .filter((e) => e != null)
1031
778
  .map((entry) => {
1032
- if (entry === null) {
1033
- return null;
1034
- }
1035
779
  return de_ColumnInfo(entry, context);
1036
780
  });
1037
781
  return retVal;
1038
782
  };
1039
- const de_ConflictException = (output, context) => {
1040
- return {
1041
- Message: __expectString(output.Message),
1042
- };
1043
- };
1044
- const de_CreateScheduledQueryResponse = (output, context) => {
1045
- return {
1046
- Arn: __expectString(output.Arn),
1047
- };
1048
- };
1049
783
  const de_Datum = (output, context) => {
1050
- return {
1051
- ArrayValue: output.ArrayValue != null ? de_DatumList(output.ArrayValue, context) : undefined,
1052
- NullValue: __expectBoolean(output.NullValue),
1053
- RowValue: output.RowValue != null ? de_Row(output.RowValue, context) : undefined,
1054
- ScalarValue: __expectString(output.ScalarValue),
1055
- TimeSeriesValue: output.TimeSeriesValue != null ? de_TimeSeriesDataPointList(output.TimeSeriesValue, context) : undefined,
1056
- };
784
+ return take(output, {
785
+ ArrayValue: (_) => de_DatumList(_, context),
786
+ NullValue: __expectBoolean,
787
+ RowValue: (_) => de_Row(_, context),
788
+ ScalarValue: __expectString,
789
+ TimeSeriesValue: (_) => de_TimeSeriesDataPointList(_, context),
790
+ });
1057
791
  };
1058
792
  const de_DatumList = (output, context) => {
1059
793
  const retVal = (output || [])
1060
794
  .filter((e) => e != null)
1061
795
  .map((entry) => {
1062
- if (entry === null) {
1063
- return null;
1064
- }
1065
796
  return de_Datum(entry, context);
1066
797
  });
1067
798
  return retVal;
1068
799
  };
1069
- const de_DescribeEndpointsResponse = (output, context) => {
1070
- return {
1071
- Endpoints: output.Endpoints != null ? de_Endpoints(output.Endpoints, context) : undefined,
1072
- };
1073
- };
1074
800
  const de_DescribeScheduledQueryResponse = (output, context) => {
1075
- return {
1076
- ScheduledQuery: output.ScheduledQuery != null ? de_ScheduledQueryDescription(output.ScheduledQuery, context) : undefined,
1077
- };
1078
- };
1079
- const de_DimensionMapping = (output, context) => {
1080
- return {
1081
- DimensionValueType: __expectString(output.DimensionValueType),
1082
- Name: __expectString(output.Name),
1083
- };
1084
- };
1085
- const de_DimensionMappingList = (output, context) => {
1086
- const retVal = (output || [])
1087
- .filter((e) => e != null)
1088
- .map((entry) => {
1089
- if (entry === null) {
1090
- return null;
1091
- }
1092
- return de_DimensionMapping(entry, context);
1093
- });
1094
- return retVal;
1095
- };
1096
- const de_Endpoint = (output, context) => {
1097
- return {
1098
- Address: __expectString(output.Address),
1099
- CachePeriodInMinutes: __expectLong(output.CachePeriodInMinutes),
1100
- };
1101
- };
1102
- const de_Endpoints = (output, context) => {
1103
- const retVal = (output || [])
1104
- .filter((e) => e != null)
1105
- .map((entry) => {
1106
- if (entry === null) {
1107
- return null;
1108
- }
1109
- return de_Endpoint(entry, context);
801
+ return take(output, {
802
+ ScheduledQuery: (_) => de_ScheduledQueryDescription(_, context),
1110
803
  });
1111
- return retVal;
1112
- };
1113
- const de_ErrorReportConfiguration = (output, context) => {
1114
- return {
1115
- S3Configuration: output.S3Configuration != null ? de_S3Configuration(output.S3Configuration, context) : undefined,
1116
- };
1117
- };
1118
- const de_ErrorReportLocation = (output, context) => {
1119
- return {
1120
- S3ReportLocation: output.S3ReportLocation != null ? de_S3ReportLocation(output.S3ReportLocation, context) : undefined,
1121
- };
1122
- };
1123
- const de_ExecutionStats = (output, context) => {
1124
- return {
1125
- BytesMetered: __expectLong(output.BytesMetered),
1126
- DataWrites: __expectLong(output.DataWrites),
1127
- ExecutionTimeInMillis: __expectLong(output.ExecutionTimeInMillis),
1128
- QueryResultRows: __expectLong(output.QueryResultRows),
1129
- RecordsIngested: __expectLong(output.RecordsIngested),
1130
- };
1131
- };
1132
- const de_InternalServerException = (output, context) => {
1133
- return {
1134
- Message: __expectString(output.Message),
1135
- };
1136
- };
1137
- const de_InvalidEndpointException = (output, context) => {
1138
- return {
1139
- Message: __expectString(output.Message),
1140
- };
1141
804
  };
1142
805
  const de_ListScheduledQueriesResponse = (output, context) => {
1143
- return {
1144
- NextToken: __expectString(output.NextToken),
1145
- ScheduledQueries: output.ScheduledQueries != null ? de_ScheduledQueryList(output.ScheduledQueries, context) : undefined,
1146
- };
1147
- };
1148
- const de_ListTagsForResourceResponse = (output, context) => {
1149
- return {
1150
- NextToken: __expectString(output.NextToken),
1151
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
1152
- };
1153
- };
1154
- const de_MixedMeasureMapping = (output, context) => {
1155
- return {
1156
- MeasureName: __expectString(output.MeasureName),
1157
- MeasureValueType: __expectString(output.MeasureValueType),
1158
- MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings != null
1159
- ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
1160
- : undefined,
1161
- SourceColumn: __expectString(output.SourceColumn),
1162
- TargetMeasureName: __expectString(output.TargetMeasureName),
1163
- };
1164
- };
1165
- const de_MixedMeasureMappingList = (output, context) => {
1166
- const retVal = (output || [])
1167
- .filter((e) => e != null)
1168
- .map((entry) => {
1169
- if (entry === null) {
1170
- return null;
1171
- }
1172
- return de_MixedMeasureMapping(entry, context);
806
+ return take(output, {
807
+ NextToken: __expectString,
808
+ ScheduledQueries: (_) => de_ScheduledQueryList(_, context),
1173
809
  });
1174
- return retVal;
1175
- };
1176
- const de_MultiMeasureAttributeMapping = (output, context) => {
1177
- return {
1178
- MeasureValueType: __expectString(output.MeasureValueType),
1179
- SourceColumn: __expectString(output.SourceColumn),
1180
- TargetMultiMeasureAttributeName: __expectString(output.TargetMultiMeasureAttributeName),
1181
- };
1182
- };
1183
- const de_MultiMeasureAttributeMappingList = (output, context) => {
1184
- const retVal = (output || [])
1185
- .filter((e) => e != null)
1186
- .map((entry) => {
1187
- if (entry === null) {
1188
- return null;
1189
- }
1190
- return de_MultiMeasureAttributeMapping(entry, context);
1191
- });
1192
- return retVal;
1193
- };
1194
- const de_MultiMeasureMappings = (output, context) => {
1195
- return {
1196
- MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings != null
1197
- ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
1198
- : undefined,
1199
- TargetMultiMeasureName: __expectString(output.TargetMultiMeasureName),
1200
- };
1201
- };
1202
- const de_NotificationConfiguration = (output, context) => {
1203
- return {
1204
- SnsConfiguration: output.SnsConfiguration != null ? de_SnsConfiguration(output.SnsConfiguration, context) : undefined,
1205
- };
1206
810
  };
1207
811
  const de_ParameterMapping = (output, context) => {
1208
- return {
1209
- Name: __expectString(output.Name),
1210
- Type: output.Type != null ? de_Type(output.Type, context) : undefined,
1211
- };
812
+ return take(output, {
813
+ Name: __expectString,
814
+ Type: (_) => de_Type(_, context),
815
+ });
1212
816
  };
1213
817
  const de_ParameterMappingList = (output, context) => {
1214
818
  const retVal = (output || [])
1215
819
  .filter((e) => e != null)
1216
820
  .map((entry) => {
1217
- if (entry === null) {
1218
- return null;
1219
- }
1220
821
  return de_ParameterMapping(entry, context);
1221
822
  });
1222
823
  return retVal;
1223
824
  };
1224
825
  const de_PrepareQueryResponse = (output, context) => {
1225
- return {
1226
- Columns: output.Columns != null ? de_SelectColumnList(output.Columns, context) : undefined,
1227
- Parameters: output.Parameters != null ? de_ParameterMappingList(output.Parameters, context) : undefined,
1228
- QueryString: __expectString(output.QueryString),
1229
- };
1230
- };
1231
- const de_QueryExecutionException = (output, context) => {
1232
- return {
1233
- Message: __expectString(output.Message),
1234
- };
826
+ return take(output, {
827
+ Columns: (_) => de_SelectColumnList(_, context),
828
+ Parameters: (_) => de_ParameterMappingList(_, context),
829
+ QueryString: __expectString,
830
+ });
1235
831
  };
1236
832
  const de_QueryResponse = (output, context) => {
1237
- return {
1238
- ColumnInfo: output.ColumnInfo != null ? de_ColumnInfoList(output.ColumnInfo, context) : undefined,
1239
- NextToken: __expectString(output.NextToken),
1240
- QueryId: __expectString(output.QueryId),
1241
- QueryStatus: output.QueryStatus != null ? de_QueryStatus(output.QueryStatus, context) : undefined,
1242
- Rows: output.Rows != null ? de_RowList(output.Rows, context) : undefined,
1243
- };
833
+ return take(output, {
834
+ ColumnInfo: (_) => de_ColumnInfoList(_, context),
835
+ NextToken: __expectString,
836
+ QueryId: __expectString,
837
+ QueryStatus: (_) => de_QueryStatus(_, context),
838
+ Rows: (_) => de_RowList(_, context),
839
+ });
1244
840
  };
1245
841
  const de_QueryStatus = (output, context) => {
1246
- return {
1247
- CumulativeBytesMetered: __expectLong(output.CumulativeBytesMetered),
1248
- CumulativeBytesScanned: __expectLong(output.CumulativeBytesScanned),
1249
- ProgressPercentage: __limitedParseDouble(output.ProgressPercentage),
1250
- };
1251
- };
1252
- const de_ResourceNotFoundException = (output, context) => {
1253
- return {
1254
- Message: __expectString(output.Message),
1255
- ScheduledQueryArn: __expectString(output.ScheduledQueryArn),
1256
- };
842
+ return take(output, {
843
+ CumulativeBytesMetered: __expectLong,
844
+ CumulativeBytesScanned: __expectLong,
845
+ ProgressPercentage: __limitedParseDouble,
846
+ });
1257
847
  };
1258
848
  const de_Row = (output, context) => {
1259
- return {
1260
- Data: output.Data != null ? de_DatumList(output.Data, context) : undefined,
1261
- };
849
+ return take(output, {
850
+ Data: (_) => de_DatumList(_, context),
851
+ });
1262
852
  };
1263
853
  const de_RowList = (output, context) => {
1264
854
  const retVal = (output || [])
1265
855
  .filter((e) => e != null)
1266
856
  .map((entry) => {
1267
- if (entry === null) {
1268
- return null;
1269
- }
1270
857
  return de_Row(entry, context);
1271
858
  });
1272
859
  return retVal;
1273
860
  };
1274
- const de_S3Configuration = (output, context) => {
1275
- return {
1276
- BucketName: __expectString(output.BucketName),
1277
- EncryptionOption: __expectString(output.EncryptionOption),
1278
- ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix),
1279
- };
1280
- };
1281
- const de_S3ReportLocation = (output, context) => {
1282
- return {
1283
- BucketName: __expectString(output.BucketName),
1284
- ObjectKey: __expectString(output.ObjectKey),
1285
- };
1286
- };
1287
- const de_ScheduleConfiguration = (output, context) => {
1288
- return {
1289
- ScheduleExpression: __expectString(output.ScheduleExpression),
1290
- };
1291
- };
1292
861
  const de_ScheduledQuery = (output, context) => {
1293
- return {
1294
- Arn: __expectString(output.Arn),
1295
- CreationTime: output.CreationTime != null
1296
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
1297
- : undefined,
1298
- ErrorReportConfiguration: output.ErrorReportConfiguration != null
1299
- ? de_ErrorReportConfiguration(output.ErrorReportConfiguration, context)
1300
- : undefined,
1301
- LastRunStatus: __expectString(output.LastRunStatus),
1302
- Name: __expectString(output.Name),
1303
- NextInvocationTime: output.NextInvocationTime != null
1304
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextInvocationTime)))
1305
- : undefined,
1306
- PreviousInvocationTime: output.PreviousInvocationTime != null
1307
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PreviousInvocationTime)))
1308
- : undefined,
1309
- State: __expectString(output.State),
1310
- TargetDestination: output.TargetDestination != null ? de_TargetDestination(output.TargetDestination, context) : undefined,
1311
- };
862
+ return take(output, {
863
+ Arn: __expectString,
864
+ CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
865
+ ErrorReportConfiguration: _json,
866
+ LastRunStatus: __expectString,
867
+ Name: __expectString,
868
+ NextInvocationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
869
+ PreviousInvocationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
870
+ State: __expectString,
871
+ TargetDestination: _json,
872
+ });
1312
873
  };
1313
874
  const de_ScheduledQueryDescription = (output, context) => {
1314
- return {
1315
- Arn: __expectString(output.Arn),
1316
- CreationTime: output.CreationTime != null
1317
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
1318
- : undefined,
1319
- ErrorReportConfiguration: output.ErrorReportConfiguration != null
1320
- ? de_ErrorReportConfiguration(output.ErrorReportConfiguration, context)
1321
- : undefined,
1322
- KmsKeyId: __expectString(output.KmsKeyId),
1323
- LastRunSummary: output.LastRunSummary != null ? de_ScheduledQueryRunSummary(output.LastRunSummary, context) : undefined,
1324
- Name: __expectString(output.Name),
1325
- NextInvocationTime: output.NextInvocationTime != null
1326
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextInvocationTime)))
1327
- : undefined,
1328
- NotificationConfiguration: output.NotificationConfiguration != null
1329
- ? de_NotificationConfiguration(output.NotificationConfiguration, context)
1330
- : undefined,
1331
- PreviousInvocationTime: output.PreviousInvocationTime != null
1332
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PreviousInvocationTime)))
1333
- : undefined,
1334
- QueryString: __expectString(output.QueryString),
1335
- RecentlyFailedRuns: output.RecentlyFailedRuns != null
1336
- ? de_ScheduledQueryRunSummaryList(output.RecentlyFailedRuns, context)
1337
- : undefined,
1338
- ScheduleConfiguration: output.ScheduleConfiguration != null
1339
- ? de_ScheduleConfiguration(output.ScheduleConfiguration, context)
1340
- : undefined,
1341
- ScheduledQueryExecutionRoleArn: __expectString(output.ScheduledQueryExecutionRoleArn),
1342
- State: __expectString(output.State),
1343
- TargetConfiguration: output.TargetConfiguration != null ? de_TargetConfiguration(output.TargetConfiguration, context) : undefined,
1344
- };
875
+ return take(output, {
876
+ Arn: __expectString,
877
+ CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
878
+ ErrorReportConfiguration: _json,
879
+ KmsKeyId: __expectString,
880
+ LastRunSummary: (_) => de_ScheduledQueryRunSummary(_, context),
881
+ Name: __expectString,
882
+ NextInvocationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
883
+ NotificationConfiguration: _json,
884
+ PreviousInvocationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
885
+ QueryString: __expectString,
886
+ RecentlyFailedRuns: (_) => de_ScheduledQueryRunSummaryList(_, context),
887
+ ScheduleConfiguration: _json,
888
+ ScheduledQueryExecutionRoleArn: __expectString,
889
+ State: __expectString,
890
+ TargetConfiguration: _json,
891
+ });
1345
892
  };
1346
893
  const de_ScheduledQueryList = (output, context) => {
1347
894
  const retVal = (output || [])
1348
895
  .filter((e) => e != null)
1349
896
  .map((entry) => {
1350
- if (entry === null) {
1351
- return null;
1352
- }
1353
897
  return de_ScheduledQuery(entry, context);
1354
898
  });
1355
899
  return retVal;
1356
900
  };
1357
901
  const de_ScheduledQueryRunSummary = (output, context) => {
1358
- return {
1359
- ErrorReportLocation: output.ErrorReportLocation != null ? de_ErrorReportLocation(output.ErrorReportLocation, context) : undefined,
1360
- ExecutionStats: output.ExecutionStats != null ? de_ExecutionStats(output.ExecutionStats, context) : undefined,
1361
- FailureReason: __expectString(output.FailureReason),
1362
- InvocationTime: output.InvocationTime != null
1363
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InvocationTime)))
1364
- : undefined,
1365
- RunStatus: __expectString(output.RunStatus),
1366
- TriggerTime: output.TriggerTime != null
1367
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TriggerTime)))
1368
- : undefined,
1369
- };
902
+ return take(output, {
903
+ ErrorReportLocation: _json,
904
+ ExecutionStats: _json,
905
+ FailureReason: __expectString,
906
+ InvocationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
907
+ RunStatus: __expectString,
908
+ TriggerTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
909
+ });
1370
910
  };
1371
911
  const de_ScheduledQueryRunSummaryList = (output, context) => {
1372
912
  const retVal = (output || [])
1373
913
  .filter((e) => e != null)
1374
914
  .map((entry) => {
1375
- if (entry === null) {
1376
- return null;
1377
- }
1378
915
  return de_ScheduledQueryRunSummary(entry, context);
1379
916
  });
1380
917
  return retVal;
1381
918
  };
1382
919
  const de_SelectColumn = (output, context) => {
1383
- return {
1384
- Aliased: __expectBoolean(output.Aliased),
1385
- DatabaseName: __expectString(output.DatabaseName),
1386
- Name: __expectString(output.Name),
1387
- TableName: __expectString(output.TableName),
1388
- Type: output.Type != null ? de_Type(output.Type, context) : undefined,
1389
- };
920
+ return take(output, {
921
+ Aliased: __expectBoolean,
922
+ DatabaseName: __expectString,
923
+ Name: __expectString,
924
+ TableName: __expectString,
925
+ Type: (_) => de_Type(_, context),
926
+ });
1390
927
  };
1391
928
  const de_SelectColumnList = (output, context) => {
1392
929
  const retVal = (output || [])
1393
930
  .filter((e) => e != null)
1394
931
  .map((entry) => {
1395
- if (entry === null) {
1396
- return null;
1397
- }
1398
932
  return de_SelectColumn(entry, context);
1399
933
  });
1400
934
  return retVal;
1401
935
  };
1402
- const de_ServiceQuotaExceededException = (output, context) => {
1403
- return {
1404
- Message: __expectString(output.Message),
1405
- };
1406
- };
1407
- const de_SnsConfiguration = (output, context) => {
1408
- return {
1409
- TopicArn: __expectString(output.TopicArn),
1410
- };
1411
- };
1412
- const de_Tag = (output, context) => {
1413
- return {
1414
- Key: __expectString(output.Key),
1415
- Value: __expectString(output.Value),
1416
- };
1417
- };
1418
- const de_TagList = (output, context) => {
1419
- const retVal = (output || [])
1420
- .filter((e) => e != null)
1421
- .map((entry) => {
1422
- if (entry === null) {
1423
- return null;
1424
- }
1425
- return de_Tag(entry, context);
1426
- });
1427
- return retVal;
1428
- };
1429
- const de_TagResourceResponse = (output, context) => {
1430
- return {};
1431
- };
1432
- const de_TargetConfiguration = (output, context) => {
1433
- return {
1434
- TimestreamConfiguration: output.TimestreamConfiguration != null
1435
- ? de_TimestreamConfiguration(output.TimestreamConfiguration, context)
1436
- : undefined,
1437
- };
1438
- };
1439
- const de_TargetDestination = (output, context) => {
1440
- return {
1441
- TimestreamDestination: output.TimestreamDestination != null
1442
- ? de_TimestreamDestination(output.TimestreamDestination, context)
1443
- : undefined,
1444
- };
1445
- };
1446
- const de_ThrottlingException = (output, context) => {
1447
- return {
1448
- Message: __expectString(output.Message),
1449
- };
1450
- };
1451
936
  const de_TimeSeriesDataPoint = (output, context) => {
1452
- return {
1453
- Time: __expectString(output.Time),
1454
- Value: output.Value != null ? de_Datum(output.Value, context) : undefined,
1455
- };
937
+ return take(output, {
938
+ Time: __expectString,
939
+ Value: (_) => de_Datum(_, context),
940
+ });
1456
941
  };
1457
942
  const de_TimeSeriesDataPointList = (output, context) => {
1458
943
  const retVal = (output || [])
1459
944
  .filter((e) => e != null)
1460
945
  .map((entry) => {
1461
- if (entry === null) {
1462
- return null;
1463
- }
1464
946
  return de_TimeSeriesDataPoint(entry, context);
1465
947
  });
1466
948
  return retVal;
1467
949
  };
1468
- const de_TimestreamConfiguration = (output, context) => {
1469
- return {
1470
- DatabaseName: __expectString(output.DatabaseName),
1471
- DimensionMappings: output.DimensionMappings != null ? de_DimensionMappingList(output.DimensionMappings, context) : undefined,
1472
- MeasureNameColumn: __expectString(output.MeasureNameColumn),
1473
- MixedMeasureMappings: output.MixedMeasureMappings != null
1474
- ? de_MixedMeasureMappingList(output.MixedMeasureMappings, context)
1475
- : undefined,
1476
- MultiMeasureMappings: output.MultiMeasureMappings != null ? de_MultiMeasureMappings(output.MultiMeasureMappings, context) : undefined,
1477
- TableName: __expectString(output.TableName),
1478
- TimeColumn: __expectString(output.TimeColumn),
1479
- };
1480
- };
1481
- const de_TimestreamDestination = (output, context) => {
1482
- return {
1483
- DatabaseName: __expectString(output.DatabaseName),
1484
- TableName: __expectString(output.TableName),
1485
- };
1486
- };
1487
950
  const de_Type = (output, context) => {
1488
- return {
1489
- ArrayColumnInfo: output.ArrayColumnInfo != null ? de_ColumnInfo(output.ArrayColumnInfo, context) : undefined,
1490
- RowColumnInfo: output.RowColumnInfo != null ? de_ColumnInfoList(output.RowColumnInfo, context) : undefined,
1491
- ScalarType: __expectString(output.ScalarType),
1492
- TimeSeriesMeasureValueColumnInfo: output.TimeSeriesMeasureValueColumnInfo != null
1493
- ? de_ColumnInfo(output.TimeSeriesMeasureValueColumnInfo, context)
1494
- : undefined,
1495
- };
1496
- };
1497
- const de_UntagResourceResponse = (output, context) => {
1498
- return {};
1499
- };
1500
- const de_ValidationException = (output, context) => {
1501
- return {
1502
- Message: __expectString(output.Message),
1503
- };
951
+ return take(output, {
952
+ ArrayColumnInfo: (_) => de_ColumnInfo(_, context),
953
+ RowColumnInfo: (_) => de_ColumnInfoList(_, context),
954
+ ScalarType: __expectString,
955
+ TimeSeriesMeasureValueColumnInfo: (_) => de_ColumnInfo(_, context),
956
+ });
1504
957
  };
1505
958
  const deserializeMetadata = (output) => ({
1506
959
  httpStatusCode: output.statusCode,
@@ -1515,6 +968,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1515
968
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1516
969
  };
1517
970
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
971
+ const throwDefaultError = withBaseException(__BaseException);
1518
972
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1519
973
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1520
974
  const contents = {
@@ -1533,6 +987,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
1533
987
  }
1534
988
  return new __HttpRequest(contents);
1535
989
  };
990
+ function sharedHeaders(operation) {
991
+ return {
992
+ "content-type": "application/x-amz-json-1.0",
993
+ "x-amz-target": `Timestream_20181101.${operation}`,
994
+ };
995
+ }
1536
996
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1537
997
  if (encoded.length) {
1538
998
  return JSON.parse(encoded);