@aws-sdk/client-keyspaces 3.183.0 → 3.185.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 +11 -0
  2. package/dist-cjs/protocols/Aws_json1_0.js +2 -2
  3. package/dist-es/Keyspaces.js +61 -54
  4. package/dist-es/KeyspacesClient.js +28 -22
  5. package/dist-es/commands/CreateKeyspaceCommand.js +28 -21
  6. package/dist-es/commands/CreateTableCommand.js +28 -21
  7. package/dist-es/commands/DeleteKeyspaceCommand.js +28 -21
  8. package/dist-es/commands/DeleteTableCommand.js +28 -21
  9. package/dist-es/commands/GetKeyspaceCommand.js +28 -21
  10. package/dist-es/commands/GetTableCommand.js +28 -21
  11. package/dist-es/commands/ListKeyspacesCommand.js +28 -21
  12. package/dist-es/commands/ListTablesCommand.js +28 -21
  13. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  14. package/dist-es/commands/RestoreTableCommand.js +28 -21
  15. package/dist-es/commands/TagResourceCommand.js +28 -21
  16. package/dist-es/commands/UntagResourceCommand.js +28 -21
  17. package/dist-es/commands/UpdateTableCommand.js +28 -21
  18. package/dist-es/endpoints.js +8 -8
  19. package/dist-es/models/KeyspacesServiceException.js +10 -5
  20. package/dist-es/models/models_0.js +109 -190
  21. package/dist-es/pagination/ListKeyspacesPaginator.js +68 -25
  22. package/dist-es/pagination/ListTablesPaginator.js +68 -25
  23. package/dist-es/pagination/ListTagsForResourcePaginator.js +68 -25
  24. package/dist-es/protocols/Aws_json1_0.js +1308 -1057
  25. package/dist-es/runtimeConfig.browser.js +12 -26
  26. package/dist-es/runtimeConfig.js +12 -30
  27. package/dist-es/runtimeConfig.native.js +5 -8
  28. package/dist-es/runtimeConfig.shared.js +11 -8
  29. package/package.json +5 -5
@@ -1,1015 +1,1243 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
3
4
  import { KeyspacesServiceException as __BaseException } from "../models/KeyspacesServiceException";
