@aws-sdk/client-timestream-query 3.40.0 → 3.45.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 (78) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +3 -2
  3. package/dist-cjs/TimestreamQuery.js +150 -0
  4. package/dist-cjs/commands/CreateScheduledQueryCommand.js +38 -0
  5. package/dist-cjs/commands/DeleteScheduledQueryCommand.js +38 -0
  6. package/dist-cjs/commands/DescribeScheduledQueryCommand.js +38 -0
  7. package/dist-cjs/commands/ExecuteScheduledQueryCommand.js +38 -0
  8. package/dist-cjs/commands/ListScheduledQueriesCommand.js +38 -0
  9. package/dist-cjs/commands/ListTagsForResourceCommand.js +38 -0
  10. package/dist-cjs/commands/PrepareQueryCommand.js +38 -0
  11. package/dist-cjs/commands/TagResourceCommand.js +38 -0
  12. package/dist-cjs/commands/UntagResourceCommand.js +38 -0
  13. package/dist-cjs/commands/UpdateScheduledQueryCommand.js +38 -0
  14. package/dist-cjs/commands/index.js +10 -0
  15. package/dist-cjs/endpoints.js +9 -0
  16. package/dist-cjs/models/models_0.js +291 -1
  17. package/dist-cjs/pagination/ListScheduledQueriesPaginator.js +35 -0
  18. package/dist-cjs/pagination/ListTagsForResourcePaginator.js +35 -0
  19. package/dist-cjs/pagination/index.js +2 -0
  20. package/dist-cjs/protocols/Aws_json1_0.js +1580 -34
  21. package/dist-es/TimestreamQuery.js +150 -0
  22. package/dist-es/commands/CreateScheduledQueryCommand.js +41 -0
  23. package/dist-es/commands/DeleteScheduledQueryCommand.js +41 -0
  24. package/dist-es/commands/DescribeScheduledQueryCommand.js +41 -0
  25. package/dist-es/commands/ExecuteScheduledQueryCommand.js +41 -0
  26. package/dist-es/commands/ListScheduledQueriesCommand.js +41 -0
  27. package/dist-es/commands/ListTagsForResourceCommand.js +41 -0
  28. package/dist-es/commands/PrepareQueryCommand.js +41 -0
  29. package/dist-es/commands/TagResourceCommand.js +41 -0
  30. package/dist-es/commands/UntagResourceCommand.js +41 -0
  31. package/dist-es/commands/UpdateScheduledQueryCommand.js +41 -0
  32. package/dist-es/commands/index.js +10 -0
  33. package/dist-es/endpoints.js +9 -0
  34. package/dist-es/models/models_0.js +200 -0
  35. package/dist-es/pagination/ListScheduledQueriesPaginator.js +74 -0
  36. package/dist-es/pagination/ListTagsForResourcePaginator.js +74 -0
  37. package/dist-es/pagination/index.js +2 -0
  38. package/dist-es/protocols/Aws_json1_0.js +1678 -106
  39. package/dist-types/TimestreamQuery.d.ts +132 -19
  40. package/dist-types/TimestreamQueryClient.d.ts +15 -5
  41. package/dist-types/commands/CancelQueryCommand.d.ts +7 -6
  42. package/dist-types/commands/CreateScheduledQueryCommand.d.ts +39 -0
  43. package/dist-types/commands/DeleteScheduledQueryCommand.d.ts +35 -0
  44. package/dist-types/commands/DescribeEndpointsCommand.d.ts +16 -10
  45. package/dist-types/commands/DescribeScheduledQueryCommand.d.ts +35 -0
  46. package/dist-types/commands/ExecuteScheduledQueryCommand.d.ts +35 -0
  47. package/dist-types/commands/ListScheduledQueriesCommand.d.ts +35 -0
  48. package/dist-types/commands/ListTagsForResourceCommand.d.ts +35 -0
  49. package/dist-types/commands/PrepareQueryCommand.d.ts +37 -0
  50. package/dist-types/commands/QueryCommand.d.ts +31 -3
  51. package/dist-types/commands/TagResourceCommand.d.ts +37 -0
  52. package/dist-types/commands/UntagResourceCommand.d.ts +35 -0
  53. package/dist-types/commands/UpdateScheduledQueryCommand.d.ts +35 -0
  54. package/dist-types/commands/index.d.ts +10 -0
  55. package/dist-types/models/models_0.d.ts +1183 -183
  56. package/dist-types/pagination/ListScheduledQueriesPaginator.d.ts +4 -0
  57. package/dist-types/pagination/ListTagsForResourcePaginator.d.ts +4 -0
  58. package/dist-types/pagination/index.d.ts +2 -0
  59. package/dist-types/protocols/Aws_json1_0.d.ts +30 -0
  60. package/dist-types/ts3.4/TimestreamQuery.d.ts +50 -0
  61. package/dist-types/ts3.4/TimestreamQueryClient.d.ts +12 -2
  62. package/dist-types/ts3.4/commands/CreateScheduledQueryCommand.d.ts +17 -0
  63. package/dist-types/ts3.4/commands/DeleteScheduledQueryCommand.d.ts +17 -0
  64. package/dist-types/ts3.4/commands/DescribeScheduledQueryCommand.d.ts +17 -0
  65. package/dist-types/ts3.4/commands/ExecuteScheduledQueryCommand.d.ts +17 -0
  66. package/dist-types/ts3.4/commands/ListScheduledQueriesCommand.d.ts +17 -0
  67. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
  68. package/dist-types/ts3.4/commands/PrepareQueryCommand.d.ts +17 -0
  69. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
  70. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
  71. package/dist-types/ts3.4/commands/UpdateScheduledQueryCommand.d.ts +17 -0
  72. package/dist-types/ts3.4/commands/index.d.ts +10 -0
  73. package/dist-types/ts3.4/models/models_0.d.ts +536 -0
  74. package/dist-types/ts3.4/pagination/ListScheduledQueriesPaginator.d.ts +4 -0
  75. package/dist-types/ts3.4/pagination/ListTagsForResourcePaginator.d.ts +4 -0
  76. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  77. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +30 -0
  78. package/package.json +7 -7
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectBoolean as __expectBoolean, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, } from "@aws-sdk/smithy-client";
3
+ import { expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  export var serializeAws_json1_0CancelQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
6
6
  var headers, body;
@@ -13,6 +13,28 @@ export var serializeAws_json1_0CancelQueryCommand = function (input, context) {
13
13
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
14
14
  });
15
15
  }); };
16
+ export var serializeAws_json1_0CreateScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
17
+ var headers, body;
18
+ return __generator(this, function (_a) {
19
+ headers = {
20
+ "content-type": "application/x-amz-json-1.0",
21
+ "x-amz-target": "Timestream_20181101.CreateScheduledQuery",
22
+ };
23
+ body = JSON.stringify(serializeAws_json1_0CreateScheduledQueryRequest(input, context));
24
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
25
+ });
26
+ }); };
27
+ export var serializeAws_json1_0DeleteScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
28
+ var headers, body;
29
+ return __generator(this, function (_a) {
30
+ headers = {
31
+ "content-type": "application/x-amz-json-1.0",
32
+ "x-amz-target": "Timestream_20181101.DeleteScheduledQuery",
33
+ };
34
+ body = JSON.stringify(serializeAws_json1_0DeleteScheduledQueryRequest(input, context));
35
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
36
+ });
37
+ }); };
16
38
  export var serializeAws_json1_0DescribeEndpointsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
17
39
  var headers, body;
18
40
  return __generator(this, function (_a) {
@@ -24,6 +46,61 @@ export var serializeAws_json1_0DescribeEndpointsCommand = function (input, conte
24
46
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
25
47
  });
26
48
  }); };
49
+ export var serializeAws_json1_0DescribeScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
50
+ var headers, body;
51
+ return __generator(this, function (_a) {
52
+ headers = {
53
+ "content-type": "application/x-amz-json-1.0",
54
+ "x-amz-target": "Timestream_20181101.DescribeScheduledQuery",
55
+ };
56
+ body = JSON.stringify(serializeAws_json1_0DescribeScheduledQueryRequest(input, context));
57
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
58
+ });
59
+ }); };
60
+ export var serializeAws_json1_0ExecuteScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
61
+ var headers, body;
62
+ return __generator(this, function (_a) {
63
+ headers = {
64
+ "content-type": "application/x-amz-json-1.0",
65
+ "x-amz-target": "Timestream_20181101.ExecuteScheduledQuery",
66
+ };
67
+ body = JSON.stringify(serializeAws_json1_0ExecuteScheduledQueryRequest(input, context));
68
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
69
+ });
70
+ }); };
71
+ export var serializeAws_json1_0ListScheduledQueriesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
72
+ var headers, body;
73
+ return __generator(this, function (_a) {
74
+ headers = {
75
+ "content-type": "application/x-amz-json-1.0",
76
+ "x-amz-target": "Timestream_20181101.ListScheduledQueries",
77
+ };
78
+ body = JSON.stringify(serializeAws_json1_0ListScheduledQueriesRequest(input, context));
79
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
80
+ });
81
+ }); };
82
+ export var serializeAws_json1_0ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
83
+ var headers, body;
84
+ return __generator(this, function (_a) {
85
+ headers = {
86
+ "content-type": "application/x-amz-json-1.0",
87
+ "x-amz-target": "Timestream_20181101.ListTagsForResource",
88
+ };
89
+ body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
90
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
91
+ });
92
+ }); };
93
+ export var serializeAws_json1_0PrepareQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
94
+ var headers, body;
95
+ return __generator(this, function (_a) {
96
+ headers = {
97
+ "content-type": "application/x-amz-json-1.0",
98
+ "x-amz-target": "Timestream_20181101.PrepareQuery",
99
+ };
100
+ body = JSON.stringify(serializeAws_json1_0PrepareQueryRequest(input, context));
101
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
102
+ });
103
+ }); };
27
104
  export var serializeAws_json1_0QueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
28
105
  var headers, body;
29
106
  return __generator(this, function (_a) {
@@ -35,6 +112,39 @@ export var serializeAws_json1_0QueryCommand = function (input, context) { return
35
112
  return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
36
113
  });
37
114
  }); };
