@aws-sdk/client-timestream-query 3.181.0 → 3.183.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 (28) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist-es/TimestreamQuery.js +54 -61
  3. package/dist-es/TimestreamQueryClient.js +23 -29
  4. package/dist-es/commands/CancelQueryCommand.js +22 -29
  5. package/dist-es/commands/CreateScheduledQueryCommand.js +22 -29
  6. package/dist-es/commands/DeleteScheduledQueryCommand.js +23 -30
  7. package/dist-es/commands/DescribeEndpointsCommand.js +21 -28
  8. package/dist-es/commands/DescribeScheduledQueryCommand.js +22 -29
  9. package/dist-es/commands/ExecuteScheduledQueryCommand.js +23 -30
  10. package/dist-es/commands/ListScheduledQueriesCommand.js +22 -29
  11. package/dist-es/commands/ListTagsForResourceCommand.js +22 -29
  12. package/dist-es/commands/PrepareQueryCommand.js +22 -29
  13. package/dist-es/commands/QueryCommand.js +22 -29
  14. package/dist-es/commands/TagResourceCommand.js +22 -29
  15. package/dist-es/commands/UntagResourceCommand.js +22 -29
  16. package/dist-es/commands/UpdateScheduledQueryCommand.js +23 -30
  17. package/dist-es/endpoints.js +8 -8
  18. package/dist-es/models/TimestreamQueryServiceException.js +5 -10
  19. package/dist-es/models/models_0.js +274 -162
  20. package/dist-es/pagination/ListScheduledQueriesPaginator.js +25 -68
  21. package/dist-es/pagination/ListTagsForResourcePaginator.js +25 -68
  22. package/dist-es/pagination/QueryPaginator.js +25 -68
  23. package/dist-es/protocols/Aws_json1_0.js +1108 -1374
  24. package/dist-es/runtimeConfig.browser.js +27 -12
  25. package/dist-es/runtimeConfig.js +31 -12
  26. package/dist-es/runtimeConfig.native.js +8 -5
  27. package/dist-es/runtimeConfig.shared.js +8 -11
  28. package/package.json +34 -34
@@ -1,1281 +1,1038 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { v4 as generateIdempotencyToken } from "uuid";
5
4
  import { AccessDeniedException, ConflictException, InternalServerException, InvalidEndpointException, QueryExecutionException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
5
  import { TimestreamQueryServiceException as __BaseException } from "../models/TimestreamQueryServiceException";
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) {
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) => {
1139
827
  return {};
1140
828
  };
1141
- var serializeAws_json1_0DescribeScheduledQueryRequest = function (input, context) {
1142
- return __assign({}, (input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }));
829
+ const serializeAws_json1_0DescribeScheduledQueryRequest = (input, context) => {
830
+ return {
831
+ ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
832
+ };
1143
833
  };
1144
- var serializeAws_json1_0DimensionMapping = function (input, context) {
1145
- return __assign(__assign({}, (input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType })), (input.Name != null && { Name: input.Name }));
834
+ const serializeAws_json1_0DimensionMapping = (input, context) => {
835
+ return {
836
+ ...(input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType }),
837
+ ...(input.Name != null && { Name: input.Name }),
838
+ };
1146
839
  };
1147
- var serializeAws_json1_0DimensionMappingList = function (input, context) {
840
+ const serializeAws_json1_0DimensionMappingList = (input, context) => {
1148
841
  return input
1149
- .filter(function (e) { return e != null; })
1150
- .map(function (entry) {
842
+ .filter((e) => e != null)
843
+ .map((entry) => {
1151
844
  return serializeAws_json1_0DimensionMapping(entry, context);
1152
845
  });
1153
846
  };
1154
- var serializeAws_json1_0ErrorReportConfiguration = function (input, context) {
1155
- return __assign({}, (input.S3Configuration != null && {
1156
- S3Configuration: serializeAws_json1_0S3Configuration(input.S3Configuration, context),
1157
- }));
847
+ const serializeAws_json1_0ErrorReportConfiguration = (input, context) => {
848
+ return {
849
+ ...(input.S3Configuration != null && {
850
+ S3Configuration: serializeAws_json1_0S3Configuration(input.S3Configuration, context),
851
+ }),
852
+ };
1158
853
  };
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 }));
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
+ };
1162
860
  };
1163
- var serializeAws_json1_0ListScheduledQueriesRequest = function (input, context) {
1164
- return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
861
+ const serializeAws_json1_0ListScheduledQueriesRequest = (input, context) => {
862
+ return {
863
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
864
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
865
+ };
1165
866
  };
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 }));
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
+ };
1168
873
  };
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 }));
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
+ };
1173
884
  };
1174
- var serializeAws_json1_0MixedMeasureMappingList = function (input, context) {
885
+ const serializeAws_json1_0MixedMeasureMappingList = (input, context) => {
1175
886
  return input
1176
- .filter(function (e) { return e != null; })
1177
- .map(function (entry) {
887
+ .filter((e) => e != null)
888
+ .map((entry) => {
1178
889
  return serializeAws_json1_0MixedMeasureMapping(entry, context);
1179
890
  });
1180
891
  };
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
- }));
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
+ };
1185
900
  };