4
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
5
- export const serializeAws_json1_0CreateKeyspaceCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.0",
8
- "x-amz-target": "KeyspacesService.CreateKeyspace",
9
- };
10
- let body;
11
- body = JSON.stringify(serializeAws_json1_0CreateKeyspaceRequest(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": "KeyspacesService.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_0DeleteKeyspaceCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.0",
26
- "x-amz-target": "KeyspacesService.DeleteKeyspace",
27
- };
28
- let body;
29
- body = JSON.stringify(serializeAws_json1_0DeleteKeyspaceRequest(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": "KeyspacesService.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_0GetKeyspaceCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.0",
44
- "x-amz-target": "KeyspacesService.GetKeyspace",
45
- };
46
- let body;
47
- body = JSON.stringify(serializeAws_json1_0GetKeyspaceRequest(input, context));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- export const serializeAws_json1_0GetTableCommand = async (input, context) => {
51
- const headers = {
52
- "content-type": "application/x-amz-json-1.0",
53
- "x-amz-target": "KeyspacesService.GetTable",
54
- };
55
- let body;
56
- body = JSON.stringify(serializeAws_json1_0GetTableRequest(input, context));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- export const serializeAws_json1_0ListKeyspacesCommand = async (input, context) => {
60
- const headers = {
61
- "content-type": "application/x-amz-json-1.0",
62
- "x-amz-target": "KeyspacesService.ListKeyspaces",
63
- };
64
- let body;
65
- body = JSON.stringify(serializeAws_json1_0ListKeyspacesRequest(input, context));
66
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
67
- };
68
- export const serializeAws_json1_0ListTablesCommand = async (input, context) => {
69
- const headers = {
70
- "content-type": "application/x-amz-json-1.0",
71
- "x-amz-target": "KeyspacesService.ListTables",
72
- };
73
- let body;
74
- body = JSON.stringify(serializeAws_json1_0ListTablesRequest(input, context));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- export const serializeAws_json1_0ListTagsForResourceCommand = async (input, context) => {
78
- const headers = {
79
- "content-type": "application/x-amz-json-1.0",
80
- "x-amz-target": "KeyspacesService.ListTagsForResource",
81
- };
82
- let body;
83
- body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- export const serializeAws_json1_0RestoreTableCommand = async (input, context) => {
87
- const headers = {
88
- "content-type": "application/x-amz-json-1.0",
89
- "x-amz-target": "KeyspacesService.RestoreTable",
90
- };
91
- let body;
92
- body = JSON.stringify(serializeAws_json1_0RestoreTableRequest(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": "KeyspacesService.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": "KeyspacesService.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_0UpdateTableCommand = async (input, context) => {
114
- const headers = {
115
- "content-type": "application/x-amz-json-1.0",
116
- "x-amz-target": "KeyspacesService.UpdateTable",
117
- };
118
- let body;
119
- body = JSON.stringify(serializeAws_json1_0UpdateTableRequest(input, context));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- export const deserializeAws_json1_0CreateKeyspaceCommand = async (output, context) => {
123
- if (output.statusCode >= 300) {
124
- return deserializeAws_json1_0CreateKeyspaceCommandError(output, context);
125
- }
126
- const data = await parseBody(output.body, context);
127
- let contents = {};
128
- contents = deserializeAws_json1_0CreateKeyspaceResponse(data, context);
129
- const response = {
130
- $metadata: deserializeMetadata(output),
131
- ...contents,
132
- };
133
- return Promise.resolve(response);
134
- };
135
- const deserializeAws_json1_0CreateKeyspaceCommandError = async (output, context) => {
136
- const parsedOutput = {
137
- ...output,
138
- body: await parseErrorBody(output.body, context),
139
- };
140
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
141
- switch (errorCode) {
142
- case "AccessDeniedException":
143
- case "com.amazonaws.keyspaces#AccessDeniedException":
144
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
145
- case "ConflictException":
146
- case "com.amazonaws.keyspaces#ConflictException":
147
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
148
- case "InternalServerException":
149
- case "com.amazonaws.keyspaces#InternalServerException":
150
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
151
- case "ServiceQuotaExceededException":
152
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
153
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
154
- case "ValidationException":
155
- case "com.amazonaws.keyspaces#ValidationException":
156
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
157
- default:
158
- const parsedBody = parsedOutput.body;
159
- throwDefaultError({
160
- output,
161
- parsedBody,
162
- exceptionCtor: __BaseException,
163
- errorCode,
164
- });
165
- }
166
- };
167
- export const deserializeAws_json1_0CreateTableCommand = async (output, context) => {
168
- if (output.statusCode >= 300) {
169
- return deserializeAws_json1_0CreateTableCommandError(output, context);
170
- }
171
- const data = await parseBody(output.body, context);
172
- let contents = {};
173
- contents = deserializeAws_json1_0CreateTableResponse(data, context);
174
- const response = {
175
- $metadata: deserializeMetadata(output),
176
- ...contents,
177
- };
178
- return Promise.resolve(response);
179
- };
180
- const deserializeAws_json1_0CreateTableCommandError = async (output, context) => {
181
- const parsedOutput = {
182
- ...output,
183
- body: await parseErrorBody(output.body, context),
184
- };
185
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
186
- switch (errorCode) {
187
- case "AccessDeniedException":
188
- case "com.amazonaws.keyspaces#AccessDeniedException":
189
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
190
- case "ConflictException":
191
- case "com.amazonaws.keyspaces#ConflictException":
192
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
193
- case "InternalServerException":
194
- case "com.amazonaws.keyspaces#InternalServerException":
195
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
196
- case "ResourceNotFoundException":
197
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
198
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
199
- case "ServiceQuotaExceededException":
200
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
201
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
202
- case "ValidationException":
203
- case "com.amazonaws.keyspaces#ValidationException":
204
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
205
- default:
206
- const parsedBody = parsedOutput.body;
207
- throwDefaultError({
208
- output,
209
- parsedBody,
210
- exceptionCtor: __BaseException,
211
- errorCode,
212
- });
213
- }
214
- };
215
- export const deserializeAws_json1_0DeleteKeyspaceCommand = async (output, context) => {
216
- if (output.statusCode >= 300) {
217
- return deserializeAws_json1_0DeleteKeyspaceCommandError(output, context);
218
- }
219
- const data = await parseBody(output.body, context);
220
- let contents = {};
221
- contents = deserializeAws_json1_0DeleteKeyspaceResponse(data, context);
222
- const response = {
223
- $metadata: deserializeMetadata(output),
224
- ...contents,
225
- };
226
- return Promise.resolve(response);
227
- };
228
- const deserializeAws_json1_0DeleteKeyspaceCommandError = async (output, context) => {
229
- const parsedOutput = {
230
- ...output,
231
- body: await parseErrorBody(output.body, context),
232
- };
233
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
234
- switch (errorCode) {
235
- case "AccessDeniedException":
236
- case "com.amazonaws.keyspaces#AccessDeniedException":
237
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
238
- case "ConflictException":
239
- case "com.amazonaws.keyspaces#ConflictException":
240
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
241
- case "InternalServerException":
242
- case "com.amazonaws.keyspaces#InternalServerException":
243
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
244
- case "ResourceNotFoundException":
245
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
246
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
247
- case "ServiceQuotaExceededException":
248
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
249
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
250
- case "ValidationException":
251
- case "com.amazonaws.keyspaces#ValidationException":
252
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
253
- default:
254
- const parsedBody = parsedOutput.body;
255
- throwDefaultError({
256
- output,
257
- parsedBody,
258
- exceptionCtor: __BaseException,
259
- errorCode,
260
- });
261
- }
262
- };
263
- export const deserializeAws_json1_0DeleteTableCommand = async (output, context) => {
264
- if (output.statusCode >= 300) {
265
- return deserializeAws_json1_0DeleteTableCommandError(output, context);
266
- }
267
- const data = await parseBody(output.body, context);
268
- let contents = {};
269
- contents = deserializeAws_json1_0DeleteTableResponse(data, context);
270
- const response = {
271
- $metadata: deserializeMetadata(output),
272
- ...contents,
273
- };
274
- return Promise.resolve(response);
275
- };
276
- const deserializeAws_json1_0DeleteTableCommandError = async (output, context) => {
277
- const parsedOutput = {
278
- ...output,
279
- body: await parseErrorBody(output.body, context),
280
- };
281
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
282
- switch (errorCode) {
283
- case "AccessDeniedException":
284
- case "com.amazonaws.keyspaces#AccessDeniedException":
285
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
286
- case "ConflictException":
287
- case "com.amazonaws.keyspaces#ConflictException":
288
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
289
- case "InternalServerException":
290
- case "com.amazonaws.keyspaces#InternalServerException":
291
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
292
- case "ResourceNotFoundException":
293
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
294
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
295
- case "ServiceQuotaExceededException":
296
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
297
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
298
- case "ValidationException":
299
- case "com.amazonaws.keyspaces#ValidationException":
300
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
301
- default:
302
- const parsedBody = parsedOutput.body;
303
- throwDefaultError({
304
- output,
305
- parsedBody,
306
- exceptionCtor: __BaseException,
307
- errorCode,
308
- });
309
- }
310
- };
311
- export const deserializeAws_json1_0GetKeyspaceCommand = async (output, context) => {
312
- if (output.statusCode >= 300) {
313
- return deserializeAws_json1_0GetKeyspaceCommandError(output, context);
314
- }
315
- const data = await parseBody(output.body, context);
316
- let contents = {};
317
- contents = deserializeAws_json1_0GetKeyspaceResponse(data, context);
318
- const response = {
319
- $metadata: deserializeMetadata(output),
320
- ...contents,
321
- };
322
- return Promise.resolve(response);
323
- };
324
- const deserializeAws_json1_0GetKeyspaceCommandError = async (output, context) => {
325
- const parsedOutput = {
326
- ...output,
327
- body: await parseErrorBody(output.body, context),
328
- };
329
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
330
- switch (errorCode) {
331
- case "AccessDeniedException":
332
- case "com.amazonaws.keyspaces#AccessDeniedException":
333
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
334
- case "InternalServerException":
335
- case "com.amazonaws.keyspaces#InternalServerException":
336
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
337
- case "ResourceNotFoundException":
338
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
339
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
340
- case "ServiceQuotaExceededException":
341
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
342
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
343
- case "ValidationException":
344
- case "com.amazonaws.keyspaces#ValidationException":
345
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
346
- default:
347
- const parsedBody = parsedOutput.body;
348
- throwDefaultError({
349
- output,
350
- parsedBody,
351
- exceptionCtor: __BaseException,
352
- errorCode,
353
- });
354
- }
355
- };
356
- export const deserializeAws_json1_0GetTableCommand = async (output, context) => {
357
- if (output.statusCode >= 300) {
358
- return deserializeAws_json1_0GetTableCommandError(output, context);
359
- }
360
- const data = await parseBody(output.body, context);
361
- let contents = {};
362
- contents = deserializeAws_json1_0GetTableResponse(data, context);
363
- const response = {
364
- $metadata: deserializeMetadata(output),
365
- ...contents,
366
- };
367
- return Promise.resolve(response);
368
- };
369
- const deserializeAws_json1_0GetTableCommandError = async (output, context) => {
370
- const parsedOutput = {
371
- ...output,
372
- body: await parseErrorBody(output.body, context),
373
- };
374
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
375
- switch (errorCode) {
376
- case "AccessDeniedException":
377
- case "com.amazonaws.keyspaces#AccessDeniedException":
378
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
379
- case "InternalServerException":
380
- case "com.amazonaws.keyspaces#InternalServerException":
381
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
382
- case "ResourceNotFoundException":
383
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
384
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
385
- case "ServiceQuotaExceededException":
386
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
387
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
388
- case "ValidationException":
389
- case "com.amazonaws.keyspaces#ValidationException":
390
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
391
- default:
392
- const parsedBody = parsedOutput.body;
393
- throwDefaultError({
394
- output,
395
- parsedBody,
396
- exceptionCtor: __BaseException,
397
- errorCode,
398
- });
399
- }
400
- };
401
- export const deserializeAws_json1_0ListKeyspacesCommand = async (output, context) => {
402
- if (output.statusCode >= 300) {
403
- return deserializeAws_json1_0ListKeyspacesCommandError(output, context);
404
- }
405
- const data = await parseBody(output.body, context);
406
- let contents = {};
407
- contents = deserializeAws_json1_0ListKeyspacesResponse(data, context);
408
- const response = {
409
- $metadata: deserializeMetadata(output),
410
- ...contents,
411
- };
412
- return Promise.resolve(response);
413
- };
414
- const deserializeAws_json1_0ListKeyspacesCommandError = async (output, context) => {
415
- const parsedOutput = {
416
- ...output,
417
- body: await parseErrorBody(output.body, context),
418
- };
419
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
420
- switch (errorCode) {
421
- case "AccessDeniedException":
422
- case "com.amazonaws.keyspaces#AccessDeniedException":
423
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
424
- case "InternalServerException":
425
- case "com.amazonaws.keyspaces#InternalServerException":
426
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
427
- case "ResourceNotFoundException":
428
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
429
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
430
- case "ServiceQuotaExceededException":
431
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
432
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
433
- case "ValidationException":
434
- case "com.amazonaws.keyspaces#ValidationException":
435
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
436
- default:
437
- const parsedBody = parsedOutput.body;
438
- throwDefaultError({
439
- output,
440
- parsedBody,
441
- exceptionCtor: __BaseException,
442
- errorCode,
443
- });
444
- }
445
- };
446
- export const deserializeAws_json1_0ListTablesCommand = async (output, context) => {
447
- if (output.statusCode >= 300) {
448
- return deserializeAws_json1_0ListTablesCommandError(output, context);
449
- }
450
- const data = await parseBody(output.body, context);
451
- let contents = {};
452
- contents = deserializeAws_json1_0ListTablesResponse(data, context);
453
- const response = {
454
- $metadata: deserializeMetadata(output),
455
- ...contents,
456
- };
457
- return Promise.resolve(response);
458
- };
459
- const deserializeAws_json1_0ListTablesCommandError = async (output, context) => {
460
- const parsedOutput = {
461
- ...output,
462
- body: await parseErrorBody(output.body, context),
463
- };
464
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
465
- switch (errorCode) {
466
- case "AccessDeniedException":
467
- case "com.amazonaws.keyspaces#AccessDeniedException":
468
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
469
- case "InternalServerException":
470
- case "com.amazonaws.keyspaces#InternalServerException":
471
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
472
- case "ResourceNotFoundException":
473
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
474
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
475
- case "ServiceQuotaExceededException":
476
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
477
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
478
- case "ValidationException":
479
- case "com.amazonaws.keyspaces#ValidationException":
480
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
481
- default:
482
- const parsedBody = parsedOutput.body;
483
- throwDefaultError({
484
- output,
485
- parsedBody,
486
- exceptionCtor: __BaseException,
487
- errorCode,
488
- });
489
- }
490
- };
491
- export const deserializeAws_json1_0ListTagsForResourceCommand = async (output, context) => {
492
- if (output.statusCode >= 300) {
493
- return deserializeAws_json1_0ListTagsForResourceCommandError(output, context);
494
- }
495
- const data = await parseBody(output.body, context);
496
- let contents = {};
497
- contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
498
- const response = {
499
- $metadata: deserializeMetadata(output),
500
- ...contents,
501
- };
502
- return Promise.resolve(response);
503
- };
504
- const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, context) => {
505
- const parsedOutput = {
506
- ...output,
507
- body: await parseErrorBody(output.body, context),
508
- };
509
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
510
- switch (errorCode) {
511
- case "AccessDeniedException":
512
- case "com.amazonaws.keyspaces#AccessDeniedException":
513
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
514
- case "InternalServerException":
515
- case "com.amazonaws.keyspaces#InternalServerException":
516
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
517
- case "ResourceNotFoundException":
518
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
519
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
520
- case "ServiceQuotaExceededException":
521
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
522
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
523
- case "ValidationException":
524
- case "com.amazonaws.keyspaces#ValidationException":
525
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
526
- default:
527
- const parsedBody = parsedOutput.body;
528
- throwDefaultError({
529
- output,
530
- parsedBody,
531
- exceptionCtor: __BaseException,
532
- errorCode,
533
- });
534
- }
535
- };
536
- export const deserializeAws_json1_0RestoreTableCommand = async (output, context) => {
537
- if (output.statusCode >= 300) {
538
- return deserializeAws_json1_0RestoreTableCommandError(output, context);
539
- }
540
- const data = await parseBody(output.body, context);
541
- let contents = {};
542
- contents = deserializeAws_json1_0RestoreTableResponse(data, context);
543
- const response = {
544
- $metadata: deserializeMetadata(output),
545
- ...contents,
546
- };
547
- return Promise.resolve(response);
548
- };
549
- const deserializeAws_json1_0RestoreTableCommandError = async (output, context) => {
550
- const parsedOutput = {
551
- ...output,
552
- body: await parseErrorBody(output.body, context),
553
- };
554
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
555
- switch (errorCode) {
556
- case "AccessDeniedException":
557
- case "com.amazonaws.keyspaces#AccessDeniedException":
558
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
559
- case "ConflictException":
560
- case "com.amazonaws.keyspaces#ConflictException":
561
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
562
- case "InternalServerException":
563
- case "com.amazonaws.keyspaces#InternalServerException":
564
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
565
- case "ResourceNotFoundException":
566
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
567
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
568
- case "ServiceQuotaExceededException":
569
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
570
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
571
- case "ValidationException":
572
- case "com.amazonaws.keyspaces#ValidationException":
573
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
574
- default:
575
- const parsedBody = parsedOutput.body;
576
- throwDefaultError({
577
- output,
578
- parsedBody,
579
- exceptionCtor: __BaseException,
580
- errorCode,
581
- });
582
- }
583
- };
584
- export const deserializeAws_json1_0TagResourceCommand = async (output, context) => {
585
- if (output.statusCode >= 300) {
586
- return deserializeAws_json1_0TagResourceCommandError(output, context);
587
- }
588
- const data = await parseBody(output.body, context);
589
- let contents = {};
590
- contents = deserializeAws_json1_0TagResourceResponse(data, context);
591
- const response = {
592
- $metadata: deserializeMetadata(output),
593
- ...contents,
594
- };
595
- return Promise.resolve(response);
596
- };
597
- const deserializeAws_json1_0TagResourceCommandError = async (output, context) => {
598
- const parsedOutput = {
599
- ...output,
600
- body: await parseErrorBody(output.body, context),
601
- };
602
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
603
- switch (errorCode) {
604
- case "AccessDeniedException":
605
- case "com.amazonaws.keyspaces#AccessDeniedException":
606
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
607
- case "InternalServerException":
608
- case "com.amazonaws.keyspaces#InternalServerException":
609
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
610
- case "ResourceNotFoundException":
611
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
612
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
613
- case "ServiceQuotaExceededException":
614
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
615
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
616
- case "ValidationException":
617
- case "com.amazonaws.keyspaces#ValidationException":
618
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
619
- default:
620
- const parsedBody = parsedOutput.body;
621
- throwDefaultError({
622
- output,
623
- parsedBody,
624
- exceptionCtor: __BaseException,
625
- errorCode,
626
- });
627
- }
628
- };
629
- export const deserializeAws_json1_0UntagResourceCommand = async (output, context) => {
630
- if (output.statusCode >= 300) {
631
- return deserializeAws_json1_0UntagResourceCommandError(output, context);
632
- }
633
- const data = await parseBody(output.body, context);
634
- let contents = {};
635
- contents = deserializeAws_json1_0UntagResourceResponse(data, context);
636
- const response = {
637
- $metadata: deserializeMetadata(output),
638
- ...contents,
639
- };
640
- return Promise.resolve(response);
641
- };
642
- const deserializeAws_json1_0UntagResourceCommandError = async (output, context) => {
643
- const parsedOutput = {
644
- ...output,
645
- body: await parseErrorBody(output.body, context),
646
- };
647
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
648
- switch (errorCode) {
649
- case "AccessDeniedException":
650
- case "com.amazonaws.keyspaces#AccessDeniedException":
651
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
652
- case "ConflictException":
653
- case "com.amazonaws.keyspaces#ConflictException":
654
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
655
- case "InternalServerException":
656
- case "com.amazonaws.keyspaces#InternalServerException":
657
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
658
- case "ResourceNotFoundException":
659
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
660
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
661
- case "ServiceQuotaExceededException":
662
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
663
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
664
- case "ValidationException":
665
- case "com.amazonaws.keyspaces#ValidationException":
666
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
667
- default:
668
- const parsedBody = parsedOutput.body;
669
- throwDefaultError({
670
- output,
671
- parsedBody,
672
- exceptionCtor: __BaseException,
673
- errorCode,
674
- });
675
- }
676
- };
677
- export const deserializeAws_json1_0UpdateTableCommand = async (output, context) => {
678
- if (output.statusCode >= 300) {
679
- return deserializeAws_json1_0UpdateTableCommandError(output, context);
680
- }
681
- const data = await parseBody(output.body, context);
682
- let contents = {};
683
- contents = deserializeAws_json1_0UpdateTableResponse(data, context);
684
- const response = {
685
- $metadata: deserializeMetadata(output),
686
- ...contents,
687
- };
688
- return Promise.resolve(response);
689
- };
690
- const deserializeAws_json1_0UpdateTableCommandError = async (output, context) => {
691
- const parsedOutput = {
692
- ...output,
693
- body: await parseErrorBody(output.body, context),
694
- };
695
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
696
- switch (errorCode) {
697
- case "AccessDeniedException":
698
- case "com.amazonaws.keyspaces#AccessDeniedException":
699
- throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
700
- case "ConflictException":
701
- case "com.amazonaws.keyspaces#ConflictException":
702
- throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
703
- case "InternalServerException":
704
- case "com.amazonaws.keyspaces#InternalServerException":
705
- throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
706
- case "ResourceNotFoundException":
707
- case "com.amazonaws.keyspaces#ResourceNotFoundException":
708
- throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
709
- case "ServiceQuotaExceededException":
710
- case "com.amazonaws.keyspaces#ServiceQuotaExceededException":
711
- throw await deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context);
712
- case "ValidationException":
713
- case "com.amazonaws.keyspaces#ValidationException":
714
- throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
715
- default:
716
- const parsedBody = parsedOutput.body;
717
- throwDefaultError({
718
- output,
719
- parsedBody,
720
- exceptionCtor: __BaseException,
721
- errorCode,
722
- });
723
- }
724
- };
725
- const deserializeAws_json1_0AccessDeniedExceptionResponse = async (parsedOutput, context) => {
726
- const body = parsedOutput.body;
727
- const deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
728
- const exception = new AccessDeniedException({
729
- $metadata: deserializeMetadata(parsedOutput),
730
- ...deserialized,
6
+ export var serializeAws_json1_0CreateKeyspaceCommand = 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": "KeyspacesService.CreateKeyspace",
12
+ };
13
+ body = JSON.stringify(serializeAws_json1_0CreateKeyspaceRequest(input, context));
14
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
731
15
  });
732
- return __decorateServiceException(exception, body);
733
- };
734
- const deserializeAws_json1_0ConflictExceptionResponse = async (parsedOutput, context) => {
735
- const body = parsedOutput.body;
736
- const deserialized = deserializeAws_json1_0ConflictException(body, context);
737
- const exception = new ConflictException({
738
- $metadata: deserializeMetadata(parsedOutput),
739
- ...deserialized,
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": "KeyspacesService.CreateTable",
23
+ };
24
+ body = JSON.stringify(serializeAws_json1_0CreateTableRequest(input, context));
25
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
740
26
  });
741
- return __decorateServiceException(exception, body);
742
- };
743
- const deserializeAws_json1_0InternalServerExceptionResponse = async (parsedOutput, context) => {
744
- const body = parsedOutput.body;
745
- const deserialized = deserializeAws_json1_0InternalServerException(body, context);
746
- const exception = new InternalServerException({
747
- $metadata: deserializeMetadata(parsedOutput),
748
- ...deserialized,
27
+ }); };
28
+ export var serializeAws_json1_0DeleteKeyspaceCommand = 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": "KeyspacesService.DeleteKeyspace",
34
+ };
35
+ body = JSON.stringify(serializeAws_json1_0DeleteKeyspaceRequest(input, context));
36
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
749
37
  });
750
- return __decorateServiceException(exception, body);
751
- };
752
- const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
753
- const body = parsedOutput.body;
754
- const deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
755
- const exception = new ResourceNotFoundException({
756
- $metadata: deserializeMetadata(parsedOutput),
757
- ...deserialized,
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": "KeyspacesService.DeleteTable",
45
+ };
46
+ body = JSON.stringify(serializeAws_json1_0DeleteTableRequest(input, context));
47
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
758
48
  });