115
+ export var serializeAws_json1_0TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
116
+ var headers, body;
117
+ return __generator(this, function (_a) {
118
+ headers = {
119
+ "content-type": "application/x-amz-json-1.0",
120
+ "x-amz-target": "Timestream_20181101.TagResource",
121
+ };
122
+ body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
123
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
124
+ });
125
+ }); };
126
+ export var serializeAws_json1_0UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
127
+ var headers, body;
128
+ return __generator(this, function (_a) {
129
+ headers = {
130
+ "content-type": "application/x-amz-json-1.0",
131
+ "x-amz-target": "Timestream_20181101.UntagResource",
132
+ };
133
+ body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
134
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
135
+ });
136
+ }); };
137
+ export var serializeAws_json1_0UpdateScheduledQueryCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
138
+ var headers, body;
139
+ return __generator(this, function (_a) {
140
+ headers = {
141
+ "content-type": "application/x-amz-json-1.0",
142
+ "x-amz-target": "Timestream_20181101.UpdateScheduledQuery",
143
+ };
144
+ body = JSON.stringify(serializeAws_json1_0UpdateScheduledQueryRequest(input, context));
145
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
146
+ });
147
+ }); };
38
148
  export var deserializeAws_json1_0CancelQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
39
149
  var data, contents, response;
40
150
  return __generator(this, function (_a) {
@@ -123,97 +233,25 @@ var deserializeAws_json1_0CancelQueryCommandError = function (output, context) {
123
233
  }
124
234
  });
125
235
  }); };
126
- export var deserializeAws_json1_0DescribeEndpointsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
127
- var data, contents, response;
128
- return __generator(this, function (_a) {
129
- switch (_a.label) {
130
- case 0:
131
- if (output.statusCode >= 300) {
132
- return [2, deserializeAws_json1_0DescribeEndpointsCommandError(output, context)];
133
- }
134
- return [4, parseBody(output.body, context)];
135
- case 1:
136
- data = _a.sent();
137
- contents = {};
138
- contents = deserializeAws_json1_0DescribeEndpointsResponse(data, context);
139
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
140
- return [2, Promise.resolve(response)];
141
- }
142
- });
143
- }); };
144
- var deserializeAws_json1_0DescribeEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
145
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
146
- var _f;
147
- return __generator(this, function (_g) {
148
- switch (_g.label) {
149
- case 0:
150
- _a = [__assign({}, output)];
151
- _f = {};
152
- return [4, parseBody(output.body, context)];
153
- case 1:
154
- parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
155
- errorCode = "UnknownError";
156
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
157
- _b = errorCode;
158
- switch (_b) {
159
- case "InternalServerException": return [3, 2];
160
- case "com.amazonaws.timestreamquery#InternalServerException": return [3, 2];
161
- case "ThrottlingException": return [3, 4];
162
- case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 4];
163
- case "ValidationException": return [3, 6];
164
- case "com.amazonaws.timestreamquery#ValidationException": return [3, 6];
165
- }
166
- return [3, 8];
167
- case 2:
168
- _c = [{}];
169
- return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
170
- case 3:
171
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
172
- return [3, 9];
173
- case 4:
174
- _d = [{}];
175
- return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
176
- case 5:
177
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
178
- return [3, 9];
179
- case 6:
180
- _e = [{}];
181
- return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
182
- case 7:
183
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
184
- return [3, 9];
185
- case 8:
186
- parsedBody = parsedOutput.body;
187
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
188
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
189
- _g.label = 9;
190
- case 9:
191
- message = response.message || response.Message || errorCode;
192
- response.message = message;
193
- delete response.Message;
194
- return [2, Promise.reject(Object.assign(new Error(message), response))];
195
- }
196
- });
197
- }); };
198
- export var deserializeAws_json1_0QueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
236
+ export var deserializeAws_json1_0CreateScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
199
237
  var data, contents, response;
200
238
  return __generator(this, function (_a) {
201
239
  switch (_a.label) {
202
240
  case 0:
203
241
  if (output.statusCode >= 300) {
204
- return [2, deserializeAws_json1_0QueryCommandError(output, context)];
242
+ return [2, deserializeAws_json1_0CreateScheduledQueryCommandError(output, context)];
205
243
  }
206
244
  return [4, parseBody(output.body, context)];
207
245
  case 1:
208
246
  data = _a.sent();
209
247
  contents = {};
210
- contents = deserializeAws_json1_0QueryResponse(data, context);
248
+ contents = deserializeAws_json1_0CreateScheduledQueryResponse(data, context);
211
249
  response = __assign({ $metadata: deserializeMetadata(output) }, contents);
212
250
  return [2, Promise.resolve(response)];
213
251
  }
214
252
  });
215
253
  }); };
216
- var deserializeAws_json1_0QueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
254
+ var deserializeAws_json1_0CreateScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
217
255
  var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
218
256
  var _k;
219
257
  return __generator(this, function (_l) {
@@ -236,8 +274,8 @@ var deserializeAws_json1_0QueryCommandError = function (output, context) { retur
236
274
  case "com.amazonaws.timestreamquery#InternalServerException": return [3, 6];
237
275
  case "InvalidEndpointException": return [3, 8];
238
276
  case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 8];
239
- case "QueryExecutionException": return [3, 10];
240
- case "com.amazonaws.timestreamquery#QueryExecutionException": return [3, 10];
277
+ case "ServiceQuotaExceededException": return [3, 10];
278
+ case "com.amazonaws.timestreamquery#ServiceQuotaExceededException": return [3, 10];
241
279
  case "ThrottlingException": return [3, 12];
242
280
  case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 12];
243
281
  case "ValidationException": return [3, 14];
@@ -270,7 +308,7 @@ var deserializeAws_json1_0QueryCommandError = function (output, context) { retur
270
308
  return [3, 17];
271
309
  case 10:
272
310
  _g = [{}];
273
- return [4, deserializeAws_json1_0QueryExecutionExceptionResponse(parsedOutput, context)];
311
+ return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
274
312
  case 11:
275
313
  response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
276
314
  return [3, 17];
@@ -299,40 +337,1024 @@ var deserializeAws_json1_0QueryCommandError = function (output, context) { retur
299
337
  }
300
338
  });
301
339
  }); };
302
- var deserializeAws_json1_0AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
303
- var body, deserialized, contents;
340
+ export var deserializeAws_json1_0DeleteScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
341
+ var response;
304
342
  return __generator(this, function (_a) {
305
- body = parsedOutput.body;
306
- deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
307
- contents = __assign({ name: "AccessDeniedException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
308
- return [2, contents];
343
+ switch (_a.label) {
344
+ case 0:
345
+ if (output.statusCode >= 300) {
346
+ return [2, deserializeAws_json1_0DeleteScheduledQueryCommandError(output, context)];
347
+ }
348
+ return [4, collectBody(output.body, context)];
349
+ case 1:
350
+ _a.sent();
351
+ response = {
352
+ $metadata: deserializeMetadata(output),
353
+ };
354
+ return [2, Promise.resolve(response)];
355
+ }
309
356
  });
310
357
  }); };
311
- var deserializeAws_json1_0ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
312
- var body, deserialized, contents;
313
- return __generator(this, function (_a) {
314
- body = parsedOutput.body;
315
- deserialized = deserializeAws_json1_0ConflictException(body, context);
316
- contents = __assign({ name: "ConflictException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
317
- return [2, contents];
358
+ var deserializeAws_json1_0DeleteScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
359
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
360
+ var _j;
361
+ return __generator(this, function (_k) {
362
+ switch (_k.label) {
363
+ case 0:
364
+ _a = [__assign({}, output)];
365
+ _j = {};
366
+ return [4, parseBody(output.body, context)];
367
+ case 1:
368
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
369
+ errorCode = "UnknownError";
370
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
371
+ _b = errorCode;
372
+ switch (_b) {
373
+ case "AccessDeniedException": return [3, 2];
374
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
375
+ case "InternalServerException": return [3, 4];
376
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
377
+ case "InvalidEndpointException": return [3, 6];
378
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
379
+ case "ResourceNotFoundException": return [3, 8];
380
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 8];
381
+ case "ThrottlingException": return [3, 10];
382
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 10];
383
+ case "ValidationException": return [3, 12];
384
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 12];
385
+ }
386
+ return [3, 14];
387
+ case 2:
388
+ _c = [{}];
389
+ return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
390
+ case 3:
391
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
392
+ return [3, 15];
393
+ case 4:
394
+ _d = [{}];
395
+ return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
396
+ case 5:
397
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
398
+ return [3, 15];
399
+ case 6:
400
+ _e = [{}];
401
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
402
+ case 7:
403
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
404
+ return [3, 15];
405
+ case 8:
406
+ _f = [{}];
407
+ return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
408
+ case 9:
409
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
410
+ return [3, 15];
411
+ case 10:
412
+ _g = [{}];
413
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
414
+ case 11:
415
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
416
+ return [3, 15];
417
+ case 12:
418
+ _h = [{}];
419
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
420
+ case 13:
421
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
422
+ return [3, 15];
423
+ case 14:
424
+ parsedBody = parsedOutput.body;
425
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
426
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
427
+ _k.label = 15;
428
+ case 15:
429
+ message = response.message || response.Message || errorCode;
430
+ response.message = message;
431
+ delete response.Message;
432
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
433
+ }
318
434
  });
319
435
  }); };
320
- var deserializeAws_json1_0InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
321
- var body, deserialized, contents;
436
+ export var deserializeAws_json1_0DescribeEndpointsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
437
+ var data, contents, response;
322
438
  return __generator(this, function (_a) {
323
- body = parsedOutput.body;
324
- deserialized = deserializeAws_json1_0InternalServerException(body, context);
325
- contents = __assign({ name: "InternalServerException", $fault: "server", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
326
- return [2, contents];
439
+ switch (_a.label) {
440
+ case 0:
441
+ if (output.statusCode >= 300) {
442
+ return [2, deserializeAws_json1_0DescribeEndpointsCommandError(output, context)];
443
+ }
444
+ return [4, parseBody(output.body, context)];
445
+ case 1:
446
+ data = _a.sent();
447
+ contents = {};
448
+ contents = deserializeAws_json1_0DescribeEndpointsResponse(data, context);
449
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
450
+ return [2, Promise.resolve(response)];
451
+ }
327
452
  });
328
453
  }); };
