@aws-sdk/client-timestream-write 3.181.0 → 3.183.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist-es/TimestreamWrite.js +62 -69
  3. package/dist-es/TimestreamWriteClient.js +23 -29
  4. package/dist-es/commands/CreateDatabaseCommand.js +22 -29
  5. package/dist-es/commands/CreateTableCommand.js +22 -29
  6. package/dist-es/commands/DeleteDatabaseCommand.js +23 -30
  7. package/dist-es/commands/DeleteTableCommand.js +23 -30
  8. package/dist-es/commands/DescribeDatabaseCommand.js +22 -29
  9. package/dist-es/commands/DescribeEndpointsCommand.js +21 -28
  10. package/dist-es/commands/DescribeTableCommand.js +22 -29
  11. package/dist-es/commands/ListDatabasesCommand.js +22 -29
  12. package/dist-es/commands/ListTablesCommand.js +22 -29
  13. package/dist-es/commands/ListTagsForResourceCommand.js +22 -29
  14. package/dist-es/commands/TagResourceCommand.js +22 -29
  15. package/dist-es/commands/UntagResourceCommand.js +22 -29
  16. package/dist-es/commands/UpdateDatabaseCommand.js +22 -29
  17. package/dist-es/commands/UpdateTableCommand.js +22 -29
  18. package/dist-es/commands/WriteRecordsCommand.js +22 -29
  19. package/dist-es/endpoints.js +8 -8
  20. package/dist-es/models/TimestreamWriteServiceException.js +5 -10
  21. package/dist-es/models/models_0.js +232 -151
  22. package/dist-es/pagination/ListDatabasesPaginator.js +25 -68
  23. package/dist-es/pagination/ListTablesPaginator.js +25 -68
  24. package/dist-es/protocols/Aws_json1_0.js +1175 -1496
  25. package/dist-es/runtimeConfig.browser.js +27 -12
  26. package/dist-es/runtimeConfig.js +31 -12
  27. package/dist-es/runtimeConfig.native.js +8 -5
  28. package/dist-es/runtimeConfig.shared.js +8 -11
  29. package/package.json +34 -34