759
- return __decorateServiceException(exception, body);
760
- };
761
- const deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
762
- const body = parsedOutput.body;
763
- const deserialized = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
764
- const exception = new ServiceQuotaExceededException({
765
- $metadata: deserializeMetadata(parsedOutput),
766
- ...deserialized,
49
+ }); };
50
+ export var serializeAws_json1_0GetKeyspaceCommand = 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": "KeyspacesService.GetKeyspace",
56
+ };
57
+ body = JSON.stringify(serializeAws_json1_0GetKeyspaceRequest(input, context));
58
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
767
59
  });
768
- return __decorateServiceException(exception, body);
769
- };
770
- const deserializeAws_json1_0ValidationExceptionResponse = async (parsedOutput, context) => {
771
- const body = parsedOutput.body;
772
- const deserialized = deserializeAws_json1_0ValidationException(body, context);
773
- const exception = new ValidationException({
774
- $metadata: deserializeMetadata(parsedOutput),
775
- ...deserialized,
60
+ }); };
61
+ export var serializeAws_json1_0GetTableCommand = 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": "KeyspacesService.GetTable",
67
+ };
68
+ body = JSON.stringify(serializeAws_json1_0GetTableRequest(input, context));
69
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
776
70
  });
777
- return __decorateServiceException(exception, body);
778
- };
779
- const serializeAws_json1_0CapacitySpecification = (input, context) => {
780
- return {
781
- ...(input.readCapacityUnits != null && { readCapacityUnits: input.readCapacityUnits }),
782
- ...(input.throughputMode != null && { throughputMode: input.throughputMode }),
783
- ...(input.writeCapacityUnits != null && { writeCapacityUnits: input.writeCapacityUnits }),
784
- };
71
+ }); };
72
+ export var serializeAws_json1_0ListKeyspacesCommand = 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": "KeyspacesService.ListKeyspaces",
78
+ };
79
+ body = JSON.stringify(serializeAws_json1_0ListKeyspacesRequest(input, context));
80
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
81
+ });
82
+ }); };
83
+ export var serializeAws_json1_0ListTablesCommand = 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": "KeyspacesService.ListTables",
89
+ };
90
+ body = JSON.stringify(serializeAws_json1_0ListTablesRequest(input, context));
91
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
92
+ });
93
+ }); };
94
+ export var serializeAws_json1_0ListTagsForResourceCommand = 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": "KeyspacesService.ListTagsForResource",
100
+ };
101
+ body = JSON.stringify(serializeAws_json1_0ListTagsForResourceRequest(input, context));
102
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
103
+ });
104
+ }); };
105
+ export var serializeAws_json1_0RestoreTableCommand = 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": "KeyspacesService.RestoreTable",
111
+ };
112
+ body = JSON.stringify(serializeAws_json1_0RestoreTableRequest(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": "KeyspacesService.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": "KeyspacesService.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_0UpdateTableCommand = 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": "KeyspacesService.UpdateTable",
144
+ };
145
+ body = JSON.stringify(serializeAws_json1_0UpdateTableRequest(input, context));
146
+ return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
147
+ });
148
+ }); };
149
+ export var deserializeAws_json1_0CreateKeyspaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
150
+ var data, contents, response;
151
+ return __generator(this, function (_a) {
152
+ switch (_a.label) {
153
+ case 0:
154
+ if (output.statusCode >= 300) {
155
+ return [2, deserializeAws_json1_0CreateKeyspaceCommandError(output, context)];
156
+ }
157
+ return [4, parseBody(output.body, context)];
158
+ case 1:
159
+ data = _a.sent();
160
+ contents = {};
161
+ contents = deserializeAws_json1_0CreateKeyspaceResponse(data, context);
162
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
163
+ return [2, Promise.resolve(response)];
164
+ }
165
+ });
166
+ }); };
167
+ var deserializeAws_json1_0CreateKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
168
+ var parsedOutput, _a, errorCode, _b, parsedBody;
169
+ var _c;
170
+ return __generator(this, function (_d) {
171
+ switch (_d.label) {
172
+ case 0:
173
+ _a = [__assign({}, output)];
174
+ _c = {};
175
+ return [4, parseErrorBody(output.body, context)];
176
+ case 1:
177
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
178
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
179
+ _b = errorCode;
180
+ switch (_b) {
181
+ case "AccessDeniedException": return [3, 2];
182
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
183
+ case "ConflictException": return [3, 4];
184
+ case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
185
+ case "InternalServerException": return [3, 6];
186
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
187
+ case "ServiceQuotaExceededException": return [3, 8];
188
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
189
+ case "ValidationException": return [3, 10];
190
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
191
+ }
192
+ return [3, 12];
193
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
194
+ case 3: throw _d.sent();
195
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
196
+ case 5: throw _d.sent();
197
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
198
+ case 7: throw _d.sent();
199
+ case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
200
+ case 9: throw _d.sent();
201
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
202
+ case 11: throw _d.sent();
203
+ case 12:
204
+ parsedBody = parsedOutput.body;
205
+ throwDefaultError({
206
+ output: output,
207
+ parsedBody: parsedBody,
208
+ exceptionCtor: __BaseException,
209
+ errorCode: errorCode,
210
+ });
211
+ _d.label = 13;
212
+ case 13: return [2];
213
+ }
214
+ });
215
+ }); };
216
+ export var deserializeAws_json1_0CreateTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
217
+ var data, contents, response;
218
+ return __generator(this, function (_a) {
219
+ switch (_a.label) {
220
+ case 0:
221
+ if (output.statusCode >= 300) {
222
+ return [2, deserializeAws_json1_0CreateTableCommandError(output, context)];
223
+ }
224
+ return [4, parseBody(output.body, context)];
225
+ case 1:
226
+ data = _a.sent();
227
+ contents = {};
228
+ contents = deserializeAws_json1_0CreateTableResponse(data, context);
229
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
230
+ return [2, Promise.resolve(response)];
231
+ }
232
+ });
233
+ }); };
234
+ var deserializeAws_json1_0CreateTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
235
+ var parsedOutput, _a, errorCode, _b, parsedBody;
236
+ var _c;
237
+ return __generator(this, function (_d) {
238
+ switch (_d.label) {
239
+ case 0:
240
+ _a = [__assign({}, output)];
241
+ _c = {};
242
+ return [4, parseErrorBody(output.body, context)];
243
+ case 1:
244
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
245
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
246
+ _b = errorCode;
247
+ switch (_b) {
248
+ case "AccessDeniedException": return [3, 2];
249
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
250
+ case "ConflictException": return [3, 4];
251
+ case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
252
+ case "InternalServerException": return [3, 6];
253
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
254
+ case "ResourceNotFoundException": return [3, 8];
255
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
256
+ case "ServiceQuotaExceededException": return [3, 10];
257
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
258
+ case "ValidationException": return [3, 12];
259
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
260
+ }
261
+ return [3, 14];
262
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
263
+ case 3: throw _d.sent();
264
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
265
+ case 5: throw _d.sent();
266
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
267
+ case 7: throw _d.sent();
268
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
269
+ case 9: throw _d.sent();
270
+ case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
271
+ case 11: throw _d.sent();
272
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
273
+ case 13: throw _d.sent();
274
+ case 14:
275
+ parsedBody = parsedOutput.body;
276
+ throwDefaultError({
277
+ output: output,
278
+ parsedBody: parsedBody,
279
+ exceptionCtor: __BaseException,
280
+ errorCode: errorCode,
281
+ });
282
+ _d.label = 15;
283
+ case 15: return [2];
284
+ }
285
+ });
286
+ }); };
287
+ export var deserializeAws_json1_0DeleteKeyspaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
288
+ var data, contents, response;
289
+ return __generator(this, function (_a) {
290
+ switch (_a.label) {
291
+ case 0:
292
+ if (output.statusCode >= 300) {
293
+ return [2, deserializeAws_json1_0DeleteKeyspaceCommandError(output, context)];
294
+ }
295
+ return [4, parseBody(output.body, context)];
296
+ case 1:
297
+ data = _a.sent();
298
+ contents = {};
299
+ contents = deserializeAws_json1_0DeleteKeyspaceResponse(data, context);
300
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
301
+ return [2, Promise.resolve(response)];
302
+ }
303
+ });
304
+ }); };
305
+ var deserializeAws_json1_0DeleteKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
306
+ var parsedOutput, _a, errorCode, _b, parsedBody;
307
+ var _c;
308
+ return __generator(this, function (_d) {
309
+ switch (_d.label) {
310
+ case 0:
311
+ _a = [__assign({}, output)];
312
+ _c = {};
313
+ return [4, parseErrorBody(output.body, context)];
314
+ case 1:
315
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
316
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
317
+ _b = errorCode;
318
+ switch (_b) {
319
+ case "AccessDeniedException": return [3, 2];
320
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
321
+ case "ConflictException": return [3, 4];
322
+ case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
323
+ case "InternalServerException": return [3, 6];
324
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
325
+ case "ResourceNotFoundException": return [3, 8];
326
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
327
+ case "ServiceQuotaExceededException": return [3, 10];
328
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
329
+ case "ValidationException": return [3, 12];
330
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
331
+ }
332
+ return [3, 14];
333
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
334
+ case 3: throw _d.sent();
335
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
336
+ case 5: throw _d.sent();
337
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
338
+ case 7: throw _d.sent();
339
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
340
+ case 9: throw _d.sent();
341
+ case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
342
+ case 11: throw _d.sent();
343
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
344
+ case 13: throw _d.sent();
345
+ case 14:
346
+ parsedBody = parsedOutput.body;
347
+ throwDefaultError({
348
+ output: output,
349
+ parsedBody: parsedBody,
350
+ exceptionCtor: __BaseException,
351
+ errorCode: errorCode,
352
+ });
353
+ _d.label = 15;
354
+ case 15: return [2];
355
+ }
356
+ });
357
+ }); };
358
+ export var deserializeAws_json1_0DeleteTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
359
+ var data, contents, response;
360
+ return __generator(this, function (_a) {
361
+ switch (_a.label) {
362
+ case 0:
363
+ if (output.statusCode >= 300) {
364
+ return [2, deserializeAws_json1_0DeleteTableCommandError(output, context)];
365
+ }
366
+ return [4, parseBody(output.body, context)];
367
+ case 1:
368
+ data = _a.sent();
369
+ contents = {};
370
+ contents = deserializeAws_json1_0DeleteTableResponse(data, context);
371
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
372
+ return [2, Promise.resolve(response)];
373
+ }
374
+ });
375
+ }); };
376
+ var deserializeAws_json1_0DeleteTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
377
+ var parsedOutput, _a, errorCode, _b, parsedBody;
378
+ var _c;
379
+ return __generator(this, function (_d) {
380
+ switch (_d.label) {
381
+ case 0:
382
+ _a = [__assign({}, output)];
383
+ _c = {};
384
+ return [4, parseErrorBody(output.body, context)];
385
+ case 1:
386
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
387
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
388
+ _b = errorCode;
389
+ switch (_b) {
390
+ case "AccessDeniedException": return [3, 2];
391
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
392
+ case "ConflictException": return [3, 4];
393
+ case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
394
+ case "InternalServerException": return [3, 6];
395
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
396
+ case "ResourceNotFoundException": return [3, 8];
397
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
398
+ case "ServiceQuotaExceededException": return [3, 10];
399
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
400
+ case "ValidationException": return [3, 12];
401
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
402
+ }
403
+ return [3, 14];
404
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
405
+ case 3: throw _d.sent();
406
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
407
+ case 5: throw _d.sent();
408
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
409
+ case 7: throw _d.sent();
410
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
411
+ case 9: throw _d.sent();
412
+ case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
413
+ case 11: throw _d.sent();
414
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
415
+ case 13: throw _d.sent();
416
+ case 14:
417
+ parsedBody = parsedOutput.body;
418
+ throwDefaultError({
419
+ output: output,
420
+ parsedBody: parsedBody,
421
+ exceptionCtor: __BaseException,
422
+ errorCode: errorCode,
423
+ });
424
+ _d.label = 15;
425
+ case 15: return [2];
426
+ }
427
+ });
428
+ }); };
429
+ export var deserializeAws_json1_0GetKeyspaceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
430
+ var data, contents, response;
431
+ return __generator(this, function (_a) {
432
+ switch (_a.label) {
433
+ case 0:
434
+ if (output.statusCode >= 300) {
435
+ return [2, deserializeAws_json1_0GetKeyspaceCommandError(output, context)];
436
+ }
437
+ return [4, parseBody(output.body, context)];
438
+ case 1:
439
+ data = _a.sent();
440
+ contents = {};
441
+ contents = deserializeAws_json1_0GetKeyspaceResponse(data, context);
442
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
443
+ return [2, Promise.resolve(response)];
444
+ }
445
+ });
446
+ }); };
447
+ var deserializeAws_json1_0GetKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
448
+ var parsedOutput, _a, errorCode, _b, parsedBody;
449
+ var _c;
450
+ return __generator(this, function (_d) {
451
+ switch (_d.label) {
452
+ case 0:
453
+ _a = [__assign({}, output)];
454
+ _c = {};
455
+ return [4, parseErrorBody(output.body, context)];
456
+ case 1:
457
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
458
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
459
+ _b = errorCode;
460
+ switch (_b) {
461
+ case "AccessDeniedException": return [3, 2];
462
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
463
+ case "InternalServerException": return [3, 4];
464
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
465
+ case "ResourceNotFoundException": return [3, 6];
466
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
467
+ case "ServiceQuotaExceededException": return [3, 8];
468
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
469
+ case "ValidationException": return [3, 10];
470
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
471
+ }
472
+ return [3, 12];
473
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
474
+ case 3: throw _d.sent();
475
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
476
+ case 5: throw _d.sent();
477
+ case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
478
+ case 7: throw _d.sent();
479
+ case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
480
+ case 9: throw _d.sent();
481
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
482
+ case 11: throw _d.sent();
483
+ case 12:
484
+ parsedBody = parsedOutput.body;
485
+ throwDefaultError({
486
+ output: output,
487
+ parsedBody: parsedBody,
488
+ exceptionCtor: __BaseException,
489
+ errorCode: errorCode,
490
+ });
491
+ _d.label = 13;
492
+ case 13: return [2];
493
+ }
494
+ });
495
+ }); };
496
+ export var deserializeAws_json1_0GetTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
497
+ var data, contents, response;
498
+ return __generator(this, function (_a) {
499
+ switch (_a.label) {
500
+ case 0:
501
+ if (output.statusCode >= 300) {
502
+ return [2, deserializeAws_json1_0GetTableCommandError(output, context)];
503
+ }
504
+ return [4, parseBody(output.body, context)];
505
+ case 1:
506
+ data = _a.sent();
507
+ contents = {};
508
+ contents = deserializeAws_json1_0GetTableResponse(data, context);
509
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
510
+ return [2, Promise.resolve(response)];
511
+ }
512
+ });
513
+ }); };
514
+ var deserializeAws_json1_0GetTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
515
+ var parsedOutput, _a, errorCode, _b, parsedBody;
516
+ var _c;
517
+ return __generator(this, function (_d) {
518
+ switch (_d.label) {
519
+ case 0:
520
+ _a = [__assign({}, output)];
521
+ _c = {};
522
+ return [4, parseErrorBody(output.body, context)];
523
+ case 1:
524
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
525
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
526
+ _b = errorCode;
527
+ switch (_b) {
528
+ case "AccessDeniedException": return [3, 2];
529
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
530
+ case "InternalServerException": return [3, 4];
531
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
532
+ case "ResourceNotFoundException": return [3, 6];
533
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
534
+ case "ServiceQuotaExceededException": return [3, 8];
535
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
536
+ case "ValidationException": return [3, 10];
537
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
538
+ }
539
+ return [3, 12];
540
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
541
+ case 3: throw _d.sent();
542
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
543
+ case 5: throw _d.sent();
544
+ case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
545
+ case 7: throw _d.sent();
546
+ case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
547
+ case 9: throw _d.sent();
548
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
549
+ case 11: throw _d.sent();
550
+ case 12:
551
+ parsedBody = parsedOutput.body;
552
+ throwDefaultError({
553
+ output: output,
554
+ parsedBody: parsedBody,
555
+ exceptionCtor: __BaseException,
556
+ errorCode: errorCode,
557
+ });
558
+ _d.label = 13;
559
+ case 13: return [2];
560
+ }
561
+ });
562
+ }); };
563
+ export var deserializeAws_json1_0ListKeyspacesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
564
+ var data, contents, response;
565
+ return __generator(this, function (_a) {
566
+ switch (_a.label) {
567
+ case 0:
568
+ if (output.statusCode >= 300) {
569
+ return [2, deserializeAws_json1_0ListKeyspacesCommandError(output, context)];
570
+ }
571
+ return [4, parseBody(output.body, context)];
572
+ case 1:
573
+ data = _a.sent();
574
+ contents = {};
575
+ contents = deserializeAws_json1_0ListKeyspacesResponse(data, context);
576
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
577
+ return [2, Promise.resolve(response)];
578
+ }
579
+ });
580
+ }); };
581
+ var deserializeAws_json1_0ListKeyspacesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
582
+ var parsedOutput, _a, errorCode, _b, parsedBody;
583
+ var _c;
584
+ return __generator(this, function (_d) {
585
+ switch (_d.label) {
586
+ case 0:
587
+ _a = [__assign({}, output)];
588
+ _c = {};
589
+ return [4, parseErrorBody(output.body, context)];
590
+ case 1:
591
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
592
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
593
+ _b = errorCode;
594
+ switch (_b) {
595
+ case "AccessDeniedException": return [3, 2];
596
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
597
+ case "InternalServerException": return [3, 4];
598
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
599
+ case "ResourceNotFoundException": return [3, 6];
600
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
601
+ case "ServiceQuotaExceededException": return [3, 8];
602
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
603
+ case "ValidationException": return [3, 10];
604
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
605
+ }
606
+ return [3, 12];
607
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
608
+ case 3: throw _d.sent();
609
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
610
+ case 5: throw _d.sent();
611
+ case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
612
+ case 7: throw _d.sent();
613
+ case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
614
+ case 9: throw _d.sent();
615
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
616
+ case 11: throw _d.sent();
617
+ case 12:
618
+ parsedBody = parsedOutput.body;
619
+ throwDefaultError({
620
+ output: output,
621
+ parsedBody: parsedBody,
622
+ exceptionCtor: __BaseException,
623
+ errorCode: errorCode,
624
+ });
625
+ _d.label = 13;
626
+ case 13: return [2];
627
+ }
628
+ });
629
+ }); };
630
+ export var deserializeAws_json1_0ListTablesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
631
+ var data, contents, response;
632
+ return __generator(this, function (_a) {
633
+ switch (_a.label) {
634
+ case 0:
635
+ if (output.statusCode >= 300) {
636
+ return [2, deserializeAws_json1_0ListTablesCommandError(output, context)];
637
+ }
638
+ return [4, parseBody(output.body, context)];
639
+ case 1:
640
+ data = _a.sent();
641
+ contents = {};
642
+ contents = deserializeAws_json1_0ListTablesResponse(data, context);
643
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
644
+ return [2, Promise.resolve(response)];
645
+ }
646
+ });
647
+ }); };
648
+ var deserializeAws_json1_0ListTablesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
649
+ var parsedOutput, _a, errorCode, _b, parsedBody;
650
+ var _c;
651
+ return __generator(this, function (_d) {
652
+ switch (_d.label) {
653
+ case 0:
654
+ _a = [__assign({}, output)];
655
+ _c = {};
656
+ return [4, parseErrorBody(output.body, context)];
657
+ case 1:
658
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
659
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
+ _b = errorCode;
661
+ switch (_b) {
662
+ case "AccessDeniedException": return [3, 2];
663
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
664
+ case "InternalServerException": return [3, 4];
665
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
666
+ case "ResourceNotFoundException": return [3, 6];
667
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
668
+ case "ServiceQuotaExceededException": return [3, 8];
669
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
670
+ case "ValidationException": return [3, 10];
671
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
672
+ }
673
+ return [3, 12];
674
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
675
+ case 3: throw _d.sent();
676
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
677
+ case 5: throw _d.sent();
678
+ case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
679
+ case 7: throw _d.sent();
680
+ case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
681
+ case 9: throw _d.sent();
682
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
683
+ case 11: throw _d.sent();
684
+ case 12:
685
+ parsedBody = parsedOutput.body;
686
+ throwDefaultError({
687
+ output: output,
688
+ parsedBody: parsedBody,
689
+ exceptionCtor: __BaseException,
690
+ errorCode: errorCode,
691
+ });
692
+ _d.label = 13;
693
+ case 13: return [2];
694
+ }
695
+ });
696
+ }); };
697
+ export var deserializeAws_json1_0ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
698
+ var data, contents, response;
699
+ return __generator(this, function (_a) {
700
+ switch (_a.label) {
701
+ case 0:
702
+ if (output.statusCode >= 300) {
703
+ return [2, deserializeAws_json1_0ListTagsForResourceCommandError(output, context)];
704
+ }
705
+ return [4, parseBody(output.body, context)];
706
+ case 1:
707
+ data = _a.sent();
708
+ contents = {};
709
+ contents = deserializeAws_json1_0ListTagsForResourceResponse(data, context);
710
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
711
+ return [2, Promise.resolve(response)];
712
+ }
713
+ });
714
+ }); };
715
+ var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
716
+ var parsedOutput, _a, errorCode, _b, parsedBody;
717
+ var _c;
718
+ return __generator(this, function (_d) {
719
+ switch (_d.label) {
720
+ case 0:
721
+ _a = [__assign({}, output)];
722
+ _c = {};
723
+ return [4, parseErrorBody(output.body, context)];
724
+ case 1:
725
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
726
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
727
+ _b = errorCode;
728
+ switch (_b) {
729
+ case "AccessDeniedException": return [3, 2];
730
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
731
+ case "InternalServerException": return [3, 4];
732
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
733
+ case "ResourceNotFoundException": return [3, 6];
734
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
735
+ case "ServiceQuotaExceededException": return [3, 8];
736
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
737
+ case "ValidationException": return [3, 10];
738
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
739
+ }
740
+ return [3, 12];
741
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
742
+ case 3: throw _d.sent();
743
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
744
+ case 5: throw _d.sent();
745
+ case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
746
+ case 7: throw _d.sent();
747
+ case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
748
+ case 9: throw _d.sent();
749
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
750
+ case 11: throw _d.sent();
751
+ case 12:
752
+ parsedBody = parsedOutput.body;
753
+ throwDefaultError({
754
+ output: output,
755
+ parsedBody: parsedBody,
756
+ exceptionCtor: __BaseException,
757
+ errorCode: errorCode,
758
+ });
759
+ _d.label = 13;
760
+ case 13: return [2];
761
+ }
762
+ });
763
+ }); };
764
+ export var deserializeAws_json1_0RestoreTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
765
+ var data, contents, response;
766
+ return __generator(this, function (_a) {
767
+ switch (_a.label) {
768
+ case 0:
769
+ if (output.statusCode >= 300) {
770
+ return [2, deserializeAws_json1_0RestoreTableCommandError(output, context)];
771
+ }
772
+ return [4, parseBody(output.body, context)];
773
+ case 1:
774
+ data = _a.sent();
775
+ contents = {};
776
+ contents = deserializeAws_json1_0RestoreTableResponse(data, context);
777
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
778
+ return [2, Promise.resolve(response)];
779
+ }
780
+ });
781
+ }); };
782
+ var deserializeAws_json1_0RestoreTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
783
+ var parsedOutput, _a, errorCode, _b, parsedBody;
784
+ var _c;
785
+ return __generator(this, function (_d) {
786
+ switch (_d.label) {
787
+ case 0:
788
+ _a = [__assign({}, output)];
789
+ _c = {};
790
+ return [4, parseErrorBody(output.body, context)];
791
+ case 1:
792
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
793
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
794
+ _b = errorCode;
795
+ switch (_b) {
796
+ case "AccessDeniedException": return [3, 2];
797
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
798
+ case "ConflictException": return [3, 4];
799
+ case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
800
+ case "InternalServerException": return [3, 6];
801
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
802
+ case "ResourceNotFoundException": return [3, 8];
803
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
804
+ case "ServiceQuotaExceededException": return [3, 10];
805
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
806
+ case "ValidationException": return [3, 12];
807
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
808
+ }
809
+ return [3, 14];
810
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
811
+ case 3: throw _d.sent();
812
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
813
+ case 5: throw _d.sent();
814
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
815
+ case 7: throw _d.sent();
816
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
817
+ case 9: throw _d.sent();
818
+ case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
819
+ case 11: throw _d.sent();
820
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
821
+ case 13: throw _d.sent();
822
+ case 14:
823
+ parsedBody = parsedOutput.body;
824
+ throwDefaultError({
825
+ output: output,
826
+ parsedBody: parsedBody,
827
+ exceptionCtor: __BaseException,
828
+ errorCode: errorCode,
829
+ });
830
+ _d.label = 15;
831
+ case 15: return [2];
832
+ }
833
+ });
834
+ }); };
835
+ export var deserializeAws_json1_0TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
836
+ var data, contents, response;
837
+ return __generator(this, function (_a) {
838
+ switch (_a.label) {
839
+ case 0:
840
+ if (output.statusCode >= 300) {
841
+ return [2, deserializeAws_json1_0TagResourceCommandError(output, context)];
842
+ }
843
+ return [4, parseBody(output.body, context)];
844
+ case 1:
845
+ data = _a.sent();
846
+ contents = {};
847
+ contents = deserializeAws_json1_0TagResourceResponse(data, context);
848
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
849
+ return [2, Promise.resolve(response)];
850
+ }
851
+ });
852
+ }); };
853
+ var deserializeAws_json1_0TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
854
+ var parsedOutput, _a, errorCode, _b, parsedBody;
855
+ var _c;
856
+ return __generator(this, function (_d) {
857
+ switch (_d.label) {
858
+ case 0:
859
+ _a = [__assign({}, output)];
860
+ _c = {};
861
+ return [4, parseErrorBody(output.body, context)];
862
+ case 1:
863
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
864
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
865
+ _b = errorCode;
866
+ switch (_b) {
867
+ case "AccessDeniedException": return [3, 2];
868
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
869
+ case "InternalServerException": return [3, 4];
870
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 4];
871
+ case "ResourceNotFoundException": return [3, 6];
872
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 6];
873
+ case "ServiceQuotaExceededException": return [3, 8];
874
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 8];
875
+ case "ValidationException": return [3, 10];
876
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 10];
877
+ }
878
+ return [3, 12];
879
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
880
+ case 3: throw _d.sent();
881
+ case 4: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
882
+ case 5: throw _d.sent();
883
+ case 6: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
884
+ case 7: throw _d.sent();
885
+ case 8: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
886
+ case 9: throw _d.sent();
887
+ case 10: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
888
+ case 11: throw _d.sent();
889
+ case 12:
890
+ parsedBody = parsedOutput.body;
891
+ throwDefaultError({
892
+ output: output,
893
+ parsedBody: parsedBody,
894
+ exceptionCtor: __BaseException,
895
+ errorCode: errorCode,
896
+ });
897
+ _d.label = 13;
898
+ case 13: return [2];
899
+ }
900
+ });
901
+ }); };
902
+ export var deserializeAws_json1_0UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
903
+ var data, contents, response;
904
+ return __generator(this, function (_a) {
905
+ switch (_a.label) {
906
+ case 0:
907
+ if (output.statusCode >= 300) {
908
+ return [2, deserializeAws_json1_0UntagResourceCommandError(output, context)];
909
+ }
910
+ return [4, parseBody(output.body, context)];
911
+ case 1:
912
+ data = _a.sent();
913
+ contents = {};
914
+ contents = deserializeAws_json1_0UntagResourceResponse(data, context);
915
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
916
+ return [2, Promise.resolve(response)];
917
+ }
918
+ });
919
+ }); };
920
+ var deserializeAws_json1_0UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
921
+ var parsedOutput, _a, errorCode, _b, parsedBody;
922
+ var _c;
923
+ return __generator(this, function (_d) {
924
+ switch (_d.label) {
925
+ case 0:
926
+ _a = [__assign({}, output)];
927
+ _c = {};
928
+ return [4, parseErrorBody(output.body, context)];
929
+ case 1:
930
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
931
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
932
+ _b = errorCode;
933
+ switch (_b) {
934
+ case "AccessDeniedException": return [3, 2];
935
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
936
+ case "ConflictException": return [3, 4];
937
+ case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
938
+ case "InternalServerException": return [3, 6];
939
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
940
+ case "ResourceNotFoundException": return [3, 8];
941
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
942
+ case "ServiceQuotaExceededException": return [3, 10];
943
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
944
+ case "ValidationException": return [3, 12];
945
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
946
+ }
947
+ return [3, 14];
948
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
949
+ case 3: throw _d.sent();
950
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
951
+ case 5: throw _d.sent();
952
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
953
+ case 7: throw _d.sent();
954
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
955
+ case 9: throw _d.sent();
956
+ case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
957
+ case 11: throw _d.sent();
958
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
959
+ case 13: throw _d.sent();
960
+ case 14:
961
+ parsedBody = parsedOutput.body;
962
+ throwDefaultError({
963
+ output: output,
964
+ parsedBody: parsedBody,
965
+ exceptionCtor: __BaseException,
966
+ errorCode: errorCode,
967
+ });
968
+ _d.label = 15;
969
+ case 15: return [2];
970
+ }
971
+ });
972
+ }); };
973
+ export var deserializeAws_json1_0UpdateTableCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
974
+ var data, contents, response;
975
+ return __generator(this, function (_a) {
976
+ switch (_a.label) {
977
+ case 0:
978
+ if (output.statusCode >= 300) {
979
+ return [2, deserializeAws_json1_0UpdateTableCommandError(output, context)];
980
+ }
981
+ return [4, parseBody(output.body, context)];
982
+ case 1:
983
+ data = _a.sent();
984
+ contents = {};
985
+ contents = deserializeAws_json1_0UpdateTableResponse(data, context);
986
+ response = __assign({ $metadata: deserializeMetadata(output) }, contents);
987
+ return [2, Promise.resolve(response)];
988
+ }
989
+ });
990
+ }); };
991
+ var deserializeAws_json1_0UpdateTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
992
+ var parsedOutput, _a, errorCode, _b, parsedBody;
993
+ var _c;
994
+ return __generator(this, function (_d) {
995
+ switch (_d.label) {
996
+ case 0:
997
+ _a = [__assign({}, output)];
998
+ _c = {};
999
+ return [4, parseErrorBody(output.body, context)];
1000
+ case 1:
1001
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1002
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1003
+ _b = errorCode;
1004
+ switch (_b) {
1005
+ case "AccessDeniedException": return [3, 2];
1006
+ case "com.amazonaws.keyspaces#AccessDeniedException": return [3, 2];
1007
+ case "ConflictException": return [3, 4];
1008
+ case "com.amazonaws.keyspaces#ConflictException": return [3, 4];
1009
+ case "InternalServerException": return [3, 6];
1010
+ case "com.amazonaws.keyspaces#InternalServerException": return [3, 6];
1011
+ case "ResourceNotFoundException": return [3, 8];
1012
+ case "com.amazonaws.keyspaces#ResourceNotFoundException": return [3, 8];
1013
+ case "ServiceQuotaExceededException": return [3, 10];
1014
+ case "com.amazonaws.keyspaces#ServiceQuotaExceededException": return [3, 10];
1015
+ case "ValidationException": return [3, 12];
1016
+ case "com.amazonaws.keyspaces#ValidationException": return [3, 12];
1017
+ }
1018
+ return [3, 14];
1019
+ case 2: return [4, deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context)];
1020
+ case 3: throw _d.sent();
1021
+ case 4: return [4, deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context)];
1022
+ case 5: throw _d.sent();
1023
+ case 6: return [4, deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context)];
1024
+ case 7: throw _d.sent();
1025
+ case 8: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
1026
+ case 9: throw _d.sent();
1027
+ case 10: return [4, deserializeAws_json1_0ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
1028
+ case 11: throw _d.sent();
1029
+ case 12: return [4, deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context)];
1030
+ case 13: throw _d.sent();
1031
+ case 14:
1032
+ parsedBody = parsedOutput.body;
1033
+ throwDefaultError({
1034
+ output: output,
1035
+ parsedBody: parsedBody,
1036
+ exceptionCtor: __BaseException,
1037
+ errorCode: errorCode,
1038
+ });
1039
+ _d.label = 15;
1040
+ case 15: return [2];
1041
+ }
1042
+ });
1043
+ }); };
1044
+ var deserializeAws_json1_0AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1045
+ var body, deserialized, exception;
1046
+ return __generator(this, function (_a) {
1047
+ body = parsedOutput.body;
1048
+ deserialized = deserializeAws_json1_0AccessDeniedException(body, context);
1049
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1050
+ return [2, __decorateServiceException(exception, body)];
1051
+ });
1052
+ }); };
1053
+ var deserializeAws_json1_0ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1054
+ var body, deserialized, exception;
1055
+ return __generator(this, function (_a) {
1056
+ body = parsedOutput.body;
1057
+ deserialized = deserializeAws_json1_0ConflictException(body, context);
1058
+ exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1059
+ return [2, __decorateServiceException(exception, body)];
1060
+ });
1061
+ }); };
1062
+ var deserializeAws_json1_0InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1063
+ var body, deserialized, exception;
1064
+ return __generator(this, function (_a) {
1065
+ body = parsedOutput.body;
1066
+ deserialized = deserializeAws_json1_0InternalServerException(body, context);
1067
+ exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1068
+ return [2, __decorateServiceException(exception, body)];
1069
+ });
1070
+ }); };
1071
+ var deserializeAws_json1_0ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1072
+ var body, deserialized, exception;
1073
+ return __generator(this, function (_a) {
1074
+ body = parsedOutput.body;
1075
+ deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
1076
+ exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1077
+ return [2, __decorateServiceException(exception, body)];
1078
+ });
1079
+ }); };
1080
+ var deserializeAws_json1_0ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1081
+ var body, deserialized, exception;
1082
+ return __generator(this, function (_a) {
1083
+ body = parsedOutput.body;
1084
+ deserialized = deserializeAws_json1_0ServiceQuotaExceededException(body, context);
1085
+ exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1086
+ return [2, __decorateServiceException(exception, body)];
1087
+ });
1088
+ }); };
1089
+ var deserializeAws_json1_0ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
1090
+ var body, deserialized, exception;
1091
+ return __generator(this, function (_a) {
1092
+ body = parsedOutput.body;
1093
+ deserialized = deserializeAws_json1_0ValidationException(body, context);
1094
+ exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
1095
+ return [2, __decorateServiceException(exception, body)];
1096
+ });
1097
+ }); };
1098
+ var serializeAws_json1_0CapacitySpecification = function (input, context) {
1099
+ return __assign(__assign(__assign({}, (input.readCapacityUnits != null && { readCapacityUnits: input.readCapacityUnits })), (input.throughputMode != null && { throughputMode: input.throughputMode })), (input.writeCapacityUnits != null && { writeCapacityUnits: input.writeCapacityUnits }));
785
1100
  };