329
- var deserializeAws_json1_0InvalidEndpointExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
330
- var body, deserialized, contents;
331
- return __generator(this, function (_a) {
332
- body = parsedOutput.body;
333
- deserialized = deserializeAws_json1_0InvalidEndpointException(body, context);
334
- contents = __assign({ name: "InvalidEndpointException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
335
- return [2, contents];
454
+ var deserializeAws_json1_0DescribeEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
455
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
456
+ var _f;
457
+ return __generator(this, function (_g) {
458
+ switch (_g.label) {
459
+ case 0:
460
+ _a = [__assign({}, output)];
461
+ _f = {};
462
+ return [4, parseBody(output.body, context)];
463
+ case 1:
464
+ parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
465
+ errorCode = "UnknownError";
466
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
467
+ _b = errorCode;
468
+ switch (_b) {
469
+ case "InternalServerException": return [3, 2];
470
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 2];
471
+ case "ThrottlingException": return [3, 4];
472
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 4];
473
+ case "ValidationException": return [3, 6];
474
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 6];
475
+ }
476
+ return [3, 8];
477
+ case 2:
478
+ _c = [{}];
479
+ return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
480
+ case 3:
481
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
482
+ return [3, 9];
483
+ case 4:
484
+ _d = [{}];
485
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
486
+ case 5:
487
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
488
+ return [3, 9];
489
+ case 6:
490
+ _e = [{}];
491
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
492
+ case 7:
493
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
494
+ return [3, 9];
495
+ case 8:
496
+ parsedBody = parsedOutput.body;
497
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
498
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
499
+ _g.label = 9;
500
+ case 9:
501
+ message = response.message || response.Message || errorCode;
502
+ response.message = message;
503
+ delete response.Message;
504
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
505
+ }
506
+ });
507
+ }); };
508
+ export var deserializeAws_json1_0DescribeScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
509
+ var data, contents, response;
510
+ return __generator(this, function (_a) {
511
+ switch (_a.label) {
512
+ case 0:
513
+ if (output.statusCode >= 300) {
514
+ return [2, deserializeAws_json1_0DescribeScheduledQueryCommandError(output, context)];
515
+ }
516
+ return [4, parseBody(output.body, context)];
517
+ case 1:
518
+ data = _a.sent();
519
+ contents = {};
520
+ contents = deserializeAws_json1_0DescribeScheduledQueryResponse(data, context);
521
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
522
+ return [2, Promise.resolve(response)];
523
+ }
524
+ });
525
+ }); };
526
+ var deserializeAws_json1_0DescribeScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
527
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
528
+ var _j;
529
+ return __generator(this, function (_k) {
530
+ switch (_k.label) {
531
+ case 0:
532
+ _a = [__assign({}, output)];
533
+ _j = {};
534
+ return [4, parseBody(output.body, context)];
535
+ case 1:
536
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
537
+ errorCode = "UnknownError";
538
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
539
+ _b = errorCode;
540
+ switch (_b) {
541
+ case "AccessDeniedException": return [3, 2];
542
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
543
+ case "InternalServerException": return [3, 4];
544
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
545
+ case "InvalidEndpointException": return [3, 6];
546
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
547
+ case "ResourceNotFoundException": return [3, 8];
548
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 8];
549
+ case "ThrottlingException": return [3, 10];
550
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 10];
551
+ case "ValidationException": return [3, 12];
552
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 12];
553
+ }
554
+ return [3, 14];
555
+ case 2:
556
+ _c = [{}];
557
+ return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
558
+ case 3:
559
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
560
+ return [3, 15];
561
+ case 4:
562
+ _d = [{}];
563
+ return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
564
+ case 5:
565
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
566
+ return [3, 15];
567
+ case 6:
568
+ _e = [{}];
569
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
570
+ case 7:
571
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
572
+ return [3, 15];
573
+ case 8:
574
+ _f = [{}];
575
+ return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
576
+ case 9:
577
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
578
+ return [3, 15];
579
+ case 10:
580
+ _g = [{}];
581
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
582
+ case 11:
583
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
584
+ return [3, 15];
585
+ case 12:
586
+ _h = [{}];
587
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
588
+ case 13:
589
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
590
+ return [3, 15];
591
+ case 14:
592
+ parsedBody = parsedOutput.body;
593
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
594
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
595
+ _k.label = 15;
596
+ case 15:
597
+ message = response.message || response.Message || errorCode;
598
+ response.message = message;
599
+ delete response.Message;
600
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
601
+ }
602
+ });
603
+ }); };
604
+ export var deserializeAws_json1_0ExecuteScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
605
+ var response;
606
+ return __generator(this, function (_a) {
607
+ switch (_a.label) {
608
+ case 0:
609
+ if (output.statusCode >= 300) {
610
+ return [2, deserializeAws_json1_0ExecuteScheduledQueryCommandError(output, context)];
611
+ }
612
+ return [4, collectBody(output.body, context)];
613
+ case 1:
614
+ _a.sent();
615
+ response = {
616
+ $metadata: deserializeMetadata(output),
617
+ };
618
+ return [2, Promise.resolve(response)];
619
+ }
620
+ });
621
+ }); };
622
+ var deserializeAws_json1_0ExecuteScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
623
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
624
+ var _j;
625
+ return __generator(this, function (_k) {
626
+ switch (_k.label) {
627
+ case 0:
628
+ _a = [__assign({}, output)];
629
+ _j = {};
630
+ return [4, parseBody(output.body, context)];
631
+ case 1:
632
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
633
+ errorCode = "UnknownError";
634
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
635
+ _b = errorCode;
636
+ switch (_b) {
637
+ case "AccessDeniedException": return [3, 2];
638
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
639
+ case "InternalServerException": return [3, 4];
640
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
641
+ case "InvalidEndpointException": return [3, 6];
642
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
643
+ case "ResourceNotFoundException": return [3, 8];
644
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 8];
645
+ case "ThrottlingException": return [3, 10];
646
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 10];
647
+ case "ValidationException": return [3, 12];
648
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 12];
649
+ }
650
+ return [3, 14];
651
+ case 2:
652
+ _c = [{}];
653
+ return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
654
+ case 3:
655
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
656
+ return [3, 15];
657
+ case 4:
658
+ _d = [{}];
659
+ return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
660
+ case 5:
661
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
662
+ return [3, 15];
663
+ case 6:
664
+ _e = [{}];
665
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
666
+ case 7:
667
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
668
+ return [3, 15];
669
+ case 8:
670
+ _f = [{}];
671
+ return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
672
+ case 9:
673
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
674
+ return [3, 15];
675
+ case 10:
676
+ _g = [{}];
677
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
678
+ case 11:
679
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
680
+ return [3, 15];
681
+ case 12:
682
+ _h = [{}];
683
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
684
+ case 13:
685
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
686
+ return [3, 15];
687
+ case 14:
688
+ parsedBody = parsedOutput.body;
689
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
690
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
691
+ _k.label = 15;
692
+ case 15:
693
+ message = response.message || response.Message || errorCode;
694
+ response.message = message;
695
+ delete response.Message;
696
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
697
+ }
698
+ });
699
+ }); };
700
+ export var deserializeAws_json1_0ListScheduledQueriesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
701
+ var data, contents, response;
702
+ return __generator(this, function (_a) {
703
+ switch (_a.label) {
704
+ case 0:
705
+ if (output.statusCode >= 300) {
706
+ return [2, deserializeAws_json1_0ListScheduledQueriesCommandError(output, context)];
707
+ }
708
+ return [4, parseBody(output.body, context)];
709
+ case 1:
710
+ data = _a.sent();
711
+ contents = {};
712
+ contents = deserializeAws_json1_0ListScheduledQueriesResponse(data, context);
713
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
714
+ return [2, Promise.resolve(response)];
715
+ }
716
+ });
717
+ }); };
718
+ var deserializeAws_json1_0ListScheduledQueriesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
719
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
720
+ var _h;
721
+ return __generator(this, function (_j) {
722
+ switch (_j.label) {
723
+ case 0:
724
+ _a = [__assign({}, output)];
725
+ _h = {};
726
+ return [4, parseBody(output.body, context)];
727
+ case 1:
728
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
729
+ errorCode = "UnknownError";
730
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
731
+ _b = errorCode;
732
+ switch (_b) {
733
+ case "AccessDeniedException": return [3, 2];
734
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
735
+ case "InternalServerException": return [3, 4];
736
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
737
+ case "InvalidEndpointException": return [3, 6];
738
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
739
+ case "ThrottlingException": return [3, 8];
740
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 8];
741
+ case "ValidationException": return [3, 10];
742
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 10];
743
+ }
744
+ return [3, 12];
745
+ case 2:
746
+ _c = [{}];
747
+ return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
748
+ case 3:
749
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
750
+ return [3, 13];
751
+ case 4:
752
+ _d = [{}];
753
+ return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
754
+ case 5:
755
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
756
+ return [3, 13];
757
+ case 6:
758
+ _e = [{}];
759
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
760
+ case 7:
761
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
762
+ return [3, 13];
763
+ case 8:
764
+ _f = [{}];
765
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
766
+ case 9:
767
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
768
+ return [3, 13];
769
+ case 10:
770
+ _g = [{}];
771
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
772
+ case 11:
773
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
774
+ return [3, 13];
775
+ case 12:
776
+ parsedBody = parsedOutput.body;
777
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
778
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
779
+ _j.label = 13;
780
+ case 13:
781
+ message = response.message || response.Message || errorCode;
782
+ response.message = message;
783
+ delete response.Message;
784
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
785
+ }
786
+ });
787
+ }); };
788
+ export var deserializeAws_json1_0ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
789
+ var data, contents, response;
790
+ return __generator(this, function (_a) {
791
+ switch (_a.label) {
792
+ case 0:
793
+ if (output.statusCode >= 300) {
794
+ return [2, deserializeAws_json1_0ListTagsForResourceCommandError(output, context)];
795
+ }
796
+ return [4, parseBody(output.body, context)];
797
+ case 1:
798
+ data = _a.sent();
799
+ contents = {};
800
+ contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
801
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
802
+ return [2, Promise.resolve(response)];
803
+ }
804
+ });
805
+ }); };
806
+ var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
807
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
808
+ var _g;
809
+ return __generator(this, function (_h) {
810
+ switch (_h.label) {
811
+ case 0:
812
+ _a = [__assign({}, output)];
813
+ _g = {};
814
+ return [4, parseBody(output.body, context)];
815
+ case 1:
816
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
817
+ errorCode = "UnknownError";
818
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
819
+ _b = errorCode;
820
+ switch (_b) {
821
+ case "InvalidEndpointException": return [3, 2];
822
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 2];
823
+ case "ResourceNotFoundException": return [3, 4];
824
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 4];
825
+ case "ThrottlingException": return [3, 6];
826
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 6];
827
+ case "ValidationException": return [3, 8];
828
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 8];
829
+ }
830
+ return [3, 10];
831
+ case 2:
832
+ _c = [{}];
833
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
834
+ case 3:
835
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
836
+ return [3, 11];
837
+ case 4:
838
+ _d = [{}];
839
+ return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
840
+ case 5:
841
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
842
+ return [3, 11];
843
+ case 6:
844
+ _e = [{}];
845
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
846
+ case 7:
847
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
848
+ return [3, 11];
849
+ case 8:
850
+ _f = [{}];
851
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
852
+ case 9:
853
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
854
+ return [3, 11];
855
+ case 10:
856
+ parsedBody = parsedOutput.body;
857
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
858
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
859
+ _h.label = 11;
860
+ case 11:
861
+ message = response.message || response.Message || errorCode;
862
+ response.message = message;
863
+ delete response.Message;
864
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
865
+ }
866
+ });
867
+ }); };
868
+ export var deserializeAws_json1_0PrepareQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
869
+ var data, contents, response;
870
+ return __generator(this, function (_a) {
871
+ switch (_a.label) {
872
+ case 0:
873
+ if (output.statusCode >= 300) {
874
+ return [2, deserializeAws_json1_0PrepareQueryCommandError(output, context)];
875
+ }
876
+ return [4, parseBody(output.body, context)];
877
+ case 1:
878
+ data = _a.sent();
879
+ contents = {};
880
+ contents = deserializeAws_json1_0PrepareQueryResponse(data, context);
881
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
882
+ return [2, Promise.resolve(response)];
883
+ }
884
+ });
885
+ }); };
886
+ var deserializeAws_json1_0PrepareQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
887
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
888
+ var _h;
889
+ return __generator(this, function (_j) {
890
+ switch (_j.label) {
891
+ case 0:
892
+ _a = [__assign({}, output)];
893
+ _h = {};
894
+ return [4, parseBody(output.body, context)];
895
+ case 1:
896
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
897
+ errorCode = "UnknownError";
898
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
899
+ _b = errorCode;
900
+ switch (_b) {
901
+ case "AccessDeniedException": return [3, 2];
902
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
903
+ case "InternalServerException": return [3, 4];
904
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
905
+ case "InvalidEndpointException": return [3, 6];
906
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
907
+ case "ThrottlingException": return [3, 8];
908
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 8];
909
+ case "ValidationException": return [3, 10];
910
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 10];
911
+ }
912
+ return [3, 12];
913
+ case 2:
914
+ _c = [{}];
915
+ return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
916
+ case 3:
917
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
918
+ return [3, 13];
919
+ case 4:
920
+ _d = [{}];
921
+ return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
922
+ case 5:
923
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
924
+ return [3, 13];
925
+ case 6:
926
+ _e = [{}];
927
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
928
+ case 7:
929
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
930
+ return [3, 13];
931
+ case 8:
932
+ _f = [{}];
933
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
934
+ case 9:
935
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
936
+ return [3, 13];
937
+ case 10:
938
+ _g = [{}];
939
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
940
+ case 11:
941
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
942
+ return [3, 13];
943
+ case 12:
944
+ parsedBody = parsedOutput.body;
945
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
946
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
947
+ _j.label = 13;
948
+ case 13:
949
+ message = response.message || response.Message || errorCode;
950
+ response.message = message;
951
+ delete response.Message;
952
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
953
+ }
954
+ });
955
+ }); };
956
+ export var deserializeAws_json1_0QueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
957
+ var data, contents, response;
958
+ return __generator(this, function (_a) {
959
+ switch (_a.label) {
960
+ case 0:
961
+ if (output.statusCode >= 300) {
962
+ return [2, deserializeAws_json1_0QueryCommandError(output, context)];
963
+ }
964
+ return [4, parseBody(output.body, context)];
965
+ case 1:
966
+ data = _a.sent();
967
+ contents = {};
968
+ contents = deserializeAws_json1_0QueryResponse(data, context);
969
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
970
+ return [2, Promise.resolve(response)];
971
+ }
972
+ });
973
+ }); };
974
+ var deserializeAws_json1_0QueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
975
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
976
+ var _k;
977
+ return __generator(this, function (_l) {
978
+ switch (_l.label) {
979
+ case 0:
980
+ _a = [__assign({}, output)];
981
+ _k = {};
982
+ return [4, parseBody(output.body, context)];
983
+ case 1:
984
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
985
+ errorCode = "UnknownError";
986
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
987
+ _b = errorCode;
988
+ switch (_b) {
989
+ case "AccessDeniedException": return [3, 2];
990
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
991
+ case "ConflictException": return [3, 4];
992
+ case "com.amazonaws.timestreamquery#ConflictException": return [3, 4];
993
+ case "InternalServerException": return [3, 6];
994
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 6];
995
+ case "InvalidEndpointException": return [3, 8];
996
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 8];
997
+ case "QueryExecutionException": return [3, 10];
998
+ case "com.amazonaws.timestreamquery#QueryExecutionException": return [3, 10];
999
+ case "ThrottlingException": return [3, 12];
1000
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 12];
1001
+ case "ValidationException": return [3, 14];
1002
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 14];
1003
+ }
1004
+ return [3, 16];
1005
+ case 2:
1006
+ _c = [{}];
1007
+ return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1008
+ case 3:
1009
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1010
+ return [3, 17];
1011
+ case 4:
1012
+ _d = [{}];
1013
+ return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
1014
+ case 5:
1015
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1016
+ return [3, 17];
1017
+ case 6:
1018
+ _e = [{}];
1019
+ return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1020
+ case 7:
1021
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1022
+ return [3, 17];
1023
+ case 8:
1024
+ _f = [{}];
1025
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
1026
+ case 9:
1027
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1028
+ return [3, 17];
1029
+ case 10:
1030
+ _g = [{}];
1031
+ return [4, deserializeAws_json1_0QueryExecutionExceptionResponse(parsedOutput, context)];
1032
+ case 11:
1033
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1034
+ return [3, 17];
1035
+ case 12:
1036
+ _h = [{}];
1037
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1038
+ case 13:
1039
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1040
+ return [3, 17];
1041
+ case 14:
1042
+ _j = [{}];
1043
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1044
+ case 15:
1045
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1046
+ return [3, 17];
1047
+ case 16:
1048
+ parsedBody = parsedOutput.body;
1049
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1050
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1051
+ _l.label = 17;
1052
+ case 17:
1053
+ message = response.message || response.Message || errorCode;
1054
+ response.message = message;
1055
+ delete response.Message;
1056
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1057
+ }
1058
+ });
1059
+ }); };
1060
+ export var deserializeAws_json1_0TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1061
+ var data, contents, response;
1062
+ return __generator(this, function (_a) {
1063
+ switch (_a.label) {
1064
+ case 0:
1065
+ if (output.statusCode >= 300) {
1066
+ return [2, deserializeAws_json1_0TagResourceCommandError(output, context)];
1067
+ }
1068
+ return [4, parseBody(output.body, context)];
1069
+ case 1:
1070
+ data = _a.sent();
1071
+ contents = {};
1072
+ contents = deserializeAws_json1_0TagResourceResponse(data, context);
1073
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1074
+ return [2, Promise.resolve(response)];
1075
+ }
1076
+ });
1077
+ }); };
1078
+ var deserializeAws_json1_0TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1079
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
1080
+ var _h;
1081
+ return __generator(this, function (_j) {
1082
+ switch (_j.label) {
1083
+ case 0:
1084
+ _a = [__assign({}, output)];
1085
+ _h = {};
1086
+ return [4, parseBody(output.body, context)];
1087
+ case 1:
1088
+ parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
1089
+ errorCode = "UnknownError";
1090
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1091
+ _b = errorCode;
1092
+ switch (_b) {
1093
+ case "InvalidEndpointException": return [3, 2];
1094
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 2];
1095
+ case "ResourceNotFoundException": return [3, 4];
1096
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 4];
1097
+ case "ServiceQuotaExceededException": return [3, 6];
1098
+ case "com.amazonaws.timestreamquery#ServiceQuotaExceededException": return [3, 6];
1099
+ case "ThrottlingException": return [3, 8];
1100
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 8];
1101
+ case "ValidationException": return [3, 10];
1102
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 10];
1103
+ }
1104
+ return [3, 12];
1105
+ case 2:
1106
+ _c = [{}];
1107
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
1108
+ case 3:
1109
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1110
+ return [3, 13];
1111
+ case 4:
1112
+ _d = [{}];
1113
+ return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1114
+ case 5:
1115
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1116
+ return [3, 13];
1117
+ case 6:
1118
+ _e = [{}];
1119
+ return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1120
+ case 7:
1121
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1122
+ return [3, 13];
1123
+ case 8:
1124
+ _f = [{}];
1125
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1126
+ case 9:
1127
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1128
+ return [3, 13];
1129
+ case 10:
1130
+ _g = [{}];
1131
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1132
+ case 11:
1133
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1134
+ return [3, 13];
1135
+ case 12:
1136
+ parsedBody = parsedOutput.body;
1137
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1138
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1139
+ _j.label = 13;
1140
+ case 13:
1141
+ message = response.message || response.Message || errorCode;
1142
+ response.message = message;
1143
+ delete response.Message;
1144
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1145
+ }
1146
+ });
1147
+ }); };
1148
+ export var deserializeAws_json1_0UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1149
+ var data, contents, response;
1150
+ return __generator(this, function (_a) {
1151
+ switch (_a.label) {
1152
+ case 0:
1153
+ if (output.statusCode >= 300) {
1154
+ return [2, deserializeAws_json1_0UntagResourceCommandError(output, context)];
1155
+ }
1156
+ return [4, parseBody(output.body, context)];
1157
+ case 1:
1158
+ data = _a.sent();
1159
+ contents = {};
1160
+ contents = deserializeAws_json1_0UntagResourceResponse(data, context);
1161
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1162
+ return [2, Promise.resolve(response)];
1163
+ }
1164
+ });
1165
+ }); };
1166
+ var deserializeAws_json1_0UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1167
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
1168
+ var _g;
1169
+ return __generator(this, function (_h) {
1170
+ switch (_h.label) {
1171
+ case 0:
1172
+ _a = [__assign({}, output)];
1173
+ _g = {};
1174
+ return [4, parseBody(output.body, context)];
1175
+ case 1:
1176
+ parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
1177
+ errorCode = "UnknownError";
1178
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1179
+ _b = errorCode;
1180
+ switch (_b) {
1181
+ case "InvalidEndpointException": return [3, 2];
1182
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 2];
1183
+ case "ResourceNotFoundException": return [3, 4];
1184
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 4];
1185
+ case "ThrottlingException": return [3, 6];
1186
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 6];
1187
+ case "ValidationException": return [3, 8];
1188
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 8];
1189
+ }
1190
+ return [3, 10];
1191
+ case 2:
1192
+ _c = [{}];
1193
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
1194
+ case 3:
1195
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1196
+ return [3, 11];
1197
+ case 4:
1198
+ _d = [{}];
1199
+ return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1200
+ case 5:
1201
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1202
+ return [3, 11];
1203
+ case 6:
1204
+ _e = [{}];
1205
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1206
+ case 7:
1207
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1208
+ return [3, 11];
1209
+ case 8:
1210
+ _f = [{}];
1211
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1212
+ case 9:
1213
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1214
+ return [3, 11];
1215
+ case 10:
1216
+ parsedBody = parsedOutput.body;
1217
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1218
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1219
+ _h.label = 11;
1220
+ case 11:
1221
+ message = response.message || response.Message || errorCode;
1222
+ response.message = message;
1223
+ delete response.Message;
1224
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1225
+ }
1226
+ });
1227
+ }); };
1228
+ export var deserializeAws_json1_0UpdateScheduledQueryCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1229
+ var response;
1230
+ return __generator(this, function (_a) {
1231
+ switch (_a.label) {
1232
+ case 0:
1233
+ if (output.statusCode >= 300) {
1234
+ return [2, deserializeAws_json1_0UpdateScheduledQueryCommandError(output, context)];
1235
+ }
1236
+ return [4, collectBody(output.body, context)];
1237
+ case 1:
1238
+ _a.sent();
1239
+ response = {
1240
+ $metadata: deserializeMetadata(output),
1241
+ };
1242
+ return [2, Promise.resolve(response)];
1243
+ }
1244
+ });
1245
+ }); };
1246
+ var deserializeAws_json1_0UpdateScheduledQueryCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1247
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, parsedBody, message;
1248
+ var _j;
1249
+ return __generator(this, function (_k) {
1250
+ switch (_k.label) {
1251
+ case 0:
1252
+ _a = [__assign({}, output)];
1253
+ _j = {};
1254
+ return [4, parseBody(output.body, context)];
1255
+ case 1:
1256
+ parsedOutput = __assign.apply(void 0, _a.concat([(_j.body = _k.sent(), _j)]));
1257
+ errorCode = "UnknownError";
1258
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1259
+ _b = errorCode;
1260
+ switch (_b) {
1261
+ case "AccessDeniedException": return [3, 2];
1262
+ case "com.amazonaws.timestreamquery#AccessDeniedException": return [3, 2];
1263
+ case "InternalServerException": return [3, 4];
1264
+ case "com.amazonaws.timestreamquery#InternalServerException": return [3, 4];
1265
+ case "InvalidEndpointException": return [3, 6];
1266
+ case "com.amazonaws.timestreamquery#InvalidEndpointException": return [3, 6];
1267
+ case "ResourceNotFoundException": return [3, 8];
1268
+ case "com.amazonaws.timestreamquery#ResourceNotFoundException": return [3, 8];
1269
+ case "ThrottlingException": return [3, 10];
1270
+ case "com.amazonaws.timestreamquery#ThrottlingException": return [3, 10];
1271
+ case "ValidationException": return [3, 12];
1272
+ case "com.amazonaws.timestreamquery#ValidationException": return [3, 12];
1273
+ }
1274
+ return [3, 14];
1275
+ case 2:
1276
+ _c = [{}];
1277
+ return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1278
+ case 3:
1279
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1280
+ return [3, 15];
1281
+ case 4:
1282
+ _d = [{}];
1283
+ return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1284
+ case 5:
1285
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1286
+ return [3, 15];
1287
+ case 6:
1288
+ _e = [{}];
1289
+ return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
1290
+ case 7:
1291
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1292
+ return [3, 15];
1293
+ case 8:
1294
+ _f = [{}];
1295
+ return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1296
+ case 9:
1297
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1298
+ return [3, 15];
1299
+ case 10:
1300
+ _g = [{}];
1301
+ return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1302
+ case 11:
1303
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1304
+ return [3, 15];
1305
+ case 12:
1306
+ _h = [{}];
1307
+ return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1308
+ case 13:
1309
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_k.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
1310
+ return [3, 15];
1311
+ case 14:
1312
+ parsedBody = parsedOutput.body;
1313
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
1314
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
1315
+ _k.label = 15;
1316
+ case 15:
1317
+ message = response.message || response.Message || errorCode;
1318
+ response.message = message;
1319
+ delete response.Message;
1320
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
1321
+ }
1322
+ });
1323
+ }); };
1324
+ var deserializeAws_json1_0AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1325
+ var body, deserialized, contents;
1326
+ return __generator(this, function (_a) {
1327
+ body = parsedOutput.body;
1328
+ deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
1329
+ contents = __assign({ name: "AccessDeniedException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
1330
+ return [2, contents];
1331
+ });
1332
+ }); };
1333
+ var deserializeAws_json1_0ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1334
+ var body, deserialized, contents;
1335
+ return __generator(this, function (_a) {
1336
+ body = parsedOutput.body;
1337
+ deserialized = deserializeAws_json1_0ConflictException(body, context);
1338
+ contents = __assign({ name: "ConflictException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
1339
+ return [2, contents];
1340
+ });
1341
+ }); };
1342
+ var deserializeAws_json1_0InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1343
+ var body, deserialized, contents;
1344
+ return __generator(this, function (_a) {
1345
+ body = parsedOutput.body;
1346
+ deserialized = deserializeAws_json1_0InternalServerException(body, context);
1347
+ contents = __assign({ name: "InternalServerException", $fault: "server", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
1348
+ return [2, contents];
1349
+ });
1350
+ }); };
1351
+ var deserializeAws_json1_0InvalidEndpointExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1352
+ var body, deserialized, contents;
1353
+ return __generator(this, function (_a) {
1354
+ body = parsedOutput.body;
1355
+ deserialized = deserializeAws_json1_0InvalidEndpointException(body, context);
1356
+ contents = __assign({ name: "InvalidEndpointException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
1357
+ return [2, contents];
336
1358
  });
337
1359
  }); };