@@ -1,1452 +1,1154 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { AccessDeniedException, ConflictException, InternalServerException, InvalidEndpointException, RejectedRecordsException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
4
  import { TimestreamWriteServiceException as __BaseException } from "../models/TimestreamWriteServiceException";
6
- export var serializeAws_json1_0CreateDatabaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var headers, body;
8
- return __generator(this, function (_a) {
9
- headers = {
10
- "content-type": "application/x-amz-json-1.0",
11
- "x-amz-target": "Timestream_20181101.CreateDatabase",
12
- };
13
- body = JSON.stringify(serializeAws_json1_0CreateDatabaseRequest(input, context));
14
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
- });
16
- }); };
17
- export var serializeAws_json1_0CreateTableCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
- var headers, body;
19
- return __generator(this, function (_a) {
20
- headers = {
21
- "content-type": "application/x-amz-json-1.0",
22
- "x-amz-target": "Timestream_20181101.CreateTable",
23
- };
24
- body = JSON.stringify(serializeAws_json1_0CreateTableRequest(input, context));
25
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
- });
27
- }); };
28
- export var serializeAws_json1_0DeleteDatabaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
29
- var headers, body;
30
- return __generator(this, function (_a) {
31
- headers = {
32
- "content-type": "application/x-amz-json-1.0",
33
- "x-amz-target": "Timestream_20181101.DeleteDatabase",
34
- };
35
- body = JSON.stringify(serializeAws_json1_0DeleteDatabaseRequest(input, context));
36
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
37
- });
38
- }); };
39
- export var serializeAws_json1_0DeleteTableCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
40
- var headers, body;
41
- return __generator(this, function (_a) {
42
- headers = {
43
- "content-type": "application/x-amz-json-1.0",
44
- "x-amz-target": "Timestream_20181101.DeleteTable",
45
- };
46
- body = JSON.stringify(serializeAws_json1_0DeleteTableRequest(input, context));
47
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
48
- });
49
- }); };
50
- export var serializeAws_json1_0DescribeDatabaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
51
- var headers, body;
52
- return __generator(this, function (_a) {
53
- headers = {
54
- "content-type": "application/x-amz-json-1.0",
55
- "x-amz-target": "Timestream_20181101.DescribeDatabase",
56
- };
57
- body = JSON.stringify(serializeAws_json1_0DescribeDatabaseRequest(input, context));
58
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
59
- });
60
- }); };
61
- export var serializeAws_json1_0DescribeEndpointsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
62
- var headers, body;
63
- return __generator(this, function (_a) {
64
- headers = {
65
- "content-type": "application/x-amz-json-1.0",
66
- "x-amz-target": "Timestream_20181101.DescribeEndpoints",
67
- };
68
- body = JSON.stringify(serializeAws_json1_0DescribeEndpointsRequest(input, context));
69
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
70
- });
71
- }); };
72
- export var serializeAws_json1_0DescribeTableCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
73
- var headers, body;
74
- return __generator(this, function (_a) {
75
- headers = {
76
- "content-type": "application/x-amz-json-1.0",
77
- "x-amz-target": "Timestream_20181101.DescribeTable",
78
- };
79
- body = JSON.stringify(serializeAws_json1_0DescribeTableRequest(input, context));
80
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
- });
82
- }); };
83
- export var serializeAws_json1_0ListDatabasesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
84
- var headers, body;
85
- return __generator(this, function (_a) {
86
- headers = {
87
- "content-type": "application/x-amz-json-1.0",
88
- "x-amz-target": "Timestream_20181101.ListDatabases",
89
- };
90
- body = JSON.stringify(serializeAws_json1_0ListDatabasesRequest(input, context));
91
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
- });
93
- }); };
94
- export var serializeAws_json1_0ListTablesCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
95
- var headers, body;
96
- return __generator(this, function (_a) {
97
- headers = {
98
- "content-type": "application/x-amz-json-1.0",
99
- "x-amz-target": "Timestream_20181101.ListTables",
100
- };
101
- body = JSON.stringify(serializeAws_json1_0ListTablesRequest(input, context));
102
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
- });
104
- }); };
105
- export var serializeAws_json1_0ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
106
- var headers, body;
107
- return __generator(this, function (_a) {
108
- headers = {
109
- "content-type": "application/x-amz-json-1.0",
110
- "x-amz-target": "Timestream_20181101.ListTagsForResource",
111
- };
112
- body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
113
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
114
- });
115
- }); };
116
- export var serializeAws_json1_0TagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
117
- var headers, body;
118
- return __generator(this, function (_a) {
119
- headers = {
120
- "content-type": "application/x-amz-json-1.0",
121
- "x-amz-target": "Timestream_20181101.TagResource",
122
- };
123
- body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
124
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
125
- });
126
- }); };
127
- export var serializeAws_json1_0UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
128
- var headers, body;
129
- return __generator(this, function (_a) {
130
- headers = {
131
- "content-type": "application/x-amz-json-1.0",
132
- "x-amz-target": "Timestream_20181101.UntagResource",
133
- };
134
- body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
135
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
136
- });
137
- }); };
138
- export var serializeAws_json1_0UpdateDatabaseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
139
- var headers, body;
140
- return __generator(this, function (_a) {
141
- headers = {
142
- "content-type": "application/x-amz-json-1.0",
143
- "x-amz-target": "Timestream_20181101.UpdateDatabase",
144
- };
145
- body = JSON.stringify(serializeAws_json1_0UpdateDatabaseRequest(input, context));
146
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
- });
148
- }); };
149
- export var serializeAws_json1_0UpdateTableCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
150
- var headers, body;
151
- return __generator(this, function (_a) {
152
- headers = {
153
- "content-type": "application/x-amz-json-1.0",
154
- "x-amz-target": "Timestream_20181101.UpdateTable",
155
- };
156
- body = JSON.stringify(serializeAws_json1_0UpdateTableRequest(input, context));
157
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
158
- });
159
- }); };
160
- export var serializeAws_json1_0WriteRecordsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
161
- var headers, body;
162
- return __generator(this, function (_a) {
163
- headers = {
164
- "content-type": "application/x-amz-json-1.0",
165
- "x-amz-target": "Timestream_20181101.WriteRecords",
166
- };
167
- body = JSON.stringify(serializeAws_json1_0WriteRecordsRequest(input, context));
168
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
169
- });
170
- }); };
171
- export var deserializeAws_json1_0CreateDatabaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
172
- var data, contents, response;
173
- return __generator(this, function (_a) {
174
- switch (_a.label) {
175
- case 0:
176
- if (output.statusCode >= 300) {
177
- return [2, deserializeAws_json1_0CreateDatabaseCommandError(output, context)];
178
- }
179
- return [4, parseBody(output.body, context)];
180
- case 1:
181
- data = _a.sent();
182
- contents = {};
183
- contents = deserializeAws_json1_0CreateDatabaseResponse(data, context);
184
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
185
- return [2, Promise.resolve(response)];
186
- }
187
- });
188
- }); };
189
- var deserializeAws_json1_0CreateDatabaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
190
- var parsedOutput, _a, errorCode, _b, parsedBody;
191
- var _c;
192
- return __generator(this, function (_d) {
193
- switch (_d.label) {
194
- case 0:
195
- _a = [__assign({}, output)];
196
- _c = {};
197
- return [4, parseErrorBody(output.body, context)];
198
- case 1:
199
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
200
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
201
- _b = errorCode;
202
- switch (_b) {
203
- case "AccessDeniedException": return [3, 2];
204
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
205
- case "ConflictException": return [3, 4];
206
- case "com.amazonaws.timestreamwrite#ConflictException": return [3, 4];
207
- case "InternalServerException": return [3, 6];
208
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 6];
209
- case "InvalidEndpointException": return [3, 8];
210
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 8];
211
- case "ServiceQuotaExceededException": return [3, 10];
212
- case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException": return [3, 10];
213
- case "ThrottlingException": return [3, 12];
214
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 12];
215
- case "ValidationException": return [3, 14];
216
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 14];
217
- }
218
- return [3, 16];
219
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
220
- case 3: throw _d.sent();
221
- case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
222
- case 5: throw _d.sent();
223
- case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
224
- case 7: throw _d.sent();
225
- case 8: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
226
- case 9: throw _d.sent();
227
- case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
228
- case 11: throw _d.sent();
229
- case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
230
- case 13: throw _d.sent();
231
- case 14: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
232
- case 15: throw _d.sent();
233
- case 16:
234
- parsedBody = parsedOutput.body;
235
- throwDefaultError({
236
- output: output,
237
- parsedBody: parsedBody,
238
- exceptionCtor: __BaseException,
239
- errorCode: errorCode,
240
- });
241
- _d.label = 17;
242
- case 17: return [2];
243
- }
244
- });
245
- }); };
246
- export var deserializeAws_json1_0CreateTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
247
- var data, contents, response;
248
- return __generator(this, function (_a) {
249
- switch (_a.label) {
250
- case 0:
251
- if (output.statusCode >= 300) {
252
- return [2, deserializeAws_json1_0CreateTableCommandError(output, context)];
253
- }
254
- return [4, parseBody(output.body, context)];
255
- case 1:
256
- data = _a.sent();
257
- contents = {};
258
- contents = deserializeAws_json1_0CreateTableResponse(data, context);
259
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
260
- return [2, Promise.resolve(response)];
261
- }
262
- });
263
- }); };
264
- var deserializeAws_json1_0CreateTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
265
- var parsedOutput, _a, errorCode, _b, parsedBody;
266
- var _c;
267
- return __generator(this, function (_d) {
268
- switch (_d.label) {
269
- case 0:
270
- _a = [__assign({}, output)];
271
- _c = {};
272
- return [4, parseErrorBody(output.body, context)];
273
- case 1:
274
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
275
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
276
- _b = errorCode;
277
- switch (_b) {
278
- case "AccessDeniedException": return [3, 2];
279
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
280
- case "ConflictException": return [3, 4];
281
- case "com.amazonaws.timestreamwrite#ConflictException": return [3, 4];
282
- case "InternalServerException": return [3, 6];
283
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 6];
284
- case "InvalidEndpointException": return [3, 8];
285
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 8];
286
- case "ResourceNotFoundException": return [3, 10];
287
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 10];
288
- case "ServiceQuotaExceededException": return [3, 12];
289
- case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException": return [3, 12];
290
- case "ThrottlingException": return [3, 14];
291
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 14];
292
- case "ValidationException": return [3, 16];
293
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 16];
294
- }
295
- return [3, 18];
296
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
297
- case 3: throw _d.sent();
298
- case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
299
- case 5: throw _d.sent();
300
- case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
301
- case 7: throw _d.sent();
302
- case 8: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
303
- case 9: throw _d.sent();
304
- case 10: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
305
- case 11: throw _d.sent();
306
- case 12: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
307
- case 13: throw _d.sent();
308
- case 14: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
309
- case 15: throw _d.sent();
310
- case 16: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
311
- case 17: throw _d.sent();
312
- case 18:
313
- parsedBody = parsedOutput.body;
314
- throwDefaultError({
315
- output: output,
316
- parsedBody: parsedBody,
317
- exceptionCtor: __BaseException,
318
- errorCode: errorCode,
319
- });
320
- _d.label = 19;
321
- case 19: return [2];
322
- }
323
- });
324
- }); };
325
- export var deserializeAws_json1_0DeleteDatabaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
326
- var response;
327
- return __generator(this, function (_a) {
328
- switch (_a.label) {
329
- case 0:
330
- if (output.statusCode >= 300) {
331
- return [2, deserializeAws_json1_0DeleteDatabaseCommandError(output, context)];
332
- }
333
- return [4, collectBody(output.body, context)];
334
- case 1:
335
- _a.sent();
336
- response = {
337
- $metadata: deserializeMetadata(output),
338
- };
339
- return [2, Promise.resolve(response)];
340
- }
341
- });
342
- }); };
343
- var deserializeAws_json1_0DeleteDatabaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
344
- var parsedOutput, _a, errorCode, _b, parsedBody;
345
- var _c;
346
- return __generator(this, function (_d) {
347
- switch (_d.label) {
348
- case 0:
349
- _a = [__assign({}, output)];
350
- _c = {};
351
- return [4, parseErrorBody(output.body, context)];
352
- case 1:
353
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
354
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
355
- _b = errorCode;
356
- switch (_b) {
357
- case "AccessDeniedException": return [3, 2];
358
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
359
- case "InternalServerException": return [3, 4];
360
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
361
- case "InvalidEndpointException": return [3, 6];
362
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
363
- case "ResourceNotFoundException": return [3, 8];
364
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 8];
365
- case "ThrottlingException": return [3, 10];
366
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 10];
367
- case "ValidationException": return [3, 12];
368
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 12];
369
- }
370
- return [3, 14];
371
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
372
- case 3: throw _d.sent();
373
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
374
- case 5: throw _d.sent();
375
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
376
- case 7: throw _d.sent();
377
- case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
378
- case 9: throw _d.sent();
379
- case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
380
- case 11: throw _d.sent();
381
- case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
382
- case 13: throw _d.sent();
383
- case 14:
384
- parsedBody = parsedOutput.body;
385
- throwDefaultError({
386
- output: output,
387
- parsedBody: parsedBody,
388
- exceptionCtor: __BaseException,
389
- errorCode: errorCode,
390
- });
391
- _d.label = 15;
392
- case 15: return [2];
393
- }
394
- });
395
- }); };
396
- export var deserializeAws_json1_0DeleteTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
397
- var response;
398
- return __generator(this, function (_a) {
399
- switch (_a.label) {
400
- case 0:
401
- if (output.statusCode >= 300) {
402
- return [2, deserializeAws_json1_0DeleteTableCommandError(output, context)];
403
- }
404
- return [4, collectBody(output.body, context)];
405
- case 1:
406
- _a.sent();
407
- response = {
408
- $metadata: deserializeMetadata(output),
409
- };
410
- return [2, Promise.resolve(response)];
411
- }
412
- });
413
- }); };
414
- var deserializeAws_json1_0DeleteTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
415
- var parsedOutput, _a, errorCode, _b, parsedBody;
416
- var _c;
417
- return __generator(this, function (_d) {
418
- switch (_d.label) {
419
- case 0:
420
- _a = [__assign({}, output)];
421
- _c = {};
422
- return [4, parseErrorBody(output.body, context)];
423
- case 1:
424
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
425
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
426
- _b = errorCode;
427
- switch (_b) {
428
- case "AccessDeniedException": return [3, 2];
429
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
430
- case "InternalServerException": return [3, 4];
431
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
432
- case "InvalidEndpointException": return [3, 6];
433
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
434
- case "ResourceNotFoundException": return [3, 8];
435
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 8];
436
- case "ThrottlingException": return [3, 10];
437
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 10];
438
- case "ValidationException": return [3, 12];
439
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 12];
440
- }
441
- return [3, 14];
442
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
443
- case 3: throw _d.sent();
444
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
445
- case 5: throw _d.sent();
446
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
447
- case 7: throw _d.sent();
448
- case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
449
- case 9: throw _d.sent();
450
- case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
451
- case 11: throw _d.sent();
452
- case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
453
- case 13: throw _d.sent();
454
- case 14:
455
- parsedBody = parsedOutput.body;
456
- throwDefaultError({
457
- output: output,
458
- parsedBody: parsedBody,
459
- exceptionCtor: __BaseException,
460
- errorCode: errorCode,
461
- });
462
- _d.label = 15;
463
- case 15: return [2];
464
- }
465
- });
466
- }); };
467
- export var deserializeAws_json1_0DescribeDatabaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
468
- var data, contents, response;
469
- return __generator(this, function (_a) {
470
- switch (_a.label) {
471
- case 0:
472
- if (output.statusCode >= 300) {
473
- return [2, deserializeAws_json1_0DescribeDatabaseCommandError(output, context)];
474
- }
475
- return [4, parseBody(output.body, context)];
476
- case 1:
477
- data = _a.sent();
478
- contents = {};
479
- contents = deserializeAws_json1_0DescribeDatabaseResponse(data, context);
480
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
481
- return [2, Promise.resolve(response)];
482
- }
483
- });
484
- }); };
485
- var deserializeAws_json1_0DescribeDatabaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
486
- var parsedOutput, _a, errorCode, _b, parsedBody;
487
- var _c;
488
- return __generator(this, function (_d) {
489
- switch (_d.label) {
490
- case 0:
491
- _a = [__assign({}, output)];
492
- _c = {};
493
- return [4, parseErrorBody(output.body, context)];
494
- case 1:
495
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
496
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
497
- _b = errorCode;
498
- switch (_b) {
499
- case "AccessDeniedException": return [3, 2];
500
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
501
- case "InternalServerException": return [3, 4];
502
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
503
- case "InvalidEndpointException": return [3, 6];
504
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
505
- case "ResourceNotFoundException": return [3, 8];
506
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 8];
507
- case "ThrottlingException": return [3, 10];
508
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 10];
509
- case "ValidationException": return [3, 12];
510
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 12];
511
- }
512
- return [3, 14];
513
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
514
- case 3: throw _d.sent();
515
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
516
- case 5: throw _d.sent();
517
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
518
- case 7: throw _d.sent();
519
- case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
520
- case 9: throw _d.sent();
521
- case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
522
- case 11: throw _d.sent();
523
- case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
524
- case 13: throw _d.sent();
525
- case 14:
526
- parsedBody = parsedOutput.body;
527
- throwDefaultError({
528
- output: output,
529
- parsedBody: parsedBody,
530
- exceptionCtor: __BaseException,
531
- errorCode: errorCode,
532
- });
533
- _d.label = 15;
534
- case 15: return [2];
535
- }
536
- });
537
- }); };
538
- export var deserializeAws_json1_0DescribeEndpointsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
539
- var data, contents, response;
540
- return __generator(this, function (_a) {
541
- switch (_a.label) {
542
- case 0:
543
- if (output.statusCode >= 300) {
544
- return [2, deserializeAws_json1_0DescribeEndpointsCommandError(output, context)];
545
- }
546
- return [4, parseBody(output.body, context)];
547
- case 1:
548
- data = _a.sent();
549
- contents = {};
550
- contents = deserializeAws_json1_0DescribeEndpointsResponse(data, context);
551
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
552
- return [2, Promise.resolve(response)];
553
- }
554
- });
555
- }); };
556
- var deserializeAws_json1_0DescribeEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
557
- var parsedOutput, _a, errorCode, _b, parsedBody;
558
- var _c;
559
- return __generator(this, function (_d) {
560
- switch (_d.label) {
561
- case 0:
562
- _a = [__assign({}, output)];
563
- _c = {};
564
- return [4, parseErrorBody(output.body, context)];
565
- case 1:
566
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
567
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
568
- _b = errorCode;
569
- switch (_b) {
570
- case "InternalServerException": return [3, 2];
571
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 2];
572
- case "ThrottlingException": return [3, 4];
573
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 4];
574
- case "ValidationException": return [3, 6];
575
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 6];
576
- }
577
- return [3, 8];
578
- case 2: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
579
- case 3: throw _d.sent();
580
- case 4: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
581
- case 5: throw _d.sent();
582
- case 6: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
583
- case 7: throw _d.sent();
584
- case 8:
585
- parsedBody = parsedOutput.body;
586
- throwDefaultError({
587
- output: output,
588
- parsedBody: parsedBody,
589
- exceptionCtor: __BaseException,
590
- errorCode: errorCode,
591
- });
592
- _d.label = 9;
593
- case 9: return [2];
594
- }
595
- });
596
- }); };
597
- export var deserializeAws_json1_0DescribeTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
598
- var data, contents, response;
599
- return __generator(this, function (_a) {
600
- switch (_a.label) {
601
- case 0:
602
- if (output.statusCode >= 300) {
603
- return [2, deserializeAws_json1_0DescribeTableCommandError(output, context)];
604
- }
605
- return [4, parseBody(output.body, context)];
606
- case 1:
607
- data = _a.sent();
608
- contents = {};
609
- contents = deserializeAws_json1_0DescribeTableResponse(data, context);
610
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
611
- return [2, Promise.resolve(response)];
612
- }
613
- });
614
- }); };
615
- var deserializeAws_json1_0DescribeTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
616
- var parsedOutput, _a, errorCode, _b, parsedBody;
617
- var _c;
618
- return __generator(this, function (_d) {
619
- switch (_d.label) {
620
- case 0:
621
- _a = [__assign({}, output)];
622
- _c = {};
623
- return [4, parseErrorBody(output.body, context)];
624
- case 1:
625
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
626
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
627
- _b = errorCode;
628
- switch (_b) {
629
- case "AccessDeniedException": return [3, 2];
630
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
631
- case "InternalServerException": return [3, 4];
632
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
633
- case "InvalidEndpointException": return [3, 6];
634
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
635
- case "ResourceNotFoundException": return [3, 8];
636
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 8];
637
- case "ThrottlingException": return [3, 10];
638
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 10];
639
- case "ValidationException": return [3, 12];
640
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 12];
641
- }
642
- return [3, 14];
643
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
644
- case 3: throw _d.sent();
645
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
646
- case 5: throw _d.sent();
647
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
648
- case 7: throw _d.sent();
649
- case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
650
- case 9: throw _d.sent();
651
- case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
652
- case 11: throw _d.sent();
653
- case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
654
- case 13: throw _d.sent();
655
- case 14:
656
- parsedBody = parsedOutput.body;
657
- throwDefaultError({
658
- output: output,
659
- parsedBody: parsedBody,
660
- exceptionCtor: __BaseException,
661
- errorCode: errorCode,
662
- });
663
- _d.label = 15;
664
- case 15: return [2];
665
- }
666
- });
667
- }); };
668
- export var deserializeAws_json1_0ListDatabasesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
669
- var data, contents, response;
670
- return __generator(this, function (_a) {
671
- switch (_a.label) {
672
- case 0:
673
- if (output.statusCode >= 300) {
674
- return [2, deserializeAws_json1_0ListDatabasesCommandError(output, context)];
675
- }
676
- return [4, parseBody(output.body, context)];
677
- case 1:
678
- data = _a.sent();
679
- contents = {};
680
- contents = deserializeAws_json1_0ListDatabasesResponse(data, context);
681
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
682
- return [2, Promise.resolve(response)];
683
- }
684
- });
685
- }); };
686
- var deserializeAws_json1_0ListDatabasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
687
- var parsedOutput, _a, errorCode, _b, parsedBody;
688
- var _c;
689
- return __generator(this, function (_d) {
690
- switch (_d.label) {
691
- case 0:
692
- _a = [__assign({}, output)];
693
- _c = {};
694
- return [4, parseErrorBody(output.body, context)];
695
- case 1:
696
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
697
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
698
- _b = errorCode;
699
- switch (_b) {
700
- case "AccessDeniedException": return [3, 2];
701
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
702
- case "InternalServerException": return [3, 4];
703
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
704
- case "InvalidEndpointException": return [3, 6];
705
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
706
- case "ThrottlingException": return [3, 8];
707
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 8];
708
- case "ValidationException": return [3, 10];
709
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 10];
710
- }
711
- return [3, 12];
712
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
713
- case 3: throw _d.sent();
714
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
715
- case 5: throw _d.sent();
716
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
717
- case 7: throw _d.sent();
718
- case 8: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
719
- case 9: throw _d.sent();
720
- case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
721
- case 11: throw _d.sent();
722
- case 12:
723
- parsedBody = parsedOutput.body;
724
- throwDefaultError({
725
- output: output,
726
- parsedBody: parsedBody,
727
- exceptionCtor: __BaseException,
728
- errorCode: errorCode,
729
- });
730
- _d.label = 13;
731
- case 13: return [2];
732
- }
733
- });
734
- }); };
735
- export var deserializeAws_json1_0ListTablesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
736
- var data, contents, response;
737
- return __generator(this, function (_a) {
738
- switch (_a.label) {
739
- case 0:
740
- if (output.statusCode >= 300) {
741
- return [2, deserializeAws_json1_0ListTablesCommandError(output, context)];
742
- }
743
- return [4, parseBody(output.body, context)];
744
- case 1:
745
- data = _a.sent();
746
- contents = {};
747
- contents = deserializeAws_json1_0ListTablesResponse(data, context);
748
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
749
- return [2, Promise.resolve(response)];
750
- }
751
- });
752
- }); };
753
- var deserializeAws_json1_0ListTablesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
754
- var parsedOutput, _a, errorCode, _b, parsedBody;
755
- var _c;
756
- return __generator(this, function (_d) {
757
- switch (_d.label) {
758
- case 0:
759
- _a = [__assign({}, output)];
760
- _c = {};
761
- return [4, parseErrorBody(output.body, context)];
762
- case 1:
763
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
764
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
765
- _b = errorCode;
766
- switch (_b) {
767
- case "AccessDeniedException": return [3, 2];
768
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
769
- case "InternalServerException": return [3, 4];
770
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
771
- case "InvalidEndpointException": return [3, 6];
772
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
773
- case "ResourceNotFoundException": return [3, 8];
774
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 8];
775
- case "ThrottlingException": return [3, 10];
776
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 10];
777
- case "ValidationException": return [3, 12];
778
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 12];
779
- }
780
- return [3, 14];
781
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
782
- case 3: throw _d.sent();
783
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
784
- case 5: throw _d.sent();
785
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
786
- case 7: throw _d.sent();
787
- case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
788
- case 9: throw _d.sent();
789
- case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
790
- case 11: throw _d.sent();
791
- case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
792
- case 13: throw _d.sent();
793
- case 14:
794
- parsedBody = parsedOutput.body;
795
- throwDefaultError({
796
- output: output,
797
- parsedBody: parsedBody,
798
- exceptionCtor: __BaseException,
799
- errorCode: errorCode,
800
- });
801
- _d.label = 15;
802
- case 15: return [2];
803
- }
804
- });
805
- }); };
806
- export var deserializeAws_json1_0ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
807
- var data, contents, response;
808
- return __generator(this, function (_a) {
809
- switch (_a.label) {
810
- case 0:
811
- if (output.statusCode >= 300) {
812
- return [2, deserializeAws_json1_0ListTagsForResourceCommandError(output, context)];
813
- }
814
- return [4, parseBody(output.body, context)];
815
- case 1:
816
- data = _a.sent();
817
- contents = {};
818
- contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
819
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
820
- return [2, Promise.resolve(response)];
821
- }
822
- });
823
- }); };
824
- var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
825
- var parsedOutput, _a, errorCode, _b, parsedBody;
826
- var _c;
827
- return __generator(this, function (_d) {
828
- switch (_d.label) {
829
- case 0:
830
- _a = [__assign({}, output)];
831
- _c = {};
832
- return [4, parseErrorBody(output.body, context)];
833
- case 1:
834
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
835
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
836
- _b = errorCode;
837
- switch (_b) {
838
- case "InvalidEndpointException": return [3, 2];
839
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 2];
840
- case "ResourceNotFoundException": return [3, 4];
841
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 4];
842
- case "ThrottlingException": return [3, 6];
843
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 6];
844
- case "ValidationException": return [3, 8];
845
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 8];
846
- }
847
- return [3, 10];
848
- case 2: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
849
- case 3: throw _d.sent();
850
- case 4: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
851
- case 5: throw _d.sent();
852
- case 6: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
853
- case 7: throw _d.sent();
854
- case 8: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
855
- case 9: throw _d.sent();
856
- case 10:
857
- parsedBody = parsedOutput.body;
858
- throwDefaultError({
859
- output: output,
860
- parsedBody: parsedBody,
861
- exceptionCtor: __BaseException,
862
- errorCode: errorCode,
863
- });
864
- _d.label = 11;
865
- case 11: return [2];
866
- }
867
- });
868
- }); };
869
- export var deserializeAws_json1_0TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
870
- var data, contents, response;
871
- return __generator(this, function (_a) {
872
- switch (_a.label) {
873
- case 0:
874
- if (output.statusCode >= 300) {
875
- return [2, deserializeAws_json1_0TagResourceCommandError(output, context)];
876
- }
877
- return [4, parseBody(output.body, context)];
878
- case 1:
879
- data = _a.sent();
880
- contents = {};
881
- contents = deserializeAws_json1_0TagResourceResponse(data, context);
882
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
883
- return [2, Promise.resolve(response)];
884
- }
885
- });
886
- }); };
887
- var deserializeAws_json1_0TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
888
- var parsedOutput, _a, errorCode, _b, parsedBody;
889
- var _c;
890
- return __generator(this, function (_d) {
891
- switch (_d.label) {
892
- case 0:
893
- _a = [__assign({}, output)];
894
- _c = {};
895
- return [4, parseErrorBody(output.body, context)];
896
- case 1:
897
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
898
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
899
- _b = errorCode;
900
- switch (_b) {
901
- case "InvalidEndpointException": return [3, 2];
902
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 2];
903
- case "ResourceNotFoundException": return [3, 4];
904
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 4];
905
- case "ServiceQuotaExceededException": return [3, 6];
906
- case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException": return [3, 6];
907
- case "ThrottlingException": return [3, 8];
908
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 8];
909
- case "ValidationException": return [3, 10];
910
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 10];
911
- }
912
- return [3, 12];
913
- case 2: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
914
- case 3: throw _d.sent();
915
- case 4: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
916
- case 5: throw _d.sent();
917
- case 6: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
918
- case 7: throw _d.sent();
919
- case 8: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
920
- case 9: throw _d.sent();
921
- case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
922
- case 11: throw _d.sent();
923
- case 12:
924
- parsedBody = parsedOutput.body;
925
- throwDefaultError({
926
- output: output,
927
- parsedBody: parsedBody,
928
- exceptionCtor: __BaseException,
929
- errorCode: errorCode,
930
- });
931
- _d.label = 13;
932
- case 13: return [2];
933
- }
934
- });
935
- }); };
936
- export var deserializeAws_json1_0UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
937
- var data, contents, response;
938
- return __generator(this, function (_a) {
939
- switch (_a.label) {
940
- case 0:
941
- if (output.statusCode >= 300) {
942
- return [2, deserializeAws_json1_0UntagResourceCommandError(output, context)];
943
- }
944
- return [4, parseBody(output.body, context)];
945
- case 1:
946
- data = _a.sent();
947
- contents = {};
948
- contents = deserializeAws_json1_0UntagResourceResponse(data, context);
949
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
950
- return [2, Promise.resolve(response)];
951
- }
952
- });
953
- }); };
954
- var deserializeAws_json1_0UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
955
- var parsedOutput, _a, errorCode, _b, parsedBody;
956
- var _c;
957
- return __generator(this, function (_d) {
958
- switch (_d.label) {
959
- case 0:
960
- _a = [__assign({}, output)];
961
- _c = {};
962
- return [4, parseErrorBody(output.body, context)];
963
- case 1:
964
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
965
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
966
- _b = errorCode;
967
- switch (_b) {
968
- case "InvalidEndpointException": return [3, 2];
969
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 2];
970
- case "ResourceNotFoundException": return [3, 4];
971
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 4];
972
- case "ServiceQuotaExceededException": return [3, 6];
973
- case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException": return [3, 6];
974
- case "ThrottlingException": return [3, 8];
975
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 8];
976
- case "ValidationException": return [3, 10];
977
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 10];
978
- }
979
- return [3, 12];
980
- case 2: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
981
- case 3: throw _d.sent();
982
- case 4: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
983
- case 5: throw _d.sent();
984
- case 6: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
985
- case 7: throw _d.sent();
986
- case 8: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
987
- case 9: throw _d.sent();
988
- case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
989
- case 11: throw _d.sent();
990
- case 12:
991
- parsedBody = parsedOutput.body;
992
- throwDefaultError({
993
- output: output,
994
- parsedBody: parsedBody,
995
- exceptionCtor: __BaseException,
996
- errorCode: errorCode,
997
- });
998
- _d.label = 13;
999
- case 13: return [2];
1000
- }
1001
- });
1002
- }); };
1003
- export var deserializeAws_json1_0UpdateDatabaseCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1004
- var data, contents, response;
1005
- return __generator(this, function (_a) {
1006
- switch (_a.label) {
1007
- case 0:
1008
- if (output.statusCode >= 300) {
1009
- return [2, deserializeAws_json1_0UpdateDatabaseCommandError(output, context)];
1010
- }
1011
- return [4, parseBody(output.body, context)];
1012
- case 1:
1013
- data = _a.sent();
1014
- contents = {};
1015
- contents = deserializeAws_json1_0UpdateDatabaseResponse(data, context);
1016
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1017
- return [2, Promise.resolve(response)];
1018
- }
1019
- });
1020
- }); };
1021
- var deserializeAws_json1_0UpdateDatabaseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1022
- var parsedOutput, _a, errorCode, _b, parsedBody;
1023
- var _c;
1024
- return __generator(this, function (_d) {
1025
- switch (_d.label) {
1026
- case 0:
1027
- _a = [__assign({}, output)];
1028
- _c = {};
1029
- return [4, parseErrorBody(output.body, context)];
1030
- case 1:
1031
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1032
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1033
- _b = errorCode;
1034
- switch (_b) {
1035
- case "AccessDeniedException": return [3, 2];
1036
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
1037
- case "InternalServerException": return [3, 4];
1038
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
1039
- case "InvalidEndpointException": return [3, 6];
1040
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
1041
- case "ResourceNotFoundException": return [3, 8];
1042
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 8];
1043
- case "ServiceQuotaExceededException": return [3, 10];
1044
- case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException": return [3, 10];
1045
- case "ThrottlingException": return [3, 12];
1046
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 12];
1047
- case "ValidationException": return [3, 14];
1048
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 14];
1049
- }
1050
- return [3, 16];
1051
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1052
- case 3: throw _d.sent();
1053
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1054
- case 5: throw _d.sent();
1055
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
1056
- case 7: throw _d.sent();
1057
- case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1058
- case 9: throw _d.sent();
1059
- case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1060
- case 11: throw _d.sent();
1061
- case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1062
- case 13: throw _d.sent();
1063
- case 14: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1064
- case 15: throw _d.sent();
1065
- case 16:
1066
- parsedBody = parsedOutput.body;
1067
- throwDefaultError({
1068
- output: output,
1069
- parsedBody: parsedBody,
1070
- exceptionCtor: __BaseException,
1071
- errorCode: errorCode,
1072
- });
1073
- _d.label = 17;
1074
- case 17: return [2];
1075
- }
1076
- });
1077
- }); };
1078
- export var deserializeAws_json1_0UpdateTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1079
- var data, contents, response;
1080
- return __generator(this, function (_a) {
1081
- switch (_a.label) {
1082
- case 0:
1083
- if (output.statusCode >= 300) {
1084
- return [2, deserializeAws_json1_0UpdateTableCommandError(output, context)];
1085
- }
1086
- return [4, parseBody(output.body, context)];
1087
- case 1:
1088
- data = _a.sent();
1089
- contents = {};
1090
- contents = deserializeAws_json1_0UpdateTableResponse(data, context);
1091
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1092
- return [2, Promise.resolve(response)];
1093
- }
1094
- });
1095
- }); };
1096
- var deserializeAws_json1_0UpdateTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1097
- var parsedOutput, _a, errorCode, _b, parsedBody;
1098
- var _c;
1099
- return __generator(this, function (_d) {
1100
- switch (_d.label) {
1101
- case 0:
1102
- _a = [__assign({}, output)];
1103
- _c = {};
1104
- return [4, parseErrorBody(output.body, context)];
1105
- case 1:
1106
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1107
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1108
- _b = errorCode;
1109
- switch (_b) {
1110
- case "AccessDeniedException": return [3, 2];
1111
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
1112
- case "InternalServerException": return [3, 4];
1113
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
1114
- case "InvalidEndpointException": return [3, 6];
1115
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
1116
- case "ResourceNotFoundException": return [3, 8];
1117
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 8];
1118
- case "ThrottlingException": return [3, 10];
1119
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 10];
1120
- case "ValidationException": return [3, 12];
1121
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 12];
1122
- }
1123
- return [3, 14];
1124
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1125
- case 3: throw _d.sent();
1126
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1127
- case 5: throw _d.sent();
1128
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
1129
- case 7: throw _d.sent();
1130
- case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1131
- case 9: throw _d.sent();
1132
- case 10: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1133
- case 11: throw _d.sent();
1134
- case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1135
- case 13: throw _d.sent();
1136
- case 14:
1137
- parsedBody = parsedOutput.body;
1138
- throwDefaultError({
1139
- output: output,
1140
- parsedBody: parsedBody,
1141
- exceptionCtor: __BaseException,
1142
- errorCode: errorCode,
1143
- });
1144
- _d.label = 15;
1145
- case 15: return [2];
1146
- }
1147
- });
1148
- }); };
1149
- export var deserializeAws_json1_0WriteRecordsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1150
- var data, contents, response;
1151
- return __generator(this, function (_a) {
1152
- switch (_a.label) {
1153
- case 0:
1154
- if (output.statusCode >= 300) {
1155
- return [2, deserializeAws_json1_0WriteRecordsCommandError(output, context)];
1156
- }
1157
- return [4, parseBody(output.body, context)];
1158
- case 1:
1159
- data = _a.sent();
1160
- contents = {};
1161
- contents = deserializeAws_json1_0WriteRecordsResponse(data, context);
1162
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
1163
- return [2, Promise.resolve(response)];
1164
- }
1165
- });
1166
- }); };
1167
- var deserializeAws_json1_0WriteRecordsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1168
- var parsedOutput, _a, errorCode, _b, parsedBody;
1169
- var _c;
1170
- return __generator(this, function (_d) {
1171
- switch (_d.label) {
1172
- case 0:
1173
- _a = [__assign({}, output)];
1174
- _c = {};
1175
- return [4, parseErrorBody(output.body, context)];
1176
- case 1:
1177
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1178
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1179
- _b = errorCode;
1180
- switch (_b) {
1181
- case "AccessDeniedException": return [3, 2];
1182
- case "com.amazonaws.timestreamwrite#AccessDeniedException": return [3, 2];
1183
- case "InternalServerException": return [3, 4];
1184
- case "com.amazonaws.timestreamwrite#InternalServerException": return [3, 4];
1185
- case "InvalidEndpointException": return [3, 6];
1186
- case "com.amazonaws.timestreamwrite#InvalidEndpointException": return [3, 6];
1187
- case "RejectedRecordsException": return [3, 8];
1188
- case "com.amazonaws.timestreamwrite#RejectedRecordsException": return [3, 8];
1189
- case "ResourceNotFoundException": return [3, 10];
1190
- case "com.amazonaws.timestreamwrite#ResourceNotFoundException": return [3, 10];
1191
- case "ThrottlingException": return [3, 12];
1192
- case "com.amazonaws.timestreamwrite#ThrottlingException": return [3, 12];
1193
- case "ValidationException": return [3, 14];
1194
- case "com.amazonaws.timestreamwrite#ValidationException": return [3, 14];
1195
- }
1196
- return [3, 16];
1197
- case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1198
- case 3: throw _d.sent();
1199
- case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1200
- case 5: throw _d.sent();
1201
- case 6: return [4, deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context)];
1202
- case 7: throw _d.sent();
1203
- case 8: return [4, deserializeAws_json1_0RejectedRecordsExceptionResponse(parsedOutput, context)];
1204
- case 9: throw _d.sent();
1205
- case 10: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1206
- case 11: throw _d.sent();
1207
- case 12: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
1208
- case 13: throw _d.sent();
1209
- case 14: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1210
- case 15: throw _d.sent();
1211
- case 16:
1212
- parsedBody = parsedOutput.body;
1213
- throwDefaultError({
1214
- output: output,
1215
- parsedBody: parsedBody,
1216
- exceptionCtor: __BaseException,
1217
- errorCode: errorCode,
1218
- });
1219
- _d.label = 17;
1220
- case 17: return [2];
1221
- }
1222
- });
1223
- }); };
1224
- var deserializeAws_json1_0AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1225
- var body, deserialized, exception;
1226
- return __generator(this, function (_a) {
1227
- body = parsedOutput.body;
1228
- deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
1229
- exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1230
- return [2, __decorateServiceException(exception, body)];
1231
- });
1232
- }); };
1233
- var deserializeAws_json1_0ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1234
- var body, deserialized, exception;
1235
- return __generator(this, function (_a) {
1236
- body = parsedOutput.body;
1237
- deserialized = deserializeAws_json1_0ConflictException(body, context);
1238
- exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1239
- return [2, __decorateServiceException(exception, body)];
1240
- });
1241
- }); };
1242
- var deserializeAws_json1_0InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1243
- var body, deserialized, exception;
1244
- return __generator(this, function (_a) {
1245
- body = parsedOutput.body;
1246
- deserialized = deserializeAws_json1_0InternalServerException(body, context);
1247
- exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1248
- return [2, __decorateServiceException(exception, body)];
1249
- });
1250
- }); };
1251
- var deserializeAws_json1_0InvalidEndpointExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1252
- var body, deserialized, exception;
1253
- return __generator(this, function (_a) {
1254
- body = parsedOutput.body;
1255
- deserialized = deserializeAws_json1_0InvalidEndpointException(body, context);
1256
- exception = new InvalidEndpointException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1257
- return [2, __decorateServiceException(exception, body)];
1258
- });
1259
- }); };
1260
- var deserializeAws_json1_0RejectedRecordsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1261
- var body, deserialized, exception;
1262
- return __generator(this, function (_a) {
1263
- body = parsedOutput.body;
1264
- deserialized = deserializeAws_json1_0RejectedRecordsException(body, context);
1265
- exception = new RejectedRecordsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1266
- return [2, __decorateServiceException(exception, body)];
1267
- });
1268
- }); };
1269
- var deserializeAws_json1_0ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1270
- var body, deserialized, exception;
1271
- return __generator(this, function (_a) {
1272
- body = parsedOutput.body;
1273
- deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
1274
- exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1275
- return [2, __decorateServiceException(exception, body)];
1276
- });
1277
- }); };
1278
- var deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1279
- var body, deserialized, exception;
1280
- return __generator(this, function (_a) {
1281
- body = parsedOutput.body;
1282
- deserialized = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
1283
- exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1284
- return [2, __decorateServiceException(exception, body)];
1285
- });
1286
- }); };
1287
- var deserializeAws_json1_0ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1288
- var body, deserialized, exception;
1289
- return __generator(this, function (_a) {
1290
- body = parsedOutput.body;
1291
- deserialized = deserializeAws_json1_0ThrottlingException(body, context);
1292
- exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1293
- return [2, __decorateServiceException(exception, body)];
1294
- });
1295
- }); };
1296
- var deserializeAws_json1_0ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1297
- var body, deserialized, exception;
1298
- return __generator(this, function (_a) {
1299
- body = parsedOutput.body;
1300
- deserialized = deserializeAws_json1_0ValidationException(body, context);
1301
- exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1302
- return [2, __decorateServiceException(exception, body)];
1303
- });
1304
- }); };
1305
- var serializeAws_json1_0CreateDatabaseRequest = function (input, context) {
1306
- return __assign(__assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId })), (input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }));
5
+ export const serializeAws_json1_0CreateDatabaseCommand = async (input, context) => {
6
+ const headers = {
7
+ "content-type": "application/x-amz-json-1.0",
8
+ "x-amz-target": "Timestream_20181101.CreateDatabase",
9
+ };
10
+ let body;
11
+ body = JSON.stringify(serializeAws_json1_0CreateDatabaseRequest(input, context));
12
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
+ };
14
+ export const serializeAws_json1_0CreateTableCommand = async (input, context) => {
15
+ const headers = {
16
+ "content-type": "application/x-amz-json-1.0",
17
+ "x-amz-target": "Timestream_20181101.CreateTable",
18
+ };
19
+ let body;
20
+ body = JSON.stringify(serializeAws_json1_0CreateTableRequest(input, context));
21
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
+ };
23
+ export const serializeAws_json1_0DeleteDatabaseCommand = async (input, context) => {
24
+ const headers = {
25
+ "content-type": "application/x-amz-json-1.0",
26
+ "x-amz-target": "Timestream_20181101.DeleteDatabase",
27
+ };
28
+ let body;
29
+ body = JSON.stringify(serializeAws_json1_0DeleteDatabaseRequest(input, context));
30
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
+ };
32
+ export const serializeAws_json1_0DeleteTableCommand = async (input, context) => {
33
+ const headers = {
34
+ "content-type": "application/x-amz-json-1.0",
35
+ "x-amz-target": "Timestream_20181101.DeleteTable",
36
+ };
37
+ let body;
38
+ body = JSON.stringify(serializeAws_json1_0DeleteTableRequest(input, context));
39
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
+ };
41
+ export const serializeAws_json1_0DescribeDatabaseCommand = async (input, context) => {
42
+ const headers = {
43
+ "content-type": "application/x-amz-json-1.0",
44
+ "x-amz-target": "Timestream_20181101.DescribeDatabase",
45
+ };
46
+ let body;
47
+ body = JSON.stringify(serializeAws_json1_0DescribeDatabaseRequest(input, context));
48
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
+ };
50
+ export const serializeAws_json1_0DescribeEndpointsCommand = async (input, context) => {
51
+ const headers = {
52
+ "content-type": "application/x-amz-json-1.0",
53
+ "x-amz-target": "Timestream_20181101.DescribeEndpoints",
54
+ };
55
+ let body;
56
+ body = JSON.stringify(serializeAws_json1_0DescribeEndpointsRequest(input, context));
57
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
+ };
59
+ export const serializeAws_json1_0DescribeTableCommand = async (input, context) => {
60
+ const headers = {
61
+ "content-type": "application/x-amz-json-1.0",
62
+ "x-amz-target": "Timestream_20181101.DescribeTable",
63
+ };
64
+ let body;
65
+ body = JSON.stringify(serializeAws_json1_0DescribeTableRequest(input, context));
66
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
+ };
68
+ export const serializeAws_json1_0ListDatabasesCommand = async (input, context) => {
69
+ const headers = {
70
+ "content-type": "application/x-amz-json-1.0",
71
+ "x-amz-target": "Timestream_20181101.ListDatabases",
72
+ };
73
+ let body;
74
+ body = JSON.stringify(serializeAws_json1_0ListDatabasesRequest(input, context));
75
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
+ };
77
+ export const serializeAws_json1_0ListTablesCommand = async (input, context) => {
78
+ const headers = {
79
+ "content-type": "application/x-amz-json-1.0",
80
+ "x-amz-target": "Timestream_20181101.ListTables",
81
+ };
82
+ let body;
83
+ body = JSON.stringify(serializeAws_json1_0ListTablesRequest(input, context));
84
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
+ };
86
+ export const serializeAws_json1_0ListTagsForResourceCommand = async (input, context) => {
87
+ const headers = {
88
+ "content-type": "application/x-amz-json-1.0",
89
+ "x-amz-target": "Timestream_20181101.ListTagsForResource",
90
+ };
91
+ let body;
92
+ body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
93
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
+ };
95
+ export const serializeAws_json1_0TagResourceCommand = async (input, context) => {
96
+ const headers = {
97
+ "content-type": "application/x-amz-json-1.0",
98
+ "x-amz-target": "Timestream_20181101.TagResource",
99
+ };
100
+ let body;
101
+ body = JSON.stringify(serializeAws_json1_0TagResourceRequest(input, context));
102
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
103
+ };
104
+ export const serializeAws_json1_0UntagResourceCommand = async (input, context) => {
105
+ const headers = {
106
+ "content-type": "application/x-amz-json-1.0",
107
+ "x-amz-target": "Timestream_20181101.UntagResource",
108
+ };
109
+ let body;
110
+ body = JSON.stringify(serializeAws_json1_0UntagResourceRequest(input, context));
111
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
+ };
113
+ export const serializeAws_json1_0UpdateDatabaseCommand = async (input, context) => {
114
+ const headers = {
115
+ "content-type": "application/x-amz-json-1.0",
116
+ "x-amz-target": "Timestream_20181101.UpdateDatabase",
117
+ };
118
+ let body;
119
+ body = JSON.stringify(serializeAws_json1_0UpdateDatabaseRequest(input, context));
120
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
+ };
122
+ export const serializeAws_json1_0UpdateTableCommand = async (input, context) => {
123
+ const headers = {
124
+ "content-type": "application/x-amz-json-1.0",
125
+ "x-amz-target": "Timestream_20181101.UpdateTable",
126
+ };
127
+ let body;
128
+ body = JSON.stringify(serializeAws_json1_0UpdateTableRequest(input, context));
129
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
+ };
131
+ export const serializeAws_json1_0WriteRecordsCommand = async (input, context) => {
132
+ const headers = {
133
+ "content-type": "application/x-amz-json-1.0",
134
+ "x-amz-target": "Timestream_20181101.WriteRecords",
135
+ };
136
+ let body;
137
+ body = JSON.stringify(serializeAws_json1_0WriteRecordsRequest(input, context));
138
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
1307
139
  };