786
- const serializeAws_json1_0ClusteringKey = (input, context) => {
787
- return {
788
- ...(input.name != null && { name: input.name }),
789
- ...(input.orderBy != null && { orderBy: input.orderBy }),
790
- };
1101
+ var serializeAws_json1_0ClusteringKey = function (input, context) {
1102
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.orderBy != null && { orderBy: input.orderBy }));
791
1103
  };
792
- const serializeAws_json1_0ClusteringKeyList = (input, context) => {
1104
+ var serializeAws_json1_0ClusteringKeyList = function (input, context) {
793
1105
  return input
794
- .filter((e) => e != null)
795
- .map((entry) => {
1106
+ .filter(function (e) { return e != null; })
1107
+ .map(function (entry) {
796
1108
  return serializeAws_json1_0ClusteringKey(entry, context);
797
1109
  });
798
1110
  };
799
- const serializeAws_json1_0ColumnDefinition = (input, context) => {
800
- return {
801
- ...(input.name != null && { name: input.name }),
802
- ...(input.type != null && { type: input.type }),
803
- };
1111
+ var serializeAws_json1_0ColumnDefinition = function (input, context) {
1112
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.type != null && { type: input.type }));
804
1113
  };
805
- const serializeAws_json1_0ColumnDefinitionList = (input, context) => {
1114
+ var serializeAws_json1_0ColumnDefinitionList = function (input, context) {
806
1115
  return input
807
- .filter((e) => e != null)
808
- .map((entry) => {
1116
+ .filter(function (e) { return e != null; })
1117
+ .map(function (entry) {
809
1118
  return serializeAws_json1_0ColumnDefinition(entry, context);
810
1119
  });
811
1120
  };
812
- const serializeAws_json1_0Comment = (input, context) => {
813
- return {
814
- ...(input.message != null && { message: input.message }),
815
- };
1121
+ var serializeAws_json1_0Comment = function (input, context) {
1122
+ return __assign({}, (input.message != null && { message: input.message }));
816
1123
  };
817
- const serializeAws_json1_0CreateKeyspaceRequest = (input, context) => {
818
- return {
819
- ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
820
- ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
821
- };
1124
+ var serializeAws_json1_0CreateKeyspaceRequest = function (input, context) {
1125
+ return __assign(__assign({}, (input.keyspaceName != null && { keyspaceName: input.keyspaceName })), (input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }));
822
1126
  };
823
- const serializeAws_json1_0CreateTableRequest = (input, context) => {
824
- return {
825
- ...(input.capacitySpecification != null && {
826
- capacitySpecification: serializeAws_json1_0CapacitySpecification(input.capacitySpecification, context),
827
- }),
828
- ...(input.comment != null && { comment: serializeAws_json1_0Comment(input.comment, context) }),
829
- ...(input.defaultTimeToLive != null && { defaultTimeToLive: input.defaultTimeToLive }),
830
- ...(input.encryptionSpecification != null && {
831
- encryptionSpecification: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecification, context),
832
- }),
833
- ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
834
- ...(input.pointInTimeRecovery != null && {
835
- pointInTimeRecovery: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecovery, context),
836
- }),
837
- ...(input.schemaDefinition != null && {
838
- schemaDefinition: serializeAws_json1_0SchemaDefinition(input.schemaDefinition, context),
839
- }),
840
- ...(input.tableName != null && { tableName: input.tableName }),
841
- ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
842
- ...(input.ttl != null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }),
843
- };
1127
+ var serializeAws_json1_0CreateTableRequest = function (input, context) {
1128
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.capacitySpecification != null && {
1129
+ capacitySpecification: serializeAws_json1_0CapacitySpecification(input.capacitySpecification, context),
1130
+ })), (input.comment != null && { comment: serializeAws_json1_0Comment(input.comment, context) })), (input.defaultTimeToLive != null && { defaultTimeToLive: input.defaultTimeToLive })), (input.encryptionSpecification != null && {
1131
+ encryptionSpecification: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecification, context),
1132
+ })), (input.keyspaceName != null && { keyspaceName: input.keyspaceName })), (input.pointInTimeRecovery != null && {
1133
+ pointInTimeRecovery: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecovery, context),
1134
+ })), (input.schemaDefinition != null && {
1135
+ schemaDefinition: serializeAws_json1_0SchemaDefinition(input.schemaDefinition, context),
1136
+ })), (input.tableName != null && { tableName: input.tableName })), (input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) })), (input.ttl != null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }));
844
1137
  };