338
1360
  var deserializeAws_json1_0QueryExecutionExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -344,6 +1366,24 @@ var deserializeAws_json1_0QueryExecutionExceptionResponse = function (parsedOutp
344
1366
  return [2, contents];
345
1367
  });
346
1368
  }); };
1369
+ var deserializeAws_json1_0ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1370
+ var body, deserialized, contents;
1371
+ return __generator(this, function (_a) {
1372
+ body = parsedOutput.body;
1373
+ deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
1374
+ contents = __assign({ name: "ResourceNotFoundException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
1375
+ return [2, contents];
1376
+ });
1377
+ }); };
1378
+ var deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1379
+ var body, deserialized, contents;
1380
+ return __generator(this, function (_a) {
1381
+ body = parsedOutput.body;
1382
+ deserialized = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
1383
+ contents = __assign({ name: "ServiceQuotaExceededException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
1384
+ return [2, contents];
1385
+ });
1386
+ }); };
347
1387
  var deserializeAws_json1_0ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
348
1388
  var body, deserialized, contents;
349
1389
  return __generator(this, function (_a) {
@@ -365,13 +1405,188 @@ var deserializeAws_json1_0ValidationExceptionResponse = function (parsedOutput,
365
1405
  var serializeAws_json1_0CancelQueryRequest = function (input, context) {
366
1406
  return __assign({}, (input.QueryId !== undefined && input.QueryId !== null && { QueryId: input.QueryId }));
367
1407
  };
1408
+ var serializeAws_json1_0CreateScheduledQueryRequest = function (input, context) {
1409
+ var _a;
1410
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.ErrorReportConfiguration !== undefined &&
1411
+ input.ErrorReportConfiguration !== null && {
1412
+ ErrorReportConfiguration: serializeAws_json1_0ErrorReportConfiguration(input.ErrorReportConfiguration, context),
1413
+ })), (input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId })), (input.Name !== undefined && input.Name !== null && { Name: input.Name })), (input.NotificationConfiguration !== undefined &&
1414
+ input.NotificationConfiguration !== null && {
1415
+ NotificationConfiguration: serializeAws_json1_0NotificationConfiguration(input.NotificationConfiguration, context),
1416
+ })), (input.QueryString !== undefined && input.QueryString !== null && { QueryString: input.QueryString })), (input.ScheduleConfiguration !== undefined &&
1417
+ input.ScheduleConfiguration !== null && {
1418
+ ScheduleConfiguration: serializeAws_json1_0ScheduleConfiguration(input.ScheduleConfiguration, context),
1419
+ })), (input.ScheduledQueryExecutionRoleArn !== undefined &&
1420
+ input.ScheduledQueryExecutionRoleArn !== null && {
1421
+ ScheduledQueryExecutionRoleArn: input.ScheduledQueryExecutionRoleArn,
1422
+ })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) })), (input.TargetConfiguration !== undefined &&
1423
+ input.TargetConfiguration !== null && {
1424
+ TargetConfiguration: serializeAws_json1_0TargetConfiguration(input.TargetConfiguration, context),
1425
+ }));
1426
+ };
1427
+ var serializeAws_json1_0DeleteScheduledQueryRequest = function (input, context) {
1428
+ return __assign({}, (input.ScheduledQueryArn !== undefined &&
1429
+ input.ScheduledQueryArn !== null && { ScheduledQueryArn: input.ScheduledQueryArn }));
1430
+ };
368
1431
  var serializeAws_json1_0DescribeEndpointsRequest = function (input, context) {
369
1432
  return {};
370
1433
  };
