@aws-sdk/client-timestream-query 3.183.0 → 3.186.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_json1_0.js +2 -2
  3. package/dist-es/TimestreamQuery.js +61 -54
  4. package/dist-es/TimestreamQueryClient.js +29 -23
  5. package/dist-es/commands/CancelQueryCommand.js +29 -22
  6. package/dist-es/commands/CreateScheduledQueryCommand.js +29 -22
  7. package/dist-es/commands/DeleteScheduledQueryCommand.js +30 -23
  8. package/dist-es/commands/DescribeEndpointsCommand.js +28 -21
  9. package/dist-es/commands/DescribeScheduledQueryCommand.js +29 -22
  10. package/dist-es/commands/ExecuteScheduledQueryCommand.js +30 -23
  11. package/dist-es/commands/ListScheduledQueriesCommand.js +29 -22
  12. package/dist-es/commands/ListTagsForResourceCommand.js +29 -22
  13. package/dist-es/commands/PrepareQueryCommand.js +29 -22
  14. package/dist-es/commands/QueryCommand.js +29 -22
  15. package/dist-es/commands/TagResourceCommand.js +29 -22
  16. package/dist-es/commands/UntagResourceCommand.js +29 -22
  17. package/dist-es/commands/UpdateScheduledQueryCommand.js +30 -23
  18. package/dist-es/endpoints.js +8 -8
  19. package/dist-es/models/TimestreamQueryServiceException.js +10 -5
  20. package/dist-es/models/models_0.js +162 -274
  21. package/dist-es/pagination/ListScheduledQueriesPaginator.js +68 -25
  22. package/dist-es/pagination/ListTagsForResourcePaginator.js +68 -25
  23. package/dist-es/pagination/QueryPaginator.js +68 -25
  24. package/dist-es/protocols/Aws_json1_0.js +1374 -1108
  25. package/dist-es/runtimeConfig.browser.js +12 -27
  26. package/dist-es/runtimeConfig.js +12 -31
  27. package/dist-es/runtimeConfig.native.js +5 -8
  28. package/dist-es/runtimeConfig.shared.js +11 -8
  29. package/package.json +34 -34
@@ -1,1038 +1,1281 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  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";
3
4
  import { v4 as generateIdempotencyToken } from "uuid";