1308
- var serializeAws_json1_0CreateTableRequest = function (input, context) {
1309
- return __assign(__assign(__assign(__assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.MagneticStoreWriteProperties != null && {
1310
- MagneticStoreWriteProperties: serializeAws_json1_0MagneticStoreWriteProperties(input.MagneticStoreWriteProperties, context),
1311
- })), (input.RetentionProperties != null && {
1312
- RetentionProperties: serializeAws_json1_0RetentionProperties(input.RetentionProperties, context),
1313
- })), (input.TableName != null && { TableName: input.TableName })), (input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }));
140
+ export const deserializeAws_json1_0CreateDatabaseCommand = async (output, context) => {
141
+ if (output.statusCode >= 300) {
142
+ return deserializeAws_json1_0CreateDatabaseCommandError(output, context);
143
+ }
144
+ const data = await parseBody(output.body, context);
145
+ let contents = {};
146
+ contents = deserializeAws_json1_0CreateDatabaseResponse(data, context);
147
+ const response = {
148
+ $metadata: deserializeMetadata(output),
149
+ ...contents,
150
+ };
151
+ return Promise.resolve(response);
1314
152
  };
1315
- var serializeAws_json1_0DeleteDatabaseRequest = function (input, context) {
1316
- return __assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName }));
153
+ const deserializeAws_json1_0CreateDatabaseCommandError = async (output, context) => {
154
+ const parsedOutput = {
155
+ ...output,
156
+ body: await parseErrorBody(output.body, context),
157
+ };
158
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
159
+ switch (errorCode) {
160
+ case "AccessDeniedException":
161
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
162
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
163
+ case "ConflictException":
164
+ case "com.amazonaws.timestreamwrite#ConflictException":
165
+ throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
166
+ case "InternalServerException":
167
+ case "com.amazonaws.timestreamwrite#InternalServerException":
168
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
169
+ case "InvalidEndpointException":
170
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
171
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
172
+ case "ServiceQuotaExceededException":
173
+ case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
174
+ throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
175
+ case "ThrottlingException":
176
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
177
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
178
+ case "ValidationException":
179
+ case "com.amazonaws.timestreamwrite#ValidationException":
180
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
181
+ default:
182
+ const parsedBody = parsedOutput.body;
183
+ throwDefaultError({
184
+ output,
185
+ parsedBody,
186
+ exceptionCtor: __BaseException,
187
+ errorCode,
188
+ });
189
+ }
1317
190
  };