1434
+ var serializeAws_json1_0DescribeScheduledQueryRequest = function (input, context) {
1435
+ return __assign({}, (input.ScheduledQueryArn !== undefined &&
1436
+ input.ScheduledQueryArn !== null && { ScheduledQueryArn: input.ScheduledQueryArn }));
1437
+ };
1438
+ var serializeAws_json1_0DimensionMapping = function (input, context) {
1439
+ return __assign(__assign({}, (input.DimensionValueType !== undefined &&
1440
+ input.DimensionValueType !== null && { DimensionValueType: input.DimensionValueType })), (input.Name !== undefined && input.Name !== null && { Name: input.Name }));
1441
+ };
1442
+ var serializeAws_json1_0DimensionMappingList = function (input, context) {
1443
+ return input
1444
+ .filter(function (e) { return e != null; })
1445
+ .map(function (entry) {
1446
+ if (entry === null) {
1447
+ return null;
1448
+ }
1449
+ return serializeAws_json1_0DimensionMapping(entry, context);
1450
+ });
1451
+ };
1452
+ var serializeAws_json1_0ErrorReportConfiguration = function (input, context) {
1453
+ return __assign({}, (input.S3Configuration !== undefined &&
1454
+ input.S3Configuration !== null && {
1455
+ S3Configuration: serializeAws_json1_0S3Configuration(input.S3Configuration, context),
1456
+ }));
1457
+ };
1458
+ var serializeAws_json1_0ExecuteScheduledQueryRequest = function (input, context) {
1459
+ var _a;
1460
+ return __assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.InvocationTime !== undefined &&
1461
+ input.InvocationTime !== null && { InvocationTime: Math.round(input.InvocationTime.getTime() / 1000) })), (input.ScheduledQueryArn !== undefined &&
1462
+ input.ScheduledQueryArn !== null && { ScheduledQueryArn: input.ScheduledQueryArn }));
1463
+ };
1464
+ var serializeAws_json1_0ListScheduledQueriesRequest = function (input, context) {
1465
+ return __assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
1466
+ };
1467
+ var serializeAws_json1_0ListTagsForResourceRequest = function (input, context) {
1468
+ return __assign(__assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN }));
1469
+ };
1470
+ var serializeAws_json1_0MixedMeasureMapping = function (input, context) {
1471
+ return __assign(__assign(__assign(__assign(__assign({}, (input.MeasureName !== undefined && input.MeasureName !== null && { MeasureName: input.MeasureName })), (input.MeasureValueType !== undefined &&
1472
+ input.MeasureValueType !== null && { MeasureValueType: input.MeasureValueType })), (input.MultiMeasureAttributeMappings !== undefined &&
1473
+ input.MultiMeasureAttributeMappings !== null && {
1474
+ MultiMeasureAttributeMappings: serializeAws_json1_0MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
1475
+ })), (input.SourceColumn !== undefined && input.SourceColumn !== null && { SourceColumn: input.SourceColumn })), (input.TargetMeasureName !== undefined &&
1476
+ input.TargetMeasureName !== null && { TargetMeasureName: input.TargetMeasureName }));
1477
+ };
1478
+ var serializeAws_json1_0MixedMeasureMappingList = function (input, context) {
1479
+ return input
1480
+ .filter(function (e) { return e != null; })
1481
+ .map(function (entry) {
1482
+ if (entry === null) {
1483
+ return null;
1484
+ }
1485
+ return serializeAws_json1_0MixedMeasureMapping(entry, context);
1486
+ });
1487
+ };
1488
+ var serializeAws_json1_0MultiMeasureAttributeMapping = function (input, context) {
1489
+ return __assign(__assign(__assign({}, (input.MeasureValueType !== undefined &&
1490
+ input.MeasureValueType !== null && { MeasureValueType: input.MeasureValueType })), (input.SourceColumn !== undefined && input.SourceColumn !== null && { SourceColumn: input.SourceColumn })), (input.TargetMultiMeasureAttributeName !== undefined &&
1491
+ input.TargetMultiMeasureAttributeName !== null && {
1492
+ TargetMultiMeasureAttributeName: input.TargetMultiMeasureAttributeName,
1493
+ }));
1494
+ };
1495
+ var serializeAws_json1_0MultiMeasureAttributeMappingList = function (input, context) {
1496
+ return input
1497
+ .filter(function (e) { return e != null; })
1498
+ .map(function (entry) {
1499
+ if (entry === null) {
1500
+ return null;
1501
+ }
1502
+ return serializeAws_json1_0MultiMeasureAttributeMapping(entry, context);
1503
+ });
1504
+ };
1505
+ var serializeAws_json1_0MultiMeasureMappings = function (input, context) {
1506
+ return __assign(__assign({}, (input.MultiMeasureAttributeMappings !== undefined &&
1507
+ input.MultiMeasureAttributeMappings !== null && {
1508
+ MultiMeasureAttributeMappings: serializeAws_json1_0MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context),
1509
+ })), (input.TargetMultiMeasureName !== undefined &&
1510
+ input.TargetMultiMeasureName !== null && { TargetMultiMeasureName: input.TargetMultiMeasureName }));
1511
+ };
1512
+ var serializeAws_json1_0NotificationConfiguration = function (input, context) {
1513
+ return __assign({}, (input.SnsConfiguration !== undefined &&
1514
+ input.SnsConfiguration !== null && {
1515
+ SnsConfiguration: serializeAws_json1_0SnsConfiguration(input.SnsConfiguration, context),
1516
+ }));
1517
+ };
1518
+ var serializeAws_json1_0PrepareQueryRequest = function (input, context) {
1519
+ return __assign(__assign({}, (input.QueryString !== undefined && input.QueryString !== null && { QueryString: input.QueryString })), (input.ValidateOnly !== undefined && input.ValidateOnly !== null && { ValidateOnly: input.ValidateOnly }));
1520
+ };
371
1521
  var serializeAws_json1_0QueryRequest = function (input, context) {
372
1522
  var _a;
373
1523
  return __assign(__assign(__assign({ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.MaxRows !== undefined && input.MaxRows !== null && { MaxRows: input.MaxRows })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.QueryString !== undefined && input.QueryString !== null && { QueryString: input.QueryString }));
374
1524
  };
1525
+ var serializeAws_json1_0S3Configuration = function (input, context) {
1526
+ return __assign(__assign(__assign({}, (input.BucketName !== undefined && input.BucketName !== null && { BucketName: input.BucketName })), (input.EncryptionOption !== undefined &&
1527
+ input.EncryptionOption !== null && { EncryptionOption: input.EncryptionOption })), (input.ObjectKeyPrefix !== undefined &&
1528
+ input.ObjectKeyPrefix !== null && { ObjectKeyPrefix: input.ObjectKeyPrefix }));
1529
+ };
1530
+ var serializeAws_json1_0ScheduleConfiguration = function (input, context) {
1531
+ return __assign({}, (input.ScheduleExpression !== undefined &&
1532
+ input.ScheduleExpression !== null && { ScheduleExpression: input.ScheduleExpression }));
1533
+ };
1534
+ var serializeAws_json1_0SnsConfiguration = function (input, context) {
1535
+ return __assign({}, (input.TopicArn !== undefined && input.TopicArn !== null && { TopicArn: input.TopicArn }));
1536
+ };
1537
+ var serializeAws_json1_0Tag = function (input, context) {
1538
+ return __assign(__assign({}, (input.Key !== undefined && input.Key !== null && { Key: input.Key })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
1539
+ };
1540
+ var serializeAws_json1_0TagKeyList = function (input, context) {
1541
+ return input
1542
+ .filter(function (e) { return e != null; })
1543
+ .map(function (entry) {
1544
+ if (entry === null) {
1545
+ return null;
1546
+ }
1547
+ return entry;
1548
+ });
1549
+ };
1550
+ var serializeAws_json1_0TagList = function (input, context) {
1551
+ return input
1552
+ .filter(function (e) { return e != null; })
1553
+ .map(function (entry) {
1554
+ if (entry === null) {
1555
+ return null;
1556
+ }
1557
+ return serializeAws_json1_0Tag(entry, context);
1558
+ });
1559
+ };
1560
+ var serializeAws_json1_0TagResourceRequest = function (input, context) {
1561
+ return __assign(__assign({}, (input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }));
1562
+ };
1563
+ var serializeAws_json1_0TargetConfiguration = function (input, context) {
1564
+ return __assign({}, (input.TimestreamConfiguration !== undefined &&
1565
+ input.TimestreamConfiguration !== null && {
1566
+ TimestreamConfiguration: serializeAws_json1_0TimestreamConfiguration(input.TimestreamConfiguration, context),
1567
+ }));
1568
+ };
1569
+ var serializeAws_json1_0TimestreamConfiguration = function (input, context) {
1570
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DatabaseName !== undefined && input.DatabaseName !== null && { DatabaseName: input.DatabaseName })), (input.DimensionMappings !== undefined &&
1571
+ input.DimensionMappings !== null && {
1572
+ DimensionMappings: serializeAws_json1_0DimensionMappingList(input.DimensionMappings, context),
1573
+ })), (input.MeasureNameColumn !== undefined &&
1574
+ input.MeasureNameColumn !== null && { MeasureNameColumn: input.MeasureNameColumn })), (input.MixedMeasureMappings !== undefined &&
1575
+ input.MixedMeasureMappings !== null && {
1576
+ MixedMeasureMappings: serializeAws_json1_0MixedMeasureMappingList(input.MixedMeasureMappings, context),
1577
+ })), (input.MultiMeasureMappings !== undefined &&
1578
+ input.MultiMeasureMappings !== null && {
1579
+ MultiMeasureMappings: serializeAws_json1_0MultiMeasureMappings(input.MultiMeasureMappings, context),
1580
+ })), (input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName })), (input.TimeColumn !== undefined && input.TimeColumn !== null && { TimeColumn: input.TimeColumn }));
1581
+ };
1582
+ var serializeAws_json1_0UntagResourceRequest = function (input, context) {
1583
+ return __assign(__assign({}, (input.ResourceARN !== undefined && input.ResourceARN !== null && { ResourceARN: input.ResourceARN })), (input.TagKeys !== undefined &&
1584
+ input.TagKeys !== null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }));
1585
+ };
1586
+ var serializeAws_json1_0UpdateScheduledQueryRequest = function (input, context) {
1587
+ return __assign(__assign({}, (input.ScheduledQueryArn !== undefined &&
1588
+ input.ScheduledQueryArn !== null && { ScheduledQueryArn: input.ScheduledQueryArn })), (input.State !== undefined && input.State !== null && { State: input.State }));
1589
+ };
375
1590
  var deserializeAws_json1_0AccessDeniedException = function (output, context) {
376
1591
  return {
377
1592
  Message: __expectString(output.Message),
@@ -403,6 +1618,11 @@ var deserializeAws_json1_0ConflictException = function (output, context) {
403
1618
  Message: __expectString(output.Message),
404
1619
  };
405
1620
  };
1621
+ var deserializeAws_json1_0CreateScheduledQueryResponse = function (output, context) {
1622
+ return {
1623
+ Arn: __expectString(output.Arn),
1624
+ };
1625
+ };
406
1626
  var deserializeAws_json1_0Datum = function (output, context) {
407
1627
  return {
408
1628
  ArrayValue: output.ArrayValue !== undefined && output.ArrayValue !== null
@@ -435,6 +1655,29 @@ var deserializeAws_json1_0DescribeEndpointsResponse = function (output, context)
435
1655
  : undefined,
436
1656
  };
437
1657
  };
1658
+ var deserializeAws_json1_0DescribeScheduledQueryResponse = function (output, context) {
1659
+ return {
1660
+ ScheduledQuery: output.ScheduledQuery !== undefined && output.ScheduledQuery !== null
1661
+ ? deserializeAws_json1_0ScheduledQueryDescription(output.ScheduledQuery, context)
1662
+ : undefined,
1663
+ };
1664
+ };
1665
+ var deserializeAws_json1_0DimensionMapping = function (output, context) {
1666
+ return {
1667
+ DimensionValueType: __expectString(output.DimensionValueType),
1668
+ Name: __expectString(output.Name),
1669
+ };
1670
+ };
1671
+ var deserializeAws_json1_0DimensionMappingList = function (output, context) {
1672
+ return (output || [])
1673
+ .filter(function (e) { return e != null; })
1674
+ .map(function (entry) {
1675
+ if (entry === null) {
1676
+ return null;
1677
+ }
1678
+ return deserializeAws_json1_0DimensionMapping(entry, context);
1679
+ });
1680
+ };
438
1681
  var deserializeAws_json1_0Endpoint = function (output, context) {
439
1682
  return {
440
1683
  Address: __expectString(output.Address),
@@ -451,6 +1694,29 @@ var deserializeAws_json1_0Endpoints = function (output, context) {
451
1694
  return deserializeAws_json1_0Endpoint(entry, context);
452
1695
  });
453
1696
  };
1697
+ var deserializeAws_json1_0ErrorReportConfiguration = function (output, context) {
1698
+ return {
1699
+ S3Configuration: output.S3Configuration !== undefined && output.S3Configuration !== null
1700
+ ? deserializeAws_json1_0S3Configuration(output.S3Configuration, context)
1701
+ : undefined,
1702
+ };
1703
+ };
1704
+ var deserializeAws_json1_0ErrorReportLocation = function (output, context) {
1705
+ return {
1706
+ S3ReportLocation: output.S3ReportLocation !== undefined && output.S3ReportLocation !== null
1707
+ ? deserializeAws_json1_0S3ReportLocation(output.S3ReportLocation, context)
1708
+ : undefined,
1709
+ };
1710
+ };
1711
+ var deserializeAws_json1_0ExecutionStats = function (output, context) {
1712
+ return {
1713
+ BytesMetered: __expectLong(output.BytesMetered),
1714
+ DataWrites: __expectLong(output.DataWrites),
1715
+ ExecutionTimeInMillis: __expectLong(output.ExecutionTimeInMillis),
1716
+ QueryResultRows: __expectLong(output.QueryResultRows),
1717
+ RecordsIngested: __expectLong(output.RecordsIngested),
1718
+ };
1719
+ };
454
1720
  var deserializeAws_json1_0InternalServerException = function (output, context) {
455
1721
  return {
456
1722
  Message: __expectString(output.Message),
@@ -461,6 +1727,102 @@ var deserializeAws_json1_0InvalidEndpointException = function (output, context)
461
1727
  Message: __expectString(output.Message),
462
1728
  };
463
1729
  };
1730
+ var deserializeAws_json1_0ListScheduledQueriesResponse = function (output, context) {
1731
+ return {
1732
+ NextToken: __expectString(output.NextToken),
1733
+ ScheduledQueries: output.ScheduledQueries !== undefined && output.ScheduledQueries !== null
1734
+ ? deserializeAws_json1_0ScheduledQueryList(output.ScheduledQueries, context)
1735
+ : undefined,
1736
+ };
1737
+ };
1738
+ var deserializeAws_json1_0ListTagsForResourceResponse = function (output, context) {
1739
+ return {
1740
+ NextToken: __expectString(output.NextToken),
1741
+ Tags: output.Tags !== undefined && output.Tags !== null
1742
+ ? deserializeAws_json1_0TagList(output.Tags, context)
1743
+ : undefined,
1744
+ };
1745
+ };
1746
+ var deserializeAws_json1_0MixedMeasureMapping = function (output, context) {
1747
+ return {
1748
+ MeasureName: __expectString(output.MeasureName),
1749
+ MeasureValueType: __expectString(output.MeasureValueType),
1750
+ MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings !== undefined && output.MultiMeasureAttributeMappings !== null
1751
+ ? deserializeAws_json1_0MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
1752
+ : undefined,
1753
+ SourceColumn: __expectString(output.SourceColumn),
1754
+ TargetMeasureName: __expectString(output.TargetMeasureName),
1755
+ };
1756
+ };
1757
+ var deserializeAws_json1_0MixedMeasureMappingList = function (output, context) {
1758
+ return (output || [])
1759
+ .filter(function (e) { return e != null; })
1760
+ .map(function (entry) {
1761
+ if (entry === null) {
1762
+ return null;
1763
+ }
1764
+ return deserializeAws_json1_0MixedMeasureMapping(entry, context);
1765
+ });
1766
+ };
1767
+ var deserializeAws_json1_0MultiMeasureAttributeMapping = function (output, context) {
1768
+ return {
1769
+ MeasureValueType: __expectString(output.MeasureValueType),
1770
+ SourceColumn: __expectString(output.SourceColumn),
1771
+ TargetMultiMeasureAttributeName: __expectString(output.TargetMultiMeasureAttributeName),
1772
+ };
1773
+ };
1774
+ var deserializeAws_json1_0MultiMeasureAttributeMappingList = function (output, context) {
1775
+ return (output || [])
1776
+ .filter(function (e) { return e != null; })
1777
+ .map(function (entry) {
1778
+ if (entry === null) {
1779
+ return null;
1780
+ }
1781
+ return deserializeAws_json1_0MultiMeasureAttributeMapping(entry, context);
1782
+ });
1783
+ };
1784
+ var deserializeAws_json1_0MultiMeasureMappings = function (output, context) {
1785
+ return {
1786
+ MultiMeasureAttributeMappings: output.MultiMeasureAttributeMappings !== undefined && output.MultiMeasureAttributeMappings !== null
1787
+ ? deserializeAws_json1_0MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context)
1788
+ : undefined,
1789
+ TargetMultiMeasureName: __expectString(output.TargetMultiMeasureName),
1790
+ };
1791
+ };
1792
+ var deserializeAws_json1_0NotificationConfiguration = function (output, context) {
1793
+ return {
1794
+ SnsConfiguration: output.SnsConfiguration !== undefined && output.SnsConfiguration !== null
1795
+ ? deserializeAws_json1_0SnsConfiguration(output.SnsConfiguration, context)
1796
+ : undefined,
1797
+ };
1798
+ };
1799
+ var deserializeAws_json1_0ParameterMapping = function (output, context) {
1800
+ return {
1801
+ Name: __expectString(output.Name),
1802
+ Type: output.Type !== undefined && output.Type !== null ? deserializeAws_json1_0Type(output.Type, context) : undefined,
1803
+ };
1804
+ };
1805
+ var deserializeAws_json1_0ParameterMappingList = function (output, context) {
1806
+ return (output || [])
1807
+ .filter(function (e) { return e != null; })
1808
+ .map(function (entry) {
1809
+ if (entry === null) {
1810
+ return null;
1811
+ }
1812
+ return deserializeAws_json1_0ParameterMapping(entry, context);
1813
+ });
1814
+ };
1815
+ var deserializeAws_json1_0PrepareQueryResponse = function (output, context) {
1816
+ return {
1817
+ Columns: output.Columns !== undefined && output.Columns !== null
1818
+ ? deserializeAws_json1_0SelectColumnList(output.Columns, context)
1819
+ : undefined,
1820
+ Parameters: output.Parameters !== undefined && output.Parameters !== null
1821
+ ? deserializeAws_json1_0ParameterMappingList(output.Parameters, context)
1822
+ : undefined,
1823
+ QueryString: __expectString(output.QueryString),
1824
+ };
1825
+ };
464
1826
  var deserializeAws_json1_0QueryExecutionException = function (output, context) {
465
1827
  return {
466
1828
  Message: __expectString(output.Message),
@@ -488,6 +1850,12 @@ var deserializeAws_json1_0QueryStatus = function (output, context) {
488
1850
  ProgressPercentage: __limitedParseDouble(output.ProgressPercentage),
489
1851
  };
490
1852
  };
1853
+ var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
1854
+ return {
1855
+ Message: __expectString(output.Message),
1856
+ ScheduledQueryArn: __expectString(output.ScheduledQueryArn),
1857
+ };
1858
+ };
491
1859
  var deserializeAws_json1_0Row = function (output, context) {
492
1860
  return {
493
1861
  Data: output.Data !== undefined && output.Data !== null
@@ -505,6 +1873,184 @@ var deserializeAws_json1_0RowList = function (output, context) {
505
1873
  return deserializeAws_json1_0Row(entry, context);
506
1874
  });
507
1875
  };