4
5
  import { AccessDeniedException, ConflictException, InternalServerException, InvalidEndpointException, QueryExecutionException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
6
  import { TimestreamQueryServiceException as __BaseException } from "../models/TimestreamQueryServiceException";
6
- export const serializeAws_json1_0CancelQueryCommand = async (input, context) => {
7
- const headers = {
8
- "content-type": "application/x-amz-json-1.0",
9
- "x-amz-target": "Timestream_20181101.CancelQuery",
10
- };
11
- let body;
12
- body = JSON.stringify(serializeAws_json1_0CancelQueryRequest(input, context));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- export const serializeAws_json1_0CreateScheduledQueryCommand = async (input, context) => {
16
- const headers = {
17
- "content-type": "application/x-amz-json-1.0",
18
- "x-amz-target": "Timestream_20181101.CreateScheduledQuery",
19
- };
20
- let body;
21
- body = JSON.stringify(serializeAws_json1_0CreateScheduledQueryRequest(input, context));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const serializeAws_json1_0DeleteScheduledQueryCommand = async (input, context) => {
25
- const headers = {
26
- "content-type": "application/x-amz-json-1.0",
27
- "x-amz-target": "Timestream_20181101.DeleteScheduledQuery",
28
- };
29
- let body;
30
- body = JSON.stringify(serializeAws_json1_0DeleteScheduledQueryRequest(input, context));
31
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
32
- };
33
- export const serializeAws_json1_0DescribeEndpointsCommand = async (input, context) => {
34
- const headers = {
35
- "content-type": "application/x-amz-json-1.0",
36
- "x-amz-target": "Timestream_20181101.DescribeEndpoints",
37
- };
38
- let body;
39
- body = JSON.stringify(serializeAws_json1_0DescribeEndpointsRequest(input, context));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const serializeAws_json1_0DescribeScheduledQueryCommand = async (input, context) => {
43
- const headers = {
44
- "content-type": "application/x-amz-json-1.0",
45
- "x-amz-target": "Timestream_20181101.DescribeScheduledQuery",
46
- };
47
- let body;
48
- body = JSON.stringify(serializeAws_json1_0DescribeScheduledQueryRequest(input, context));
49
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
- };
51
- export const serializeAws_json1_0ExecuteScheduledQueryCommand = async (input, context) => {
52
- const headers = {
53
- "content-type": "application/x-amz-json-1.0",
54
- "x-amz-target": "Timestream_20181101.ExecuteScheduledQuery",
55
- };
56
- let body;
57
- body = JSON.stringify(serializeAws_json1_0ExecuteScheduledQueryRequest(input, context));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const serializeAws_json1_0ListScheduledQueriesCommand = async (input, context) => {
61
- const headers = {
62
- "content-type": "application/x-amz-json-1.0",
63
- "x-amz-target": "Timestream_20181101.ListScheduledQueries",
64
- };
65
- let body;
66
- body = JSON.stringify(serializeAws_json1_0ListScheduledQueriesRequest(input, context));
67
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
68
- };
69
- export const serializeAws_json1_0ListTagsForResourceCommand = async (input, context) => {
70
- const headers = {
71
- "content-type": "application/x-amz-json-1.0",
72
- "x-amz-target": "Timestream_20181101.ListTagsForResource",
73
- };
74
- let body;
75
- body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const serializeAws_json1_0PrepareQueryCommand = async (input, context) => {
79
- const headers = {
80
- "content-type": "application/x-amz-json-1.0",
81
- "x-amz-target": "Timestream_20181101.PrepareQuery",
82
- };
83
- let body;
84
- body = JSON.stringify(serializeAws_json1_0PrepareQueryRequest(input, context));
85
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
- };
87
- export const serializeAws_json1_0QueryCommand = async (input, context) => {
88
- const headers = {
89
- "content-type": "application/x-amz-json-1.0",
90
- "x-amz-target": "Timestream_20181101.Query",
91
- };
92
- let body;
93
- body = JSON.stringify(serializeAws_json1_0QueryRequest(input, context));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const serializeAws_json1_0TagResourceCommand = async (input, context) => {
97
- const headers = {
98
- "content-type": "application/x-amz-json-1.0",
99
- "x-amz-target": "Timestream_20181101.TagResource",
100
- };
101
- let body;
102
- body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
103
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
104
- };
105
- export const serializeAws_json1_0UntagResourceCommand = async (input, context) => {
106
- const headers = {
107
- "content-type": "application/x-amz-json-1.0",
108
- "x-amz-target": "Timestream_20181101.UntagResource",
109
- };
110
- let body;
111
- body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const serializeAws_json1_0UpdateScheduledQueryCommand = async (input, context) => {
115
- const headers = {
116
- "content-type": "application/x-amz-json-1.0",
117
- "x-amz-target": "Timestream_20181101.UpdateScheduledQuery",
118
- };
119
- let body;
120
- body = JSON.stringify(serializeAws_json1_0UpdateScheduledQueryRequest(input, context));
121
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
- };
123
- export const deserializeAws_json1_0CancelQueryCommand = async (output, context) => {
124
- if (output.statusCode >= 300) {
125
- return deserializeAws_json1_0CancelQueryCommandError(output, context);
126
- }
127
- const data = await parseBody(output.body, context);
128
- let contents = {};
129
- contents = deserializeAws_json1_0CancelQueryResponse(data, context);
130
- const response = {
131
- $metadata: deserializeMetadata(output),
132
- ...contents,
133
- };
134
- return Promise.resolve(response);
135
- };
136
- const deserializeAws_json1_0CancelQueryCommandError = async (output, context) => {
137
- const parsedOutput = {
138
- ...output,
139
- body: await parseErrorBody(output.body, context),
140
- };
141
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
142
- switch (errorCode) {
143
- case "AccessDeniedException":
144
- case "com.amazonaws.timestreamquery#AccessDeniedException":
145
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
146
- case "InternalServerException":
147
- case "com.amazonaws.timestreamquery#InternalServerException":
148
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
149
- case "InvalidEndpointException":
150
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
151
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
152
- case "ThrottlingException":
153
- case "com.amazonaws.timestreamquery#ThrottlingException":
154
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
155
- case "ValidationException":
156
- case "com.amazonaws.timestreamquery#ValidationException":
157
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
158
- default:
159
- const parsedBody = parsedOutput.body;
160
- throwDefaultError({
161
- output,
162
- parsedBody,
163
- exceptionCtor: __BaseException,
164
- errorCode,
165
- });
166
- }
167
- };
168
- export const deserializeAws_json1_0CreateScheduledQueryCommand = async (output, context) => {
169
- if (output.statusCode >= 300) {
170
- return deserializeAws_json1_0CreateScheduledQueryCommandError(output, context);
171
- }
172
- const data = await parseBody(output.body, context);
173
- let contents = {};
174
- contents = deserializeAws_json1_0CreateScheduledQueryResponse(data, context);
175
- const response = {
176
- $metadata: deserializeMetadata(output),
177
- ...contents,
178
- };
179
- return Promise.resolve(response);
180
- };
181
- const deserializeAws_json1_0CreateScheduledQueryCommandError = async (output, context) => {
182
- const parsedOutput = {
183
- ...output,
184
- body: await parseErrorBody(output.body, context),
185
- };
186
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
187
- switch (errorCode) {
188
- case "AccessDeniedException":
189
- case "com.amazonaws.timestreamquery#AccessDeniedException":
190
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
191
- case "ConflictException":
192
- case "com.amazonaws.timestreamquery#ConflictException":
193
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
194
- case "InternalServerException":
195
- case "com.amazonaws.timestreamquery#InternalServerException":
196
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
197
- case "InvalidEndpointException":
198
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
199
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
200
- case "ServiceQuotaExceededException":
201
- case "com.amazonaws.timestreamquery#ServiceQuotaExceededException":
202
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
203
- case "ThrottlingException":
204
- case "com.amazonaws.timestreamquery#ThrottlingException":
205
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
206
- case "ValidationException":
207
- case "com.amazonaws.timestreamquery#ValidationException":
208
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
209
- default:
210
- const parsedBody = parsedOutput.body;
211
- throwDefaultError({
212
- output,
213
- parsedBody,
214
- exceptionCtor: __BaseException,
215
- errorCode,
216
- });
217
- }
218
- };
219
- export const deserializeAws_json1_0DeleteScheduledQueryCommand = async (output, context) => {
220
- if (output.statusCode >= 300) {
221
- return deserializeAws_json1_0DeleteScheduledQueryCommandError(output, context);
222
- }
223
- await collectBody(output.body, context);
224
- const response = {
225
- $metadata: deserializeMetadata(output),
226
- };
227
- return Promise.resolve(response);
228
- };
229
- const deserializeAws_json1_0DeleteScheduledQueryCommandError = async (output, context) => {
230
- const parsedOutput = {
231
- ...output,
232
- body: await parseErrorBody(output.body, context),
233
- };
234
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
235
- switch (errorCode) {
236
- case "AccessDeniedException":
237
- case "com.amazonaws.timestreamquery#AccessDeniedException":
238
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
239
- case "InternalServerException":
240
- case "com.amazonaws.timestreamquery#InternalServerException":
241
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
242
- case "InvalidEndpointException":
243
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
244
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
245
- case "ResourceNotFoundException":
246
- case "com.amazonaws.timestreamquery#ResourceNotFoundException":
247
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
248
- case "ThrottlingException":
249
- case "com.amazonaws.timestreamquery#ThrottlingException":
250
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
251
- case "ValidationException":
252
- case "com.amazonaws.timestreamquery#ValidationException":
253
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
254
- default:
255
- const parsedBody = parsedOutput.body;
256
- throwDefaultError({
257
- output,
258
- parsedBody,
259
- exceptionCtor: __BaseException,
260
- errorCode,
261
- });
262
- }
263
- };
264
- export const deserializeAws_json1_0DescribeEndpointsCommand = async (output, context) => {
265
- if (output.statusCode >= 300) {
266
- return deserializeAws_json1_0DescribeEndpointsCommandError(output, context);
267
- }
268
- const data = await parseBody(output.body, context);
269
- let contents = {};
270
- contents = deserializeAws_json1_0DescribeEndpointsResponse(data, context);
271
- const response = {
272
- $metadata: deserializeMetadata(output),
273
- ...contents,
274
- };
275
- return Promise.resolve(response);
276
- };
277
- const deserializeAws_json1_0DescribeEndpointsCommandError = async (output, context) => {
278
- const parsedOutput = {
279
- ...output,
280
- body: await parseErrorBody(output.body, context),
281
- };
282
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
283
- switch (errorCode) {
284
- case "InternalServerException":
285
- case "com.amazonaws.timestreamquery#InternalServerException":
286
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
287
- case "ThrottlingException":
288
- case "com.amazonaws.timestreamquery#ThrottlingException":
289
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
290
- case "ValidationException":
291
- case "com.amazonaws.timestreamquery#ValidationException":
292
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
293
- default:
294
- const parsedBody = parsedOutput.body;
295
- throwDefaultError({
296
- output,
297
- parsedBody,
298
- exceptionCtor: __BaseException,
299
- errorCode,
300
- });
301
- }
302
- };
303
- export const deserializeAws_json1_0DescribeScheduledQueryCommand = async (output, context) => {
304
- if (output.statusCode >= 300) {
305
- return deserializeAws_json1_0DescribeScheduledQueryCommandError(output, context);
306
- }
307
- const data = await parseBody(output.body, context);
308
- let contents = {};
309
- contents = deserializeAws_json1_0DescribeScheduledQueryResponse(data, context);
310
- const response = {
311
- $metadata: deserializeMetadata(output),
312
- ...contents,
313
- };
314
- return Promise.resolve(response);
315
- };
316
- const deserializeAws_json1_0DescribeScheduledQueryCommandError = async (output, context) => {
317
- const parsedOutput = {
318
- ...output,
319
- body: await parseErrorBody(output.body, context),
320
- };
321
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
322
- switch (errorCode) {
323
- case "AccessDeniedException":
324
- case "com.amazonaws.timestreamquery#AccessDeniedException":
325
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
326
- case "InternalServerException":
327
- case "com.amazonaws.timestreamquery#InternalServerException":
328
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
329
- case "InvalidEndpointException":
330
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
331
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
332
- case "ResourceNotFoundException":
333
- case "com.amazonaws.timestreamquery#ResourceNotFoundException":
334
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
335
- case "ThrottlingException":
336
- case "com.amazonaws.timestreamquery#ThrottlingException":
337
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
338
- case "ValidationException":
339
- case "com.amazonaws.timestreamquery#ValidationException":
340
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
341
- default:
342
- const parsedBody = parsedOutput.body;
343
- throwDefaultError({
344
- output,
345
- parsedBody,
346
- exceptionCtor: __BaseException,
347
- errorCode,
348
- });
349
- }
350
- };
351
- export const deserializeAws_json1_0ExecuteScheduledQueryCommand = async (output, context) => {
352
- if (output.statusCode >= 300) {
353
- return deserializeAws_json1_0ExecuteScheduledQueryCommandError(output, context);
354
- }
355
- await collectBody(output.body, context);
356
- const response = {
357
- $metadata: deserializeMetadata(output),
358
- };
359
- return Promise.resolve(response);
360
- };
361
- const deserializeAws_json1_0ExecuteScheduledQueryCommandError = async (output, context) => {
362
- const parsedOutput = {
363
- ...output,
364
- body: await parseErrorBody(output.body, context),
365
- };
366
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
367
- switch (errorCode) {
368
- case "AccessDeniedException":
369
- case "com.amazonaws.timestreamquery#AccessDeniedException":
370
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
371
- case "InternalServerException":
372
- case "com.amazonaws.timestreamquery#InternalServerException":
373
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
374
- case "InvalidEndpointException":
375
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
376
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
377
- case "ResourceNotFoundException":
378
- case "com.amazonaws.timestreamquery#ResourceNotFoundException":
379
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
380
- case "ThrottlingException":
381
- case "com.amazonaws.timestreamquery#ThrottlingException":
382
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
383
- case "ValidationException":
384
- case "com.amazonaws.timestreamquery#ValidationException":
385
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
386
- default:
387
- const parsedBody = parsedOutput.body;
388
- throwDefaultError({
389
- output,
390
- parsedBody,
391
- exceptionCtor: __BaseException,
392
- errorCode,
393
- });
394
- }
395
- };
396
- export const deserializeAws_json1_0ListScheduledQueriesCommand = async (output, context) => {
397
- if (output.statusCode >= 300) {
398
- return deserializeAws_json1_0ListScheduledQueriesCommandError(output, context);
399
- }
400
- const data = await parseBody(output.body, context);
401
- let contents = {};
402
- contents = deserializeAws_json1_0ListScheduledQueriesResponse(data, context);
403
- const response = {
404
- $metadata: deserializeMetadata(output),
405
- ...contents,
406
- };
407
- return Promise.resolve(response);
408
- };
409
- const deserializeAws_json1_0ListScheduledQueriesCommandError = async (output, context) => {
410
- const parsedOutput = {
411
- ...output,
412
- body: await parseErrorBody(output.body, context),
413
- };
414
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
415
- switch (errorCode) {
416
- case "AccessDeniedException":
417
- case "com.amazonaws.timestreamquery#AccessDeniedException":
418
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
419
- case "InternalServerException":
420
- case "com.amazonaws.timestreamquery#InternalServerException":
421
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
422
- case "InvalidEndpointException":
423
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
424
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
425
- case "ThrottlingException":
426
- case "com.amazonaws.timestreamquery#ThrottlingException":
427
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
428
- case "ValidationException":
429
- case "com.amazonaws.timestreamquery#ValidationException":
430
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
431
- default:
432
- const parsedBody = parsedOutput.body;
433
- throwDefaultError({
434
- output,
435
- parsedBody,
436
- exceptionCtor: __BaseException,
437
- errorCode,
438
- });
439
- }
440
- };
441
- export const deserializeAws_json1_0ListTagsForResourceCommand = async (output, context) => {
442
- if (output.statusCode >= 300) {
443
- return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
444
- }
445
- const data = await parseBody(output.body, context);
446
- let contents = {};
447
- contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
448
- const response = {
449
- $metadata: deserializeMetadata(output),
450
- ...contents,
451
- };
452
- return Promise.resolve(response);
453
- };
454
- const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, context) => {
455
- const parsedOutput = {
456
- ...output,
457
- body: await parseErrorBody(output.body, context),
458
- };
459
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
460
- switch (errorCode) {
461
- case "InvalidEndpointException":
462
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
463
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
464
- case "ResourceNotFoundException":
465
- case "com.amazonaws.timestreamquery#ResourceNotFoundException":
466
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
467
- case "ThrottlingException":
468
- case "com.amazonaws.timestreamquery#ThrottlingException":
469
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
470
- case "ValidationException":
471
- case "com.amazonaws.timestreamquery#ValidationException":
472
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
473
- default:
474
- const parsedBody = parsedOutput.body;
475
- throwDefaultError({
476
- output,
477
- parsedBody,
478
- exceptionCtor: __BaseException,
479
- errorCode,
480
- });
481
- }
482
- };
483
- export const deserializeAws_json1_0PrepareQueryCommand = async (output, context) => {
484
- if (output.statusCode >= 300) {
485
- return deserializeAws_json1_0PrepareQueryCommandError(output, context);
486
- }
487
- const data = await parseBody(output.body, context);
488
- let contents = {};
489
- contents = deserializeAws_json1_0PrepareQueryResponse(data, context);
490
- const response = {
491
- $metadata: deserializeMetadata(output),
492
- ...contents,
493
- };
494
- return Promise.resolve(response);
495
- };
496
- const deserializeAws_json1_0PrepareQueryCommandError = async (output, context) => {
497
- const parsedOutput = {
498
- ...output,
499
- body: await parseErrorBody(output.body, context),
500
- };
501
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
502
- switch (errorCode) {
503
- case "AccessDeniedException":
504
- case "com.amazonaws.timestreamquery#AccessDeniedException":
505
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
506
- case "InternalServerException":
507
- case "com.amazonaws.timestreamquery#InternalServerException":
508
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
509
- case "InvalidEndpointException":
510
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
511
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
512
- case "ThrottlingException":
513
- case "com.amazonaws.timestreamquery#ThrottlingException":
514
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
515
- case "ValidationException":
516
- case "com.amazonaws.timestreamquery#ValidationException":
517
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
518
- default:
519
- const parsedBody = parsedOutput.body;
520
- throwDefaultError({
521
- output,
522
- parsedBody,
523
- exceptionCtor: __BaseException,
524
- errorCode,
525
- });
526
- }
527
- };
528
- export const deserializeAws_json1_0QueryCommand = async (output, context) => {
529
- if (output.statusCode >= 300) {
530
- return deserializeAws_json1_0QueryCommandError(output, context);
531
- }
532
- const data = await parseBody(output.body, context);
533
- let contents = {};
534
- contents = deserializeAws_json1_0QueryResponse(data, context);
535
- const response = {
536
- $metadata: deserializeMetadata(output),
537
- ...contents,
538
- };
539
- return Promise.resolve(response);
540
- };
541
- const deserializeAws_json1_0QueryCommandError = async (output, context) => {
542
- const parsedOutput = {
543
- ...output,
544
- body: await parseErrorBody(output.body, context),
545
- };
546
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
547
- switch (errorCode) {
548
- case "AccessDeniedException":
549
- case "com.amazonaws.timestreamquery#AccessDeniedException":
550
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
551
- case "ConflictException":
552
- case "com.amazonaws.timestreamquery#ConflictException":
553
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
554
- case "InternalServerException":
555
- case "com.amazonaws.timestreamquery#InternalServerException":
556
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
557
- case "InvalidEndpointException":
558
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
559
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
560
- case "QueryExecutionException":
561
- case "com.amazonaws.timestreamquery#QueryExecutionException":
562
- throw await deserializeAws_json1_0QueryExecutionExceptionResponse(parsedOutput, context);
563
- case "ThrottlingException":
564
- case "com.amazonaws.timestreamquery#ThrottlingException":
565
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
566
- case "ValidationException":
567
- case "com.amazonaws.timestreamquery#ValidationException":
568
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
569
- default:
570
- const parsedBody = parsedOutput.body;
571
- throwDefaultError({
572
- output,
573
- parsedBody,
574
- exceptionCtor: __BaseException,
575
- errorCode,
576
- });
577
- }
578
- };
579
- export const deserializeAws_json1_0TagResourceCommand = async (output, context) => {
580
- if (output.statusCode >= 300) {
581
- return deserializeAws_json1_0TagResourceCommandError(output, context);
582
- }
583
- const data = await parseBody(output.body, context);
584
- let contents = {};
585
- contents = deserializeAws_json1_0TagResourceResponse(data, context);
586
- const response = {
587
- $metadata: deserializeMetadata(output),
588
- ...contents,
589
- };
590
- return Promise.resolve(response);
591
- };
592
- const deserializeAws_json1_0TagResourceCommandError = async (output, context) => {
593
- const parsedOutput = {
594
- ...output,
595
- body: await parseErrorBody(output.body, context),
596
- };
597
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
598
- switch (errorCode) {
599
- case "InvalidEndpointException":
600
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
601
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
602
- case "ResourceNotFoundException":
603
- case "com.amazonaws.timestreamquery#ResourceNotFoundException":
604
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
605
- case "ServiceQuotaExceededException":
606
- case "com.amazonaws.timestreamquery#ServiceQuotaExceededException":
607
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
608
- case "ThrottlingException":
609
- case "com.amazonaws.timestreamquery#ThrottlingException":
610
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
611
- case "ValidationException":
612
- case "com.amazonaws.timestreamquery#ValidationException":
613
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
614
- default:
615
- const parsedBody = parsedOutput.body;
616
- throwDefaultError({
617
- output,
618
- parsedBody,
619
- exceptionCtor: __BaseException,
620
- errorCode,
621
- });
622
- }
623
- };
624
- export const deserializeAws_json1_0UntagResourceCommand = async (output, context) => {
625
- if (output.statusCode >= 300) {
626
- return deserializeAws_json1_0UntagResourceCommandError(output, context);
627
- }
628
- const data = await parseBody(output.body, context);
629
- let contents = {};
630
- contents = deserializeAws_json1_0UntagResourceResponse(data, context);
631
- const response = {
632
- $metadata: deserializeMetadata(output),
633
- ...contents,
634
- };
635
- return Promise.resolve(response);
636
- };
637
- const deserializeAws_json1_0UntagResourceCommandError = async (output, context) => {
638
- const parsedOutput = {
639
- ...output,
640
- body: await parseErrorBody(output.body, context),
641
- };
642
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
643
- switch (errorCode) {
644
- case "InvalidEndpointException":
645
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
646
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
647
- case "ResourceNotFoundException":
648
- case "com.amazonaws.timestreamquery#ResourceNotFoundException":
649
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
650
- case "ThrottlingException":
651
- case "com.amazonaws.timestreamquery#ThrottlingException":
652
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
653
- case "ValidationException":
654
- case "com.amazonaws.timestreamquery#ValidationException":
655
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
656
- default:
657
- const parsedBody = parsedOutput.body;
658
- throwDefaultError({
659
- output,
660
- parsedBody,
661
- exceptionCtor: __BaseException,
662
- errorCode,
663
- });
664
- }
665
- };
666
- export const deserializeAws_json1_0UpdateScheduledQueryCommand = async (output, context) => {
667
- if (output.statusCode >= 300) {
668
- return deserializeAws_json1_0UpdateScheduledQueryCommandError(output, context);
669
- }
670
- await collectBody(output.body, context);
671
- const response = {
672
- $metadata: deserializeMetadata(output),
673
- };
674
- return Promise.resolve(response);
675
- };
676
- const deserializeAws_json1_0UpdateScheduledQueryCommandError = async (output, context) => {
677
- const parsedOutput = {
678
- ...output,
679
- body: await parseErrorBody(output.body, context),
680
- };
681
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
682
- switch (errorCode) {
683
- case "AccessDeniedException":
684
- case "com.amazonaws.timestreamquery#AccessDeniedException":
685
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
686
- case "InternalServerException":
687
- case "com.amazonaws.timestreamquery#InternalServerException":
688
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
689
- case "InvalidEndpointException":
690
- case "com.amazonaws.timestreamquery#InvalidEndpointException":
691
- throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
692
- case "ResourceNotFoundException":
693
- case "com.amazonaws.timestreamquery#ResourceNotFoundException":
694
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
695
- case "ThrottlingException":
696
- case "com.amazonaws.timestreamquery#ThrottlingException":
697
- throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
698
- case "ValidationException":
699
- case "com.amazonaws.timestreamquery#ValidationException":
700
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
701
- default:
702
- const parsedBody = parsedOutput.body;
703
- throwDefaultError({
704
- output,
705
- parsedBody,
706
- exceptionCtor: __BaseException,
707
- errorCode,
708
- });
709
- }
710
- };
711
- const deserializeAws_json1_0AccessDeniedExceptionResponse = async (parsedOutput, context) => {
712
- const body = parsedOutput.body;
713
- const deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
714
- const exception = new AccessDeniedException({
715
- $metadata: deserializeMetadata(parsedOutput),
716
- ...deserialized,
717
- });
718
- return __decorateServiceException(exception, body);
719
- };
720
- const deserializeAws_json1_0ConflictExceptionResponse = async (parsedOutput, context) => {
721
- const body = parsedOutput.body;
722
- const deserialized = deserializeAws_json1_0ConflictException(body, context);
723
- const exception = new ConflictException({
724
- $metadata: deserializeMetadata(parsedOutput),
725
- ...deserialized,
726
- });
727
- return __decorateServiceException(exception, body);
728
- };
729
- const deserializeAws_json1_0InternalServerExceptionResponse = async (parsedOutput, context) => {
730
- const body = parsedOutput.body;
731
- const deserialized = deserializeAws_json1_0InternalServerException(body, context);
732
- const exception = new InternalServerException({
733
- $metadata: deserializeMetadata(parsedOutput),
734
- ...deserialized,
735
- });
736
- return __decorateServiceException(exception, body);
737
- };
738
- const deserializeAws_json1_0InvalidEndpointExceptionResponse = async (parsedOutput, context) => {
739
- const body = parsedOutput.body;
740
- const deserialized = deserializeAws_json1_0InvalidEndpointException(body, context);
741
- const exception = new InvalidEndpointException({
742
- $metadata: deserializeMetadata(parsedOutput),
743
- ...deserialized,
744
- });
745
- return __decorateServiceException(exception, body);
746
- };
747
- const deserializeAws_json1_0QueryExecutionExceptionResponse = async (parsedOutput, context) => {
748
- const body = parsedOutput.body;
749
- const deserialized = deserializeAws_json1_0QueryExecutionException(body, context);
750
- const exception = new QueryExecutionException({
751
- $metadata: deserializeMetadata(parsedOutput),
752
- ...deserialized,
753
- });
754
- return __decorateServiceException(exception, body);
755
- };
756
- const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
757
- const body = parsedOutput.body;
758
- const deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
759
- const exception = new ResourceNotFoundException({
760
- $metadata: deserializeMetadata(parsedOutput),
761
- ...deserialized,
762
- });
763
- return __decorateServiceException(exception, body);
764
- };
765
- const deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
766
- const body = parsedOutput.body;
767
- const deserialized = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
768
- const exception = new ServiceQuotaExceededException({
769
- $metadata: deserializeMetadata(parsedOutput),
770
- ...deserialized,
771
- });
772
- return __decorateServiceException(exception, body);
773
- };
774
- const deserializeAws_json1_0ThrottlingExceptionResponse = async (parsedOutput, context) => {
775
- const body = parsedOutput.body;
776
- const deserialized = deserializeAws_json1_0ThrottlingException(body, context);
777
- const exception = new ThrottlingException({
778
- $metadata: deserializeMetadata(parsedOutput),
779
- ...deserialized,
780
- });
781
- return __decorateServiceException(exception, body);
782
- };
783
- const deserializeAws_json1_0ValidationExceptionResponse = async (parsedOutput, context) => {
784
- const body = parsedOutput.body;
785
- const deserialized = deserializeAws_json1_0ValidationException(body, context);
786
- const exception = new ValidationException({
787
- $metadata: deserializeMetadata(parsedOutput),
788
- ...deserialized,
789
- });
790
- return __decorateServiceException(exception, body);
791
- };
792
- const serializeAws_json1_0CancelQueryRequest = (input, context) => {
793
- return {
794
- ...(input.QueryId != null && { QueryId: input.QueryId }),
795
- };
796
- };
797
- const serializeAws_json1_0CreateScheduledQueryRequest = (input, context) => {
798
- return {
799
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
800
- ...(input.ErrorReportConfiguration != null && {
801
- ErrorReportConfiguration: serializeAws_json1_0ErrorReportConfiguration(input.ErrorReportConfiguration, context),
802
- }),
803
- ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
804
- ...(input.Name != null && { Name: input.Name }),
805
- ...(input.NotificationConfiguration != null && {
806
- NotificationConfiguration: serializeAws_json1_0NotificationConfiguration(input.NotificationConfiguration, context),
807
- }),
808
- ...(input.QueryString != null && { QueryString: input.QueryString }),
809
- ...(input.ScheduleConfiguration != null && {
810
- ScheduleConfiguration: serializeAws_json1_0ScheduleConfiguration(input.ScheduleConfiguration, context),
811
- }),
812
- ...(input.ScheduledQueryExecutionRoleArn != null && {
813
- ScheduledQueryExecutionRoleArn: input.ScheduledQueryExecutionRoleArn,
814
- }),
815
- ...(input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
816
- ...(input.TargetConfiguration != null && {
817
- TargetConfiguration: serializeAws_json1_0TargetConfiguration(input.TargetConfiguration, context),
818
- }),
819
- };
820
- };
821
- const serializeAws_json1_0DeleteScheduledQueryRequest = (input, context) => {
822
- return {
823
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
824
- };
825
- };
826
- const serializeAws_json1_0DescribeEndpointsRequest = (input, context) => {
7
+ export var serializeAws_json1_0CancelQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
8
+ var headers, body;
9
+ return __generator(this, function (_a) {
10
+ headers = {
11
+ "content-type": "application/x-amz-json-1.0",
12
+ "x-amz-target": "Timestream_20181101.CancelQuery",
13
+ };
14
+ body = JSON.stringify(serializeAws_json1_0CancelQueryRequest(input, context));
15
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
16
+ });
17
+ }); };
18
+ export var serializeAws_json1_0CreateScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
19
+ var headers, body;
20
+ return __generator(this, function (_a) {
21
+ headers = {
22
+ "content-type": "application/x-amz-json-1.0",
23
+ "x-amz-target": "Timestream_20181101.CreateScheduledQuery",
24
+ };
25
+ body = JSON.stringify(serializeAws_json1_0CreateScheduledQueryRequest(input, context));
26
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
27
+ });
28
+ }); };
29
+ export var serializeAws_json1_0DeleteScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
30
+ var headers, body;
31
+ return __generator(this, function (_a) {
32
+ headers = {
33
+ "content-type": "application/x-amz-json-1.0",
34
+ "x-amz-target": "Timestream_20181101.DeleteScheduledQuery",
35
+ };
36
+ body = JSON.stringify(serializeAws_json1_0DeleteScheduledQueryRequest(input, context));
37
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
38
+ });
39
+ }); };
40
+ export var serializeAws_json1_0DescribeEndpointsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
41
+ var headers, body;
42
+ return __generator(this, function (_a) {
43
+ headers = {
44
+ "content-type": "application/x-amz-json-1.0",
45
+ "x-amz-target": "Timestream_20181101.DescribeEndpoints",
46
+ };
47
+ body = JSON.stringify(serializeAws_json1_0DescribeEndpointsRequest(input, context));
48
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
49
+ });
50
+ }); };
51
+ export var serializeAws_json1_0DescribeScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
52
+ var headers, body;
53
+ return __generator(this, function (_a) {
54
+ headers = {
55
+ "content-type": "application/x-amz-json-1.0",
56
+ "x-amz-target": "Timestream_20181101.DescribeScheduledQuery",
57
+ };
58
+ body = JSON.stringify(serializeAws_json1_0DescribeScheduledQueryRequest(input, context));
59
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
60
+ });
61
+ }); };
62
+ export var serializeAws_json1_0ExecuteScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
63
+ var headers, body;
64
+ return __generator(this, function (_a) {
65
+ headers = {
66
+ "content-type": "application/x-amz-json-1.0",
67
+ "x-amz-target": "Timestream_20181101.ExecuteScheduledQuery",
68
+ };
69
+ body = JSON.stringify(serializeAws_json1_0ExecuteScheduledQueryRequest(input, context));
70
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
71
+ });
72
+ }); };
73
+ export var serializeAws_json1_0ListScheduledQueriesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
74
+ var headers, body;
75
+ return __generator(this, function (_a) {
76
+ headers = {
77
+ "content-type": "application/x-amz-json-1.0",
78
+ "x-amz-target": "Timestream_20181101.ListScheduledQueries",
79
+ };
80
+ body = JSON.stringify(serializeAws_json1_0ListScheduledQueriesRequest(input, context));
81
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
82
+ });
83
+ }); };
84
+ export var serializeAws_json1_0ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
85
+ var headers, body;
86
+ return __generator(this, function (_a) {
87
+ headers = {
88
+ "content-type": "application/x-amz-json-1.0",
89
+ "x-amz-target": "Timestream_20181101.ListTagsForResource",
90
+ };
91
+ body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
92
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
93
+ });
94
+ }); };
95
+ export var serializeAws_json1_0PrepareQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
96
+ var headers, body;
97
+ return __generator(this, function (_a) {
98
+ headers = {
99
+ "content-type": "application/x-amz-json-1.0",
100
+ "x-amz-target": "Timestream_20181101.PrepareQuery",
101
+ };
102
+ body = JSON.stringify(serializeAws_json1_0PrepareQueryRequest(input, context));
103
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
104
+ });
105
+ }); };
106
+ export var serializeAws_json1_0QueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
107
+ var headers, body;
108
+ return __generator(this, function (_a) {
109
+ headers = {
110
+ "content-type": "application/x-amz-json-1.0",
111
+ "x-amz-target": "Timestream_20181101.Query",
112
+ };
113
+ body = JSON.stringify(serializeAws_json1_0QueryRequest(input, context));
114
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
115
+ });
116
+ }); };
117
+ export var serializeAws_json1_0TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
118
+ var headers, body;
119
+ return __generator(this, function (_a) {
120
+ headers = {
121
+ "content-type": "application/x-amz-json-1.0",
122
+ "x-amz-target": "Timestream_20181101.TagResource",
123
+ };
124
+ body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
125
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
126
+ });
127
+ }); };
128
+ export var serializeAws_json1_0UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
129
+ var headers, body;
130
+ return __generator(this, function (_a) {
131
+ headers = {
132
+ "content-type": "application/x-amz-json-1.0",
133
+ "x-amz-target": "Timestream_20181101.UntagResource",
134
+ };
135
+ body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
136
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
137
+ });
138
+ }); };
139
+ export var serializeAws_json1_0UpdateScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
140
+ var headers, body;
141
+ return __generator(this, function (_a) {
142
+ headers = {
143
+ "content-type": "application/x-amz-json-1.0",
144
+ "x-amz-target": "Timestream_20181101.UpdateScheduledQuery",
145
+ };
146
+ body = JSON.stringify(serializeAws_json1_0UpdateScheduledQueryRequest(input, context));
147
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
148
+ });
149
+ }); };
150
+ export var deserializeAws_json1_0CancelQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
151
+ var data, contents, response;
152
+ return __generator(this, function (_a) {
153
+ switch (_a.label) {
154
+ case 0:
155
+ if (output.statusCode >= 300) {
156
+ return [2, deserializeAws_json1_0CancelQueryCommandError(output, context)];
157
+ }
158
+ return [4, parseBody(output.body, context)];
159
+ case 1:
160
+ data = _a.sent();
161
+ contents = {};
162
+ contents = deserializeAws_json1_0CancelQueryResponse(data, context);
163
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
164
+ return [2, Promise.resolve(response)];
165
+ }
166
+ });
167
+ }); };
168
+ var deserializeAws_json1_0CancelQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
169
+ var parsedOutput, _a, errorCode, _b, parsedBody;
170
+ var _c;
171
+ return __generator(this, function (_d) {
172
+ switch (_d.label) {
173
+ case 0:
174
+ _a = [__assign({}, output)];
175
+ _c = {};
176
+ return [4, parseErrorBody(output.body, context)];
177
+ case 1:
178
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
179
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
180
+ _b = errorCode;
181
+ switch (_b) {
182
+ case "AccessDeniedException": return [3, 2];
183
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
184
+ case "InternalServerException": return [3, 4];
185
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
186
+ case "InvalidEndpointException": return [3, 6];
187
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
188
+ case "ThrottlingException": return [3, 8];
189
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 8];
190
+ case "ValidationException": return [3, 10];
191
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 10];
192
+ }
193
+ return [3, 12];
194
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
195
+ case 3: throw _d.sent();
196
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
197
+ case 5: throw _d.sent();
198
+ case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
199
+ case 7: throw _d.sent();
200
+ case 8: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
201
+ case 9: throw _d.sent();
202
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
203
+ case 11: throw _d.sent();
204
+ case 12:
205
+ parsedBody = parsedOutput.body;
206
+ throwDefaultError({
207
+ output: output,
208
+ parsedBody: parsedBody,
209
+ exceptionCtor: __BaseException,
210
+ errorCode: errorCode,
211
+ });
212
+ _d.label = 13;
213
+ case 13: return [2];
214
+ }
215
+ });
216
+ }); };
217
+ export var deserializeAws_json1_0CreateScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
218
+ var data, contents, response;
219
+ return __generator(this, function (_a) {
220
+ switch (_a.label) {
221
+ case 0:
222
+ if (output.statusCode >= 300) {
223
+ return [2, deserializeAws_json1_0CreateScheduledQueryCommandError(output, context)];
224
+ }
225
+ return [4, parseBody(output.body, context)];
226
+ case 1:
227
+ data = _a.sent();
228
+ contents = {};
229
+ contents = deserializeAws_json1_0CreateScheduledQueryResponse(data, context);
230
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
231
+ return [2, Promise.resolve(response)];
232
+ }
233
+ });
234
+ }); };
235
+ var deserializeAws_json1_0CreateScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
236
+ var parsedOutput, _a, errorCode, _b, parsedBody;
237
+ var _c;
238
+ return __generator(this, function (_d) {
239
+ switch (_d.label) {
240
+ case 0:
241
+ _a = [__assign({}, output)];
242
+ _c = {};
243
+ return [4, parseErrorBody(output.body, context)];
244
+ case 1:
245
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
246
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
247
+ _b = errorCode;
248
+ switch (_b) {
249
+ case "AccessDeniedException": return [3, 2];
250
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
251
+ case "ConflictException": return [3, 4];
252
+ case "com.amazonaws.timestreamquery#ConflictException": return [3, 4];
253
+ case "InternalServerException": return [3, 6];
254
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 6];
255
+ case "InvalidEndpointException": return [3, 8];
256
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 8];
257
+ case "ServiceQuotaExceededException": return [3, 10];
258
+ case "com.amazonaws.timestreamquery#ServiceQuotaExceededException": return [3, 10];
259
+ case "ThrottlingException": return [3, 12];
260
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 12];
261
+ case "ValidationException": return [3, 14];
262
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 14];
263
+ }
264
+ return [3, 16];
265
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
266
+ case 3: throw _d.sent();
267
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
268
+ case 5: throw _d.sent();
269
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
270
+ case 7: throw _d.sent();
271
+ case 8: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
272
+ case 9: throw _d.sent();
273
+ case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
274
+ case 11: throw _d.sent();
275
+ case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
276
+ case 13: throw _d.sent();
277
+ case 14: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
278
+ case 15: throw _d.sent();
279
+ case 16:
280
+ parsedBody = parsedOutput.body;
281
+ throwDefaultError({
282
+ output: output,
283
+ parsedBody: parsedBody,
284
+ exceptionCtor: __BaseException,
285
+ errorCode: errorCode,
286
+ });
287
+ _d.label = 17;
288
+ case 17: return [2];
289
+ }
290
+ });
291
+ }); };
292
+ export var deserializeAws_json1_0DeleteScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
293
+ var response;
294
+ return __generator(this, function (_a) {
295
+ switch (_a.label) {
296
+ case 0:
297
+ if (output.statusCode >= 300) {
298
+ return [2, deserializeAws_json1_0DeleteScheduledQueryCommandError(output, context)];
299
+ }
300
+ return [4, collectBody(output.body, context)];
301
+ case 1:
302
+ _a.sent();
303
+ response = {
304
+ $metadata: deserializeMetadata(output),
305
+ };
306
+ return [2, Promise.resolve(response)];
307
+ }
308
+ });
309
+ }); };
310
+ var deserializeAws_json1_0DeleteScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
311
+ var parsedOutput, _a, errorCode, _b, parsedBody;
312
+ var _c;
313
+ return __generator(this, function (_d) {
314
+ switch (_d.label) {
315
+ case 0:
316
+ _a = [__assign({}, output)];
317
+ _c = {};
318
+ return [4, parseErrorBody(output.body, context)];
319
+ case 1:
320
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
321
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
322
+ _b = errorCode;
323
+ switch (_b) {
324
+ case "AccessDeniedException": return [3, 2];
325
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
326
+ case "InternalServerException": return [3, 4];
327
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
328
+ case "InvalidEndpointException": return [3, 6];
329
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
330
+ case "ResourceNotFoundException": return [3, 8];
331
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 8];
332
+ case "ThrottlingException": return [3, 10];
333
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 10];
334
+ case "ValidationException": return [3, 12];
335
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 12];
336
+ }
337
+ return [3, 14];
338
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
339
+ case 3: throw _d.sent();
340
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
341
+ case 5: throw _d.sent();
342
+ case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
343
+ case 7: throw _d.sent();
344
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
345
+ case 9: throw _d.sent();
346
+ case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
347
+ case 11: throw _d.sent();
348
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
349
+ case 13: throw _d.sent();
350
+ case 14:
351
+ parsedBody = parsedOutput.body;
352
+ throwDefaultError({
353
+ output: output,
354
+ parsedBody: parsedBody,
355
+ exceptionCtor: __BaseException,
356
+ errorCode: errorCode,
357
+ });
358
+ _d.label = 15;
359
+ case 15: return [2];
360
+ }
361
+ });
362
+ }); };
363
+ export var deserializeAws_json1_0DescribeEndpointsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
364
+ var data, contents, response;
365
+ return __generator(this, function (_a) {
366
+ switch (_a.label) {
367
+ case 0:
368
+ if (output.statusCode >= 300) {
369
+ return [2, deserializeAws_json1_0DescribeEndpointsCommandError(output, context)];
370
+ }
371
+ return [4, parseBody(output.body, context)];
372
+ case 1:
373
+ data = _a.sent();
374
+ contents = {};
375
+ contents = deserializeAws_json1_0DescribeEndpointsResponse(data, context);
376
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
377
+ return [2, Promise.resolve(response)];
378
+ }
379
+ });
380
+ }); };
381
+ var deserializeAws_json1_0DescribeEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
382
+ var parsedOutput, _a, errorCode, _b, parsedBody;
383
+ var _c;
384
+ return __generator(this, function (_d) {
385
+ switch (_d.label) {
386
+ case 0:
387
+ _a = [__assign({}, output)];
388
+ _c = {};
389
+ return [4, parseErrorBody(output.body, context)];
390
+ case 1:
391
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
392
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
393
+ _b = errorCode;
394
+ switch (_b) {
395
+ case "InternalServerException": return [3, 2];
396
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 2];
397
+ case "ThrottlingException": return [3, 4];
398
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 4];
399
+ case "ValidationException": return [3, 6];
400
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 6];
401
+ }
402
+ return [3, 8];
403
+ case 2: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
404
+ case 3: throw _d.sent();
405
+ case 4: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
406
+ case 5: throw _d.sent();
407
+ case 6: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
408
+ case 7: throw _d.sent();
409
+ case 8:
410
+ parsedBody = parsedOutput.body;
411
+ throwDefaultError({
412
+ output: output,
413
+ parsedBody: parsedBody,
414
+ exceptionCtor: __BaseException,
415
+ errorCode: errorCode,
416
+ });
417
+ _d.label = 9;
418
+ case 9: return [2];
419
+ }
420
+ });
421
+ }); };
422
+ export var deserializeAws_json1_0DescribeScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
423
+ var data, contents, response;
424
+ return __generator(this, function (_a) {
425
+ switch (_a.label) {
426
+ case 0:
427
+ if (output.statusCode >= 300) {
428
+ return [2, deserializeAws_json1_0DescribeScheduledQueryCommandError(output, context)];
429
+ }
430
+ return [4, parseBody(output.body, context)];
431
+ case 1:
432
+ data = _a.sent();
433
+ contents = {};
434
+ contents = deserializeAws_json1_0DescribeScheduledQueryResponse(data, context);
435
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
436
+ return [2, Promise.resolve(response)];
437
+ }
438
+ });
439
+ }); };
440
+ var deserializeAws_json1_0DescribeScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
441
+ var parsedOutput, _a, errorCode, _b, parsedBody;
442
+ var _c;
443
+ return __generator(this, function (_d) {
444
+ switch (_d.label) {
445
+ case 0:
446
+ _a = [__assign({}, output)];
447
+ _c = {};
448
+ return [4, parseErrorBody(output.body, context)];
449
+ case 1:
450
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
451
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
452
+ _b = errorCode;
453
+ switch (_b) {
454
+ case "AccessDeniedException": return [3, 2];
455
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
456
+ case "InternalServerException": return [3, 4];
457
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
458
+ case "InvalidEndpointException": return [3, 6];
459
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
460
+ case "ResourceNotFoundException": return [3, 8];
461
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 8];
462
+ case "ThrottlingException": return [3, 10];
463
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 10];
464
+ case "ValidationException": return [3, 12];
465
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 12];
466
+ }
467
+ return [3, 14];
468
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
469
+ case 3: throw _d.sent();
470
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
471
+ case 5: throw _d.sent();
472
+ case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
473
+ case 7: throw _d.sent();
474
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
475
+ case 9: throw _d.sent();
476
+ case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
477
+ case 11: throw _d.sent();
478
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
479
+ case 13: throw _d.sent();
480
+ case 14:
481
+ parsedBody = parsedOutput.body;
482
+ throwDefaultError({
483
+ output: output,
484
+ parsedBody: parsedBody,
485
+ exceptionCtor: __BaseException,
486
+ errorCode: errorCode,
487
+ });
488
+ _d.label = 15;
489
+ case 15: return [2];
490
+ }
491
+ });
492
+ }); };
493
+ export var deserializeAws_json1_0ExecuteScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
494
+ var response;
495
+ return __generator(this, function (_a) {
496
+ switch (_a.label) {
497
+ case 0:
498
+ if (output.statusCode >= 300) {
499
+ return [2, deserializeAws_json1_0ExecuteScheduledQueryCommandError(output, context)];
500
+ }
501
+ return [4, collectBody(output.body, context)];
502
+ case 1:
503
+ _a.sent();
504
+ response = {
505
+ $metadata: deserializeMetadata(output),
506
+ };
507
+ return [2, Promise.resolve(response)];
508
+ }
509
+ });
510
+ }); };
511
+ var deserializeAws_json1_0ExecuteScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
512
+ var parsedOutput, _a, errorCode, _b, parsedBody;
513
+ var _c;
514
+ return __generator(this, function (_d) {
515
+ switch (_d.label) {
516
+ case 0:
517
+ _a = [__assign({}, output)];
518
+ _c = {};
519
+ return [4, parseErrorBody(output.body, context)];
520
+ case 1:
521
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
522
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
523
+ _b = errorCode;
524
+ switch (_b) {
525
+ case "AccessDeniedException": return [3, 2];
526
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
527
+ case "InternalServerException": return [3, 4];
528
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
529
+ case "InvalidEndpointException": return [3, 6];
530
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
531
+ case "ResourceNotFoundException": return [3, 8];
532
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 8];
533
+ case "ThrottlingException": return [3, 10];
534
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 10];
535
+ case "ValidationException": return [3, 12];
536
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 12];
537
+ }
538
+ return [3, 14];
539
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
540
+ case 3: throw _d.sent();
541
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
542
+ case 5: throw _d.sent();
543
+ case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
544
+ case 7: throw _d.sent();
545
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
546
+ case 9: throw _d.sent();
547
+ case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
548
+ case 11: throw _d.sent();
549
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
550
+ case 13: throw _d.sent();
551
+ case 14:
552
+ parsedBody = parsedOutput.body;
553
+ throwDefaultError({
554
+ output: output,
555
+ parsedBody: parsedBody,
556
+ exceptionCtor: __BaseException,
557
+ errorCode: errorCode,
558
+ });
559
+ _d.label = 15;
560
+ case 15: return [2];
561
+ }
562
+ });
563
+ }); };
564
+ export var deserializeAws_json1_0ListScheduledQueriesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
565
+ var data, contents, response;
566
+ return __generator(this, function (_a) {
567
+ switch (_a.label) {
568
+ case 0:
569
+ if (output.statusCode >= 300) {
570
+ return [2, deserializeAws_json1_0ListScheduledQueriesCommandError(output, context)];
571
+ }
572
+ return [4, parseBody(output.body, context)];
573
+ case 1:
574
+ data = _a.sent();
575
+ contents = {};
576
+ contents = deserializeAws_json1_0ListScheduledQueriesResponse(data, context);
577
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
578
+ return [2, Promise.resolve(response)];
579
+ }
580
+ });
581
+ }); };
582
+ var deserializeAws_json1_0ListScheduledQueriesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
583
+ var parsedOutput, _a, errorCode, _b, parsedBody;
584
+ var _c;
585
+ return __generator(this, function (_d) {
586
+ switch (_d.label) {
587
+ case 0:
588
+ _a = [__assign({}, output)];
589
+ _c = {};
590
+ return [4, parseErrorBody(output.body, context)];
591
+ case 1:
592
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
593
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
594
+ _b = errorCode;
595
+ switch (_b) {
596
+ case "AccessDeniedException": return [3, 2];
597
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
598
+ case "InternalServerException": return [3, 4];
599
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
600
+ case "InvalidEndpointException": return [3, 6];
601
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
602
+ case "ThrottlingException": return [3, 8];
603
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 8];
604
+ case "ValidationException": return [3, 10];
605
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 10];
606
+ }
607
+ return [3, 12];
608
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
609
+ case 3: throw _d.sent();
610
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
611
+ case 5: throw _d.sent();
612
+ case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
613
+ case 7: throw _d.sent();
614
+ case 8: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
615
+ case 9: throw _d.sent();
616
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
617
+ case 11: throw _d.sent();
618
+ case 12:
619
+ parsedBody = parsedOutput.body;
620
+ throwDefaultError({
621
+ output: output,
622
+ parsedBody: parsedBody,
623
+ exceptionCtor: __BaseException,
624
+ errorCode: errorCode,
625
+ });
626
+ _d.label = 13;
627
+ case 13: return [2];
628
+ }
629
+ });
630
+ }); };
631
+ export var deserializeAws_json1_0ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
632
+ var data, contents, response;
633
+ return __generator(this, function (_a) {
634
+ switch (_a.label) {
635
+ case 0:
636
+ if (output.statusCode >= 300) {
637
+ return [2, deserializeAws_json1_0ListTagsForResourceCommandError(output, context)];
638
+ }
639
+ return [4, parseBody(output.body, context)];
640
+ case 1:
641
+ data = _a.sent();
642
+ contents = {};
643
+ contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
644
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
645
+ return [2, Promise.resolve(response)];
646
+ }
647
+ });
648
+ }); };
649
+ var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
650
+ var parsedOutput, _a, errorCode, _b, parsedBody;
651
+ var _c;
652
+ return __generator(this, function (_d) {
653
+ switch (_d.label) {
654
+ case 0:
655
+ _a = [__assign({}, output)];
656
+ _c = {};
657
+ return [4, parseErrorBody(output.body, context)];
658
+ case 1:
659
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
660
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
661
+ _b = errorCode;
662
+ switch (_b) {
663
+ case "InvalidEndpointException": return [3, 2];
664
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 2];
665
+ case "ResourceNotFoundException": return [3, 4];
666
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 4];
667
+ case "ThrottlingException": return [3, 6];
668
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 6];
669
+ case "ValidationException": return [3, 8];
670
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 8];
671
+ }
672
+ return [3, 10];
673
+ case 2: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
674
+ case 3: throw _d.sent();
675
+ case 4: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
676
+ case 5: throw _d.sent();
677
+ case 6: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
678
+ case 7: throw _d.sent();
679
+ case 8: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
680
+ case 9: throw _d.sent();
681
+ case 10:
682
+ parsedBody = parsedOutput.body;
683
+ throwDefaultError({
684
+ output: output,
685
+ parsedBody: parsedBody,
686
+ exceptionCtor: __BaseException,
687
+ errorCode: errorCode,
688
+ });
689
+ _d.label = 11;
690
+ case 11: return [2];
691
+ }
692
+ });
693
+ }); };
694
+ export var deserializeAws_json1_0PrepareQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
695
+ var data, contents, response;
696
+ return __generator(this, function (_a) {
697
+ switch (_a.label) {
698
+ case 0:
699
+ if (output.statusCode >= 300) {
700
+ return [2, deserializeAws_json1_0PrepareQueryCommandError(output, context)];
701
+ }
702
+ return [4, parseBody(output.body, context)];
703
+ case 1:
704
+ data = _a.sent();
705
+ contents = {};
706
+ contents = deserializeAws_json1_0PrepareQueryResponse(data, context);
707
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
708
+ return [2, Promise.resolve(response)];
709
+ }
710
+ });
711
+ }); };
712
+ var deserializeAws_json1_0PrepareQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
713
+ var parsedOutput, _a, errorCode, _b, parsedBody;
714
+ var _c;
715
+ return __generator(this, function (_d) {
716
+ switch (_d.label) {
717
+ case 0:
718
+ _a = [__assign({}, output)];
719
+ _c = {};
720
+ return [4, parseErrorBody(output.body, context)];
721
+ case 1:
722
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
723
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
724
+ _b = errorCode;
725
+ switch (_b) {
726
+ case "AccessDeniedException": return [3, 2];
727
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
728
+ case "InternalServerException": return [3, 4];
729
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
730
+ case "InvalidEndpointException": return [3, 6];
731
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
732
+ case "ThrottlingException": return [3, 8];
733
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 8];
734
+ case "ValidationException": return [3, 10];
735
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 10];
736
+ }
737
+ return [3, 12];
738
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
739
+ case 3: throw _d.sent();
740
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
741
+ case 5: throw _d.sent();
742
+ case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
743
+ case 7: throw _d.sent();
744
+ case 8: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
745
+ case 9: throw _d.sent();
746
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
747
+ case 11: throw _d.sent();
748
+ case 12:
749
+ parsedBody = parsedOutput.body;
750
+ throwDefaultError({
751
+ output: output,
752
+ parsedBody: parsedBody,
753
+ exceptionCtor: __BaseException,
754
+ errorCode: errorCode,
755
+ });
756
+ _d.label = 13;
757
+ case 13: return [2];
758
+ }
759
+ });
760
+ }); };
761
+ export var deserializeAws_json1_0QueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
762
+ var data, contents, response;
763
+ return __generator(this, function (_a) {
764
+ switch (_a.label) {
765
+ case 0:
766
+ if (output.statusCode >= 300) {
767
+ return [2, deserializeAws_json1_0QueryCommandError(output, context)];
768
+ }
769
+ return [4, parseBody(output.body, context)];
770
+ case 1:
771
+ data = _a.sent();
772
+ contents = {};
773
+ contents = deserializeAws_json1_0QueryResponse(data, context);
774
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
775
+ return [2, Promise.resolve(response)];
776
+ }
777
+ });
778
+ }); };
779
+ var deserializeAws_json1_0QueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
780
+ var parsedOutput, _a, errorCode, _b, parsedBody;
781
+ var _c;
782
+ return __generator(this, function (_d) {
783
+ switch (_d.label) {
784
+ case 0:
785
+ _a = [__assign({}, output)];
786
+ _c = {};
787
+ return [4, parseErrorBody(output.body, context)];
788
+ case 1:
789
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
790
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
791
+ _b = errorCode;
792
+ switch (_b) {
793
+ case "AccessDeniedException": return [3, 2];
794
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
795
+ case "ConflictException": return [3, 4];
796
+ case "com.amazonaws.timestreamquery#ConflictException": return [3, 4];
797
+ case "InternalServerException": return [3, 6];
798
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 6];
799
+ case "InvalidEndpointException": return [3, 8];
800
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 8];
801
+ case "QueryExecutionException": return [3, 10];
802
+ case "com.amazonaws.timestreamquery#QueryExecutionException": return [3, 10];
803
+ case "ThrottlingException": return [3, 12];
804
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 12];
805
+ case "ValidationException": return [3, 14];
806
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 14];
807
+ }
808
+ return [3, 16];
809
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
810
+ case 3: throw _d.sent();
811
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
812
+ case 5: throw _d.sent();
813
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
814
+ case 7: throw _d.sent();
815
+ case 8: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
816
+ case 9: throw _d.sent();
817
+ case 10: return [4, deserializeAws_json1_0QueryExecutionExceptionResponse(parsedOutput, context)];
818
+ case 11: throw _d.sent();
819
+ case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
820
+ case 13: throw _d.sent();
821
+ case 14: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
822
+ case 15: throw _d.sent();
823
+ case 16:
824
+ parsedBody = parsedOutput.body;
825
+ throwDefaultError({
826
+ output: output,
827
+ parsedBody: parsedBody,
828
+ exceptionCtor: __BaseException,
829
+ errorCode: errorCode,
830
+ });
831
+ _d.label = 17;
832
+ case 17: return [2];
833
+ }
834
+ });
835
+ }); };
836
+ export var deserializeAws_json1_0TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
837
+ var data, contents, response;
838
+ return __generator(this, function (_a) {
839
+ switch (_a.label) {
840
+ case 0:
841
+ if (output.statusCode >= 300) {
842
+ return [2, deserializeAws_json1_0TagResourceCommandError(output, context)];
843
+ }
844
+ return [4, parseBody(output.body, context)];
845
+ case 1:
846
+ data = _a.sent();
847
+ contents = {};
848
+ contents = deserializeAws_json1_0TagResourceResponse(data, context);
849
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
850
+ return [2, Promise.resolve(response)];
851
+ }
852
+ });
853
+ }); };
854
+ var deserializeAws_json1_0TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
855
+ var parsedOutput, _a, errorCode, _b, parsedBody;
856
+ var _c;
857
+ return __generator(this, function (_d) {
858
+ switch (_d.label) {
859
+ case 0:
860
+ _a = [__assign({}, output)];
861
+ _c = {};
862
+ return [4, parseErrorBody(output.body, context)];
863
+ case 1:
864
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
865
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
866
+ _b = errorCode;
867
+ switch (_b) {
868
+ case "InvalidEndpointException": return [3, 2];
869
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 2];
870
+ case "ResourceNotFoundException": return [3, 4];
871
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 4];
872
+ case "ServiceQuotaExceededException": return [3, 6];
873
+ case "com.amazonaws.timestreamquery#ServiceQuotaExceededException": return [3, 6];
874
+ case "ThrottlingException": return [3, 8];
875
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 8];
876
+ case "ValidationException": return [3, 10];
877
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 10];
878
+ }
879
+ return [3, 12];
880
+ case 2: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
881
+ case 3: throw _d.sent();
882
+ case 4: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
883
+ case 5: throw _d.sent();
884
+ case 6: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
885
+ case 7: throw _d.sent();
886
+ case 8: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
887
+ case 9: throw _d.sent();
888
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
889
+ case 11: throw _d.sent();
890
+ case 12:
891
+ parsedBody = parsedOutput.body;
892
+ throwDefaultError({
893
+ output: output,
894
+ parsedBody: parsedBody,
895
+ exceptionCtor: __BaseException,
896
+ errorCode: errorCode,
897
+ });
898
+ _d.label = 13;
899
+ case 13: return [2];
900
+ }
901
+ });
902
+ }); };
903
+ export var deserializeAws_json1_0UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
904
+ var data, contents, response;
905
+ return __generator(this, function (_a) {
906
+ switch (_a.label) {
907
+ case 0:
908
+ if (output.statusCode >= 300) {
909
+ return [2, deserializeAws_json1_0UntagResourceCommandError(output, context)];
910
+ }
911
+ return [4, parseBody(output.body, context)];
912
+ case 1:
913
+ data = _a.sent();
914
+ contents = {};
915
+ contents = deserializeAws_json1_0UntagResourceResponse(data, context);
916
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
917
+ return [2, Promise.resolve(response)];
918
+ }
919
+ });
920
+ }); };
921
+ var deserializeAws_json1_0UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
922
+ var parsedOutput, _a, errorCode, _b, parsedBody;
923
+ var _c;
924
+ return __generator(this, function (_d) {
925
+ switch (_d.label) {
926
+ case 0:
927
+ _a = [__assign({}, output)];
928
+ _c = {};
929
+ return [4, parseErrorBody(output.body, context)];
930
+ case 1:
931
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
932
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
933
+ _b = errorCode;
934
+ switch (_b) {
935
+ case "InvalidEndpointException": return [3, 2];
936
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 2];
937
+ case "ResourceNotFoundException": return [3, 4];
938
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 4];
939
+ case "ThrottlingException": return [3, 6];
940
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 6];
941
+ case "ValidationException": return [3, 8];
942
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 8];
943
+ }
944
+ return [3, 10];
945
+ case 2: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
946
+ case 3: throw _d.sent();
947
+ case 4: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
948
+ case 5: throw _d.sent();
949
+ case 6: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
950
+ case 7: throw _d.sent();
951
+ case 8: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
952
+ case 9: throw _d.sent();
953
+ case 10:
954
+ parsedBody = parsedOutput.body;
955
+ throwDefaultError({
956
+ output: output,
957
+ parsedBody: parsedBody,
958
+ exceptionCtor: __BaseException,
959
+ errorCode: errorCode,
960
+ });
961
+ _d.label = 11;
962
+ case 11: return [2];
963
+ }
964
+ });
965
+ }); };
966
+ export var deserializeAws_json1_0UpdateScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
967
+ var response;
968
+ return __generator(this, function (_a) {
969
+ switch (_a.label) {
970
+ case 0:
971
+ if (output.statusCode >= 300) {
972
+ return [2, deserializeAws_json1_0UpdateScheduledQueryCommandError(output, context)];
973
+ }
974
+ return [4, collectBody(output.body, context)];
975
+ case 1:
976
+ _a.sent();
977
+ response = {
978
+ $metadata: deserializeMetadata(output),
979
+ };
980
+ return [2, Promise.resolve(response)];
981
+ }
982
+ });
983
+ }); };
984
+ var deserializeAws_json1_0UpdateScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
985
+ var parsedOutput, _a, errorCode, _b, parsedBody;
986
+ var _c;
987
+ return __generator(this, function (_d) {
988
+ switch (_d.label) {
989
+ case 0:
990
+ _a = [__assign({}, output)];
991
+ _c = {};
992
+ return [4, parseErrorBody(output.body, context)];
993
+ case 1:
994
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
995
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
996
+ _b = errorCode;
997
+ switch (_b) {
998
+ case "AccessDeniedException": return [3, 2];
999
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
1000
+ case "InternalServerException": return [3, 4];
1001
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
1002
+ case "InvalidEndpointException": return [3, 6];
1003
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
1004
+ case "ResourceNotFoundException": return [3, 8];
1005
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 8];
1006
+ case "ThrottlingException": return [3, 10];
1007
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 10];
1008
+ case "ValidationException": return [3, 12];
1009
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 12];
1010
+ }
1011
+ return [3, 14];
1012
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1013
+ case 3: throw _d.sent();
1014
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1015
+ case 5: throw _d.sent();
1016
+ case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
1017
+ case 7: throw _d.sent();
1018
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1019
+ case 9: throw _d.sent();
1020
+ case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1021
+ case 11: throw _d.sent();
1022
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1023
+ case 13: throw _d.sent();
1024
+ case 14:
1025
+ parsedBody = parsedOutput.body;
1026
+ throwDefaultError({
1027
+ output: output,
1028
+ parsedBody: parsedBody,
1029
+ exceptionCtor: __BaseException,
1030
+ errorCode: errorCode,
1031
+ });
1032
+ _d.label = 15;
1033
+ case 15: return [2];
1034
+ }
1035
+ });
1036
+ }); };
1037
+ var deserializeAws_json1_0AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1038
+ var body, deserialized, exception;
1039
+ return __generator(this, function (_a) {
1040
+ body = parsedOutput.body;
1041
+ deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
1042
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1043
+ return [2, __decorateServiceException(exception, body)];
1044
+ });
1045
+ }); };
1046
+ var deserializeAws_json1_0ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1047
+ var body, deserialized, exception;
1048
+ return __generator(this, function (_a) {
1049
+ body = parsedOutput.body;
1050
+ deserialized = deserializeAws_json1_0ConflictException(body, context);
1051
+ exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1052
+ return [2, __decorateServiceException(exception, body)];
1053
+ });
1054
+ }); };
1055
+ var deserializeAws_json1_0InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1056
+ var body, deserialized, exception;
1057
+ return __generator(this, function (_a) {
1058
+ body = parsedOutput.body;
1059
+ deserialized = deserializeAws_json1_0InternalServerException(body, context);
1060
+ exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1061
+ return [2, __decorateServiceException(exception, body)];
1062
+ });
1063
+ }); };
1064
+ var deserializeAws_json1_0InvalidEndpointExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1065
+ var body, deserialized, exception;
1066
+ return __generator(this, function (_a) {
1067
+ body = parsedOutput.body;
1068
+ deserialized = deserializeAws_json1_0InvalidEndpointException(body, context);
1069
+ exception = new InvalidEndpointException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1070
+ return [2, __decorateServiceException(exception, body)];
1071
+ });
1072
+ }); };
1073
+ var deserializeAws_json1_0QueryExecutionExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1074
+ var body, deserialized, exception;
1075
+ return __generator(this, function (_a) {
1076
+ body = parsedOutput.body;
1077
+ deserialized = deserializeAws_json1_0QueryExecutionException(body, context);
1078
+ exception = new QueryExecutionException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1079
+ return [2, __decorateServiceException(exception, body)];
1080
+ });
1081
+ }); };
1082
+ var deserializeAws_json1_0ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1083
+ var body, deserialized, exception;
1084
+ return __generator(this, function (_a) {
1085
+ body = parsedOutput.body;
1086
+ deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
1087
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1088
+ return [2, __decorateServiceException(exception, body)];
1089
+ });
1090
+ }); };
1091
+ var deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1092
+ var body, deserialized, exception;
1093
+ return __generator(this, function (_a) {
1094
+ body = parsedOutput.body;
1095
+ deserialized = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
1096
+ exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1097
+ return [2, __decorateServiceException(exception, body)];
1098
+ });
1099
+ }); };
1100
+ var deserializeAws_json1_0ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1101
+ var body, deserialized, exception;
1102
+ return __generator(this, function (_a) {
1103
+ body = parsedOutput.body;
1104
+ deserialized = deserializeAws_json1_0ThrottlingException(body, context);
1105
+ exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1106
+ return [2, __decorateServiceException(exception, body)];
1107
+ });
1108
+ }); };
1109
+ var deserializeAws_json1_0ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1110
+ var body, deserialized, exception;
1111
+ return __generator(this, function (_a) {
1112
+ body = parsedOutput.body;
1113
+ deserialized = deserializeAws_json1_0ValidationException(body, context);
1114
+ exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1115
+ return [2, __decorateServiceException(exception, body)];
1116
+ });
1117
+ }); };
1118
+ var serializeAws_json1_0CancelQueryRequest = function (input, context) {
1119
+ return __assign({}, (input.QueryId != null && { QueryId: input.QueryId }));
1120
+ };
1121
+ var serializeAws_json1_0CreateScheduledQueryRequest = function (input, context) {
1122
+ var _a;
1123
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.ErrorReportConfiguration != null && {
1124
+ ErrorReportConfiguration: serializeAws_json1_0ErrorReportConfiguration(input.ErrorReportConfiguration, context),
1125
+ })), (input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId })), (input.Name != null && { Name: input.Name })), (input.NotificationConfiguration != null && {
1126
+ NotificationConfiguration: serializeAws_json1_0NotificationConfiguration(input.NotificationConfiguration, context),
1127
+ })), (input.QueryString != null && { QueryString: input.QueryString })), (input.ScheduleConfiguration != null && {
1128
+ ScheduleConfiguration: serializeAws_json1_0ScheduleConfiguration(input.ScheduleConfiguration, context),
1129
+ })), (input.ScheduledQueryExecutionRoleArn != null && {
1130
+ ScheduledQueryExecutionRoleArn: input.ScheduledQueryExecutionRoleArn,
1131
+ })), (input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) })), (input.TargetConfiguration != null && {
1132
+ TargetConfiguration: serializeAws_json1_0TargetConfiguration(input.TargetConfiguration, context),
1133
+ }));
1134
+ };
1135
+ var serializeAws_json1_0DeleteScheduledQueryRequest = function (input, context) {
1136
+ return __assign({}, (input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }));
1137
+ };
1138
+ var serializeAws_json1_0DescribeEndpointsRequest = function (input, context) {
827
1139
  return {};
828
1140
  };