1186
- var serializeAws_json1_0MultiMeasureAttributeMappingList = function (input, context) {
901
+ const serializeAws_json1_0MultiMeasureAttributeMappingList = (input, context) => {
1187
902
  return input
1188
- .filter(function (e) { return e != null; })
1189
- .map(function (entry) {
903
+ .filter((e) => e != null)
904
+ .map((entry) => {
1190
905
  return serializeAws_json1_0MultiMeasureAttributeMapping(entry, context);
1191
906
  });
1192
907
  };
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 }));
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
+ };
1197
915
  };
1198
- var serializeAws_json1_0NotificationConfiguration = function (input, context) {
1199
- return __assign({}, (input.SnsConfiguration != null && {
1200
- SnsConfiguration: serializeAws_json1_0SnsConfiguration(input.SnsConfiguration, context),
1201
- }));
916
+ const serializeAws_json1_0NotificationConfiguration = (input, context) => {
917
+ return {
918
+ ...(input.SnsConfiguration != null && {
919
+ SnsConfiguration: serializeAws_json1_0SnsConfiguration(input.SnsConfiguration, context),
920
+ }),
921
+ };
1202
922
  };
1203
- var serializeAws_json1_0PrepareQueryRequest = function (input, context) {
1204
- return __assign(__assign({}, (input.QueryString != null && { QueryString: input.QueryString })), (input.ValidateOnly != null && { ValidateOnly: input.ValidateOnly }));
923
+ const serializeAws_json1_0PrepareQueryRequest = (input, context) => {
924
+ return {
925
+ ...(input.QueryString != null && { QueryString: input.QueryString }),
926
+ ...(input.ValidateOnly != null && { ValidateOnly: input.ValidateOnly }),
927
+ };
1205
928
  };
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 }));
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
+ };
1209
936
  };
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 }));
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
+ };
1212
943
  };
1213
- var serializeAws_json1_0ScheduleConfiguration = function (input, context) {
1214
- return __assign({}, (input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }));
944
+ const serializeAws_json1_0ScheduleConfiguration = (input, context) => {
945
+ return {
946
+ ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }),
947
+ };
1215
948
  };
1216
- var serializeAws_json1_0SnsConfiguration = function (input, context) {
1217
- return __assign({}, (input.TopicArn != null && { TopicArn: input.TopicArn }));
949
+ const serializeAws_json1_0SnsConfiguration = (input, context) => {
950
+ return {
951
+ ...(input.TopicArn != null && { TopicArn: input.TopicArn }),
952
+ };
1218
953
  };
1219
- var serializeAws_json1_0Tag = function (input, context) {
1220
- return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
954
+ const serializeAws_json1_0Tag = (input, context) => {
955
+ return {
956
+ ...(input.Key != null && { Key: input.Key }),
957
+ ...(input.Value != null && { Value: input.Value }),
958
+ };
1221
959
  };
1222
- var serializeAws_json1_0TagKeyList = function (input, context) {
960
+ const serializeAws_json1_0TagKeyList = (input, context) => {
1223
961
  return input
1224
- .filter(function (e) { return e != null; })
1225
- .map(function (entry) {
962
+ .filter((e) => e != null)
963
+ .map((entry) => {
1226
964
  return entry;
1227
965
  });
1228
966
  };
1229
- var serializeAws_json1_0TagList = function (input, context) {
967
+ const serializeAws_json1_0TagList = (input, context) => {
1230
968
  return input
1231
- .filter(function (e) { return e != null; })
1232
- .map(function (entry) {
969
+ .filter((e) => e != null)
970
+ .map((entry) => {
1233
971
  return serializeAws_json1_0Tag(entry, context);
1234
972
  });
1235
973
  };
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) }));
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
+ };
1238
979
  };
1239
- var serializeAws_json1_0TargetConfiguration = function (input, context) {
1240
- return __assign({}, (input.TimestreamConfiguration != null && {
1241
- TimestreamConfiguration: serializeAws_json1_0TimestreamConfiguration(input.TimestreamConfiguration, context),
1242
- }));
980
+ const serializeAws_json1_0TargetConfiguration = (input, context) => {
981
+ return {
982
+ ...(input.TimestreamConfiguration != null && {
983
+ TimestreamConfiguration: serializeAws_json1_0TimestreamConfiguration(input.TimestreamConfiguration, context),
984
+ }),
985
+ };
1243
986
  };
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 }));
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
+ };
1252
1003
  };
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) }));
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
+ };
1255
1009
  };
1256
- var serializeAws_json1_0UpdateScheduledQueryRequest = function (input, context) {
1257
- return __assign(__assign({}, (input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn })), (input.State != null && { State: input.State }));
1010
+ const serializeAws_json1_0UpdateScheduledQueryRequest = (input, context) => {
1011
+ return {
1012
+ ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }),
1013
+ ...(input.State != null && { State: input.State }),
1014
+ };
1258
1015
  };