845
- const serializeAws_json1_0DeleteKeyspaceRequest = (input, context) => {
846
- return {
847
- ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
848
- };
1138
+ var serializeAws_json1_0DeleteKeyspaceRequest = function (input, context) {
1139
+ return __assign({}, (input.keyspaceName != null && { keyspaceName: input.keyspaceName }));
849
1140
  };
850
- const serializeAws_json1_0DeleteTableRequest = (input, context) => {
851
- return {
852
- ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
853
- ...(input.tableName != null && { tableName: input.tableName }),
854
- };
1141
+ var serializeAws_json1_0DeleteTableRequest = function (input, context) {
1142
+ return __assign(__assign({}, (input.keyspaceName != null && { keyspaceName: input.keyspaceName })), (input.tableName != null && { tableName: input.tableName }));
855
1143
  };
856
- const serializeAws_json1_0EncryptionSpecification = (input, context) => {
857
- return {
858
- ...(input.kmsKeyIdentifier != null && { kmsKeyIdentifier: input.kmsKeyIdentifier }),
859
- ...(input.type != null && { type: input.type }),
860
- };
1144
+ var serializeAws_json1_0EncryptionSpecification = function (input, context) {
1145
+ return __assign(__assign({}, (input.kmsKeyIdentifier != null && { kmsKeyIdentifier: input.kmsKeyIdentifier })), (input.type != null && { type: input.type }));
861
1146
  };
862
- const serializeAws_json1_0GetKeyspaceRequest = (input, context) => {
863
- return {
864
- ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
865
- };
1147
+ var serializeAws_json1_0GetKeyspaceRequest = function (input, context) {
1148
+ return __assign({}, (input.keyspaceName != null && { keyspaceName: input.keyspaceName }));
866
1149
  };
867
- const serializeAws_json1_0GetTableRequest = (input, context) => {
868
- return {
869
- ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
870
- ...(input.tableName != null && { tableName: input.tableName }),
871
- };
1150
+ var serializeAws_json1_0GetTableRequest = function (input, context) {
1151
+ return __assign(__assign({}, (input.keyspaceName != null && { keyspaceName: input.keyspaceName })), (input.tableName != null && { tableName: input.tableName }));
872
1152
  };
873
- const serializeAws_json1_0ListKeyspacesRequest = (input, context) => {
874
- return {
875
- ...(input.maxResults != null && { maxResults: input.maxResults }),
876
- ...(input.nextToken != null && { nextToken: input.nextToken }),
877
- };
1153
+ var serializeAws_json1_0ListKeyspacesRequest = function (input, context) {
1154
+ return __assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
878
1155
  };
879
- const serializeAws_json1_0ListTablesRequest = (input, context) => {
880
- return {
881
- ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
882
- ...(input.maxResults != null && { maxResults: input.maxResults }),
883
- ...(input.nextToken != null && { nextToken: input.nextToken }),
884
- };
1156
+ var serializeAws_json1_0ListTablesRequest = function (input, context) {
1157
+ return __assign(__assign(__assign({}, (input.keyspaceName != null && { keyspaceName: input.keyspaceName })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken }));
885
1158
  };
886
- const serializeAws_json1_0ListTagsForResourceRequest = (input, context) => {
887
- return {
888
- ...(input.maxResults != null && { maxResults: input.maxResults }),
889
- ...(input.nextToken != null && { nextToken: input.nextToken }),
890
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
891
- };
1159
+ var serializeAws_json1_0ListTagsForResourceRequest = function (input, context) {
1160
+ return __assign(__assign(__assign({}, (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })), (input.resourceArn != null && { resourceArn: input.resourceArn }));
892
1161
  };
893
- const serializeAws_json1_0PartitionKey = (input, context) => {
894
- return {
895
- ...(input.name != null && { name: input.name }),
896
- };
1162
+ var serializeAws_json1_0PartitionKey = function (input, context) {
1163
+ return __assign({}, (input.name != null && { name: input.name }));
897
1164
  };
898
- const serializeAws_json1_0PartitionKeyList = (input, context) => {
1165
+ var serializeAws_json1_0PartitionKeyList = function (input, context) {
899
1166
  return input
900
- .filter((e) => e != null)
901
- .map((entry) => {
1167
+ .filter(function (e) { return e != null; })
1168
+ .map(function (entry) {
902
1169
  return serializeAws_json1_0PartitionKey(entry, context);
903
1170
  });
904
1171
  };
905
- const serializeAws_json1_0PointInTimeRecovery = (input, context) => {
906
- return {
907
- ...(input.status != null && { status: input.status }),
908
- };
909
- };
910
- const serializeAws_json1_0RestoreTableRequest = (input, context) => {
911
- return {
912
- ...(input.capacitySpecificationOverride != null && {
913
- capacitySpecificationOverride: serializeAws_json1_0CapacitySpecification(input.capacitySpecificationOverride, context),
914
- }),
915
- ...(input.encryptionSpecificationOverride != null && {
916
- encryptionSpecificationOverride: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecificationOverride, context),
917
- }),
918
- ...(input.pointInTimeRecoveryOverride != null && {
919
- pointInTimeRecoveryOverride: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecoveryOverride, context),
920
- }),
921
- ...(input.restoreTimestamp != null && { restoreTimestamp: Math.round(input.restoreTimestamp.getTime() / 1000) }),
922
- ...(input.sourceKeyspaceName != null && { sourceKeyspaceName: input.sourceKeyspaceName }),
923
- ...(input.sourceTableName != null && { sourceTableName: input.sourceTableName }),
924
- ...(input.tagsOverride != null && { tagsOverride: serializeAws_json1_0TagList(input.tagsOverride, context) }),
925
- ...(input.targetKeyspaceName != null && { targetKeyspaceName: input.targetKeyspaceName }),
926
- ...(input.targetTableName != null && { targetTableName: input.targetTableName }),
927
- };
928
- };
929
- const serializeAws_json1_0SchemaDefinition = (input, context) => {
930
- return {
931
- ...(input.allColumns != null && {
932
- allColumns: serializeAws_json1_0ColumnDefinitionList(input.allColumns, context),
933
- }),
934
- ...(input.clusteringKeys != null && {
935
- clusteringKeys: serializeAws_json1_0ClusteringKeyList(input.clusteringKeys, context),
936
- }),
937
- ...(input.partitionKeys != null && {
938
- partitionKeys: serializeAws_json1_0PartitionKeyList(input.partitionKeys, context),
939
- }),
940
- ...(input.staticColumns != null && {
941
- staticColumns: serializeAws_json1_0StaticColumnList(input.staticColumns, context),
942
- }),
943
- };
944
- };
945
- const serializeAws_json1_0StaticColumn = (input, context) => {
946
- return {
947
- ...(input.name != null && { name: input.name }),
948
- };
949
- };
950
- const serializeAws_json1_0StaticColumnList = (input, context) => {
1172
+ var serializeAws_json1_0PointInTimeRecovery = function (input, context) {
1173
+ return __assign({}, (input.status != null && { status: input.status }));
1174
+ };
1175
+ var serializeAws_json1_0RestoreTableRequest = function (input, context) {
1176
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.capacitySpecificationOverride != null && {
1177
+ capacitySpecificationOverride: serializeAws_json1_0CapacitySpecification(input.capacitySpecificationOverride, context),
1178
+ })), (input.encryptionSpecificationOverride != null && {
1179
+ encryptionSpecificationOverride: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecificationOverride, context),
1180
+ })), (input.pointInTimeRecoveryOverride != null && {
1181
+ pointInTimeRecoveryOverride: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecoveryOverride, context),
1182
+ })), (input.restoreTimestamp != null && { restoreTimestamp: Math.round(input.restoreTimestamp.getTime() / 1000) })), (input.sourceKeyspaceName != null && { sourceKeyspaceName: input.sourceKeyspaceName })), (input.sourceTableName != null && { sourceTableName: input.sourceTableName })), (input.tagsOverride != null && { tagsOverride: serializeAws_json1_0TagList(input.tagsOverride, context) })), (input.targetKeyspaceName != null && { targetKeyspaceName: input.targetKeyspaceName })), (input.targetTableName != null && { targetTableName: input.targetTableName }));
1183
+ };
1184
+ var serializeAws_json1_0SchemaDefinition = function (input, context) {
1185
+ return __assign(__assign(__assign(__assign({}, (input.allColumns != null && {
1186
+ allColumns: serializeAws_json1_0ColumnDefinitionList(input.allColumns, context),
1187
+ })), (input.clusteringKeys != null && {
1188
+ clusteringKeys: serializeAws_json1_0ClusteringKeyList(input.clusteringKeys, context),
1189
+ })), (input.partitionKeys != null && {
1190
+ partitionKeys: serializeAws_json1_0PartitionKeyList(input.partitionKeys, context),
1191
+ })), (input.staticColumns != null && {
1192
+ staticColumns: serializeAws_json1_0StaticColumnList(input.staticColumns, context),
1193
+ }));
1194
+ };
1195
+ var serializeAws_json1_0StaticColumn = function (input, context) {
1196
+ return __assign({}, (input.name != null && { name: input.name }));
1197
+ };
1198
+ var serializeAws_json1_0StaticColumnList = function (input, context) {
951
1199
  return input
952
- .filter((e) => e != null)
953
- .map((entry) => {
1200
+ .filter(function (e) { return e != null; })
1201
+ .map(function (entry) {
954
1202
  return serializeAws_json1_0StaticColumn(entry, context);
955
1203
  });
956
1204
  };
957
- const serializeAws_json1_0Tag = (input, context) => {
958
- return {
959
- ...(input.key != null && { key: input.key }),
960
- ...(input.value != null && { value: input.value }),
961
- };
1205
+ var serializeAws_json1_0Tag = function (input, context) {
1206
+ return __assign(__assign({}, (input.key != null && { key: input.key })), (input.value != null && { value: input.value }));
962
1207
  };
963
- const serializeAws_json1_0TagList = (input, context) => {
1208
+ var serializeAws_json1_0TagList = function (input, context) {
964
1209
  return input
965
- .filter((e) => e != null)
966
- .map((entry) => {
1210
+ .filter(function (e) { return e != null; })
1211
+ .map(function (entry) {
967
1212
  return serializeAws_json1_0Tag(entry, context);
968
1213
  });
969
1214
  };
970
- const serializeAws_json1_0TagResourceRequest = (input, context) => {
971
- return {
972
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
973
- ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
974
- };
1215
+ var serializeAws_json1_0TagResourceRequest = function (input, context) {
1216
+ return __assign(__assign({}, (input.resourceArn != null && { resourceArn: input.resourceArn })), (input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }));
975
1217
  };
976
- const serializeAws_json1_0TimeToLive = (input, context) => {
977
- return {
978
- ...(input.status != null && { status: input.status }),
979
- };
1218
+ var serializeAws_json1_0TimeToLive = function (input, context) {
1219
+ return __assign({}, (input.status != null && { status: input.status }));
980
1220
  };
981
- const serializeAws_json1_0UntagResourceRequest = (input, context) => {
982
- return {
983
- ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
984
- ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
985
- };
1221
+ var serializeAws_json1_0UntagResourceRequest = function (input, context) {
1222
+ return __assign(__assign({}, (input.resourceArn != null && { resourceArn: input.resourceArn })), (input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }));
986
1223
  };
987
- const serializeAws_json1_0UpdateTableRequest = (input, context) => {
988
- return {
989
- ...(input.addColumns != null && {
990
- addColumns: serializeAws_json1_0ColumnDefinitionList(input.addColumns, context),
991
- }),
992
- ...(input.capacitySpecification != null && {
993
- capacitySpecification: serializeAws_json1_0CapacitySpecification(input.capacitySpecification, context),
994
- }),
995
- ...(input.defaultTimeToLive != null && { defaultTimeToLive: input.defaultTimeToLive }),
996
- ...(input.encryptionSpecification != null && {
997
- encryptionSpecification: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecification, context),
998
- }),
999
- ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
1000
- ...(input.pointInTimeRecovery != null && {
1001
- pointInTimeRecovery: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecovery, context),
1002
- }),
1003
- ...(input.tableName != null && { tableName: input.tableName }),
1004
- ...(input.ttl != null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }),
1005
- };
1224
+ var serializeAws_json1_0UpdateTableRequest = function (input, context) {
1225
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.addColumns != null && {
1226
+ addColumns: serializeAws_json1_0ColumnDefinitionList(input.addColumns, context),
1227
+ })), (input.capacitySpecification != null && {
1228
+ capacitySpecification: serializeAws_json1_0CapacitySpecification(input.capacitySpecification, context),
1229
+ })), (input.defaultTimeToLive != null && { defaultTimeToLive: input.defaultTimeToLive })), (input.encryptionSpecification != null && {
1230
+ encryptionSpecification: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecification, context),
1231
+ })), (input.keyspaceName != null && { keyspaceName: input.keyspaceName })), (input.pointInTimeRecovery != null && {
1232
+ pointInTimeRecovery: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecovery, context),
1233
+ })), (input.tableName != null && { tableName: input.tableName })), (input.ttl != null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }));
1006
1234
  };