829
- const serializeAws_json1_0DescribeScheduledQueryRequest = (input, context) => {
830
- return {
831
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
832
- };
1141
+ var serializeAws_json1_0DescribeScheduledQueryRequest = function (input, context) {
1142
+ return __assign({}, (input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }));
833
1143
  };
834
- const serializeAws_json1_0DimensionMapping = (input, context) => {
835
- return {
836
- ...(input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType }),
837
- ...(input.Name != null && { Name: input.Name }),
838
- };
1144
+ var serializeAws_json1_0DimensionMapping = function (input, context) {
1145
+ return __assign(__assign({}, (input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType })), (input.Name != null && { Name: input.Name }));
839
1146
  };
840
- const serializeAws_json1_0DimensionMappingList = (input, context) => {
1147
+ var serializeAws_json1_0DimensionMappingList = function (input, context) {
841
1148
  return input
842
- .filter((e) => e != null)
843
- .map((entry) => {
1149
+ .filter(function (e) { return e != null; })
1150
+ .map(function (entry) {
844
1151
  return serializeAws_json1_0DimensionMapping(entry, context);
845
1152
  });
846
1153
  };
847
- const serializeAws_json1_0ErrorReportConfiguration = (input, context) => {
848
- return {
849
- ...(input.S3Configuration != null && {
850
- S3Configuration: serializeAws_json1_0S3Configuration(input.S3Configuration, context),
851
- }),
852
- };
1154
+ var serializeAws_json1_0ErrorReportConfiguration = function (input, context) {
1155
+ return __assign({}, (input.S3Configuration != null && {
1156
+ S3Configuration: serializeAws_json1_0S3Configuration(input.S3Configuration, context),
1157
+ }));
853
1158
  };
854
- const serializeAws_json1_0ExecuteScheduledQueryRequest = (input, context) => {
855
- return {
856
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
857
- ...(input.InvocationTime != null && { InvocationTime: Math.round(input.InvocationTime.getTime() / 1000) }),
858
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
859
- };
1159
+ var serializeAws_json1_0ExecuteScheduledQueryRequest = function (input, context) {
1160
+ var _a;
1161
+ return __assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.InvocationTime != null && { InvocationTime: Math.round(input.InvocationTime.getTime() / 1000) })), (input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }));
860
1162
  };
861
- const serializeAws_json1_0ListScheduledQueriesRequest = (input, context) => {
862
- return {
863
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
864
- ...(input.NextToken != null && { NextToken: input.NextToken }),
865
- };
1163
+ var serializeAws_json1_0ListScheduledQueriesRequest = function (input, context) {
1164
+ return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
866
1165
  };
867
- const serializeAws_json1_0ListTagsForResourceRequest = (input, context) => {
868
- return {
869
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
870
- ...(input.NextToken != null && { NextToken: input.NextToken }),
871
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
872
- };
1166
+ var serializeAws_json1_0ListTagsForResourceRequest = function (input, context) {
1167
+ return __assign(__assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ResourceARN != null && { ResourceARN: input.ResourceARN }));
873
1168
  };
874
- const serializeAws_json1_0MixedMeasureMapping = (input, context) => {
875
- return {
876
- ...(input.MeasureName != null && { MeasureName: input.MeasureName }),
877
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
878
- ...(input.MultiMeasureAttributeMappings != null && {
879
- MultiMeasureAttributeMappings: serializeAws_json1_0MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
880
- }),
881
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
882
- ...(input.TargetMeasureName != null && { TargetMeasureName: input.TargetMeasureName }),
883
- };
1169
+ var serializeAws_json1_0MixedMeasureMapping = function (input, context) {
1170
+ return __assign(__assign(__assign(__assign(__assign({}, (input.MeasureName != null && { MeasureName: input.MeasureName })), (input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType })), (input.MultiMeasureAttributeMappings != null && {
1171
+ MultiMeasureAttributeMappings: serializeAws_json1_0MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
1172
+ })), (input.SourceColumn != null && { SourceColumn: input.SourceColumn })), (input.TargetMeasureName != null && { TargetMeasureName: input.TargetMeasureName }));
884
1173
  };
885
- const serializeAws_json1_0MixedMeasureMappingList = (input, context) => {
1174
+ var serializeAws_json1_0MixedMeasureMappingList = function (input, context) {
886
1175
  return input
887
- .filter((e) => e != null)
888
- .map((entry) => {
1176
+ .filter(function (e) { return e != null; })
1177
+ .map(function (entry) {
889
1178
  return serializeAws_json1_0MixedMeasureMapping(entry, context);
890
1179
  });
891
1180
  };
892
- const serializeAws_json1_0MultiMeasureAttributeMapping = (input, context) => {
893
- return {
894
- ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
895
- ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }),
896
- ...(input.TargetMultiMeasureAttributeName != null && {
897
- TargetMultiMeasureAttributeName: input.TargetMultiMeasureAttributeName,
898
- }),
899
- };
1181
+ var serializeAws_json1_0MultiMeasureAttributeMapping = function (input, context) {
1182
+ return __assign(__assign(__assign({}, (input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType })), (input.SourceColumn != null && { SourceColumn: input.SourceColumn })), (input.TargetMultiMeasureAttributeName != null && {
1183
+ TargetMultiMeasureAttributeName: input.TargetMultiMeasureAttributeName,
1184
+ }));
900
1185
  };
901
- const serializeAws_json1_0MultiMeasureAttributeMappingList = (input, context) => {
1186
+ var serializeAws_json1_0MultiMeasureAttributeMappingList = function (input, context) {
902
1187
  return input
903
- .filter((e) => e != null)
904
- .map((entry) => {
1188
+ .filter(function (e) { return e != null; })
1189
+ .map(function (entry) {
905
1190
  return serializeAws_json1_0MultiMeasureAttributeMapping(entry, context);
906
1191
  });
907
1192
  };
908
- const serializeAws_json1_0MultiMeasureMappings = (input, context) => {
909
- return {
910
- ...(input.MultiMeasureAttributeMappings != null && {
911
- MultiMeasureAttributeMappings: serializeAws_json1_0MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
912
- }),
913
- ...(input.TargetMultiMeasureName != null && { TargetMultiMeasureName: input.TargetMultiMeasureName }),
914
- };
1193
+ var serializeAws_json1_0MultiMeasureMappings = function (input, context) {
1194
+ return __assign(__assign({}, (input.MultiMeasureAttributeMappings != null && {
1195
+ MultiMeasureAttributeMappings: serializeAws_json1_0MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
1196
+ })), (input.TargetMultiMeasureName != null && { TargetMultiMeasureName: input.TargetMultiMeasureName }));
915
1197
  };
916
- const serializeAws_json1_0NotificationConfiguration = (input, context) => {
917
- return {
918
- ...(input.SnsConfiguration != null && {
919
- SnsConfiguration: serializeAws_json1_0SnsConfiguration(input.SnsConfiguration, context),
920
- }),
921
- };
1198
+ var serializeAws_json1_0NotificationConfiguration = function (input, context) {
1199
+ return __assign({}, (input.SnsConfiguration != null && {
1200
+ SnsConfiguration: serializeAws_json1_0SnsConfiguration(input.SnsConfiguration, context),
1201
+ }));
922
1202
  };
923
- const serializeAws_json1_0PrepareQueryRequest = (input, context) => {
924
- return {
925
- ...(input.QueryString != null && { QueryString: input.QueryString }),
926
- ...(input.ValidateOnly != null && { ValidateOnly: input.ValidateOnly }),
927
- };
1203
+ var serializeAws_json1_0PrepareQueryRequest = function (input, context) {
1204
+ return __assign(__assign({}, (input.QueryString != null && { QueryString: input.QueryString })), (input.ValidateOnly != null && { ValidateOnly: input.ValidateOnly }));
928
1205
  };
929
- const serializeAws_json1_0QueryRequest = (input, context) => {
930
- return {
931
- ClientToken: input.ClientToken ?? generateIdempotencyToken(),
932
- ...(input.MaxRows != null && { MaxRows: input.MaxRows }),
933
- ...(input.NextToken != null && { NextToken: input.NextToken }),
934
- ...(input.QueryString != null && { QueryString: input.QueryString }),
935
- };
1206
+ var serializeAws_json1_0QueryRequest = function (input, context) {
1207
+ var _a;
1208
+ return __assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.MaxRows != null && { MaxRows: input.MaxRows })), (input.NextToken != null && { NextToken: input.NextToken })), (input.QueryString != null && { QueryString: input.QueryString }));
936
1209
  };
937
- const serializeAws_json1_0S3Configuration = (input, context) => {
938
- return {
939
- ...(input.BucketName != null && { BucketName: input.BucketName }),
940
- ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }),
941
- ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }),
942
- };
1210
+ var serializeAws_json1_0S3Configuration = function (input, context) {
1211
+ return __assign(__assign(__assign({}, (input.BucketName != null && { BucketName: input.BucketName })), (input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption })), (input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }));
943
1212
  };
944
- const serializeAws_json1_0ScheduleConfiguration = (input, context) => {
945
- return {
946
- ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
947
- };
1213
+ var serializeAws_json1_0ScheduleConfiguration = function (input, context) {
1214
+ return __assign({}, (input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }));
948
1215
  };
949
- const serializeAws_json1_0SnsConfiguration = (input, context) => {
950
- return {
951
- ...(input.TopicArn != null && { TopicArn: input.TopicArn }),
952
- };
1216
+ var serializeAws_json1_0SnsConfiguration = function (input, context) {
1217
+ return __assign({}, (input.TopicArn != null && { TopicArn: input.TopicArn }));
953
1218
  };
954
- const serializeAws_json1_0Tag = (input, context) => {
955
- return {
956
- ...(input.Key != null && { Key: input.Key }),
957
- ...(input.Value != null && { Value: input.Value }),
958
- };
1219
+ var serializeAws_json1_0Tag = function (input, context) {
1220
+ return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
959
1221
  };
960
- const serializeAws_json1_0TagKeyList = (input, context) => {
1222
+ var serializeAws_json1_0TagKeyList = function (input, context) {
961
1223
  return input
962
- .filter((e) => e != null)
963
- .map((entry) => {
1224
+ .filter(function (e) { return e != null; })
1225
+ .map(function (entry) {
964
1226
  return entry;
965
1227
  });
966
1228
  };
967
- const serializeAws_json1_0TagList = (input, context) => {
1229
+ var serializeAws_json1_0TagList = function (input, context) {
968
1230
  return input
969
- .filter((e) => e != null)
970
- .map((entry) => {
1231
+ .filter(function (e) { return e != null; })
1232
+ .map(function (entry) {
971
1233
  return serializeAws_json1_0Tag(entry, context);
972
1234
  });
973
1235
  };
974
- const serializeAws_json1_0TagResourceRequest = (input, context) => {
975
- return {
976
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
977
- ...(input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
978
- };
1236
+ var serializeAws_json1_0TagResourceRequest = function (input, context) {
1237
+ return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }));
979
1238
  };
980
- const serializeAws_json1_0TargetConfiguration = (input, context) => {
981
- return {
982
- ...(input.TimestreamConfiguration != null && {
983
- TimestreamConfiguration: serializeAws_json1_0TimestreamConfiguration(input.TimestreamConfiguration, context),
984
- }),
985
- };
1239
+ var serializeAws_json1_0TargetConfiguration = function (input, context) {
1240
+ return __assign({}, (input.TimestreamConfiguration != null && {
1241
+ TimestreamConfiguration: serializeAws_json1_0TimestreamConfiguration(input.TimestreamConfiguration, context),
1242
+ }));
986
1243
  };
987
- const serializeAws_json1_0TimestreamConfiguration = (input, context) => {
988
- return {
989
- ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
990
- ...(input.DimensionMappings != null && {
991
- DimensionMappings: serializeAws_json1_0DimensionMappingList(input.DimensionMappings, context),
992
- }),
993
- ...(input.MeasureNameColumn != null && { MeasureNameColumn: input.MeasureNameColumn }),
994
- ...(input.MixedMeasureMappings != null && {
995
- MixedMeasureMappings: serializeAws_json1_0MixedMeasureMappingList(input.MixedMeasureMappings, context),
996
- }),
997
- ...(input.MultiMeasureMappings != null && {
998
- MultiMeasureMappings: serializeAws_json1_0MultiMeasureMappings(input.MultiMeasureMappings, context),
999
- }),
1000
- ...(input.TableName != null && { TableName: input.TableName }),
1001
- ...(input.TimeColumn != null && { TimeColumn: input.TimeColumn }),
1002
- };
1244
+ var serializeAws_json1_0TimestreamConfiguration = function (input, context) {
1245
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.DimensionMappings != null && {
1246
+ DimensionMappings: serializeAws_json1_0DimensionMappingList(input.DimensionMappings, context),
1247
+ })), (input.MeasureNameColumn != null && { MeasureNameColumn: input.MeasureNameColumn })), (input.MixedMeasureMappings != null && {
1248
+ MixedMeasureMappings: serializeAws_json1_0MixedMeasureMappingList(input.MixedMeasureMappings, context),
1249
+ })), (input.MultiMeasureMappings != null && {
1250
+ MultiMeasureMappings: serializeAws_json1_0MultiMeasureMappings(input.MultiMeasureMappings, context),
1251
+ })), (input.TableName != null && { TableName: input.TableName })), (input.TimeColumn != null && { TimeColumn: input.TimeColumn }));
1003
1252
  };
1004
- const serializeAws_json1_0UntagResourceRequest = (input, context) => {
1005
- return {
1006
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1007
- ...(input.TagKeys != null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }),
1008
- };
1253
+ var serializeAws_json1_0UntagResourceRequest = function (input, context) {
1254
+ return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.TagKeys != null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }));
1009
1255
  };