1259
- var deserializeAws_json1_0AccessDeniedException = function (output, context) {
1016
+ const deserializeAws_json1_0AccessDeniedException = (output, context) => {
1260
1017
  return {
1261
1018
  Message: __expectString(output.Message),
1262
1019
  };
1263
1020
  };
1264
- var deserializeAws_json1_0CancelQueryResponse = function (output, context) {
1021
+ const deserializeAws_json1_0CancelQueryResponse = (output, context) => {
1265
1022
  return {
1266
1023
  CancellationMessage: __expectString(output.CancellationMessage),
1267
1024
  };
1268
1025
  };
1269
- var deserializeAws_json1_0ColumnInfo = function (output, context) {
1026
+ const deserializeAws_json1_0ColumnInfo = (output, context) => {
1270
1027
  return {
1271
1028
  Name: __expectString(output.Name),
1272
1029
  Type: output.Type != null ? deserializeAws_json1_0Type(output.Type, context) : undefined,
1273
1030
  };
1274
1031
  };
1275
- var deserializeAws_json1_0ColumnInfoList = function (output, context) {
1276
- var retVal = (output || [])
1277
- .filter(function (e) { return e != null; })
1278
- .map(function (entry) {
1032
+ const deserializeAws_json1_0ColumnInfoList = (output, context) => {
1033
+ const retVal = (output || [])
1034
+ .filter((e) => e != null)
1035
+ .map((entry) => {
1279
1036
  if (entry === null) {
1280
1037
  return null;
1281
1038
  }
@@ -1283,17 +1040,17 @@ var deserializeAws_json1_0ColumnInfoList = function (output, context) {
1283
1040
  });
1284
1041
  return retVal;
1285
1042
  };
1286
- var deserializeAws_json1_0ConflictException = function (output, context) {
1043
+ const deserializeAws_json1_0ConflictException = (output, context) => {
1287
1044
  return {
1288
1045
  Message: __expectString(output.Message),
1289
1046
  };
1290
1047
  };
1291
- var deserializeAws_json1_0CreateScheduledQueryResponse = function (output, context) {
1048
+ const deserializeAws_json1_0CreateScheduledQueryResponse = (output, context) => {
1292
1049
  return {
1293
1050
  Arn: __expectString(output.Arn),
1294
1051
  };
1295
1052
  };
1296
- var deserializeAws_json1_0Datum = function (output, context) {
1053
+ const deserializeAws_json1_0Datum = (output, context) => {
1297
1054
  return {
1298
1055
  ArrayValue: output.ArrayValue != null ? deserializeAws_json1_0DatumList(output.ArrayValue, context) : undefined,
1299
1056
  NullValue: __expectBoolean(output.NullValue),
@@ -1304,10 +1061,10 @@ var deserializeAws_json1_0Datum = function (output, context) {
1304
1061
  : undefined,
1305
1062
  };
1306
1063
  };
1307
- var deserializeAws_json1_0DatumList = function (output, context) {
1308
- var retVal = (output || [])
1309
- .filter(function (e) { return e != null; })
1310
- .map(function (entry) {
1064
+ const deserializeAws_json1_0DatumList = (output, context) => {
1065
+ const retVal = (output || [])
1066
+ .filter((e) => e != null)
1067
+ .map((entry) => {
1311
1068
  if (entry === null) {
1312
1069
  return null;
1313
1070
  }
@@ -1315,28 +1072,28 @@ var deserializeAws_json1_0DatumList = function (output, context) {
1315
1072
  });
1316
1073
  return retVal;
1317
1074
  };
1318
- var deserializeAws_json1_0DescribeEndpointsResponse = function (output, context) {
1075
+ const deserializeAws_json1_0DescribeEndpointsResponse = (output, context) => {
1319
1076
  return {
1320
1077
  Endpoints: output.Endpoints != null ? deserializeAws_json1_0Endpoints(output.Endpoints, context) : undefined,
1321
1078
  };
1322
1079
  };
1323
- var deserializeAws_json1_0DescribeScheduledQueryResponse = function (output, context) {
1080
+ const deserializeAws_json1_0DescribeScheduledQueryResponse = (output, context) => {
1324
1081
  return {
1325
1082
  ScheduledQuery: output.ScheduledQuery != null
1326
1083
  ? deserializeAws_json1_0ScheduledQueryDescription(output.ScheduledQuery, context)
1327
1084
  : undefined,
1328
1085
  };
1329
1086
  };
1330
- var deserializeAws_json1_0DimensionMapping = function (output, context) {
1087
+ const deserializeAws_json1_0DimensionMapping = (output, context) => {
1331
1088
  return {
1332
1089
  DimensionValueType: __expectString(output.DimensionValueType),
1333
1090
  Name: __expectString(output.Name),
1334
1091
  };
1335
1092
  };
1336
- var deserializeAws_json1_0DimensionMappingList = function (output, context) {
1337
- var retVal = (output || [])
1338
- .filter(function (e) { return e != null; })
1339
- .map(function (entry) {
1093
+ const deserializeAws_json1_0DimensionMappingList = (output, context) => {
1094
+ const retVal = (output || [])
1095
+ .filter((e) => e != null)
1096
+ .map((entry) => {
1340
1097
  if (entry === null) {
1341
1098
  return null;
1342
1099
  }
@@ -1344,16 +1101,16 @@ var deserializeAws_json1_0DimensionMappingList = function (output, context) {
1344
1101
  });
1345
1102
  return retVal;
1346
1103
  };
1347
- var deserializeAws_json1_0Endpoint = function (output, context) {
1104
+ const deserializeAws_json1_0Endpoint = (output, context) => {
1348
1105
  return {
1349
1106
  Address: __expectString(output.Address),
1350
1107
  CachePeriodInMinutes: __expectLong(output.CachePeriodInMinutes),
1351
1108
  };
1352
1109
  };
1353
- var deserializeAws_json1_0Endpoints = function (output, context) {
1354
- var retVal = (output || [])
1355
- .filter(function (e) { return e != null; })
1356
- .map(function (entry) {
1110
+ const deserializeAws_json1_0Endpoints = (output, context) => {
1111
+ const retVal = (output || [])
1112
+ .filter((e) => e != null)
1113
+ .map((entry) => {
1357
1114
  if (entry === null) {
1358
1115
  return null;
1359
1116
  }
@@ -1361,21 +1118,21 @@ var deserializeAws_json1_0Endpoints = function (output, context) {
1361
1118
  });
1362
1119
  return retVal;
1363
1120
  };
1364
- var deserializeAws_json1_0ErrorReportConfiguration = function (output, context) {
1121
+ const deserializeAws_json1_0ErrorReportConfiguration = (output, context) => {
1365
1122
  return {
1366
1123
  S3Configuration: output.S3Configuration != null
1367
1124
  ? deserializeAws_json1_0S3Configuration(output.S3Configuration, context)
1368
1125
  : undefined,
1369
1126
  };
1370
1127
  };
1371
- var deserializeAws_json1_0ErrorReportLocation = function (output, context) {
1128
+ const deserializeAws_json1_0ErrorReportLocation = (output, context) => {
1372
1129
  return {
1373
1130
  S3ReportLocation: output.S3ReportLocation != null
1374
1131
  ? deserializeAws_json1_0S3ReportLocation(output.S3ReportLocation, context)
1375
1132
  : undefined,
1376
1133
  };
1377
1134
  };
1378
- var deserializeAws_json1_0ExecutionStats = function (output, context) {
1135
+ const deserializeAws_json1_0ExecutionStats = (output, context) => {
1379
1136
  return {
1380
1137
  BytesMetered: __expectLong(output.BytesMetered),
1381
1138
  DataWrites: __expectLong(output.DataWrites),
@@ -1384,17 +1141,17 @@ var deserializeAws_json1_0ExecutionStats = function (output, context) {
1384
1141
  RecordsIngested: __expectLong(output.RecordsIngested),
1385
1142
  };
1386
1143
  };
1387
- var deserializeAws_json1_0InternalServerException = function (output, context) {
1144
+ const deserializeAws_json1_0InternalServerException = (output, context) => {
1388
1145
  return {
1389
1146
  Message: __expectString(output.Message),
1390
1147
  };
1391
1148
  };
1392
- var deserializeAws_json1_0InvalidEndpointException = function (output, context) {
1149
+ const deserializeAws_json1_0InvalidEndpointException = (output, context) => {
1393
1150
  return {
1394
1151
  Message: __expectString(output.Message),
1395
1152
  };
1396
1153
  };
1397
- var deserializeAws_json1_0ListScheduledQueriesResponse = function (output, context) {
1154
+ const deserializeAws_json1_0ListScheduledQueriesResponse = (output, context) => {
1398
1155
  return {
1399
1156
  NextToken: __expectString(output.NextToken),
1400
1157
  ScheduledQueries: output.ScheduledQueries != null
@@ -1402,13 +1159,13 @@ var deserializeAws_json1_0ListScheduledQueriesResponse = function (output, conte
1402
1159
  : undefined,
1403
1160
  };
1404
1161
  };
1405
- var deserializeAws_json1_0ListTagsForResourceResponse = function (output, context) {
1162
+ const deserializeAws_json1_0ListTagsForResourceResponse = (output, context) => {
1406
1163
  return {
1407
1164
  NextToken: __expectString(output.NextToken),
1408
1165
  Tags: output.Tags != null ? deserializeAws_json1_0TagList(output.Tags, context) : undefined,
1409
1166
  };
1410
1167
  };
1411
- var deserializeAws_json1_0MixedMeasureMapping = function (output, context) {
1168
+ const deserializeAws_json1_0MixedMeasureMapping = (output, context) => {
1412
1169
  return {
1413
1170
  MeasureName: __expectString(output.MeasureName),
1414
1171
  MeasureValueType: __expectString(output.MeasureValueType),
@@ -1419,10 +1176,10 @@ var deserializeAws_json1_0MixedMeasureMapping = function (output, context) {
1419
1176
  TargetMeasureName: __expectString(output.TargetMeasureName),
1420
1177
  };
1421
1178
  };
1422
- var deserializeAws_json1_0MixedMeasureMappingList = function (output, context) {
1423
- var retVal = (output || [])
1424
- .filter(function (e) { return e != null; })
1425
- .map(function (entry) {
1179
+ const deserializeAws_json1_0MixedMeasureMappingList = (output, context) => {
1180
+ const retVal = (output || [])
1181
+ .filter((e) => e != null)
1182
+ .map((entry) => {
1426
1183
  if (entry === null) {
1427
1184
  return null;
1428
1185
  }
@@ -1430,17 +1187,17 @@ var deserializeAws_json1_0MixedMeasureMappingList = function (output, context) {
1430
1187
  });
1431
1188
  return retVal;
1432
1189
  };
1433
- var deserializeAws_json1_0MultiMeasureAttributeMapping = function (output, context) {
1190
+ const deserializeAws_json1_0MultiMeasureAttributeMapping = (output, context) => {
1434
1191
  return {
1435
1192
  MeasureValueType: __expectString(output.MeasureValueType),
1436
1193
  SourceColumn: __expectString(output.SourceColumn),
1437
1194
  TargetMultiMeasureAttributeName: __expectString(output.TargetMultiMeasureAttributeName),
1438
1195
  };
1439
1196
  };
1440
- var deserializeAws_json1_0MultiMeasureAttributeMappingList = function (output, context) {
1441
- var retVal = (output || [])
1442
- .filter(function (e) { return e != null; })
1443
- .map(function (entry) {
1197
+ const deserializeAws_json1_0MultiMeasureAttributeMappingList = (output, context) => {
1198
+ const retVal = (output || [])
1199
+ .filter((e) => e != null)
1200
+ .map((entry) => {
1444
1201
  if (entry === null) {
1445
1202
  return null;
1446
1203
  }
@@ -1448,7 +1205,7 @@ var deserializeAws_json1_0MultiMeasureAttributeMappingList = function (output, c
1448
1205
  });
1449
1206
  return retVal;
1450
1207
  };
1451
- var deserializeAws_json1_0MultiMeasureMappings = function (output, context) {
1208
+ const deserializeAws_json1_0MultiMeasureMappings = (output, context) => {
1452
1209
  return {
1453
1210
  MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings != null
1454
1211
  ? deserializeAws_json1_0MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
@@ -1456,23 +1213,23 @@ var deserializeAws_json1_0MultiMeasureMappings = function (output, context) {
1456
1213
  TargetMultiMeasureName: __expectString(output.TargetMultiMeasureName),
1457
1214
  };
1458
1215
  };
1459
- var deserializeAws_json1_0NotificationConfiguration = function (output, context) {
1216
+ const deserializeAws_json1_0NotificationConfiguration = (output, context) => {
1460
1217
  return {
1461
1218
  SnsConfiguration: output.SnsConfiguration != null
1462
1219
  ? deserializeAws_json1_0SnsConfiguration(output.SnsConfiguration, context)
1463
1220
  : undefined,
1464
1221
  };
1465
1222
  };
1466
- var deserializeAws_json1_0ParameterMapping = function (output, context) {
1223
+ const deserializeAws_json1_0ParameterMapping = (output, context) => {
1467
1224
  return {
1468
1225
  Name: __expectString(output.Name),
1469
1226
  Type: output.Type != null ? deserializeAws_json1_0Type(output.Type, context) : undefined,
1470
1227
  };
1471
1228
  };
1472
- var deserializeAws_json1_0ParameterMappingList = function (output, context) {
1473
- var retVal = (output || [])
1474
- .filter(function (e) { return e != null; })
1475
- .map(function (entry) {
1229
+ const deserializeAws_json1_0ParameterMappingList = (output, context) => {
1230
+ const retVal = (output || [])
1231
+ .filter((e) => e != null)
1232
+ .map((entry) => {
1476
1233
  if (entry === null) {
1477
1234
  return null;
1478
1235
  }
@@ -1480,19 +1237,19 @@ var deserializeAws_json1_0ParameterMappingList = function (output, context) {
1480
1237
  });
1481
1238
  return retVal;
1482
1239
  };
1483
- var deserializeAws_json1_0PrepareQueryResponse = function (output, context) {
1240
+ const deserializeAws_json1_0PrepareQueryResponse = (output, context) => {
1484
1241
  return {
1485
1242
  Columns: output.Columns != null ? deserializeAws_json1_0SelectColumnList(output.Columns, context) : undefined,
1486
1243
  Parameters: output.Parameters != null ? deserializeAws_json1_0ParameterMappingList(output.Parameters, context) : undefined,
1487
1244
  QueryString: __expectString(output.QueryString),
1488
1245
  };
1489
1246
  };
1490
- var deserializeAws_json1_0QueryExecutionException = function (output, context) {
1247
+ const deserializeAws_json1_0QueryExecutionException = (output, context) => {
1491
1248
  return {
1492
1249
  Message: __expectString(output.Message),
1493
1250
  };
1494
1251
  };
1495
- var deserializeAws_json1_0QueryResponse = function (output, context) {
1252
+ const deserializeAws_json1_0QueryResponse = (output, context) => {
1496
1253
  return {
1497
1254
  ColumnInfo: output.ColumnInfo != null ? deserializeAws_json1_0ColumnInfoList(output.ColumnInfo, context) : undefined,
1498
1255
  NextToken: __expectString(output.NextToken),
@@ -1501,28 +1258,28 @@ var deserializeAws_json1_0QueryResponse = function (output, context) {
1501
1258
  Rows: output.Rows != null ? deserializeAws_json1_0RowList(output.Rows, context) : undefined,
1502
1259
  };
1503
1260
  };
1504
- var deserializeAws_json1_0QueryStatus = function (output, context) {
1261
+ const deserializeAws_json1_0QueryStatus = (output, context) => {
1505
1262
  return {
1506
1263
  CumulativeBytesMetered: __expectLong(output.CumulativeBytesMetered),
1507
1264
  CumulativeBytesScanned: __expectLong(output.CumulativeBytesScanned),
1508
1265
  ProgressPercentage: __limitedParseDouble(output.ProgressPercentage),
1509
1266
  };
1510
1267
  };
1511
- var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
1268
+ const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
1512
1269
  return {
1513
1270
  Message: __expectString(output.Message),
1514
1271
  ScheduledQueryArn: __expectString(output.ScheduledQueryArn),
1515
1272
  };
1516
1273
  };
1517
- var deserializeAws_json1_0Row = function (output, context) {
1274
+ const deserializeAws_json1_0Row = (output, context) => {
1518
1275
  return {
1519
1276
  Data: output.Data != null ? deserializeAws_json1_0DatumList(output.Data, context) : undefined,
1520
1277
  };
1521
1278
  };
1522
- var deserializeAws_json1_0RowList = function (output, context) {
1523
- var retVal = (output || [])
1524
- .filter(function (e) { return e != null; })
1525
- .map(function (entry) {
1279
+ const deserializeAws_json1_0RowList = (output, context) => {
1280
+ const retVal = (output || [])
1281
+ .filter((e) => e != null)
1282
+ .map((entry) => {
1526
1283
  if (entry === null) {
1527
1284
  return null;
1528
1285
  }
@@ -1530,25 +1287,25 @@ var deserializeAws_json1_0RowList = function (output, context) {
1530
1287
  });
1531
1288
  return retVal;
1532
1289
  };
1533
- var deserializeAws_json1_0S3Configuration = function (output, context) {
1290
+ const deserializeAws_json1_0S3Configuration = (output, context) => {
1534
1291
  return {
1535
1292
  BucketName: __expectString(output.BucketName),
1536
1293
  EncryptionOption: __expectString(output.EncryptionOption),
1537
1294
  ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix),
1538
1295
  };
1539
1296
  };
1540
- var deserializeAws_json1_0S3ReportLocation = function (output, context) {
1297
+ const deserializeAws_json1_0S3ReportLocation = (output, context) => {
1541
1298
  return {
1542
1299
  BucketName: __expectString(output.BucketName),
1543
1300
  ObjectKey: __expectString(output.ObjectKey),
1544
1301
  };
1545
1302
  };
1546
- var deserializeAws_json1_0ScheduleConfiguration = function (output, context) {
1303
+ const deserializeAws_json1_0ScheduleConfiguration = (output, context) => {
1547
1304
  return {
1548
1305
  ScheduleExpression: __expectString(output.ScheduleExpression),
1549
1306
  };
1550
1307
  };
1551
- var deserializeAws_json1_0ScheduledQuery = function (output, context) {
1308
+ const deserializeAws_json1_0ScheduledQuery = (output, context) => {
1552
1309
  return {
1553
1310
  Arn: __expectString(output.Arn),
1554
1311
  CreationTime: output.CreationTime != null
@@ -1571,7 +1328,7 @@ var deserializeAws_json1_0ScheduledQuery = function (output, context) {
1571
1328
  : undefined,
1572
1329
  };
1573
1330
  };
1574
- var deserializeAws_json1_0ScheduledQueryDescription = function (output, context) {
1331
+ const deserializeAws_json1_0ScheduledQueryDescription = (output, context) => {
1575
1332
  return {
1576
1333
  Arn: __expectString(output.Arn),
1577
1334
  CreationTime: output.CreationTime != null
@@ -1608,10 +1365,10 @@ var deserializeAws_json1_0ScheduledQueryDescription = function (output, context)
1608
1365
  : undefined,
1609
1366
  };
1610
1367
  };
1611
- var deserializeAws_json1_0ScheduledQueryList = function (output, context) {
1612
- var retVal = (output || [])
1613
- .filter(function (e) { return e != null; })
1614
- .map(function (entry) {
1368
+ const deserializeAws_json1_0ScheduledQueryList = (output, context) => {
1369
+ const retVal = (output || [])
1370
+ .filter((e) => e != null)
1371
+ .map((entry) => {
1615
1372
  if (entry === null) {
1616
1373
  return null;
1617
1374
  }
@@ -1619,7 +1376,7 @@ var deserializeAws_json1_0ScheduledQueryList = function (output, context) {
1619
1376
  });
1620
1377
  return retVal;
1621
1378
  };
1622
- var deserializeAws_json1_0ScheduledQueryRunSummary = function (output, context) {
1379
+ const deserializeAws_json1_0ScheduledQueryRunSummary = (output, context) => {
1623
1380
  return {
1624
1381
  ErrorReportLocation: output.ErrorReportLocation != null
1625
1382
  ? deserializeAws_json1_0ErrorReportLocation(output.ErrorReportLocation, context)
@@ -1635,10 +1392,10 @@ var deserializeAws_json1_0ScheduledQueryRunSummary = function (output, context)
1635
1392
  : undefined,
1636
1393
  };
1637
1394
  };
1638
- var deserializeAws_json1_0ScheduledQueryRunSummaryList = function (output, context) {
1639
- var retVal = (output || [])
1640
- .filter(function (e) { return e != null; })
1641
- .map(function (entry) {
1395
+ const deserializeAws_json1_0ScheduledQueryRunSummaryList = (output, context) => {
1396
+ const retVal = (output || [])
1397
+ .filter((e) => e != null)
1398
+ .map((entry) => {
1642
1399
  if (entry === null) {
1643
1400
  return null;
1644
1401
  }
@@ -1646,7 +1403,7 @@ var deserializeAws_json1_0ScheduledQueryRunSummaryList = function (output, conte
1646
1403
  });
1647
1404
  return retVal;
1648
1405
  };
1649
- var deserializeAws_json1_0SelectColumn = function (output, context) {
1406
+ const deserializeAws_json1_0SelectColumn = (output, context) => {
1650
1407
  return {
1651
1408
  Aliased: __expectBoolean(output.Aliased),
1652
1409
  DatabaseName: __expectString(output.DatabaseName),
@@ -1655,10 +1412,10 @@ var deserializeAws_json1_0SelectColumn = function (output, context) {
1655
1412
  Type: output.Type != null ? deserializeAws_json1_0Type(output.Type, context) : undefined,
1656
1413
  };
1657
1414
  };
1658
- var deserializeAws_json1_0SelectColumnList = function (output, context) {
1659
- var retVal = (output || [])
1660
- .filter(function (e) { return e != null; })
1661
- .map(function (entry) {
1415
+ const deserializeAws_json1_0SelectColumnList = (output, context) => {
1416
+ const retVal = (output || [])
1417
+ .filter((e) => e != null)
1418
+ .map((entry) => {
1662
1419
  if (entry === null) {
1663
1420
  return null;
1664
1421
  }
@@ -1666,26 +1423,26 @@ var deserializeAws_json1_0SelectColumnList = function (output, context) {
1666
1423
  });
1667
1424
  return retVal;
1668
1425
  };
1669
- var deserializeAws_json1_0ServiceQuotaExceededException = function (output, context) {
1426
+ const deserializeAws_json1_0ServiceQuotaExceededException = (output, context) => {
1670
1427
  return {
1671
1428
  Message: __expectString(output.Message),
1672
1429
  };
1673
1430
  };
1674
- var deserializeAws_json1_0SnsConfiguration = function (output, context) {
1431
+ const deserializeAws_json1_0SnsConfiguration = (output, context) => {
1675
1432
  return {
1676
1433
  TopicArn: __expectString(output.TopicArn),
1677
1434
  };
1678
1435
  };
1679
- var deserializeAws_json1_0Tag = function (output, context) {
1436
+ const deserializeAws_json1_0Tag = (output, context) => {
1680
1437
  return {
1681
1438
  Key: __expectString(output.Key),
1682
1439
  Value: __expectString(output.Value),
1683
1440
  };
1684
1441
  };
1685
- var deserializeAws_json1_0TagList = function (output, context) {
1686
- var retVal = (output || [])
1687
- .filter(function (e) { return e != null; })
1688
- .map(function (entry) {
1442
+ const deserializeAws_json1_0TagList = (output, context) => {
1443
+ const retVal = (output || [])
1444
+ .filter((e) => e != null)
1445
+ .map((entry) => {
1689
1446
  if (entry === null) {
1690
1447
  return null;
1691
1448
  }
@@ -1693,38 +1450,38 @@ var deserializeAws_json1_0TagList = function (output, context) {
1693
1450
  });
1694
1451
  return retVal;
1695
1452
  };
1696
- var deserializeAws_json1_0TagResourceResponse = function (output, context) {
1453
+ const deserializeAws_json1_0TagResourceResponse = (output, context) => {
1697
1454
  return {};
1698
1455
  };
1699
- var deserializeAws_json1_0TargetConfiguration = function (output, context) {
1456
+ const deserializeAws_json1_0TargetConfiguration = (output, context) => {
1700
1457
  return {
1701
1458
  TimestreamConfiguration: output.TimestreamConfiguration != null
1702
1459
  ? deserializeAws_json1_0TimestreamConfiguration(output.TimestreamConfiguration, context)
1703
1460
  : undefined,
1704
1461
  };
1705
1462
  };
1706
- var deserializeAws_json1_0TargetDestination = function (output, context) {
1463
+ const deserializeAws_json1_0TargetDestination = (output, context) => {
1707
1464
  return {
1708
1465
  TimestreamDestination: output.TimestreamDestination != null
1709
1466
  ? deserializeAws_json1_0TimestreamDestination(output.TimestreamDestination, context)
1710
1467
  : undefined,
1711
1468
  };
1712
1469
  };
1713
- var deserializeAws_json1_0ThrottlingException = function (output, context) {
1470
+ const deserializeAws_json1_0ThrottlingException = (output, context) => {
1714
1471
  return {
1715
1472
  Message: __expectString(output.Message),
1716
1473
  };
1717
1474
  };
1718
- var deserializeAws_json1_0TimeSeriesDataPoint = function (output, context) {
1475
+ const deserializeAws_json1_0TimeSeriesDataPoint = (output, context) => {
1719
1476
  return {
1720
1477
  Time: __expectString(output.Time),
1721
1478
  Value: output.Value != null ? deserializeAws_json1_0Datum(output.Value, context) : undefined,
1722
1479
  };
1723
1480
  };
1724
- var deserializeAws_json1_0TimeSeriesDataPointList = function (output, context) {
1725
- var retVal = (output || [])
1726
- .filter(function (e) { return e != null; })
1727
- .map(function (entry) {
1481
+ const deserializeAws_json1_0TimeSeriesDataPointList = (output, context) => {
1482
+ const retVal = (output || [])
1483
+ .filter((e) => e != null)
1484
+ .map((entry) => {
1728
1485
  if (entry === null) {
1729
1486
  return null;
1730
1487
  }
@@ -1732,7 +1489,7 @@ var deserializeAws_json1_0TimeSeriesDataPointList = function (output, context) {
1732
1489
  });
1733
1490
  return retVal;
1734
1491
  };
1735
- var deserializeAws_json1_0TimestreamConfiguration = function (output, context) {
1492
+ const deserializeAws_json1_0TimestreamConfiguration = (output, context) => {
1736
1493
  return {
1737
1494
  DatabaseName: __expectString(output.DatabaseName),
1738
1495
  DimensionMappings: output.DimensionMappings != null
@@ -1749,13 +1506,13 @@ var deserializeAws_json1_0TimestreamConfiguration = function (output, context) {
1749
1506
  TimeColumn: __expectString(output.TimeColumn),
1750
1507
  };
1751
1508
  };
1752
- var deserializeAws_json1_0TimestreamDestination = function (output, context) {
1509
+ const deserializeAws_json1_0TimestreamDestination = (output, context) => {
1753
1510
  return {
1754
1511
  DatabaseName: __expectString(output.DatabaseName),
1755
1512
  TableName: __expectString(output.TableName),
1756
1513
  };
1757
1514
  };
1758
- var deserializeAws_json1_0Type = function (output, context) {
1515
+ const deserializeAws_json1_0Type = (output, context) => {
1759
1516
  return {
1760
1517
  ArrayColumnInfo: output.ArrayColumnInfo != null ? deserializeAws_json1_0ColumnInfo(output.ArrayColumnInfo, context) : undefined,
1761
1518
  RowColumnInfo: output.RowColumnInfo != null ? deserializeAws_json1_0ColumnInfoList(output.RowColumnInfo, context) : undefined,
@@ -1765,83 +1522,60 @@ var deserializeAws_json1_0Type = function (output, context) {
1765
1522
  : undefined,
1766
1523
  };
1767
1524
  };
1768
- var deserializeAws_json1_0UntagResourceResponse = function (output, context) {
1525
+ const deserializeAws_json1_0UntagResourceResponse = (output, context) => {
1769
1526
  return {};
1770
1527
  };
1771
- var deserializeAws_json1_0ValidationException = function (output, context) {
1528
+ const deserializeAws_json1_0ValidationException = (output, context) => {
1772
1529
  return {
1773
1530
  Message: __expectString(output.Message),
1774
1531
  };
1775
1532
  };
1776
- var deserializeMetadata = function (output) {
1777
- var _a;
1778
- return ({
1779
- httpStatusCode: output.statusCode,
1780
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-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(); }
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) => {
1787
1540
  if (streamBody instanceof Uint8Array) {
1788
1541
  return Promise.resolve(streamBody);
1789
1542
  }
1790
1543
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1791
1544
  };
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
- });
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);
1827
1563
  };
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;
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;
1845
1579
  if (typeof cleanValue === "number") {
1846
1580
  cleanValue = cleanValue.toString();
1847
1581
  }
@@ -1856,7 +1590,7 @@ var loadRestJsonErrorCode = function (output, data) {
1856
1590
  }
1857
1591
  return cleanValue;
1858
1592
  };
1859
- var headerKey = findKey(output.headers, "x-amzn-errortype");
1593
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1860
1594
  if (headerKey !== undefined) {
1861
1595
  return sanitizeErrorCode(output.headers[headerKey]);
1862
1596
  }