1318
- var serializeAws_json1_0DeleteTableRequest = function (input, context) {
1319
- return __assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.TableName != null && { TableName: input.TableName }));
191
+ export const deserializeAws_json1_0CreateTableCommand = async (output, context) => {
192
+ if (output.statusCode >= 300) {
193
+ return deserializeAws_json1_0CreateTableCommandError(output, context);
194
+ }
195
+ const data = await parseBody(output.body, context);
196
+ let contents = {};
197
+ contents = deserializeAws_json1_0CreateTableResponse(data, context);
198
+ const response = {
199
+ $metadata: deserializeMetadata(output),
200
+ ...contents,
201
+ };
202
+ return Promise.resolve(response);
1320
203
  };
1321
- var serializeAws_json1_0DescribeDatabaseRequest = function (input, context) {
1322
- return __assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName }));
204
+ const deserializeAws_json1_0CreateTableCommandError = async (output, context) => {
205
+ const parsedOutput = {
206
+ ...output,
207
+ body: await parseErrorBody(output.body, context),
208
+ };
209
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
210
+ switch (errorCode) {
211
+ case "AccessDeniedException":
212
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
213
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
214
+ case "ConflictException":
215
+ case "com.amazonaws.timestreamwrite#ConflictException":
216
+ throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
217
+ case "InternalServerException":
218
+ case "com.amazonaws.timestreamwrite#InternalServerException":
219
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
220
+ case "InvalidEndpointException":
221
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
222
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
223
+ case "ResourceNotFoundException":
224
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
225
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
226
+ case "ServiceQuotaExceededException":
227
+ case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
228
+ throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
229
+ case "ThrottlingException":
230
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
231
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
232
+ case "ValidationException":
233
+ case "com.amazonaws.timestreamwrite#ValidationException":
234
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
235
+ default:
236
+ const parsedBody = parsedOutput.body;
237
+ throwDefaultError({
238
+ output,
239
+ parsedBody,
240
+ exceptionCtor: __BaseException,
241
+ errorCode,
242
+ });
243
+ }
1323
244
  };