1876
+ var deserializeAws_json1_0S3Configuration = function (output, context) {
1877
+ return {
1878
+ BucketName: __expectString(output.BucketName),
1879
+ EncryptionOption: __expectString(output.EncryptionOption),
1880
+ ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix),
1881
+ };
1882
+ };
1883
+ var deserializeAws_json1_0S3ReportLocation = function (output, context) {
1884
+ return {
1885
+ BucketName: __expectString(output.BucketName),
1886
+ ObjectKey: __expectString(output.ObjectKey),
1887
+ };
1888
+ };
1889
+ var deserializeAws_json1_0ScheduleConfiguration = function (output, context) {
1890
+ return {
1891
+ ScheduleExpression: __expectString(output.ScheduleExpression),
1892
+ };
1893
+ };
1894
+ var deserializeAws_json1_0ScheduledQuery = function (output, context) {
1895
+ return {
1896
+ Arn: __expectString(output.Arn),
1897
+ CreationTime: output.CreationTime !== undefined && output.CreationTime !== null
1898
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
1899
+ : undefined,
1900
+ ErrorReportConfiguration: output.ErrorReportConfiguration !== undefined && output.ErrorReportConfiguration !== null
1901
+ ? deserializeAws_json1_0ErrorReportConfiguration(output.ErrorReportConfiguration, context)
1902
+ : undefined,
1903
+ LastRunStatus: __expectString(output.LastRunStatus),
1904
+ Name: __expectString(output.Name),
1905
+ NextInvocationTime: output.NextInvocationTime !== undefined && output.NextInvocationTime !== null
1906
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextInvocationTime)))
1907
+ : undefined,
1908
+ PreviousInvocationTime: output.PreviousInvocationTime !== undefined && output.PreviousInvocationTime !== null
1909
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PreviousInvocationTime)))
1910
+ : undefined,
1911
+ State: __expectString(output.State),
1912
+ TargetDestination: output.TargetDestination !== undefined && output.TargetDestination !== null
1913
+ ? deserializeAws_json1_0TargetDestination(output.TargetDestination, context)
1914
+ : undefined,
1915
+ };
1916
+ };
1917
+ var deserializeAws_json1_0ScheduledQueryDescription = function (output, context) {
1918
+ return {
1919
+ Arn: __expectString(output.Arn),
1920
+ CreationTime: output.CreationTime !== undefined && output.CreationTime !== null
1921
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
1922
+ : undefined,
1923
+ ErrorReportConfiguration: output.ErrorReportConfiguration !== undefined && output.ErrorReportConfiguration !== null
1924
+ ? deserializeAws_json1_0ErrorReportConfiguration(output.ErrorReportConfiguration, context)
1925
+ : undefined,
1926
+ KmsKeyId: __expectString(output.KmsKeyId),
1927
+ LastRunSummary: output.LastRunSummary !== undefined && output.LastRunSummary !== null
1928
+ ? deserializeAws_json1_0ScheduledQueryRunSummary(output.LastRunSummary, context)
1929
+ : undefined,
1930
+ Name: __expectString(output.Name),
1931
+ NextInvocationTime: output.NextInvocationTime !== undefined && output.NextInvocationTime !== null
1932
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextInvocationTime)))
1933
+ : undefined,
1934
+ NotificationConfiguration: output.NotificationConfiguration !== undefined && output.NotificationConfiguration !== null
1935
+ ? deserializeAws_json1_0NotificationConfiguration(output.NotificationConfiguration, context)
1936
+ : undefined,
1937
+ PreviousInvocationTime: output.PreviousInvocationTime !== undefined && output.PreviousInvocationTime !== null
1938
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PreviousInvocationTime)))
1939
+ : undefined,
1940
+ QueryString: __expectString(output.QueryString),
1941
+ RecentlyFailedRuns: output.RecentlyFailedRuns !== undefined && output.RecentlyFailedRuns !== null
1942
+ ? deserializeAws_json1_0ScheduledQueryRunSummaryList(output.RecentlyFailedRuns, context)
1943
+ : undefined,
1944
+ ScheduleConfiguration: output.ScheduleConfiguration !== undefined && output.ScheduleConfiguration !== null
1945
+ ? deserializeAws_json1_0ScheduleConfiguration(output.ScheduleConfiguration, context)
1946
+ : undefined,
1947
+ ScheduledQueryExecutionRoleArn: __expectString(output.ScheduledQueryExecutionRoleArn),
1948
+ State: __expectString(output.State),
1949
+ TargetConfiguration: output.TargetConfiguration !== undefined && output.TargetConfiguration !== null
1950
+ ? deserializeAws_json1_0TargetConfiguration(output.TargetConfiguration, context)
1951
+ : undefined,
1952
+ };
1953
+ };
1954
+ var deserializeAws_json1_0ScheduledQueryList = function (output, context) {
1955
+ return (output || [])
1956
+ .filter(function (e) { return e != null; })
1957
+ .map(function (entry) {
1958
+ if (entry === null) {
1959
+ return null;
1960
+ }
1961
+ return deserializeAws_json1_0ScheduledQuery(entry, context);
1962
+ });
1963
+ };
1964
+ var deserializeAws_json1_0ScheduledQueryRunSummary = function (output, context) {
1965
+ return {
1966
+ ErrorReportLocation: output.ErrorReportLocation !== undefined && output.ErrorReportLocation !== null
1967
+ ? deserializeAws_json1_0ErrorReportLocation(output.ErrorReportLocation, context)
1968
+ : undefined,
1969
+ ExecutionStats: output.ExecutionStats !== undefined && output.ExecutionStats !== null
1970
+ ? deserializeAws_json1_0ExecutionStats(output.ExecutionStats, context)
1971
+ : undefined,
1972
+ FailureReason: __expectString(output.FailureReason),
1973
+ InvocationTime: output.InvocationTime !== undefined && output.InvocationTime !== null
1974
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InvocationTime)))
1975
+ : undefined,
1976
+ RunStatus: __expectString(output.RunStatus),
1977
+ TriggerTime: output.TriggerTime !== undefined && output.TriggerTime !== null
1978
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TriggerTime)))
1979
+ : undefined,
1980
+ };
1981
+ };
1982
+ var deserializeAws_json1_0ScheduledQueryRunSummaryList = function (output, context) {
1983
+ return (output || [])
1984
+ .filter(function (e) { return e != null; })
1985
+ .map(function (entry) {
1986
+ if (entry === null) {
1987
+ return null;
1988
+ }
1989
+ return deserializeAws_json1_0ScheduledQueryRunSummary(entry, context);
1990
+ });
1991
+ };
1992
+ var deserializeAws_json1_0SelectColumn = function (output, context) {
1993
+ return {
1994
+ Aliased: __expectBoolean(output.Aliased),
1995
+ DatabaseName: __expectString(output.DatabaseName),
1996
+ Name: __expectString(output.Name),
1997
+ TableName: __expectString(output.TableName),
1998
+ Type: output.Type !== undefined && output.Type !== null ? deserializeAws_json1_0Type(output.Type, context) : undefined,
1999
+ };
2000
+ };
2001
+ var deserializeAws_json1_0SelectColumnList = function (output, context) {
2002
+ return (output || [])
2003
+ .filter(function (e) { return e != null; })
2004
+ .map(function (entry) {
2005
+ if (entry === null) {
2006
+ return null;
2007
+ }
2008
+ return deserializeAws_json1_0SelectColumn(entry, context);
2009
+ });
2010
+ };
2011
+ var deserializeAws_json1_0ServiceQuotaExceededException = function (output, context) {
2012
+ return {
2013
+ Message: __expectString(output.Message),
2014
+ };
2015
+ };
2016
+ var deserializeAws_json1_0SnsConfiguration = function (output, context) {
2017
+ return {
2018
+ TopicArn: __expectString(output.TopicArn),
2019
+ };
2020
+ };
2021
+ var deserializeAws_json1_0Tag = function (output, context) {
2022
+ return {
2023
+ Key: __expectString(output.Key),
2024
+ Value: __expectString(output.Value),
2025
+ };
2026
+ };
2027
+ var deserializeAws_json1_0TagList = function (output, context) {
2028
+ return (output || [])
2029
+ .filter(function (e) { return e != null; })
2030
+ .map(function (entry) {
2031
+ if (entry === null) {
2032
+ return null;
2033
+ }
2034
+ return deserializeAws_json1_0Tag(entry, context);
2035
+ });
2036
+ };
2037
+ var deserializeAws_json1_0TagResourceResponse = function (output, context) {
2038
+ return {};
2039
+ };
2040
+ var deserializeAws_json1_0TargetConfiguration = function (output, context) {
2041
+ return {
2042
+ TimestreamConfiguration: output.TimestreamConfiguration !== undefined && output.TimestreamConfiguration !== null
2043
+ ? deserializeAws_json1_0TimestreamConfiguration(output.TimestreamConfiguration, context)
2044
+ : undefined,
2045
+ };
2046
+ };
2047
+ var deserializeAws_json1_0TargetDestination = function (output, context) {
2048
+ return {
2049
+ TimestreamDestination: output.TimestreamDestination !== undefined && output.TimestreamDestination !== null
2050
+ ? deserializeAws_json1_0TimestreamDestination(output.TimestreamDestination, context)
2051
+ : undefined,
2052
+ };
2053
+ };
508
2054
  var deserializeAws_json1_0ThrottlingException = function (output, context) {
509
2055
  return {
510
2056
  Message: __expectString(output.Message),
@@ -528,6 +2074,29 @@ var deserializeAws_json1_0TimeSeriesDataPointList = function (output, context) {
528
2074
  return deserializeAws_json1_0TimeSeriesDataPoint(entry, context);
529
2075
  });
530
2076
  };