1010
- const serializeAws_json1_0UpdateScheduledQueryRequest = (input, context) => {
1011
- return {
1012
- ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
1013
- ...(input.State != null && { State: input.State }),
1014
- };
1256
+ var serializeAws_json1_0UpdateScheduledQueryRequest = function (input, context) {
1257
+ return __assign(__assign({}, (input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn })), (input.State != null && { State: input.State }));
1015
1258
  };
1016
- const deserializeAws_json1_0AccessDeniedException = (output, context) => {
1259
+ var deserializeAws_json1_0AccessDeniedException = function (output, context) {
1017
1260
  return {
1018
1261
  Message: __expectString(output.Message),
1019
1262
  };
1020
1263
  };
1021
- const deserializeAws_json1_0CancelQueryResponse = (output, context) => {
1264
+ var deserializeAws_json1_0CancelQueryResponse = function (output, context) {
1022
1265
  return {
1023
1266
  CancellationMessage: __expectString(output.CancellationMessage),
1024
1267
  };
1025
1268
  };
1026
- const deserializeAws_json1_0ColumnInfo = (output, context) => {
1269
+ var deserializeAws_json1_0ColumnInfo = function (output, context) {
1027
1270
  return {
1028
1271
  Name: __expectString(output.Name),
1029
1272
  Type: output.Type != null ? deserializeAws_json1_0Type(output.Type, context) : undefined,
1030
1273
  };
1031
1274
  };
1032
- const deserializeAws_json1_0ColumnInfoList = (output, context) => {
1033
- const retVal = (output || [])
1034
- .filter((e) => e != null)
1035
- .map((entry) => {
1275
+ var deserializeAws_json1_0ColumnInfoList = function (output, context) {
1276
+ var retVal = (output || [])
1277
+ .filter(function (e) { return e != null; })
1278
+ .map(function (entry) {
1036
1279
  if (entry === null) {
1037
1280
  return null;
1038
1281
  }
@@ -1040,17 +1283,17 @@ const deserializeAws_json1_0ColumnInfoList = (output, context) => {
1040
1283
  });
1041
1284
  return retVal;
1042
1285
  };
1043
- const deserializeAws_json1_0ConflictException = (output, context) => {
1286
+ var deserializeAws_json1_0ConflictException = function (output, context) {
1044
1287
  return {
1045
1288
  Message: __expectString(output.Message),
1046
1289
  };
1047
1290
  };
1048
- const deserializeAws_json1_0CreateScheduledQueryResponse = (output, context) => {
1291
+ var deserializeAws_json1_0CreateScheduledQueryResponse = function (output, context) {
1049
1292
  return {
1050
1293
  Arn: __expectString(output.Arn),
1051
1294
  };
1052
1295
  };
1053
- const deserializeAws_json1_0Datum = (output, context) => {
1296
+ var deserializeAws_json1_0Datum = function (output, context) {
1054
1297
  return {
1055
1298
  ArrayValue: output.ArrayValue != null ? deserializeAws_json1_0DatumList(output.ArrayValue, context) : undefined,
1056
1299
  NullValue: __expectBoolean(output.NullValue),
@@ -1061,10 +1304,10 @@ const deserializeAws_json1_0Datum = (output, context) => {
1061
1304
  : undefined,
1062
1305
  };
1063
1306
  };
1064
- const deserializeAws_json1_0DatumList = (output, context) => {
1065
- const retVal = (output || [])
1066
- .filter((e) => e != null)
1067
- .map((entry) => {
1307
+ var deserializeAws_json1_0DatumList = function (output, context) {
1308
+ var retVal = (output || [])
1309
+ .filter(function (e) { return e != null; })
1310
+ .map(function (entry) {
1068
1311
  if (entry === null) {
1069
1312
  return null;
1070
1313
  }
@@ -1072,28 +1315,28 @@ const deserializeAws_json1_0DatumList = (output, context) => {
1072
1315
  });
1073
1316
  return retVal;
1074
1317
  };
1075
- const deserializeAws_json1_0DescribeEndpointsResponse = (output, context) => {
1318
+ var deserializeAws_json1_0DescribeEndpointsResponse = function (output, context) {
1076
1319
  return {
1077
1320
  Endpoints: output.Endpoints != null ? deserializeAws_json1_0Endpoints(output.Endpoints, context) : undefined,
1078
1321
  };
1079
1322
  };
1080
- const deserializeAws_json1_0DescribeScheduledQueryResponse = (output, context) => {
1323
+ var deserializeAws_json1_0DescribeScheduledQueryResponse = function (output, context) {
1081
1324
  return {
1082
1325
  ScheduledQuery: output.ScheduledQuery != null
1083
1326
  ? deserializeAws_json1_0ScheduledQueryDescription(output.ScheduledQuery, context)
1084
1327
  : undefined,
1085
1328
  };
1086
1329
  };
1087
- const deserializeAws_json1_0DimensionMapping = (output, context) => {
1330
+ var deserializeAws_json1_0DimensionMapping = function (output, context) {
1088
1331
  return {
1089
1332
  DimensionValueType: __expectString(output.DimensionValueType),
1090
1333
  Name: __expectString(output.Name),
1091
1334
  };
1092
1335
  };
1093
- const deserializeAws_json1_0DimensionMappingList = (output, context) => {
1094
- const retVal = (output || [])
1095
- .filter((e) => e != null)
1096
- .map((entry) => {
1336
+ var deserializeAws_json1_0DimensionMappingList = function (output, context) {
1337
+ var retVal = (output || [])
1338
+ .filter(function (e) { return e != null; })
1339
+ .map(function (entry) {
1097
1340
  if (entry === null) {
1098
1341
  return null;
1099
1342
  }
@@ -1101,16 +1344,16 @@ const deserializeAws_json1_0DimensionMappingList = (output, context) => {
1101
1344
  });
1102
1345
  return retVal;
1103
1346
  };
1104
- const deserializeAws_json1_0Endpoint = (output, context) => {
1347
+ var deserializeAws_json1_0Endpoint = function (output, context) {
1105
1348
  return {
1106
1349
  Address: __expectString(output.Address),
1107
1350
  CachePeriodInMinutes: __expectLong(output.CachePeriodInMinutes),
1108
1351
  };
1109
1352
  };
1110
- const deserializeAws_json1_0Endpoints = (output, context) => {
1111
- const retVal = (output || [])
1112
- .filter((e) => e != null)
1113
- .map((entry) => {
1353
+ var deserializeAws_json1_0Endpoints = function (output, context) {
1354
+ var retVal = (output || [])
1355
+ .filter(function (e) { return e != null; })
1356
+ .map(function (entry) {
1114
1357
  if (entry === null) {
1115
1358
  return null;
1116
1359
  }
@@ -1118,21 +1361,21 @@ const deserializeAws_json1_0Endpoints = (output, context) => {
1118
1361
  });
1119
1362
  return retVal;
1120
1363
  };
1121
- const deserializeAws_json1_0ErrorReportConfiguration = (output, context) => {
1364
+ var deserializeAws_json1_0ErrorReportConfiguration = function (output, context) {
1122
1365
  return {
1123
1366
  S3Configuration: output.S3Configuration != null
1124
1367
  ? deserializeAws_json1_0S3Configuration(output.S3Configuration, context)
1125
1368
  : undefined,
1126
1369
  };
1127
1370
  };
1128
- const deserializeAws_json1_0ErrorReportLocation = (output, context) => {
1371
+ var deserializeAws_json1_0ErrorReportLocation = function (output, context) {
1129
1372
  return {
1130
1373
  S3ReportLocation: output.S3ReportLocation != null
1131
1374
  ? deserializeAws_json1_0S3ReportLocation(output.S3ReportLocation, context)
1132
1375
  : undefined,
1133
1376
  };
1134
1377
  };
1135
- const deserializeAws_json1_0ExecutionStats = (output, context) => {
1378
+ var deserializeAws_json1_0ExecutionStats = function (output, context) {
1136
1379
  return {
1137
1380
  BytesMetered: __expectLong(output.BytesMetered),
1138
1381
  DataWrites: __expectLong(output.DataWrites),
@@ -1141,17 +1384,17 @@ const deserializeAws_json1_0ExecutionStats = (output, context) => {
1141
1384
  RecordsIngested: __expectLong(output.RecordsIngested),
1142
1385
  };
1143
1386
  };
1144
- const deserializeAws_json1_0InternalServerException = (output, context) => {
1387
+ var deserializeAws_json1_0InternalServerException = function (output, context) {
1145
1388
  return {
1146
1389
  Message: __expectString(output.Message),
1147
1390
  };
1148
1391
  };
1149
- const deserializeAws_json1_0InvalidEndpointException = (output, context) => {
1392
+ var deserializeAws_json1_0InvalidEndpointException = function (output, context) {
1150
1393
  return {
1151
1394
  Message: __expectString(output.Message),
1152
1395
  };
1153
1396
  };
1154
- const deserializeAws_json1_0ListScheduledQueriesResponse = (output, context) => {
1397
+ var deserializeAws_json1_0ListScheduledQueriesResponse = function (output, context) {
1155
1398
  return {
1156
1399
  NextToken: __expectString(output.NextToken),
1157
1400
  ScheduledQueries: output.ScheduledQueries != null
@@ -1159,13 +1402,13 @@ const deserializeAws_json1_0ListScheduledQueriesResponse = (output, context) =>
1159
1402
  : undefined,
1160
1403
  };
1161
1404
  };
1162
- const deserializeAws_json1_0ListTagsForResourceResponse = (output, context) => {
1405
+ var deserializeAws_json1_0ListTagsForResourceResponse = function (output, context) {
1163
1406
  return {
1164
1407
  NextToken: __expectString(output.NextToken),
1165
1408
  Tags: output.Tags != null ? deserializeAws_json1_0TagList(output.Tags, context) : undefined,
1166
1409
  };
1167
1410
  };
1168
- const deserializeAws_json1_0MixedMeasureMapping = (output, context) => {
1411
+ var deserializeAws_json1_0MixedMeasureMapping = function (output, context) {
1169
1412
  return {
1170
1413
  MeasureName: __expectString(output.MeasureName),
1171
1414
  MeasureValueType: __expectString(output.MeasureValueType),
@@ -1176,10 +1419,10 @@ const deserializeAws_json1_0MixedMeasureMapping = (output, context) => {
1176
1419
  TargetMeasureName: __expectString(output.TargetMeasureName),
1177
1420
  };
1178
1421
  };
1179
- const deserializeAws_json1_0MixedMeasureMappingList = (output, context) => {
1180
- const retVal = (output || [])
1181
- .filter((e) => e != null)
1182
- .map((entry) => {
1422
+ var deserializeAws_json1_0MixedMeasureMappingList = function (output, context) {
1423
+ var retVal = (output || [])
1424
+ .filter(function (e) { return e != null; })
1425
+ .map(function (entry) {
1183
1426
  if (entry === null) {
1184
1427
  return null;
1185
1428
  }
@@ -1187,17 +1430,17 @@ const deserializeAws_json1_0MixedMeasureMappingList = (output, context) => {
1187
1430
  });
1188
1431
  return retVal;
1189
1432
  };
1190
- const deserializeAws_json1_0MultiMeasureAttributeMapping = (output, context) => {
1433
+ var deserializeAws_json1_0MultiMeasureAttributeMapping = function (output, context) {
1191
1434
  return {
1192
1435
  MeasureValueType: __expectString(output.MeasureValueType),
1193
1436
  SourceColumn: __expectString(output.SourceColumn),
1194
1437
  TargetMultiMeasureAttributeName: __expectString(output.TargetMultiMeasureAttributeName),
1195
1438
  };
1196
1439
  };
1197
- const deserializeAws_json1_0MultiMeasureAttributeMappingList = (output, context) => {
1198
- const retVal = (output || [])
1199
- .filter((e) => e != null)
1200
- .map((entry) => {
1440
+ var deserializeAws_json1_0MultiMeasureAttributeMappingList = function (output, context) {
1441
+ var retVal = (output || [])
1442
+ .filter(function (e) { return e != null; })
1443
+ .map(function (entry) {
1201
1444
  if (entry === null) {
1202
1445
  return null;
1203
1446
  }
@@ -1205,7 +1448,7 @@ const deserializeAws_json1_0MultiMeasureAttributeMappingList = (output, context)
1205
1448
  });
1206
1449
  return retVal;
1207
1450
  };
1208
- const deserializeAws_json1_0MultiMeasureMappings = (output, context) => {
1451
+ var deserializeAws_json1_0MultiMeasureMappings = function (output, context) {
1209
1452
  return {
1210
1453
  MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings != null
1211
1454
  ? deserializeAws_json1_0MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
@@ -1213,23 +1456,23 @@ const deserializeAws_json1_0MultiMeasureMappings = (output, context) => {
1213
1456
  TargetMultiMeasureName: __expectString(output.TargetMultiMeasureName),
1214
1457
  };
1215
1458
  };
1216
- const deserializeAws_json1_0NotificationConfiguration = (output, context) => {
1459
+ var deserializeAws_json1_0NotificationConfiguration = function (output, context) {
1217
1460
  return {
1218
1461
  SnsConfiguration: output.SnsConfiguration != null
1219
1462
  ? deserializeAws_json1_0SnsConfiguration(output.SnsConfiguration, context)
1220
1463
  : undefined,
1221
1464
  };
1222
1465
  };
1223
- const deserializeAws_json1_0ParameterMapping = (output, context) => {
1466
+ var deserializeAws_json1_0ParameterMapping = function (output, context) {
1224
1467
  return {
1225
1468
  Name: __expectString(output.Name),
1226
1469
  Type: output.Type != null ? deserializeAws_json1_0Type(output.Type, context) : undefined,
1227
1470
  };
1228
1471
  };
1229
- const deserializeAws_json1_0ParameterMappingList = (output, context) => {
1230
- const retVal = (output || [])
1231
- .filter((e) => e != null)
1232
- .map((entry) => {
1472
+ var deserializeAws_json1_0ParameterMappingList = function (output, context) {
1473
+ var retVal = (output || [])
1474
+ .filter(function (e) { return e != null; })
1475
+ .map(function (entry) {
1233
1476
  if (entry === null) {
1234
1477
  return null;
1235
1478
  }
@@ -1237,19 +1480,19 @@ const deserializeAws_json1_0ParameterMappingList = (output, context) => {
1237
1480
  });
1238
1481
  return retVal;
1239
1482
  };
1240
- const deserializeAws_json1_0PrepareQueryResponse = (output, context) => {
1483
+ var deserializeAws_json1_0PrepareQueryResponse = function (output, context) {
1241
1484
  return {
1242
1485
  Columns: output.Columns != null ? deserializeAws_json1_0SelectColumnList(output.Columns, context) : undefined,
1243
1486
  Parameters: output.Parameters != null ? deserializeAws_json1_0ParameterMappingList(output.Parameters, context) : undefined,
1244
1487
  QueryString: __expectString(output.QueryString),
1245
1488
  };
1246
1489
  };
1247
- const deserializeAws_json1_0QueryExecutionException = (output, context) => {
1490
+ var deserializeAws_json1_0QueryExecutionException = function (output, context) {
1248
1491
  return {
1249
1492
  Message: __expectString(output.Message),
1250
1493
  };
1251
1494
  };
1252
- const deserializeAws_json1_0QueryResponse = (output, context) => {
1495
+ var deserializeAws_json1_0QueryResponse = function (output, context) {
1253
1496
  return {
1254
1497
  ColumnInfo: output.ColumnInfo != null ? deserializeAws_json1_0ColumnInfoList(output.ColumnInfo, context) : undefined,
1255
1498
  NextToken: __expectString(output.NextToken),
@@ -1258,28 +1501,28 @@ const deserializeAws_json1_0QueryResponse = (output, context) => {
1258
1501
  Rows: output.Rows != null ? deserializeAws_json1_0RowList(output.Rows, context) : undefined,
1259
1502
  };
1260
1503
  };
1261
- const deserializeAws_json1_0QueryStatus = (output, context) => {
1504
+ var deserializeAws_json1_0QueryStatus = function (output, context) {
1262
1505
  return {
1263
1506
  CumulativeBytesMetered: __expectLong(output.CumulativeBytesMetered),
1264
1507
  CumulativeBytesScanned: __expectLong(output.CumulativeBytesScanned),
1265
1508
  ProgressPercentage: __limitedParseDouble(output.ProgressPercentage),
1266
1509
  };
1267
1510
  };
1268
- const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
1511
+ var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
1269
1512
  return {
1270
1513
  Message: __expectString(output.Message),
1271
1514
  ScheduledQueryArn: __expectString(output.ScheduledQueryArn),
1272
1515
  };
1273
1516
  };
1274
- const deserializeAws_json1_0Row = (output, context) => {
1517
+ var deserializeAws_json1_0Row = function (output, context) {
1275
1518
  return {
1276
1519
  Data: output.Data != null ? deserializeAws_json1_0DatumList(output.Data, context) : undefined,
1277
1520
  };
1278
1521
  };
1279
- const deserializeAws_json1_0RowList = (output, context) => {
1280
- const retVal = (output || [])
1281
- .filter((e) => e != null)
1282
- .map((entry) => {
1522
+ var deserializeAws_json1_0RowList = function (output, context) {
1523
+ var retVal = (output || [])
1524
+ .filter(function (e) { return e != null; })
1525
+ .map(function (entry) {
1283
1526
  if (entry === null) {
1284
1527
  return null;
1285
1528
  }
@@ -1287,25 +1530,25 @@ const deserializeAws_json1_0RowList = (output, context) => {
1287
1530
  });
1288
1531
  return retVal;
1289
1532
  };
1290
- const deserializeAws_json1_0S3Configuration = (output, context) => {
1533
+ var deserializeAws_json1_0S3Configuration = function (output, context) {
1291
1534
  return {
1292
1535
  BucketName: __expectString(output.BucketName),
1293
1536
  EncryptionOption: __expectString(output.EncryptionOption),
1294
1537
  ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix),
1295
1538
  };
1296
1539
  };
1297
- const deserializeAws_json1_0S3ReportLocation = (output, context) => {
1540
+ var deserializeAws_json1_0S3ReportLocation = function (output, context) {
1298
1541
  return {
1299
1542
  BucketName: __expectString(output.BucketName),
1300
1543
  ObjectKey: __expectString(output.ObjectKey),
1301
1544
  };
1302
1545
  };
1303
- const deserializeAws_json1_0ScheduleConfiguration = (output, context) => {
1546
+ var deserializeAws_json1_0ScheduleConfiguration = function (output, context) {
1304
1547
  return {
1305
1548
  ScheduleExpression: __expectString(output.ScheduleExpression),
1306
1549
  };
1307
1550
  };
1308
- const deserializeAws_json1_0ScheduledQuery = (output, context) => {
1551
+ var deserializeAws_json1_0ScheduledQuery = function (output, context) {
1309
1552
  return {
1310
1553
  Arn: __expectString(output.Arn),
1311
1554
  CreationTime: output.CreationTime != null
@@ -1328,7 +1571,7 @@ const deserializeAws_json1_0ScheduledQuery = (output, context) => {
1328
1571
  : undefined,
1329
1572
  };
1330
1573
  };
1331
- const deserializeAws_json1_0ScheduledQueryDescription = (output, context) => {
1574
+ var deserializeAws_json1_0ScheduledQueryDescription = function (output, context) {
1332
1575
  return {
1333
1576
  Arn: __expectString(output.Arn),
1334
1577
  CreationTime: output.CreationTime != null
@@ -1365,10 +1608,10 @@ const deserializeAws_json1_0ScheduledQueryDescription = (output, context) => {
1365
1608
  : undefined,
1366
1609
  };
1367
1610
  };
1368
- const deserializeAws_json1_0ScheduledQueryList = (output, context) => {
1369
- const retVal = (output || [])
1370
- .filter((e) => e != null)
1371
- .map((entry) => {
1611
+ var deserializeAws_json1_0ScheduledQueryList = function (output, context) {
1612
+ var retVal = (output || [])
1613
+ .filter(function (e) { return e != null; })
1614
+ .map(function (entry) {
1372
1615
  if (entry === null) {
1373
1616
  return null;
1374
1617
  }
@@ -1376,7 +1619,7 @@ const deserializeAws_json1_0ScheduledQueryList = (output, context) => {
1376
1619
  });
1377
1620
  return retVal;
1378
1621
  };
1379
- const deserializeAws_json1_0ScheduledQueryRunSummary = (output, context) => {
1622
+ var deserializeAws_json1_0ScheduledQueryRunSummary = function (output, context) {
1380
1623
  return {
1381
1624
  ErrorReportLocation: output.ErrorReportLocation != null
1382
1625
  ? deserializeAws_json1_0ErrorReportLocation(output.ErrorReportLocation, context)
@@ -1392,10 +1635,10 @@ const deserializeAws_json1_0ScheduledQueryRunSummary = (output, context) => {
1392
1635
  : undefined,
1393
1636
  };
1394
1637
  };
1395
- const deserializeAws_json1_0ScheduledQueryRunSummaryList = (output, context) => {
1396
- const retVal = (output || [])
1397
- .filter((e) => e != null)
1398
- .map((entry) => {
1638
+ var deserializeAws_json1_0ScheduledQueryRunSummaryList = function (output, context) {
1639
+ var retVal = (output || [])
1640
+ .filter(function (e) { return e != null; })
1641
+ .map(function (entry) {
1399
1642
  if (entry === null) {
1400
1643
  return null;
1401
1644
  }
@@ -1403,7 +1646,7 @@ const deserializeAws_json1_0ScheduledQueryRunSummaryList = (output, context) =>
1403
1646
  });
1404
1647
  return retVal;
1405
1648
  };
1406
- const deserializeAws_json1_0SelectColumn = (output, context) => {
1649
+ var deserializeAws_json1_0SelectColumn = function (output, context) {
1407
1650
  return {
1408
1651
  Aliased: __expectBoolean(output.Aliased),
1409
1652
  DatabaseName: __expectString(output.DatabaseName),
@@ -1412,10 +1655,10 @@ const deserializeAws_json1_0SelectColumn = (output, context) => {
1412
1655
  Type: output.Type != null ? deserializeAws_json1_0Type(output.Type, context) : undefined,
1413
1656
  };
1414
1657
  };
1415
- const deserializeAws_json1_0SelectColumnList = (output, context) => {
1416
- const retVal = (output || [])
1417
- .filter((e) => e != null)
1418
- .map((entry) => {
1658
+ var deserializeAws_json1_0SelectColumnList = function (output, context) {
1659
+ var retVal = (output || [])
1660
+ .filter(function (e) { return e != null; })
1661
+ .map(function (entry) {
1419
1662
  if (entry === null) {
1420
1663
  return null;
1421
1664
  }
@@ -1423,26 +1666,26 @@ const deserializeAws_json1_0SelectColumnList = (output, context) => {
1423
1666
  });
1424
1667
  return retVal;
1425
1668
  };
1426
- const deserializeAws_json1_0ServiceQuotaExceededException = (output, context) => {
1669
+ var deserializeAws_json1_0ServiceQuotaExceededException = function (output, context) {
1427
1670
  return {
1428
1671
  Message: __expectString(output.Message),
1429
1672
  };
1430
1673
  };
1431
- const deserializeAws_json1_0SnsConfiguration = (output, context) => {
1674
+ var deserializeAws_json1_0SnsConfiguration = function (output, context) {
1432
1675
  return {
1433
1676
  TopicArn: __expectString(output.TopicArn),
1434
1677
  };
1435
1678
  };
1436
- const deserializeAws_json1_0Tag = (output, context) => {
1679
+ var deserializeAws_json1_0Tag = function (output, context) {
1437
1680
  return {
1438
1681
  Key: __expectString(output.Key),
1439
1682
  Value: __expectString(output.Value),
1440
1683
  };
1441
1684
  };
1442
- const deserializeAws_json1_0TagList = (output, context) => {
1443
- const retVal = (output || [])
1444
- .filter((e) => e != null)
1445
- .map((entry) => {
1685
+ var deserializeAws_json1_0TagList = function (output, context) {
1686
+ var retVal = (output || [])
1687
+ .filter(function (e) { return e != null; })
1688
+ .map(function (entry) {
1446
1689
  if (entry === null) {
1447
1690
  return null;
1448
1691
  }
@@ -1450,38 +1693,38 @@ const deserializeAws_json1_0TagList = (output, context) => {
1450
1693
  });
1451
1694
  return retVal;
1452
1695
  };
1453
- const deserializeAws_json1_0TagResourceResponse = (output, context) => {
1696
+ var deserializeAws_json1_0TagResourceResponse = function (output, context) {
1454
1697
  return {};
1455
1698
  };
1456
- const deserializeAws_json1_0TargetConfiguration = (output, context) => {
1699
+ var deserializeAws_json1_0TargetConfiguration = function (output, context) {
1457
1700
  return {
1458
1701
  TimestreamConfiguration: output.TimestreamConfiguration != null
1459
1702
  ? deserializeAws_json1_0TimestreamConfiguration(output.TimestreamConfiguration, context)
1460
1703
  : undefined,
1461
1704
  };
1462
1705
  };
1463
- const deserializeAws_json1_0TargetDestination = (output, context) => {
1706
+ var deserializeAws_json1_0TargetDestination = function (output, context) {
1464
1707
  return {
1465
1708
  TimestreamDestination: output.TimestreamDestination != null
1466
1709
  ? deserializeAws_json1_0TimestreamDestination(output.TimestreamDestination, context)
1467
1710
  : undefined,
1468
1711
  };
1469
1712
  };
1470
- const deserializeAws_json1_0ThrottlingException = (output, context) => {
1713
+ var deserializeAws_json1_0ThrottlingException = function (output, context) {
1471
1714
  return {
1472
1715
  Message: __expectString(output.Message),
1473
1716
  };
1474
1717
  };
1475
- const deserializeAws_json1_0TimeSeriesDataPoint = (output, context) => {
1718
+ var deserializeAws_json1_0TimeSeriesDataPoint = function (output, context) {
1476
1719
  return {
1477
1720
  Time: __expectString(output.Time),
1478
1721
  Value: output.Value != null ? deserializeAws_json1_0Datum(output.Value, context) : undefined,
1479
1722
  };
1480
1723
  };
1481
- const deserializeAws_json1_0TimeSeriesDataPointList = (output, context) => {
1482
- const retVal = (output || [])
1483
- .filter((e) => e != null)
1484
- .map((entry) => {
1724
+ var deserializeAws_json1_0TimeSeriesDataPointList = function (output, context) {
1725
+ var retVal = (output || [])
1726
+ .filter(function (e) { return e != null; })
1727
+ .map(function (entry) {
1485
1728
  if (entry === null) {
1486
1729
  return null;
1487
1730
  }
@@ -1489,7 +1732,7 @@ const deserializeAws_json1_0TimeSeriesDataPointList = (output, context) => {
1489
1732
  });
1490
1733
  return retVal;
1491
1734
  };
1492
- const deserializeAws_json1_0TimestreamConfiguration = (output, context) => {
1735
+ var deserializeAws_json1_0TimestreamConfiguration = function (output, context) {
1493
1736
  return {
1494
1737
  DatabaseName: __expectString(output.DatabaseName),
1495
1738
  DimensionMappings: output.DimensionMappings != null
@@ -1506,13 +1749,13 @@ const deserializeAws_json1_0TimestreamConfiguration = (output, context) => {
1506
1749
  TimeColumn: __expectString(output.TimeColumn),
1507
1750
  };
1508
1751
  };
1509
- const deserializeAws_json1_0TimestreamDestination = (output, context) => {
1752
+ var deserializeAws_json1_0TimestreamDestination = function (output, context) {
1510
1753
  return {
1511
1754
  DatabaseName: __expectString(output.DatabaseName),
1512
1755
  TableName: __expectString(output.TableName),
1513
1756
  };
1514
1757
  };
1515
- const deserializeAws_json1_0Type = (output, context) => {
1758
+ var deserializeAws_json1_0Type = function (output, context) {
1516
1759
  return {
1517
1760
  ArrayColumnInfo: output.ArrayColumnInfo != null ? deserializeAws_json1_0ColumnInfo(output.ArrayColumnInfo, context) : undefined,
1518
1761
  RowColumnInfo: output.RowColumnInfo != null ? deserializeAws_json1_0ColumnInfoList(output.RowColumnInfo, context) : undefined,
@@ -1522,60 +1765,83 @@ const deserializeAws_json1_0Type = (output, context) => {
1522
1765
  : undefined,
1523
1766
  };
1524
1767
  };
1525
- const deserializeAws_json1_0UntagResourceResponse = (output, context) => {
1768
+ var deserializeAws_json1_0UntagResourceResponse = function (output, context) {
1526
1769
  return {};
1527
1770
  };
1528
- const deserializeAws_json1_0ValidationException = (output, context) => {
1771
+ var deserializeAws_json1_0ValidationException = function (output, context) {
1529
1772
  return {
1530
1773
  Message: __expectString(output.Message),
1531
1774
  };
1532
1775
  };
1533
- const deserializeMetadata = (output) => ({
1534
- httpStatusCode: output.statusCode,
1535
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1536
- extendedRequestId: output.headers["x-amz-id-2"],
1537
- cfId: output.headers["x-amz-cf-id"],
1538
- });
1539
- const collectBody = (streamBody = new Uint8Array(), context) => {
1776
+ var deserializeMetadata = function (output) {
1777
+ var _a, _b;
1778
+ return ({
1779
+ httpStatusCode: output.statusCode,
1780
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
1781
+ extendedRequestId: output.headers["x-amz-id-2"],
1782
+ cfId: output.headers["x-amz-cf-id"],
1783
+ });
1784
+ };
1785
+ var collectBody = function (streamBody, context) {
1786
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
1540
1787
  if (streamBody instanceof Uint8Array) {
1541
1788
  return Promise.resolve(streamBody);
1542
1789
  }
1543
1790
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1544
1791
  };
1545
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1546
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1547
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1548
- const contents = {
1549
- protocol,
1550
- hostname,
1551
- port,
1552
- method: "POST",
1553
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1554
- headers,
1555
- };
1556
- if (resolvedHostname !== undefined) {
1557
- contents.hostname = resolvedHostname;
1558
- }
1559
- if (body !== undefined) {
1560
- contents.body = body;
1561
- }
1562
- return new __HttpRequest(contents);
1792
+ var collectBodyString = function (streamBody, context) {
1793
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1794
+ };
1795
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
1796
+ var _a, hostname, _b, protocol, port, basePath, contents;
1797
+ return __generator(this, function (_c) {
1798
+ switch (_c.label) {
1799
+ case 0: return [4, context.endpoint()];
1800
+ case 1:
1801
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1802
+ contents = {
1803
+ protocol: protocol,
1804
+ hostname: hostname,
1805
+ port: port,
1806
+ method: "POST",
1807
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1808
+ headers: headers,
1809
+ };
1810
+ if (resolvedHostname !== undefined) {
1811
+ contents.hostname = resolvedHostname;
1812
+ }
1813
+ if (body !== undefined) {
1814
+ contents.body = body;
1815
+ }
1816
+ return [2, new __HttpRequest(contents)];
1817
+ }
1818
+ });
1819
+ }); };
1820
+ var parseBody = function (streamBody, context) {
1821
+ return collectBodyString(streamBody, context).then(function (encoded) {
1822
+ if (encoded.length) {
1823
+ return JSON.parse(encoded);
1824
+ }
1825
+ return {};
1826
+ });
1563
1827
  };
1564
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1565
- if (encoded.length) {
1566
- return JSON.parse(encoded);
1567
- }
1568
- return {};
1569
- });
1570
- const parseErrorBody = async (errorBody, context) => {
1571
- const value = await parseBody(errorBody, context);
1572
- value.message = value.message ?? value.Message;
1573
- return value;
1574
- };
1575
- const loadRestJsonErrorCode = (output, data) => {
1576
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1577
- const sanitizeErrorCode = (rawValue) => {
1578
- let cleanValue = rawValue;
1828
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1829
+ var value;
1830
+ var _a;
1831
+ return __generator(this, function (_b) {
1832
+ switch (_b.label) {
1833
+ case 0: return [4, parseBody(errorBody, context)];
1834
+ case 1:
1835
+ value = _b.sent();
1836
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1837
+ return [2, value];
1838
+ }
1839
+ });
1840
+ }); };
1841
+ var loadRestJsonErrorCode = function (output, data) {
1842
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1843
+ var sanitizeErrorCode = function (rawValue) {
1844
+ var cleanValue = rawValue;
1579
1845
  if (typeof cleanValue === "number") {
1580
1846
  cleanValue = cleanValue.toString();
1581
1847
  }
@@ -1590,7 +1856,7 @@ const loadRestJsonErrorCode = (output, data) => {
1590
1856
  }
1591
1857
  return cleanValue;
1592
1858
  };
1593
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1859
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
1594
1860
  if (headerKey !== undefined) {
1595
1861
  return sanitizeErrorCode(output.headers[headerKey]);
1596
1862
  }