1324
- var serializeAws_json1_0DescribeEndpointsRequest = function (input, context) {
245
+ export const deserializeAws_json1_0DeleteDatabaseCommand = async (output, context) => {
246
+ if (output.statusCode >= 300) {
247
+ return deserializeAws_json1_0DeleteDatabaseCommandError(output, context);
248
+ }
249
+ await collectBody(output.body, context);
250
+ const response = {
251
+ $metadata: deserializeMetadata(output),
252
+ };
253
+ return Promise.resolve(response);
254
+ };
255
+ const deserializeAws_json1_0DeleteDatabaseCommandError = async (output, context) => {
256
+ const parsedOutput = {
257
+ ...output,
258
+ body: await parseErrorBody(output.body, context),
259
+ };
260
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
261
+ switch (errorCode) {
262
+ case "AccessDeniedException":
263
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
264
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
265
+ case "InternalServerException":
266
+ case "com.amazonaws.timestreamwrite#InternalServerException":
267
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
268
+ case "InvalidEndpointException":
269
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
270
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
271
+ case "ResourceNotFoundException":
272
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
273
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
274
+ case "ThrottlingException":
275
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
276
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
277
+ case "ValidationException":
278
+ case "com.amazonaws.timestreamwrite#ValidationException":
279
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
280
+ default:
281
+ const parsedBody = parsedOutput.body;
282
+ throwDefaultError({
283
+ output,
284
+ parsedBody,
285
+ exceptionCtor: __BaseException,
286
+ errorCode,
287
+ });
288
+ }
289
+ };
290
+ export const deserializeAws_json1_0DeleteTableCommand = async (output, context) => {
291
+ if (output.statusCode >= 300) {
292
+ return deserializeAws_json1_0DeleteTableCommandError(output, context);
293
+ }
294
+ await collectBody(output.body, context);
295
+ const response = {
296
+ $metadata: deserializeMetadata(output),
297
+ };
298
+ return Promise.resolve(response);
299
+ };
300
+ const deserializeAws_json1_0DeleteTableCommandError = async (output, context) => {
301
+ const parsedOutput = {
302
+ ...output,
303
+ body: await parseErrorBody(output.body, context),
304
+ };
305
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
306
+ switch (errorCode) {
307
+ case "AccessDeniedException":
308
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
309
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
310
+ case "InternalServerException":
311
+ case "com.amazonaws.timestreamwrite#InternalServerException":
312
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
313
+ case "InvalidEndpointException":
314
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
315
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
316
+ case "ResourceNotFoundException":
317
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
318
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
319
+ case "ThrottlingException":
320
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
321
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
322
+ case "ValidationException":
323
+ case "com.amazonaws.timestreamwrite#ValidationException":
324
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
325
+ default:
326
+ const parsedBody = parsedOutput.body;
327
+ throwDefaultError({
328
+ output,
329
+ parsedBody,
330
+ exceptionCtor: __BaseException,
331
+ errorCode,
332
+ });
333
+ }
334
+ };
335
+ export const deserializeAws_json1_0DescribeDatabaseCommand = async (output, context) => {
336
+ if (output.statusCode >= 300) {
337
+ return deserializeAws_json1_0DescribeDatabaseCommandError(output, context);
338
+ }
339
+ const data = await parseBody(output.body, context);
340
+ let contents = {};
341
+ contents = deserializeAws_json1_0DescribeDatabaseResponse(data, context);
342
+ const response = {
343
+ $metadata: deserializeMetadata(output),
344
+ ...contents,
345
+ };
346
+ return Promise.resolve(response);
347
+ };
348
+ const deserializeAws_json1_0DescribeDatabaseCommandError = async (output, context) => {
349
+ const parsedOutput = {
350
+ ...output,
351
+ body: await parseErrorBody(output.body, context),
352
+ };
353
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
354
+ switch (errorCode) {
355
+ case "AccessDeniedException":
356
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
357
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
358
+ case "InternalServerException":
359
+ case "com.amazonaws.timestreamwrite#InternalServerException":
360
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
361
+ case "InvalidEndpointException":
362
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
363
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
364
+ case "ResourceNotFoundException":
365
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
366
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
367
+ case "ThrottlingException":
368
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
369
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
370
+ case "ValidationException":
371
+ case "com.amazonaws.timestreamwrite#ValidationException":
372
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
373
+ default:
374
+ const parsedBody = parsedOutput.body;
375
+ throwDefaultError({
376
+ output,
377
+ parsedBody,
378
+ exceptionCtor: __BaseException,
379
+ errorCode,
380
+ });
381
+ }
382
+ };
383
+ export const deserializeAws_json1_0DescribeEndpointsCommand = async (output, context) => {
384
+ if (output.statusCode >= 300) {
385
+ return deserializeAws_json1_0DescribeEndpointsCommandError(output, context);
386
+ }
387
+ const data = await parseBody(output.body, context);
388
+ let contents = {};
389
+ contents = deserializeAws_json1_0DescribeEndpointsResponse(data, context);
390
+ const response = {
391
+ $metadata: deserializeMetadata(output),
392
+ ...contents,
393
+ };
394
+ return Promise.resolve(response);
395
+ };
396
+ const deserializeAws_json1_0DescribeEndpointsCommandError = async (output, context) => {
397
+ const parsedOutput = {
398
+ ...output,
399
+ body: await parseErrorBody(output.body, context),
400
+ };
401
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
+ switch (errorCode) {
403
+ case "InternalServerException":
404
+ case "com.amazonaws.timestreamwrite#InternalServerException":
405
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
406
+ case "ThrottlingException":
407
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
408
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
409
+ case "ValidationException":
410
+ case "com.amazonaws.timestreamwrite#ValidationException":
411
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
412
+ default:
413
+ const parsedBody = parsedOutput.body;
414
+ throwDefaultError({
415
+ output,
416
+ parsedBody,
417
+ exceptionCtor: __BaseException,
418
+ errorCode,
419
+ });
420
+ }
421
+ };
422
+ export const deserializeAws_json1_0DescribeTableCommand = async (output, context) => {
423
+ if (output.statusCode >= 300) {
424
+ return deserializeAws_json1_0DescribeTableCommandError(output, context);
425
+ }
426
+ const data = await parseBody(output.body, context);
427
+ let contents = {};
428
+ contents = deserializeAws_json1_0DescribeTableResponse(data, context);
429
+ const response = {
430
+ $metadata: deserializeMetadata(output),
431
+ ...contents,
432
+ };
433
+ return Promise.resolve(response);
434
+ };
435
+ const deserializeAws_json1_0DescribeTableCommandError = async (output, context) => {
436
+ const parsedOutput = {
437
+ ...output,
438
+ body: await parseErrorBody(output.body, context),
439
+ };
440
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
441
+ switch (errorCode) {
442
+ case "AccessDeniedException":
443
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
444
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
445
+ case "InternalServerException":
446
+ case "com.amazonaws.timestreamwrite#InternalServerException":
447
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
448
+ case "InvalidEndpointException":
449
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
450
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
451
+ case "ResourceNotFoundException":
452
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
453
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
454
+ case "ThrottlingException":
455
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
456
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
457
+ case "ValidationException":
458
+ case "com.amazonaws.timestreamwrite#ValidationException":
459
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
460
+ default:
461
+ const parsedBody = parsedOutput.body;
462
+ throwDefaultError({
463
+ output,
464
+ parsedBody,
465
+ exceptionCtor: __BaseException,
466
+ errorCode,
467
+ });
468
+ }
469
+ };
470
+ export const deserializeAws_json1_0ListDatabasesCommand = async (output, context) => {
471
+ if (output.statusCode >= 300) {
472
+ return deserializeAws_json1_0ListDatabasesCommandError(output, context);
473
+ }
474
+ const data = await parseBody(output.body, context);
475
+ let contents = {};
476
+ contents = deserializeAws_json1_0ListDatabasesResponse(data, context);
477
+ const response = {
478
+ $metadata: deserializeMetadata(output),
479
+ ...contents,
480
+ };
481
+ return Promise.resolve(response);
482
+ };
483
+ const deserializeAws_json1_0ListDatabasesCommandError = async (output, context) => {
484
+ const parsedOutput = {
485
+ ...output,
486
+ body: await parseErrorBody(output.body, context),
487
+ };
488
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
489
+ switch (errorCode) {
490
+ case "AccessDeniedException":
491
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
492
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
493
+ case "InternalServerException":
494
+ case "com.amazonaws.timestreamwrite#InternalServerException":
495
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
496
+ case "InvalidEndpointException":
497
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
498
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
499
+ case "ThrottlingException":
500
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
501
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
502
+ case "ValidationException":
503
+ case "com.amazonaws.timestreamwrite#ValidationException":
504
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
505
+ default:
506
+ const parsedBody = parsedOutput.body;
507
+ throwDefaultError({
508
+ output,
509
+ parsedBody,
510
+ exceptionCtor: __BaseException,
511
+ errorCode,
512
+ });
513
+ }
514
+ };
515
+ export const deserializeAws_json1_0ListTablesCommand = async (output, context) => {
516
+ if (output.statusCode >= 300) {
517
+ return deserializeAws_json1_0ListTablesCommandError(output, context);
518
+ }
519
+ const data = await parseBody(output.body, context);
520
+ let contents = {};
521
+ contents = deserializeAws_json1_0ListTablesResponse(data, context);
522
+ const response = {
523
+ $metadata: deserializeMetadata(output),
524
+ ...contents,
525
+ };
526
+ return Promise.resolve(response);
527
+ };
528
+ const deserializeAws_json1_0ListTablesCommandError = async (output, context) => {
529
+ const parsedOutput = {
530
+ ...output,
531
+ body: await parseErrorBody(output.body, context),
532
+ };
533
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
534
+ switch (errorCode) {
535
+ case "AccessDeniedException":
536
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
537
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
538
+ case "InternalServerException":
539
+ case "com.amazonaws.timestreamwrite#InternalServerException":
540
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
541
+ case "InvalidEndpointException":
542
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
543
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
544
+ case "ResourceNotFoundException":
545
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
546
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
547
+ case "ThrottlingException":
548
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
549
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
550
+ case "ValidationException":
551
+ case "com.amazonaws.timestreamwrite#ValidationException":
552
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
553
+ default:
554
+ const parsedBody = parsedOutput.body;
555
+ throwDefaultError({
556
+ output,
557
+ parsedBody,
558
+ exceptionCtor: __BaseException,
559
+ errorCode,
560
+ });
561
+ }
562
+ };
563
+ export const deserializeAws_json1_0ListTagsForResourceCommand = async (output, context) => {
564
+ if (output.statusCode >= 300) {
565
+ return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
566
+ }
567
+ const data = await parseBody(output.body, context);
568
+ let contents = {};
569
+ contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
570
+ const response = {
571
+ $metadata: deserializeMetadata(output),
572
+ ...contents,
573
+ };
574
+ return Promise.resolve(response);
575
+ };
576
+ const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, context) => {
577
+ const parsedOutput = {
578
+ ...output,
579
+ body: await parseErrorBody(output.body, context),
580
+ };
581
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
582
+ switch (errorCode) {
583
+ case "InvalidEndpointException":
584
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
585
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
586
+ case "ResourceNotFoundException":
587
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
588
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
589
+ case "ThrottlingException":
590
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
591
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
592
+ case "ValidationException":
593
+ case "com.amazonaws.timestreamwrite#ValidationException":
594
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
595
+ default:
596
+ const parsedBody = parsedOutput.body;
597
+ throwDefaultError({
598
+ output,
599
+ parsedBody,
600
+ exceptionCtor: __BaseException,
601
+ errorCode,
602
+ });
603
+ }
604
+ };
605
+ export const deserializeAws_json1_0TagResourceCommand = async (output, context) => {
606
+ if (output.statusCode >= 300) {
607
+ return deserializeAws_json1_0TagResourceCommandError(output, context);
608
+ }
609
+ const data = await parseBody(output.body, context);
610
+ let contents = {};
611
+ contents = deserializeAws_json1_0TagResourceResponse(data, context);
612
+ const response = {
613
+ $metadata: deserializeMetadata(output),
614
+ ...contents,
615
+ };
616
+ return Promise.resolve(response);
617
+ };
618
+ const deserializeAws_json1_0TagResourceCommandError = async (output, context) => {
619
+ const parsedOutput = {
620
+ ...output,
621
+ body: await parseErrorBody(output.body, context),
622
+ };
623
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
624
+ switch (errorCode) {
625
+ case "InvalidEndpointException":
626
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
627
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
628
+ case "ResourceNotFoundException":
629
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
630
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
631
+ case "ServiceQuotaExceededException":
632
+ case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
633
+ throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
634
+ case "ThrottlingException":
635
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
636
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
637
+ case "ValidationException":
638
+ case "com.amazonaws.timestreamwrite#ValidationException":
639
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
640
+ default:
641
+ const parsedBody = parsedOutput.body;
642
+ throwDefaultError({
643
+ output,
644
+ parsedBody,
645
+ exceptionCtor: __BaseException,
646
+ errorCode,
647
+ });
648
+ }
649
+ };
650
+ export const deserializeAws_json1_0UntagResourceCommand = async (output, context) => {
651
+ if (output.statusCode >= 300) {
652
+ return deserializeAws_json1_0UntagResourceCommandError(output, context);
653
+ }
654
+ const data = await parseBody(output.body, context);
655
+ let contents = {};
656
+ contents = deserializeAws_json1_0UntagResourceResponse(data, context);
657
+ const response = {
658
+ $metadata: deserializeMetadata(output),
659
+ ...contents,
660
+ };
661
+ return Promise.resolve(response);
662
+ };
663
+ const deserializeAws_json1_0UntagResourceCommandError = async (output, context) => {
664
+ const parsedOutput = {
665
+ ...output,
666
+ body: await parseErrorBody(output.body, context),
667
+ };
668
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
669
+ switch (errorCode) {
670
+ case "InvalidEndpointException":
671
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
672
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
673
+ case "ResourceNotFoundException":
674
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
675
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
676
+ case "ServiceQuotaExceededException":
677
+ case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
678
+ throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
679
+ case "ThrottlingException":
680
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
681
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
682
+ case "ValidationException":
683
+ case "com.amazonaws.timestreamwrite#ValidationException":
684
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
685
+ default:
686
+ const parsedBody = parsedOutput.body;
687
+ throwDefaultError({
688
+ output,
689
+ parsedBody,
690
+ exceptionCtor: __BaseException,
691
+ errorCode,
692
+ });
693
+ }
694
+ };
695
+ export const deserializeAws_json1_0UpdateDatabaseCommand = async (output, context) => {
696
+ if (output.statusCode >= 300) {
697
+ return deserializeAws_json1_0UpdateDatabaseCommandError(output, context);
698
+ }
699
+ const data = await parseBody(output.body, context);
700
+ let contents = {};
701
+ contents = deserializeAws_json1_0UpdateDatabaseResponse(data, context);
702
+ const response = {
703
+ $metadata: deserializeMetadata(output),
704
+ ...contents,
705
+ };
706
+ return Promise.resolve(response);
707
+ };
708
+ const deserializeAws_json1_0UpdateDatabaseCommandError = async (output, context) => {
709
+ const parsedOutput = {
710
+ ...output,
711
+ body: await parseErrorBody(output.body, context),
712
+ };
713
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
714
+ switch (errorCode) {
715
+ case "AccessDeniedException":
716
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
717
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
718
+ case "InternalServerException":
719
+ case "com.amazonaws.timestreamwrite#InternalServerException":
720
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
721
+ case "InvalidEndpointException":
722
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
723
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
724
+ case "ResourceNotFoundException":
725
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
726
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
727
+ case "ServiceQuotaExceededException":
728
+ case "com.amazonaws.timestreamwrite#ServiceQuotaExceededException":
729
+ throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
730
+ case "ThrottlingException":
731
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
732
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
733
+ case "ValidationException":
734
+ case "com.amazonaws.timestreamwrite#ValidationException":
735
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
736
+ default:
737
+ const parsedBody = parsedOutput.body;
738
+ throwDefaultError({
739
+ output,
740
+ parsedBody,
741
+ exceptionCtor: __BaseException,
742
+ errorCode,
743
+ });
744
+ }
745
+ };
746
+ export const deserializeAws_json1_0UpdateTableCommand = async (output, context) => {
747
+ if (output.statusCode >= 300) {
748
+ return deserializeAws_json1_0UpdateTableCommandError(output, context);
749
+ }
750
+ const data = await parseBody(output.body, context);
751
+ let contents = {};
752
+ contents = deserializeAws_json1_0UpdateTableResponse(data, context);
753
+ const response = {
754
+ $metadata: deserializeMetadata(output),
755
+ ...contents,
756
+ };
757
+ return Promise.resolve(response);
758
+ };
759
+ const deserializeAws_json1_0UpdateTableCommandError = async (output, context) => {
760
+ const parsedOutput = {
761
+ ...output,
762
+ body: await parseErrorBody(output.body, context),
763
+ };
764
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
765
+ switch (errorCode) {
766
+ case "AccessDeniedException":
767
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
768
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
769
+ case "InternalServerException":
770
+ case "com.amazonaws.timestreamwrite#InternalServerException":
771
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
772
+ case "InvalidEndpointException":
773
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
774
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
775
+ case "ResourceNotFoundException":
776
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
777
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
778
+ case "ThrottlingException":
779
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
780
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
781
+ case "ValidationException":
782
+ case "com.amazonaws.timestreamwrite#ValidationException":
783
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
784
+ default:
785
+ const parsedBody = parsedOutput.body;
786
+ throwDefaultError({
787
+ output,
788
+ parsedBody,
789
+ exceptionCtor: __BaseException,
790
+ errorCode,
791
+ });
792
+ }
793
+ };
794
+ export const deserializeAws_json1_0WriteRecordsCommand = async (output, context) => {
795
+ if (output.statusCode >= 300) {
796
+ return deserializeAws_json1_0WriteRecordsCommandError(output, context);
797
+ }
798
+ const data = await parseBody(output.body, context);
799
+ let contents = {};
800
+ contents = deserializeAws_json1_0WriteRecordsResponse(data, context);
801
+ const response = {
802
+ $metadata: deserializeMetadata(output),
803
+ ...contents,
804
+ };
805
+ return Promise.resolve(response);
806
+ };
807
+ const deserializeAws_json1_0WriteRecordsCommandError = async (output, context) => {
808
+ const parsedOutput = {
809
+ ...output,
810
+ body: await parseErrorBody(output.body, context),
811
+ };
812
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
813
+ switch (errorCode) {
814
+ case "AccessDeniedException":
815
+ case "com.amazonaws.timestreamwrite#AccessDeniedException":
816
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
817
+ case "InternalServerException":
818
+ case "com.amazonaws.timestreamwrite#InternalServerException":
819
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
820
+ case "InvalidEndpointException":
821
+ case "com.amazonaws.timestreamwrite#InvalidEndpointException":
822
+ throw await deserializeAws_json1_0InvalidEndpointExceptionResponse(parsedOutput, context);
823
+ case "RejectedRecordsException":
824
+ case "com.amazonaws.timestreamwrite#RejectedRecordsException":
825
+ throw await deserializeAws_json1_0RejectedRecordsExceptionResponse(parsedOutput, context);
826
+ case "ResourceNotFoundException":
827
+ case "com.amazonaws.timestreamwrite#ResourceNotFoundException":
828
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
829
+ case "ThrottlingException":
830
+ case "com.amazonaws.timestreamwrite#ThrottlingException":
831
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
832
+ case "ValidationException":
833
+ case "com.amazonaws.timestreamwrite#ValidationException":
834
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
835
+ default:
836
+ const parsedBody = parsedOutput.body;
837
+ throwDefaultError({
838
+ output,
839
+ parsedBody,
840
+ exceptionCtor: __BaseException,
841
+ errorCode,
842
+ });
843
+ }
844
+ };
845
+ const deserializeAws_json1_0AccessDeniedExceptionResponse = async (parsedOutput, context) => {
846
+ const body = parsedOutput.body;
847
+ const deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
848
+ const exception = new AccessDeniedException({
849
+ $metadata: deserializeMetadata(parsedOutput),
850
+ ...deserialized,
851
+ });
852
+ return __decorateServiceException(exception, body);
853
+ };
854
+ const deserializeAws_json1_0ConflictExceptionResponse = async (parsedOutput, context) => {
855
+ const body = parsedOutput.body;
856
+ const deserialized = deserializeAws_json1_0ConflictException(body, context);
857
+ const exception = new ConflictException({
858
+ $metadata: deserializeMetadata(parsedOutput),
859
+ ...deserialized,
860
+ });
861
+ return __decorateServiceException(exception, body);
862
+ };
863
+ const deserializeAws_json1_0InternalServerExceptionResponse = async (parsedOutput, context) => {
864
+ const body = parsedOutput.body;
865
+ const deserialized = deserializeAws_json1_0InternalServerException(body, context);
866
+ const exception = new InternalServerException({
867
+ $metadata: deserializeMetadata(parsedOutput),
868
+ ...deserialized,
869
+ });
870
+ return __decorateServiceException(exception, body);
871
+ };
872
+ const deserializeAws_json1_0InvalidEndpointExceptionResponse = async (parsedOutput, context) => {
873
+ const body = parsedOutput.body;
874
+ const deserialized = deserializeAws_json1_0InvalidEndpointException(body, context);
875
+ const exception = new InvalidEndpointException({
876
+ $metadata: deserializeMetadata(parsedOutput),
877
+ ...deserialized,
878
+ });
879
+ return __decorateServiceException(exception, body);
880
+ };
881
+ const deserializeAws_json1_0RejectedRecordsExceptionResponse = async (parsedOutput, context) => {
882
+ const body = parsedOutput.body;
883
+ const deserialized = deserializeAws_json1_0RejectedRecordsException(body, context);
884
+ const exception = new RejectedRecordsException({
885
+ $metadata: deserializeMetadata(parsedOutput),
886
+ ...deserialized,
887
+ });
888
+ return __decorateServiceException(exception, body);
889
+ };
890
+ const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
891
+ const body = parsedOutput.body;
892
+ const deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
893
+ const exception = new ResourceNotFoundException({
894
+ $metadata: deserializeMetadata(parsedOutput),
895
+ ...deserialized,
896
+ });
897
+ return __decorateServiceException(exception, body);
898
+ };
899
+ const deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
900
+ const body = parsedOutput.body;
901
+ const deserialized = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
902
+ const exception = new ServiceQuotaExceededException({
903
+ $metadata: deserializeMetadata(parsedOutput),
904
+ ...deserialized,
905
+ });
906
+ return __decorateServiceException(exception, body);
907
+ };
908
+ const deserializeAws_json1_0ThrottlingExceptionResponse = async (parsedOutput, context) => {
909
+ const body = parsedOutput.body;
910
+ const deserialized = deserializeAws_json1_0ThrottlingException(body, context);
911
+ const exception = new ThrottlingException({
912
+ $metadata: deserializeMetadata(parsedOutput),
913
+ ...deserialized,
914
+ });
915
+ return __decorateServiceException(exception, body);
916
+ };
917
+ const deserializeAws_json1_0ValidationExceptionResponse = async (parsedOutput, context) => {
918
+ const body = parsedOutput.body;
919
+ const deserialized = deserializeAws_json1_0ValidationException(body, context);
920
+ const exception = new ValidationException({
921
+ $metadata: deserializeMetadata(parsedOutput),
922
+ ...deserialized,
923
+ });
924
+ return __decorateServiceException(exception, body);
925
+ };
926
+ const serializeAws_json1_0CreateDatabaseRequest = (input, context) => {
927
+ return {
928
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
929
+ ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
930
+ ...(input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
931
+ };
932
+ };
933
+ const serializeAws_json1_0CreateTableRequest = (input, context) => {
934
+ return {
935
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
936
+ ...(input.MagneticStoreWriteProperties != null && {
937
+ MagneticStoreWriteProperties: serializeAws_json1_0MagneticStoreWriteProperties(input.MagneticStoreWriteProperties, context),
938
+ }),
939
+ ...(input.RetentionProperties != null && {
940
+ RetentionProperties: serializeAws_json1_0RetentionProperties(input.RetentionProperties, context),
941
+ }),
942
+ ...(input.TableName != null && { TableName: input.TableName }),
943
+ ...(input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
944
+ };
945
+ };
946
+ const serializeAws_json1_0DeleteDatabaseRequest = (input, context) => {
947
+ return {
948
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
949
+ };
950
+ };
951
+ const serializeAws_json1_0DeleteTableRequest = (input, context) => {
952
+ return {
953
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
954
+ ...(input.TableName != null && { TableName: input.TableName }),
955
+ };
956
+ };
957
+ const serializeAws_json1_0DescribeDatabaseRequest = (input, context) => {
958
+ return {
959
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
960
+ };
961
+ };
962
+ const serializeAws_json1_0DescribeEndpointsRequest = (input, context) => {
1325
963
  return {};
1326
964
  };
1327
- var serializeAws_json1_0DescribeTableRequest = function (input, context) {
1328
- return __assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.TableName != null && { TableName: input.TableName }));
965
+ const serializeAws_json1_0DescribeTableRequest = (input, context) => {
966
+ return {
967
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
968
+ ...(input.TableName != null && { TableName: input.TableName }),
969
+ };
1329
970
  };
1330
- var serializeAws_json1_0Dimension = function (input, context) {
1331
- return __assign(__assign(__assign({}, (input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType })), (input.Name != null && { Name: input.Name })), (input.Value != null && { Value: input.Value }));
971
+ const serializeAws_json1_0Dimension = (input, context) => {
972
+ return {
973
+ ...(input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType }),
974
+ ...(input.Name != null && { Name: input.Name }),
975
+ ...(input.Value != null && { Value: input.Value }),
976
+ };
1332
977
  };