2077
+ var deserializeAws_json1_0TimestreamConfiguration = function (output, context) {
2078
+ return {
2079
+ DatabaseName: __expectString(output.DatabaseName),
2080
+ DimensionMappings: output.DimensionMappings !== undefined && output.DimensionMappings !== null
2081
+ ? deserializeAws_json1_0DimensionMappingList(output.DimensionMappings, context)
2082
+ : undefined,
2083
+ MeasureNameColumn: __expectString(output.MeasureNameColumn),
2084
+ MixedMeasureMappings: output.MixedMeasureMappings !== undefined && output.MixedMeasureMappings !== null
2085
+ ? deserializeAws_json1_0MixedMeasureMappingList(output.MixedMeasureMappings, context)
2086
+ : undefined,
2087
+ MultiMeasureMappings: output.MultiMeasureMappings !== undefined && output.MultiMeasureMappings !== null
2088
+ ? deserializeAws_json1_0MultiMeasureMappings(output.MultiMeasureMappings, context)
2089
+ : undefined,
2090
+ TableName: __expectString(output.TableName),
2091
+ TimeColumn: __expectString(output.TimeColumn),
2092
+ };
2093
+ };
2094
+ var deserializeAws_json1_0TimestreamDestination = function (output, context) {
2095
+ return {
2096
+ DatabaseName: __expectString(output.DatabaseName),
2097
+ TableName: __expectString(output.TableName),
2098
+ };
2099
+ };
531
2100
  var deserializeAws_json1_0Type = function (output, context) {
532
2101
  return {
533
2102
  ArrayColumnInfo: output.ArrayColumnInfo !== undefined && output.ArrayColumnInfo !== null
@@ -542,6 +2111,9 @@ var deserializeAws_json1_0Type = function (output, context) {
542
2111
  : undefined,
543
2112
  };
544
2113
  };
2114
+ var deserializeAws_json1_0UntagResourceResponse = function (output, context) {
2115
+ return {};
2116
+ };
545
2117
  var deserializeAws_json1_0ValidationException = function (output, context) {
546
2118
  return {
547
2119
  Message: __expectString(output.Message),