1007
- const deserializeAws_json1_0AccessDeniedException = (output, context) => {
1235
+ var deserializeAws_json1_0AccessDeniedException = function (output, context) {
1008
1236
  return {
1009
1237
  message: __expectString(output.message),
1010
1238
  };
1011
1239
  };
1012
- const deserializeAws_json1_0CapacitySpecificationSummary = (output, context) => {
1240
+ var deserializeAws_json1_0CapacitySpecificationSummary = function (output, context) {
1013
1241
  return {
1014
1242
  lastUpdateToPayPerRequestTimestamp: output.lastUpdateToPayPerRequestTimestamp != null
1015
1243
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateToPayPerRequestTimestamp)))
@@ -1019,16 +1247,16 @@ const deserializeAws_json1_0CapacitySpecificationSummary = (output, context) =>
1019
1247
  writeCapacityUnits: __expectLong(output.writeCapacityUnits),
1020
1248
  };
1021
1249
  };
1022
- const deserializeAws_json1_0ClusteringKey = (output, context) => {
1250
+ var deserializeAws_json1_0ClusteringKey = function (output, context) {
1023
1251
  return {
1024
1252
  name: __expectString(output.name),
1025
1253
  orderBy: __expectString(output.orderBy),
1026
1254
  };
1027
1255
  };
1028
- const deserializeAws_json1_0ClusteringKeyList = (output, context) => {
1029
- const retVal = (output || [])
1030
- .filter((e) => e != null)
1031
- .map((entry) => {
1256
+ var deserializeAws_json1_0ClusteringKeyList = function (output, context) {
1257
+ var retVal = (output || [])
1258
+ .filter(function (e) { return e != null; })
1259
+ .map(function (entry) {
1032
1260
  if (entry === null) {
1033
1261
  return null;
1034
1262
  }
@@ -1036,16 +1264,16 @@ const deserializeAws_json1_0ClusteringKeyList = (output, context) => {
1036
1264
  });
1037
1265
  return retVal;
1038
1266
  };
1039
- const deserializeAws_json1_0ColumnDefinition = (output, context) => {
1267
+ var deserializeAws_json1_0ColumnDefinition = function (output, context) {
1040
1268
  return {
1041
1269
  name: __expectString(output.name),
1042
1270
  type: __expectString(output.type),
1043
1271
  };
1044
1272
  };
1045
- const deserializeAws_json1_0ColumnDefinitionList = (output, context) => {
1046
- const retVal = (output || [])
1047
- .filter((e) => e != null)
1048
- .map((entry) => {
1273
+ var deserializeAws_json1_0ColumnDefinitionList = function (output, context) {
1274
+ var retVal = (output || [])
1275
+ .filter(function (e) { return e != null; })
1276
+ .map(function (entry) {
1049
1277
  if (entry === null) {
1050
1278
  return null;
1051
1279
  }
@@ -1053,45 +1281,45 @@ const deserializeAws_json1_0ColumnDefinitionList = (output, context) => {
1053
1281
  });
1054
1282
  return retVal;
1055
1283
  };
1056
- const deserializeAws_json1_0Comment = (output, context) => {
1284
+ var deserializeAws_json1_0Comment = function (output, context) {
1057
1285
  return {
1058
1286
  message: __expectString(output.message),
1059
1287
  };
1060
1288
  };
1061
- const deserializeAws_json1_0ConflictException = (output, context) => {
1289
+ var deserializeAws_json1_0ConflictException = function (output, context) {
1062
1290
  return {
1063
1291
  message: __expectString(output.message),
1064
1292
  };
1065
1293
  };
1066
- const deserializeAws_json1_0CreateKeyspaceResponse = (output, context) => {
1294
+ var deserializeAws_json1_0CreateKeyspaceResponse = function (output, context) {
1067
1295
  return {
1068
1296
  resourceArn: __expectString(output.resourceArn),
1069
1297
  };
1070
1298
  };
1071
- const deserializeAws_json1_0CreateTableResponse = (output, context) => {
1299
+ var deserializeAws_json1_0CreateTableResponse = function (output, context) {
1072
1300
  return {
1073
1301
  resourceArn: __expectString(output.resourceArn),
1074
1302
  };
1075
1303
  };
1076
- const deserializeAws_json1_0DeleteKeyspaceResponse = (output, context) => {
1304
+ var deserializeAws_json1_0DeleteKeyspaceResponse = function (output, context) {
1077
1305
  return {};
1078
1306
  };
1079
- const deserializeAws_json1_0DeleteTableResponse = (output, context) => {
1307
+ var deserializeAws_json1_0DeleteTableResponse = function (output, context) {
1080
1308
  return {};
1081
1309
  };
1082
- const deserializeAws_json1_0EncryptionSpecification = (output, context) => {
1310
+ var deserializeAws_json1_0EncryptionSpecification = function (output, context) {
1083
1311
  return {
1084
1312
  kmsKeyIdentifier: __expectString(output.kmsKeyIdentifier),
1085
1313
  type: __expectString(output.type),
1086
1314
  };
1087
1315
  };
1088
- const deserializeAws_json1_0GetKeyspaceResponse = (output, context) => {
1316
+ var deserializeAws_json1_0GetKeyspaceResponse = function (output, context) {
1089
1317
  return {
1090
1318
  keyspaceName: __expectString(output.keyspaceName),
1091
1319
  resourceArn: __expectString(output.resourceArn),
1092
1320
  };
1093
1321
  };
1094
- const deserializeAws_json1_0GetTableResponse = (output, context) => {
1322
+ var deserializeAws_json1_0GetTableResponse = function (output, context) {
1095
1323
  return {
1096
1324
  capacitySpecification: output.capacitySpecification != null
1097
1325
  ? deserializeAws_json1_0CapacitySpecificationSummary(output.capacitySpecification, context)
@@ -1117,21 +1345,21 @@ const deserializeAws_json1_0GetTableResponse = (output, context) => {
1117
1345
  ttl: output.ttl != null ? deserializeAws_json1_0TimeToLive(output.ttl, context) : undefined,
1118
1346
  };
1119
1347
  };
1120
- const deserializeAws_json1_0InternalServerException = (output, context) => {
1348
+ var deserializeAws_json1_0InternalServerException = function (output, context) {
1121
1349
  return {
1122
1350
  message: __expectString(output.message),
1123
1351
  };
1124
1352
  };
1125
- const deserializeAws_json1_0KeyspaceSummary = (output, context) => {
1353
+ var deserializeAws_json1_0KeyspaceSummary = function (output, context) {
1126
1354
  return {
1127
1355
  keyspaceName: __expectString(output.keyspaceName),
1128
1356
  resourceArn: __expectString(output.resourceArn),
1129
1357
  };
1130
1358
  };
1131
- const deserializeAws_json1_0KeyspaceSummaryList = (output, context) => {
1132
- const retVal = (output || [])
1133
- .filter((e) => e != null)
1134
- .map((entry) => {
1359
+ var deserializeAws_json1_0KeyspaceSummaryList = function (output, context) {
1360
+ var retVal = (output || [])
1361
+ .filter(function (e) { return e != null; })
1362
+ .map(function (entry) {
1135
1363
  if (entry === null) {
1136
1364
  return null;
1137
1365
  }
@@ -1139,33 +1367,33 @@ const deserializeAws_json1_0KeyspaceSummaryList = (output, context) => {
1139
1367
  });
1140
1368
  return retVal;
1141
1369
  };
1142
- const deserializeAws_json1_0ListKeyspacesResponse = (output, context) => {
1370
+ var deserializeAws_json1_0ListKeyspacesResponse = function (output, context) {
1143
1371
  return {
1144
1372
  keyspaces: output.keyspaces != null ? deserializeAws_json1_0KeyspaceSummaryList(output.keyspaces, context) : undefined,
1145
1373
  nextToken: __expectString(output.nextToken),
1146
1374
  };
1147
1375
  };
1148
- const deserializeAws_json1_0ListTablesResponse = (output, context) => {
1376
+ var deserializeAws_json1_0ListTablesResponse = function (output, context) {
1149
1377
  return {
1150
1378
  nextToken: __expectString(output.nextToken),
1151
1379
  tables: output.tables != null ? deserializeAws_json1_0TableSummaryList(output.tables, context) : undefined,
1152
1380
  };
1153
1381
  };
1154
- const deserializeAws_json1_0ListTagsForResourceResponse = (output, context) => {
1382
+ var deserializeAws_json1_0ListTagsForResourceResponse = function (output, context) {
1155
1383
  return {
1156
1384
  nextToken: __expectString(output.nextToken),
1157
1385
  tags: output.tags != null ? deserializeAws_json1_0TagList(output.tags, context) : undefined,
1158
1386
  };
1159
1387
  };
1160
- const deserializeAws_json1_0PartitionKey = (output, context) => {
1388
+ var deserializeAws_json1_0PartitionKey = function (output, context) {
1161
1389
  return {
1162
1390
  name: __expectString(output.name),
1163
1391
  };
1164
1392
  };
1165
- const deserializeAws_json1_0PartitionKeyList = (output, context) => {
1166
- const retVal = (output || [])
1167
- .filter((e) => e != null)
1168
- .map((entry) => {
1393
+ var deserializeAws_json1_0PartitionKeyList = function (output, context) {
1394
+ var retVal = (output || [])
1395
+ .filter(function (e) { return e != null; })
1396
+ .map(function (entry) {
1169
1397
  if (entry === null) {
1170
1398
  return null;
1171
1399
  }
@@ -1173,7 +1401,7 @@ const deserializeAws_json1_0PartitionKeyList = (output, context) => {
1173
1401
  });
1174
1402
  return retVal;
1175
1403
  };
1176
- const deserializeAws_json1_0PointInTimeRecoverySummary = (output, context) => {
1404
+ var deserializeAws_json1_0PointInTimeRecoverySummary = function (output, context) {
1177
1405
  return {
1178
1406
  earliestRestorableTimestamp: output.earliestRestorableTimestamp != null
1179
1407
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.earliestRestorableTimestamp)))
@@ -1181,18 +1409,18 @@ const deserializeAws_json1_0PointInTimeRecoverySummary = (output, context) => {
1181
1409
  status: __expectString(output.status),
1182
1410
  };
1183
1411
  };
1184
- const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
1412
+ var deserializeAws_json1_0ResourceNotFoundException = function (output, context) {
1185
1413
  return {
1186
1414
  message: __expectString(output.message),
1187
1415
  resourceArn: __expectString(output.resourceArn),
1188
1416
  };
1189
1417
  };
1190
- const deserializeAws_json1_0RestoreTableResponse = (output, context) => {
1418
+ var deserializeAws_json1_0RestoreTableResponse = function (output, context) {
1191
1419
  return {
1192
1420
  restoredTableARN: __expectString(output.restoredTableARN),
1193
1421
  };
1194
1422
  };
1195
- const deserializeAws_json1_0SchemaDefinition = (output, context) => {
1423
+ var deserializeAws_json1_0SchemaDefinition = function (output, context) {
1196
1424
  return {
1197
1425
  allColumns: output.allColumns != null ? deserializeAws_json1_0ColumnDefinitionList(output.allColumns, context) : undefined,
1198
1426
  clusteringKeys: output.clusteringKeys != null
@@ -1202,20 +1430,20 @@ const deserializeAws_json1_0SchemaDefinition = (output, context) => {
1202
1430
  staticColumns: output.staticColumns != null ? deserializeAws_json1_0StaticColumnList(output.staticColumns, context) : undefined,
1203
1431
  };
1204
1432
  };
1205
- const deserializeAws_json1_0ServiceQuotaExceededException = (output, context) => {
1433
+ var deserializeAws_json1_0ServiceQuotaExceededException = function (output, context) {
1206
1434
  return {
1207
1435
  message: __expectString(output.message),
1208
1436
  };
1209
1437
  };
1210
- const deserializeAws_json1_0StaticColumn = (output, context) => {
1438
+ var deserializeAws_json1_0StaticColumn = function (output, context) {
1211
1439
  return {
1212
1440
  name: __expectString(output.name),
1213
1441
  };
1214
1442
  };
1215
- const deserializeAws_json1_0StaticColumnList = (output, context) => {
1216
- const retVal = (output || [])
1217
- .filter((e) => e != null)
1218
- .map((entry) => {
1443
+ var deserializeAws_json1_0StaticColumnList = function (output, context) {
1444
+ var retVal = (output || [])
1445
+ .filter(function (e) { return e != null; })
1446
+ .map(function (entry) {
1219
1447
  if (entry === null) {
1220
1448
  return null;
1221
1449
  }
@@ -1223,17 +1451,17 @@ const deserializeAws_json1_0StaticColumnList = (output, context) => {
1223
1451
  });
1224
1452
  return retVal;
1225
1453
  };
1226
- const deserializeAws_json1_0TableSummary = (output, context) => {
1454
+ var deserializeAws_json1_0TableSummary = function (output, context) {
1227
1455
  return {
1228
1456
  keyspaceName: __expectString(output.keyspaceName),
1229
1457
  resourceArn: __expectString(output.resourceArn),
1230
1458
  tableName: __expectString(output.tableName),
1231
1459
  };
1232
1460
  };
1233
- const deserializeAws_json1_0TableSummaryList = (output, context) => {
1234
- const retVal = (output || [])
1235
- .filter((e) => e != null)
1236
- .map((entry) => {
1461
+ var deserializeAws_json1_0TableSummaryList = function (output, context) {
1462
+ var retVal = (output || [])
1463
+ .filter(function (e) { return e != null; })
1464
+ .map(function (entry) {
1237
1465
  if (entry === null) {
1238
1466
  return null;
1239
1467
  }
@@ -1241,16 +1469,16 @@ const deserializeAws_json1_0TableSummaryList = (output, context) => {
1241
1469
  });
1242
1470
  return retVal;
1243
1471
  };
1244
- const deserializeAws_json1_0Tag = (output, context) => {
1472
+ var deserializeAws_json1_0Tag = function (output, context) {
1245
1473
  return {
1246
1474
  key: __expectString(output.key),
1247
1475
  value: __expectString(output.value),
1248
1476
  };
1249
1477
  };
1250
- const deserializeAws_json1_0TagList = (output, context) => {
1251
- const retVal = (output || [])
1252
- .filter((e) => e != null)
1253
- .map((entry) => {
1478
+ var deserializeAws_json1_0TagList = function (output, context) {
1479
+ var retVal = (output || [])
1480
+ .filter(function (e) { return e != null; })
1481
+ .map(function (entry) {
1254
1482
  if (entry === null) {
1255
1483
  return null;
1256
1484
  }
@@ -1258,73 +1486,96 @@ const deserializeAws_json1_0TagList = (output, context) => {
1258
1486
  });
1259
1487
  return retVal;
1260
1488
  };
1261
- const deserializeAws_json1_0TagResourceResponse = (output, context) => {
1489
+ var deserializeAws_json1_0TagResourceResponse = function (output, context) {
1262
1490
  return {};
1263
1491
  };
1264
- const deserializeAws_json1_0TimeToLive = (output, context) => {
1492
+ var deserializeAws_json1_0TimeToLive = function (output, context) {
1265
1493
  return {
1266
1494
  status: __expectString(output.status),
1267
1495
  };
1268
1496
  };
1269
- const deserializeAws_json1_0UntagResourceResponse = (output, context) => {
1497
+ var deserializeAws_json1_0UntagResourceResponse = function (output, context) {
1270
1498
  return {};
1271
1499
  };
1272
- const deserializeAws_json1_0UpdateTableResponse = (output, context) => {
1500
+ var deserializeAws_json1_0UpdateTableResponse = function (output, context) {
1273
1501
  return {
1274
1502
  resourceArn: __expectString(output.resourceArn),
1275
1503
  };
1276
1504
  };
1277
- const deserializeAws_json1_0ValidationException = (output, context) => {
1505
+ var deserializeAws_json1_0ValidationException = function (output, context) {
1278
1506
  return {
1279
1507
  message: __expectString(output.message),
1280
1508
  };
1281
1509
  };
1282
- const deserializeMetadata = (output) => ({
1283
- httpStatusCode: output.statusCode,
1284
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
1285
- extendedRequestId: output.headers["x-amz-id-2"],
1286
- cfId: output.headers["x-amz-cf-id"],
1287
- });
1288
- const collectBody = (streamBody = new Uint8Array(), context) => {
1510
+ var deserializeMetadata = function (output) {
1511
+ var _a, _b;
1512
+ return ({
1513
+ httpStatusCode: output.statusCode,
1514
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
1515
+ extendedRequestId: output.headers["x-amz-id-2"],
1516
+ cfId: output.headers["x-amz-cf-id"],
1517
+ });
1518
+ };
1519
+ var collectBody = function (streamBody, context) {
1520
+ if (streamBody === void 0) { streamBody = new Uint8Array(); }
1289
1521
  if (streamBody instanceof Uint8Array) {
1290
1522
  return Promise.resolve(streamBody);
1291
1523
  }
1292
1524
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1293
1525
  };
1294
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1295
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1297
- const contents = {
1298
- protocol,
1299
- hostname,
1300
- port,
1301
- method: "POST",
1302
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1303
- headers,
1304
- };
1305
- if (resolvedHostname !== undefined) {
1306
- contents.hostname = resolvedHostname;
1307
- }
1308
- if (body !== undefined) {
1309
- contents.body = body;
1310
- }
1311
- return new __HttpRequest(contents);
1526
+ var collectBodyString = function (streamBody, context) {
1527
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
1528
+ };
1529
+ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
1530
+ var _a, hostname, _b, protocol, port, basePath, contents;
1531
+ return __generator(this, function (_c) {
1532
+ switch (_c.label) {
1533
+ case 0: return [4, context.endpoint()];
1534
+ case 1:
1535
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1536
+ contents = {
1537
+ protocol: protocol,
1538
+ hostname: hostname,
1539
+ port: port,
1540
+ method: "POST",
1541
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1542
+ headers: headers,
1543
+ };
1544
+ if (resolvedHostname !== undefined) {
1545
+ contents.hostname = resolvedHostname;
1546
+ }
1547
+ if (body !== undefined) {
1548
+ contents.body = body;
1549
+ }
1550
+ return [2, new __HttpRequest(contents)];
1551
+ }
1552
+ });
1553
+ }); };
1554
+ var parseBody = function (streamBody, context) {
1555
+ return collectBodyString(streamBody, context).then(function (encoded) {
1556
+ if (encoded.length) {
1557
+ return JSON.parse(encoded);
1558
+ }
1559
+ return {};
1560
+ });
1312
1561
  };
1313
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1314
- if (encoded.length) {
1315
- return JSON.parse(encoded);
1316
- }
1317
- return {};
1318
- });
1319
- const parseErrorBody = async (errorBody, context) => {
1320
- const value = await parseBody(errorBody, context);
1321
- value.message = value.message ?? value.Message;
1322
- return value;
1323
- };
1324
- const loadRestJsonErrorCode = (output, data) => {
1325
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1326
- const sanitizeErrorCode = (rawValue) => {
1327
- let cleanValue = rawValue;
1562
+ var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
1563
+ var value;
1564
+ var _a;
1565
+ return __generator(this, function (_b) {
1566
+ switch (_b.label) {
1567
+ case 0: return [4, parseBody(errorBody, context)];
1568
+ case 1:
1569
+ value = _b.sent();
1570
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1571
+ return [2, value];
1572
+ }
1573
+ });
1574
+ }); };
1575
+ var loadRestJsonErrorCode = function (output, data) {
1576
+ var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1577
+ var sanitizeErrorCode = function (rawValue) {
1578
+ var cleanValue = rawValue;
1328
1579
  if (typeof cleanValue === "number") {
1329
1580
  cleanValue = cleanValue.toString();
1330
1581
  }
@@ -1339,7 +1590,7 @@ const loadRestJsonErrorCode = (output, data) => {
1339
1590
  }
1340
1591
  return cleanValue;
1341
1592
  };
1342
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1593
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
1343
1594
  if (headerKey !== undefined) {
1344
1595
  return sanitizeErrorCode(output.headers[headerKey]);
1345
1596
  }