1333
- var serializeAws_json1_0Dimensions = function (input, context) {
978
+ const serializeAws_json1_0Dimensions = (input, context) => {
1334
979
  return input
1335
- .filter(function (e) { return e != null; })
1336
- .map(function (entry) {
980
+ .filter((e) => e != null)
981
+ .map((entry) => {
1337
982
  return serializeAws_json1_0Dimension(entry, context);
1338
983
  });
1339
984
  };
1340
- var serializeAws_json1_0ListDatabasesRequest = function (input, context) {
1341
- return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
985
+ const serializeAws_json1_0ListDatabasesRequest = (input, context) => {
986
+ return {
987
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
988
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
989
+ };
1342
990
  };
1343
- var serializeAws_json1_0ListTablesRequest = function (input, context) {
1344
- return __assign(__assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
991
+ const serializeAws_json1_0ListTablesRequest = (input, context) => {
992
+ return {
993
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
994
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
995
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
996
+ };
1345
997
  };
1346
- var serializeAws_json1_0ListTagsForResourceRequest = function (input, context) {
1347
- return __assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN }));
998
+ const serializeAws_json1_0ListTagsForResourceRequest = (input, context) => {
999
+ return {
1000
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1001
+ };
1348
1002
  };
1349
- var serializeAws_json1_0MagneticStoreRejectedDataLocation = function (input, context) {
1350
- return __assign({}, (input.S3Configuration != null && {
1351
- S3Configuration: serializeAws_json1_0S3Configuration(input.S3Configuration, context),
1352
- }));
1003
+ const serializeAws_json1_0MagneticStoreRejectedDataLocation = (input, context) => {
1004
+ return {
1005
+ ...(input.S3Configuration != null && {
1006
+ S3Configuration: serializeAws_json1_0S3Configuration(input.S3Configuration, context),
1007
+ }),
1008
+ };
1353
1009
  };
1354
- var serializeAws_json1_0MagneticStoreWriteProperties = function (input, context) {
1355
- return __assign(__assign({}, (input.EnableMagneticStoreWrites != null && { EnableMagneticStoreWrites: input.EnableMagneticStoreWrites })), (input.MagneticStoreRejectedDataLocation != null && {
1356
- MagneticStoreRejectedDataLocation: serializeAws_json1_0MagneticStoreRejectedDataLocation(input.MagneticStoreRejectedDataLocation, context),
1357
- }));
1010
+ const serializeAws_json1_0MagneticStoreWriteProperties = (input, context) => {
1011
+ return {
1012
+ ...(input.EnableMagneticStoreWrites != null && { EnableMagneticStoreWrites: input.EnableMagneticStoreWrites }),
1013
+ ...(input.MagneticStoreRejectedDataLocation != null && {
1014
+ MagneticStoreRejectedDataLocation: serializeAws_json1_0MagneticStoreRejectedDataLocation(input.MagneticStoreRejectedDataLocation, context),
1015
+ }),
1016
+ };
1358
1017
  };
1359
- var serializeAws_json1_0MeasureValue = function (input, context) {
1360
- return __assign(__assign(__assign({}, (input.Name != null && { Name: input.Name })), (input.Type != null && { Type: input.Type })), (input.Value != null && { Value: input.Value }));
1018
+ const serializeAws_json1_0MeasureValue = (input, context) => {
1019
+ return {
1020
+ ...(input.Name != null && { Name: input.Name }),
1021
+ ...(input.Type != null && { Type: input.Type }),
1022
+ ...(input.Value != null && { Value: input.Value }),
1023
+ };
1361
1024
  };
1362
- var serializeAws_json1_0MeasureValues = function (input, context) {
1025
+ const serializeAws_json1_0MeasureValues = (input, context) => {
1363
1026
  return input
1364
- .filter(function (e) { return e != null; })
1365
- .map(function (entry) {
1027
+ .filter((e) => e != null)
1028
+ .map((entry) => {
1366
1029
  return serializeAws_json1_0MeasureValue(entry, context);
1367
1030
  });
1368
1031
  };
1369
- var serializeAws_json1_0_Record = function (input, context) {
1370
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Dimensions != null && { Dimensions: serializeAws_json1_0Dimensions(input.Dimensions, context) })), (input.MeasureName != null && { MeasureName: input.MeasureName })), (input.MeasureValue != null && { MeasureValue: input.MeasureValue })), (input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType })), (input.MeasureValues != null && {
1371
- MeasureValues: serializeAws_json1_0MeasureValues(input.MeasureValues, context),
1372
- })), (input.Time != null && { Time: input.Time })), (input.TimeUnit != null && { TimeUnit: input.TimeUnit })), (input.Version != null && { Version: input.Version }));
1032
+ const serializeAws_json1_0_Record = (input, context) => {
1033
+ return {
1034
+ ...(input.Dimensions != null && { Dimensions: serializeAws_json1_0Dimensions(input.Dimensions, context) }),
1035
+ ...(input.MeasureName != null && { MeasureName: input.MeasureName }),
1036
+ ...(input.MeasureValue != null && { MeasureValue: input.MeasureValue }),
1037
+ ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }),
1038
+ ...(input.MeasureValues != null && {
1039
+ MeasureValues: serializeAws_json1_0MeasureValues(input.MeasureValues, context),
1040
+ }),
1041
+ ...(input.Time != null && { Time: input.Time }),
1042
+ ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }),
1043
+ ...(input.Version != null && { Version: input.Version }),
1044
+ };
1373
1045
  };
1374
- var serializeAws_json1_0Records = function (input, context) {
1046
+ const serializeAws_json1_0Records = (input, context) => {
1375
1047
  return input
1376
- .filter(function (e) { return e != null; })
1377
- .map(function (entry) {
1048
+ .filter((e) => e != null)
1049
+ .map((entry) => {
1378
1050
  return serializeAws_json1_0_Record(entry, context);
1379
1051
  });
1380
1052
  };
1381
- var serializeAws_json1_0RetentionProperties = function (input, context) {
1382
- return __assign(__assign({}, (input.MagneticStoreRetentionPeriodInDays != null && {
1383
- MagneticStoreRetentionPeriodInDays: input.MagneticStoreRetentionPeriodInDays,
1384
- })), (input.MemoryStoreRetentionPeriodInHours != null && {
1385
- MemoryStoreRetentionPeriodInHours: input.MemoryStoreRetentionPeriodInHours,
1386
- }));
1053
+ const serializeAws_json1_0RetentionProperties = (input, context) => {
1054
+ return {
1055
+ ...(input.MagneticStoreRetentionPeriodInDays != null && {
1056
+ MagneticStoreRetentionPeriodInDays: input.MagneticStoreRetentionPeriodInDays,
1057
+ }),
1058
+ ...(input.MemoryStoreRetentionPeriodInHours != null && {
1059
+ MemoryStoreRetentionPeriodInHours: input.MemoryStoreRetentionPeriodInHours,
1060
+ }),
1061
+ };
1387
1062
  };
1388
- var serializeAws_json1_0S3Configuration = function (input, context) {
1389
- return __assign(__assign(__assign(__assign({}, (input.BucketName != null && { BucketName: input.BucketName })), (input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption })), (input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId })), (input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }));
1063
+ const serializeAws_json1_0S3Configuration = (input, context) => {
1064
+ return {
1065
+ ...(input.BucketName != null && { BucketName: input.BucketName }),
1066
+ ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }),
1067
+ ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
1068
+ ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }),
1069
+ };
1390
1070
  };
1391
- var serializeAws_json1_0Tag = function (input, context) {
1392
- return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
1071
+ const serializeAws_json1_0Tag = (input, context) => {
1072
+ return {
1073
+ ...(input.Key != null && { Key: input.Key }),
1074
+ ...(input.Value != null && { Value: input.Value }),
1075
+ };
1393
1076
  };
1394
- var serializeAws_json1_0TagKeyList = function (input, context) {
1077
+ const serializeAws_json1_0TagKeyList = (input, context) => {
1395
1078
  return input
1396
- .filter(function (e) { return e != null; })
1397
- .map(function (entry) {
1079
+ .filter((e) => e != null)
1080
+ .map((entry) => {
1398
1081
  return entry;
1399
1082
  });
1400
1083
  };
1401
- var serializeAws_json1_0TagList = function (input, context) {
1084
+ const serializeAws_json1_0TagList = (input, context) => {
1402
1085
  return input
1403
- .filter(function (e) { return e != null; })
1404
- .map(function (entry) {
1086
+ .filter((e) => e != null)
1087
+ .map((entry) => {
1405
1088
  return serializeAws_json1_0Tag(entry, context);
1406
1089
  });
1407
1090
  };
1408
- var serializeAws_json1_0TagResourceRequest = function (input, context) {
1409
- return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }));
1091
+ const serializeAws_json1_0TagResourceRequest = (input, context) => {
1092
+ return {
1093
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1094
+ ...(input.Tags != null && { Tags: serializeAws_json1_0TagList(input.Tags, context) }),
1095
+ };
1410
1096
  };
1411
- var serializeAws_json1_0UntagResourceRequest = function (input, context) {
1412
- return __assign(__assign({}, (input.ResourceARN != null && { ResourceARN: input.ResourceARN })), (input.TagKeys != null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }));
1097
+ const serializeAws_json1_0UntagResourceRequest = (input, context) => {
1098
+ return {
1099
+ ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1100
+ ...(input.TagKeys != null && { TagKeys: serializeAws_json1_0TagKeyList(input.TagKeys, context) }),
1101
+ };
1413
1102
  };
1414
- var serializeAws_json1_0UpdateDatabaseRequest = function (input, context) {
1415
- return __assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }));
1103
+ const serializeAws_json1_0UpdateDatabaseRequest = (input, context) => {
1104
+ return {
1105
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1106
+ ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
1107
+ };
1416
1108
  };
1417
- var serializeAws_json1_0UpdateTableRequest = function (input, context) {
1418
- return __assign(__assign(__assign(__assign({}, (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.MagneticStoreWriteProperties != null && {
1419
- MagneticStoreWriteProperties: serializeAws_json1_0MagneticStoreWriteProperties(input.MagneticStoreWriteProperties, context),
1420
- })), (input.RetentionProperties != null && {
1421
- RetentionProperties: serializeAws_json1_0RetentionProperties(input.RetentionProperties, context),
1422
- })), (input.TableName != null && { TableName: input.TableName }));
1109
+ const serializeAws_json1_0UpdateTableRequest = (input, context) => {
1110
+ return {
1111
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1112
+ ...(input.MagneticStoreWriteProperties != null && {
1113
+ MagneticStoreWriteProperties: serializeAws_json1_0MagneticStoreWriteProperties(input.MagneticStoreWriteProperties, context),
1114
+ }),
1115
+ ...(input.RetentionProperties != null && {
1116
+ RetentionProperties: serializeAws_json1_0RetentionProperties(input.RetentionProperties, context),
1117
+ }),
1118
+ ...(input.TableName != null && { TableName: input.TableName }),
1119
+ };
1423
1120
  };
1424
- var serializeAws_json1_0WriteRecordsRequest = function (input, context) {
1425
- return __assign(__assign(__assign(__assign({}, (input.CommonAttributes != null && {
1426
- CommonAttributes: serializeAws_json1_0_Record(input.CommonAttributes, context),
1427
- })), (input.DatabaseName != null && { DatabaseName: input.DatabaseName })), (input.Records != null && { Records: serializeAws_json1_0Records(input.Records, context) })), (input.TableName != null && { TableName: input.TableName }));
1121
+ const serializeAws_json1_0WriteRecordsRequest = (input, context) => {
1122
+ return {
1123
+ ...(input.CommonAttributes != null && {
1124
+ CommonAttributes: serializeAws_json1_0_Record(input.CommonAttributes, context),
1125
+ }),
1126
+ ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
1127
+ ...(input.Records != null && { Records: serializeAws_json1_0Records(input.Records, context) }),
1128
+ ...(input.TableName != null && { TableName: input.TableName }),
1129
+ };
1428
1130
  };
1429
- var deserializeAws_json1_0AccessDeniedException = function (output, context) {
1131
+ const deserializeAws_json1_0AccessDeniedException = (output, context) => {
1430
1132
  return {
1431
1133
  Message: __expectString(output.Message),
1432
1134
  };
1433
1135
  };
1434
- var deserializeAws_json1_0ConflictException = function (output, context) {
1136
+ const deserializeAws_json1_0ConflictException = (output, context) => {
1435
1137
  return {
1436
1138
  Message: __expectString(output.Message),
1437
1139
  };
1438
1140
  };
1439
- var deserializeAws_json1_0CreateDatabaseResponse = function (output, context) {
1141
+ const deserializeAws_json1_0CreateDatabaseResponse = (output, context) => {
1440
1142
  return {
1441
1143
  Database: output.Database != null ? deserializeAws_json1_0Database(output.Database, context) : undefined,
1442
1144
  };
1443
1145
  };
1444
- var deserializeAws_json1_0CreateTableResponse = function (output, context) {
1146
+ const deserializeAws_json1_0CreateTableResponse = (output, context) => {
1445
1147
  return {
1446
1148
  Table: output.Table != null ? deserializeAws_json1_0Table(output.Table, context) : undefined,
1447
1149
  };
1448
1150
  };
1449
- var deserializeAws_json1_0Database = function (output, context) {
1151
+ const deserializeAws_json1_0Database = (output, context) => {
1450
1152
  return {
1451
1153
  Arn: __expectString(output.Arn),
1452
1154
  CreationTime: output.CreationTime != null
@@ -1460,10 +1162,10 @@ var deserializeAws_json1_0Database = function (output, context) {
1460
1162
  TableCount: __expectLong(output.TableCount),
1461
1163
  };
1462
1164
  };
1463
- var deserializeAws_json1_0DatabaseList = function (output, context) {
1464
- var retVal = (output || [])
1465
- .filter(function (e) { return e != null; })
1466
- .map(function (entry) {
1165
+ const deserializeAws_json1_0DatabaseList = (output, context) => {
1166
+ const retVal = (output || [])
1167
+ .filter((e) => e != null)
1168
+ .map((entry) => {
1467
1169
  if (entry === null) {
1468
1170
  return null;
1469
1171
  }
@@ -1471,31 +1173,31 @@ var deserializeAws_json1_0DatabaseList = function (output, context) {
1471
1173
  });
1472
1174
  return retVal;
1473
1175
  };
1474
- var deserializeAws_json1_0DescribeDatabaseResponse = function (output, context) {
1176
+ const deserializeAws_json1_0DescribeDatabaseResponse = (output, context) => {
1475
1177
  return {
1476
1178
  Database: output.Database != null ? deserializeAws_json1_0Database(output.Database, context) : undefined,
1477
1179
  };
1478
1180
  };
1479
- var deserializeAws_json1_0DescribeEndpointsResponse = function (output, context) {
1181
+ const deserializeAws_json1_0DescribeEndpointsResponse = (output, context) => {
1480
1182
  return {
1481
1183
  Endpoints: output.Endpoints != null ? deserializeAws_json1_0Endpoints(output.Endpoints, context) : undefined,
1482
1184
  };
1483
1185
  };
1484
- var deserializeAws_json1_0DescribeTableResponse = function (output, context) {
1186
+ const deserializeAws_json1_0DescribeTableResponse = (output, context) => {
1485
1187
  return {
1486
1188
  Table: output.Table != null ? deserializeAws_json1_0Table(output.Table, context) : undefined,
1487
1189
  };
1488
1190
  };
1489
- var deserializeAws_json1_0Endpoint = function (output, context) {
1191
+ const deserializeAws_json1_0Endpoint = (output, context) => {
1490
1192
  return {
1491
1193
  Address: __expectString(output.Address),
1492
1194
  CachePeriodInMinutes: __expectLong(output.CachePeriodInMinutes),
1493
1195
  };
1494
1196
  };
1495
- var deserializeAws_json1_0Endpoints = function (output, context) {
1496
- var retVal = (output || [])
1497
- .filter(function (e) { return e != null; })
1498
- .map(function (entry) {
1197
+ const deserializeAws_json1_0Endpoints = (output, context) => {
1198
+ const retVal = (output || [])
1199
+ .filter((e) => e != null)
1200
+ .map((entry) => {
1499
1201
  if (entry === null) {
1500
1202
  return null;
1501
1203
  }
@@ -1503,41 +1205,41 @@ var deserializeAws_json1_0Endpoints = function (output, context) {
1503
1205
  });
1504
1206
  return retVal;
1505
1207
  };
1506
- var deserializeAws_json1_0InternalServerException = function (output, context) {
1208
+ const deserializeAws_json1_0InternalServerException = (output, context) => {
1507
1209
  return {
1508
1210
  Message: __expectString(output.Message),
1509
1211
  };
1510
1212
  };
1511
- var deserializeAws_json1_0InvalidEndpointException = function (output, context) {
1213
+ const deserializeAws_json1_0InvalidEndpointException = (output, context) => {
1512
1214
  return {
1513
1215
  Message: __expectString(output.Message),
1514
1216
  };
1515
1217
  };
1516
- var deserializeAws_json1_0ListDatabasesResponse = function (output, context) {
1218
+ const deserializeAws_json1_0ListDatabasesResponse = (output, context) => {
1517
1219
  return {
1518
1220
  Databases: output.Databases != null ? deserializeAws_json1_0DatabaseList(output.Databases, context) : undefined,
1519
1221
  NextToken: __expectString(output.NextToken),
1520
1222
  };
1521
1223
  };
1522
- var deserializeAws_json1_0ListTablesResponse = function (output, context) {
1224
+ const deserializeAws_json1_0ListTablesResponse = (output, context) => {
1523
1225
  return {
1524
1226
  NextToken: __expectString(output.NextToken),
1525
1227
  Tables: output.Tables != null ? deserializeAws_json1_0TableList(output.Tables, context) : undefined,
1526
1228
  };
1527
1229
  };
1528
- var deserializeAws_json1_0ListTagsForResourceResponse = function (output, context) {
1230
+ const deserializeAws_json1_0ListTagsForResourceResponse = (output, context) => {
1529
1231
  return {
1530
1232
  Tags: output.Tags != null ? deserializeAws_json1_0TagList(output.Tags, context) : undefined,
1531
1233
  };
1532
1234
  };
1533
- var deserializeAws_json1_0MagneticStoreRejectedDataLocation = function (output, context) {
1235
+ const deserializeAws_json1_0MagneticStoreRejectedDataLocation = (output, context) => {
1534
1236
  return {
1535
1237
  S3Configuration: output.S3Configuration != null
1536
1238
  ? deserializeAws_json1_0S3Configuration(output.S3Configuration, context)
1537
1239
  : undefined,
1538
1240
  };
1539
1241
  };
1540
- var deserializeAws_json1_0MagneticStoreWriteProperties = function (output, context) {
1242
+ const deserializeAws_json1_0MagneticStoreWriteProperties = (output, context) => {
1541
1243
  return {
1542
1244
  EnableMagneticStoreWrites: __expectBoolean(output.EnableMagneticStoreWrites),
1543
1245
  MagneticStoreRejectedDataLocation: output.MagneticStoreRejectedDataLocation != null
@@ -1545,24 +1247,24 @@ var deserializeAws_json1_0MagneticStoreWriteProperties = function (output, conte
1545
1247
  : undefined,
1546
1248
  };
1547
1249
  };
1548
- var deserializeAws_json1_0RecordsIngested = function (output, context) {
1250
+ const deserializeAws_json1_0RecordsIngested = (output, context) => {
1549
1251
  return {
1550
1252
  MagneticStore: __expectInt32(output.MagneticStore),
1551
1253
  MemoryStore: __expectInt32(output.MemoryStore),
1552
1254
  Total: __expectInt32(output.Total),
1553
1255
  };
1554
1256
  };
1555
- var deserializeAws_json1_0RejectedRecord = function (output, context) {
1257
+ const deserializeAws_json1_0RejectedRecord = (output, context) => {
1556
1258
  return {
1557
1259
  ExistingVersion: __expectLong(output.ExistingVersion),
1558
1260
  Reason: __expectString(output.Reason),
1559
1261
  RecordIndex: __expectInt32(output.RecordIndex),
1560
1262
  };
1561
1263
  };
1562
- var deserializeAws_json1_0RejectedRecords = function (output, context) {
1563
- var retVal = (output || [])
1564
- .filter(function (e) { return e != null; })
1565
- .map(function (entry) {
1264
+ const deserializeAws_json1_0RejectedRecords = (output, context) => {
1265
+ const retVal = (output || [])
1266
+ .filter((e) => e != null)
1267
+ .map((entry) => {
1566
1268
  if (entry === null) {
1567
1269
  return null;
1568
1270
  }
@@ -1570,7 +1272,7 @@ var deserializeAws_json1_0RejectedRecords = function (output, context) {
1570
1272
  });
1571
1273
  return retVal;
1572
1274
  };
1573
- var deserializeAws_json1_0RejectedRecordsException = function (output, context) {
1275
+ const deserializeAws_json1_0RejectedRecordsException = (output, context) => {
1574
1276
  return {
1575
1277
  Message: __expectString(output.Message),
1576
1278
  RejectedRecords: output.RejectedRecords != null
@@ -1578,18 +1280,18 @@ var deserializeAws_json1_0RejectedRecordsException = function (output, context)
1578
1280
  : undefined,
1579
1281
  };
1580
1282
  };
1581
- var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
1283
+ const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
1582
1284
  return {
1583
1285
  Message: __expectString(output.Message),
1584
1286
  };
1585
1287
  };
1586
- var deserializeAws_json1_0RetentionProperties = function (output, context) {
1288
+ const deserializeAws_json1_0RetentionProperties = (output, context) => {
1587
1289
  return {
1588
1290
  MagneticStoreRetentionPeriodInDays: __expectLong(output.MagneticStoreRetentionPeriodInDays),
1589
1291
  MemoryStoreRetentionPeriodInHours: __expectLong(output.MemoryStoreRetentionPeriodInHours),
1590
1292
  };
1591
1293
  };
1592
- var deserializeAws_json1_0S3Configuration = function (output, context) {
1294
+ const deserializeAws_json1_0S3Configuration = (output, context) => {
1593
1295
  return {
1594
1296
  BucketName: __expectString(output.BucketName),
1595
1297
  EncryptionOption: __expectString(output.EncryptionOption),
@@ -1597,12 +1299,12 @@ var deserializeAws_json1_0S3Configuration = function (output, context) {
1597
1299
  ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix),
1598
1300
  };
1599
1301
  };
1600
- var deserializeAws_json1_0ServiceQuotaExceededException = function (output, context) {
1302
+ const deserializeAws_json1_0ServiceQuotaExceededException = (output, context) => {
1601
1303
  return {
1602
1304
  Message: __expectString(output.Message),
1603
1305
  };
1604
1306
  };
1605
- var deserializeAws_json1_0Table = function (output, context) {
1307
+ const deserializeAws_json1_0Table = (output, context) => {
1606
1308
  return {
1607
1309
  Arn: __expectString(output.Arn),
1608
1310
  CreationTime: output.CreationTime != null
@@ -1622,10 +1324,10 @@ var deserializeAws_json1_0Table = function (output, context) {
1622
1324
  TableStatus: __expectString(output.TableStatus),
1623
1325
  };
1624
1326
  };
1625
- var deserializeAws_json1_0TableList = function (output, context) {
1626
- var retVal = (output || [])
1627
- .filter(function (e) { return e != null; })
1628
- .map(function (entry) {
1327
+ const deserializeAws_json1_0TableList = (output, context) => {
1328
+ const retVal = (output || [])
1329
+ .filter((e) => e != null)
1330
+ .map((entry) => {
1629
1331
  if (entry === null) {
1630
1332
  return null;
1631
1333
  }
@@ -1633,16 +1335,16 @@ var deserializeAws_json1_0TableList = function (output, context) {
1633
1335
  });
1634
1336
  return retVal;
1635
1337
  };
1636
- var deserializeAws_json1_0Tag = function (output, context) {
1338
+ const deserializeAws_json1_0Tag = (output, context) => {
1637
1339
  return {
1638
1340
  Key: __expectString(output.Key),
1639
1341
  Value: __expectString(output.Value),
1640
1342
  };
1641
1343
  };
1642
- var deserializeAws_json1_0TagList = function (output, context) {
1643
- var retVal = (output || [])
1644
- .filter(function (e) { return e != null; })
1645
- .map(function (entry) {
1344
+ const deserializeAws_json1_0TagList = (output, context) => {
1345
+ const retVal = (output || [])
1346
+ .filter((e) => e != null)
1347
+ .map((entry) => {
1646
1348
  if (entry === null) {
1647
1349
  return null;
1648
1350
  }
@@ -1650,108 +1352,85 @@ var deserializeAws_json1_0TagList = function (output, context) {
1650
1352
  });
1651
1353
  return retVal;
1652
1354
  };
1653
- var deserializeAws_json1_0TagResourceResponse = function (output, context) {
1355
+ const deserializeAws_json1_0TagResourceResponse = (output, context) => {
1654
1356
  return {};
1655
1357
  };
1656
- var deserializeAws_json1_0ThrottlingException = function (output, context) {
1358
+ const deserializeAws_json1_0ThrottlingException = (output, context) => {
1657
1359
  return {
1658
1360
  Message: __expectString(output.Message),
1659
1361
  };
1660
1362
  };
1661
- var deserializeAws_json1_0UntagResourceResponse = function (output, context) {
1363
+ const deserializeAws_json1_0UntagResourceResponse = (output, context) => {
1662
1364
  return {};
1663
1365
  };
1664
- var deserializeAws_json1_0UpdateDatabaseResponse = function (output, context) {
1366
+ const deserializeAws_json1_0UpdateDatabaseResponse = (output, context) => {
1665
1367
  return {
1666
1368
  Database: output.Database != null ? deserializeAws_json1_0Database(output.Database, context) : undefined,
1667
1369
  };
1668
1370
  };
1669
- var deserializeAws_json1_0UpdateTableResponse = function (output, context) {
1371
+ const deserializeAws_json1_0UpdateTableResponse = (output, context) => {
1670
1372
  return {
1671
1373
  Table: output.Table != null ? deserializeAws_json1_0Table(output.Table, context) : undefined,
1672
1374
  };
1673
1375
  };
1674
- var deserializeAws_json1_0ValidationException = function (output, context) {
1376
+ const deserializeAws_json1_0ValidationException = (output, context) => {
1675
1377
  return {
1676
1378
  Message: __expectString(output.Message),
1677
1379
  };
1678
1380
  };
1679
- var deserializeAws_json1_0WriteRecordsResponse = function (output, context) {
1381
+ const deserializeAws_json1_0WriteRecordsResponse = (output, context) => {
1680
1382
  return {
1681
1383
  RecordsIngested: output.RecordsIngested != null
1682
1384
  ? deserializeAws_json1_0RecordsIngested(output.RecordsIngested, context)
1683
1385
  : undefined,
1684
1386
  };
1685
1387
  };
1686
- var deserializeMetadata = function (output) {
1687
- var _a;
1688
- return ({
1689
- httpStatusCode: output.statusCode,
1690
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
1691
- extendedRequestId: output.headers["x-amz-id-2"],
1692
- cfId: output.headers["x-amz-cf-id"],
1693
- });
1694
- };
1695
- var collectBody = function (streamBody, context) {
1696
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
1388
+ const deserializeMetadata = (output) => ({
1389
+ httpStatusCode: output.statusCode,
1390
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1391
+ extendedRequestId: output.headers["x-amz-id-2"],
1392
+ cfId: output.headers["x-amz-cf-id"],
1393
+ });
1394
+ const collectBody = (streamBody = new Uint8Array(), context) => {
1697
1395
  if (streamBody instanceof Uint8Array) {
1698
1396
  return Promise.resolve(streamBody);
1699
1397
  }
1700
1398
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1701
1399
  };
1702
- var collectBodyString = function (streamBody, context) {
1703
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1704
- };
1705
- var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
1706
- var _a, hostname, _b, protocol, port, basePath, contents;
1707
- return __generator(this, function (_c) {
1708
- switch (_c.label) {
1709
- case 0: return [4, context.endpoint()];
1710
- case 1:
1711
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1712
- contents = {
1713
- protocol: protocol,
1714
- hostname: hostname,
1715
- port: port,
1716
- method: "POST",
1717
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1718
- headers: headers,
1719
- };
1720
- if (resolvedHostname !== undefined) {
1721
- contents.hostname = resolvedHostname;
1722
- }
1723
- if (body !== undefined) {
1724
- contents.body = body;
1725
- }
1726
- return [2, new __HttpRequest(contents)];
1727
- }
1728
- });
1729
- }); };
1730
- var parseBody = function (streamBody, context) {
1731
- return collectBodyString(streamBody, context).then(function (encoded) {
1732
- if (encoded.length) {
1733
- return JSON.parse(encoded);
1734
- }
1735
- return {};
1736
- });
1400
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1401
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1402
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1403
+ const contents = {
1404
+ protocol,
1405
+ hostname,
1406
+ port,
1407
+ method: "POST",
1408
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1409
+ headers,
1410
+ };
1411
+ if (resolvedHostname !== undefined) {
1412
+ contents.hostname = resolvedHostname;
1413
+ }
1414
+ if (body !== undefined) {
1415
+ contents.body = body;
1416
+ }
1417
+ return new __HttpRequest(contents);
1737
1418
  };
1738
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1739
- var value;
1740
- var _a;
1741
- return __generator(this, function (_b) {
1742
- switch (_b.label) {
1743
- case 0: return [4, parseBody(errorBody, context)];
1744
- case 1:
1745
- value = _b.sent();
1746
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1747
- return [2, value];
1748
- }
1749
- });
1750
- }); };
1751
- var loadRestJsonErrorCode = function (output, data) {
1752
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1753
- var sanitizeErrorCode = function (rawValue) {
1754
- var cleanValue = rawValue;
1419
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1420
+ if (encoded.length) {
1421
+ return JSON.parse(encoded);
1422
+ }
1423
+ return {};
1424
+ });
1425
+ const parseErrorBody = async (errorBody, context) => {
1426
+ const value = await parseBody(errorBody, context);
1427
+ value.message = value.message ?? value.Message;
1428
+ return value;
1429
+ };
1430
+ const loadRestJsonErrorCode = (output, data) => {
1431
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1432
+ const sanitizeErrorCode = (rawValue) => {
1433
+ let cleanValue = rawValue;
1755
1434
  if (typeof cleanValue === "number") {
1756
1435
  cleanValue = cleanValue.toString();
1757
1436
  }
@@ -1766,7 +1445,7 @@ var loadRestJsonErrorCode = function (output, data) {
1766
1445
  }
1767
1446
  return cleanValue;
1768
1447
  };
1769
- var headerKey = findKey(output.headers, "x-amzn-errortype");
1448
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
1770
1449
  if (headerKey !== undefined) {
1771
1450
  return sanitizeErrorCode(output.headers[headerKey]);
1772
1451
  }