@aws-sdk/client-keyspaces 3.118.1 → 3.128.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.
@@ -155,8 +155,7 @@ const deserializeAws_json1_0CreateKeyspaceCommandError = async (output, context)
155
155
  body: await parseBody(output.body, context),
156
156
  };
157
157
  let response;
158
- let errorCode = "UnknownError";
159
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
158
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
160
159
  switch (errorCode) {
161
160
  case "AccessDeniedException":
162
161
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -175,10 +174,12 @@ const deserializeAws_json1_0CreateKeyspaceCommandError = async (output, context)
175
174
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
176
175
  default:
177
176
  const parsedBody = parsedOutput.body;
177
+ const $metadata = deserializeMetadata(output);
178
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
178
179
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
179
- name: parsedBody.code || parsedBody.Code || errorCode,
180
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
180
181
  $fault: "client",
181
- $metadata: deserializeMetadata(output),
182
+ $metadata,
182
183
  });
183
184
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
184
185
  }
@@ -203,8 +204,7 @@ const deserializeAws_json1_0CreateTableCommandError = async (output, context) =>
203
204
  body: await parseBody(output.body, context),
204
205
  };
205
206
  let response;
206
- let errorCode = "UnknownError";
207
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
207
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
208
208
  switch (errorCode) {
209
209
  case "AccessDeniedException":
210
210
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -226,10 +226,12 @@ const deserializeAws_json1_0CreateTableCommandError = async (output, context) =>
226
226
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
227
227
  default:
228
228
  const parsedBody = parsedOutput.body;
229
+ const $metadata = deserializeMetadata(output);
230
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
229
231
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
230
- name: parsedBody.code || parsedBody.Code || errorCode,
232
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
231
233
  $fault: "client",
232
- $metadata: deserializeMetadata(output),
234
+ $metadata,
233
235
  });
234
236
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
235
237
  }
@@ -254,8 +256,7 @@ const deserializeAws_json1_0DeleteKeyspaceCommandError = async (output, context)
254
256
  body: await parseBody(output.body, context),
255
257
  };
256
258
  let response;
257
- let errorCode = "UnknownError";
258
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
259
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
259
260
  switch (errorCode) {
260
261
  case "AccessDeniedException":
261
262
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -277,10 +278,12 @@ const deserializeAws_json1_0DeleteKeyspaceCommandError = async (output, context)
277
278
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
278
279
  default:
279
280
  const parsedBody = parsedOutput.body;
281
+ const $metadata = deserializeMetadata(output);
282
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
280
283
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
281
- name: parsedBody.code || parsedBody.Code || errorCode,
284
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
282
285
  $fault: "client",
283
- $metadata: deserializeMetadata(output),
286
+ $metadata,
284
287
  });
285
288
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
286
289
  }
@@ -305,8 +308,7 @@ const deserializeAws_json1_0DeleteTableCommandError = async (output, context) =>
305
308
  body: await parseBody(output.body, context),
306
309
  };
307
310
  let response;
308
- let errorCode = "UnknownError";
309
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
311
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
310
312
  switch (errorCode) {
311
313
  case "AccessDeniedException":
312
314
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -328,10 +330,12 @@ const deserializeAws_json1_0DeleteTableCommandError = async (output, context) =>
328
330
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
329
331
  default:
330
332
  const parsedBody = parsedOutput.body;
333
+ const $metadata = deserializeMetadata(output);
334
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
331
335
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
332
- name: parsedBody.code || parsedBody.Code || errorCode,
336
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
333
337
  $fault: "client",
334
- $metadata: deserializeMetadata(output),
338
+ $metadata,
335
339
  });
336
340
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
337
341
  }
@@ -356,8 +360,7 @@ const deserializeAws_json1_0GetKeyspaceCommandError = async (output, context) =>
356
360
  body: await parseBody(output.body, context),
357
361
  };
358
362
  let response;
359
- let errorCode = "UnknownError";
360
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
363
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
361
364
  switch (errorCode) {
362
365
  case "AccessDeniedException":
363
366
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -376,10 +379,12 @@ const deserializeAws_json1_0GetKeyspaceCommandError = async (output, context) =>
376
379
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
377
380
  default:
378
381
  const parsedBody = parsedOutput.body;
382
+ const $metadata = deserializeMetadata(output);
383
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
379
384
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
380
- name: parsedBody.code || parsedBody.Code || errorCode,
385
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
381
386
  $fault: "client",
382
- $metadata: deserializeMetadata(output),
387
+ $metadata,
383
388
  });
384
389
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
385
390
  }
@@ -404,8 +409,7 @@ const deserializeAws_json1_0GetTableCommandError = async (output, context) => {
404
409
  body: await parseBody(output.body, context),
405
410
  };
406
411
  let response;
407
- let errorCode = "UnknownError";
408
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
412
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
409
413
  switch (errorCode) {
410
414
  case "AccessDeniedException":
411
415
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -424,10 +428,12 @@ const deserializeAws_json1_0GetTableCommandError = async (output, context) => {
424
428
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
425
429
  default:
426
430
  const parsedBody = parsedOutput.body;
431
+ const $metadata = deserializeMetadata(output);
432
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
427
433
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
428
- name: parsedBody.code || parsedBody.Code || errorCode,
434
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
429
435
  $fault: "client",
430
- $metadata: deserializeMetadata(output),
436
+ $metadata,
431
437
  });
432
438
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
433
439
  }
@@ -452,8 +458,7 @@ const deserializeAws_json1_0ListKeyspacesCommandError = async (output, context)
452
458
  body: await parseBody(output.body, context),
453
459
  };
454
460
  let response;
455
- let errorCode = "UnknownError";
456
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
461
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
457
462
  switch (errorCode) {
458
463
  case "AccessDeniedException":
459
464
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -472,10 +477,12 @@ const deserializeAws_json1_0ListKeyspacesCommandError = async (output, context)
472
477
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
473
478
  default:
474
479
  const parsedBody = parsedOutput.body;
480
+ const $metadata = deserializeMetadata(output);
481
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
475
482
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
476
- name: parsedBody.code || parsedBody.Code || errorCode,
483
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
477
484
  $fault: "client",
478
- $metadata: deserializeMetadata(output),
485
+ $metadata,
479
486
  });
480
487
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
481
488
  }
@@ -500,8 +507,7 @@ const deserializeAws_json1_0ListTablesCommandError = async (output, context) =>
500
507
  body: await parseBody(output.body, context),
501
508
  };
502
509
  let response;
503
- let errorCode = "UnknownError";
504
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
510
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
505
511
  switch (errorCode) {
506
512
  case "AccessDeniedException":
507
513
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -520,10 +526,12 @@ const deserializeAws_json1_0ListTablesCommandError = async (output, context) =>
520
526
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
521
527
  default:
522
528
  const parsedBody = parsedOutput.body;
529
+ const $metadata = deserializeMetadata(output);
530
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
523
531
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
524
- name: parsedBody.code || parsedBody.Code || errorCode,
532
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
525
533
  $fault: "client",
526
- $metadata: deserializeMetadata(output),
534
+ $metadata,
527
535
  });
528
536
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
529
537
  }
@@ -548,8 +556,7 @@ const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, con
548
556
  body: await parseBody(output.body, context),
549
557
  };
550
558
  let response;
551
- let errorCode = "UnknownError";
552
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
559
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
553
560
  switch (errorCode) {
554
561
  case "AccessDeniedException":
555
562
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -568,10 +575,12 @@ const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, con
568
575
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
569
576
  default:
570
577
  const parsedBody = parsedOutput.body;
578
+ const $metadata = deserializeMetadata(output);
579
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
571
580
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
572
- name: parsedBody.code || parsedBody.Code || errorCode,
581
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
573
582
  $fault: "client",
574
- $metadata: deserializeMetadata(output),
583
+ $metadata,
575
584
  });
576
585
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
577
586
  }
@@ -596,8 +605,7 @@ const deserializeAws_json1_0RestoreTableCommandError = async (output, context) =
596
605
  body: await parseBody(output.body, context),
597
606
  };
598
607
  let response;
599
- let errorCode = "UnknownError";
600
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
608
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
601
609
  switch (errorCode) {
602
610
  case "AccessDeniedException":
603
611
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -619,10 +627,12 @@ const deserializeAws_json1_0RestoreTableCommandError = async (output, context) =
619
627
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
620
628
  default:
621
629
  const parsedBody = parsedOutput.body;
630
+ const $metadata = deserializeMetadata(output);
631
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
622
632
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
623
- name: parsedBody.code || parsedBody.Code || errorCode,
633
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
624
634
  $fault: "client",
625
- $metadata: deserializeMetadata(output),
635
+ $metadata,
626
636
  });
627
637
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
628
638
  }
@@ -647,8 +657,7 @@ const deserializeAws_json1_0TagResourceCommandError = async (output, context) =>
647
657
  body: await parseBody(output.body, context),
648
658
  };
649
659
  let response;
650
- let errorCode = "UnknownError";
651
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
652
661
  switch (errorCode) {
653
662
  case "AccessDeniedException":
654
663
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -667,10 +676,12 @@ const deserializeAws_json1_0TagResourceCommandError = async (output, context) =>
667
676
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
668
677
  default:
669
678
  const parsedBody = parsedOutput.body;
679
+ const $metadata = deserializeMetadata(output);
680
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
670
681
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
671
- name: parsedBody.code || parsedBody.Code || errorCode,
682
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
672
683
  $fault: "client",
673
- $metadata: deserializeMetadata(output),
684
+ $metadata,
674
685
  });
675
686
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
676
687
  }
@@ -695,8 +706,7 @@ const deserializeAws_json1_0UntagResourceCommandError = async (output, context)
695
706
  body: await parseBody(output.body, context),
696
707
  };
697
708
  let response;
698
- let errorCode = "UnknownError";
699
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
709
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
700
710
  switch (errorCode) {
701
711
  case "AccessDeniedException":
702
712
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -718,10 +728,12 @@ const deserializeAws_json1_0UntagResourceCommandError = async (output, context)
718
728
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
719
729
  default:
720
730
  const parsedBody = parsedOutput.body;
731
+ const $metadata = deserializeMetadata(output);
732
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
721
733
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
722
- name: parsedBody.code || parsedBody.Code || errorCode,
734
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
723
735
  $fault: "client",
724
- $metadata: deserializeMetadata(output),
736
+ $metadata,
725
737
  });
726
738
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
727
739
  }
@@ -746,8 +758,7 @@ const deserializeAws_json1_0UpdateTableCommandError = async (output, context) =>
746
758
  body: await parseBody(output.body, context),
747
759
  };
748
760
  let response;
749
- let errorCode = "UnknownError";
750
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
761
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
751
762
  switch (errorCode) {
752
763
  case "AccessDeniedException":
753
764
  case "com.amazonaws.keyspaces#AccessDeniedException":
@@ -769,10 +780,12 @@ const deserializeAws_json1_0UpdateTableCommandError = async (output, context) =>
769
780
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
770
781
  default:
771
782
  const parsedBody = parsedOutput.body;
783
+ const $metadata = deserializeMetadata(output);
784
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
772
785
  response = new KeyspacesServiceException_1.KeyspacesServiceException({
773
- name: parsedBody.code || parsedBody.Code || errorCode,
786
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
774
787
  $fault: "client",
775
- $metadata: deserializeMetadata(output),
788
+ $metadata,
776
789
  });
777
790
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
778
791
  }
@@ -833,18 +846,15 @@ const deserializeAws_json1_0ValidationExceptionResponse = async (parsedOutput, c
833
846
  };
834
847
  const serializeAws_json1_0CapacitySpecification = (input, context) => {
835
848
  return {
836
- ...(input.readCapacityUnits !== undefined &&
837
- input.readCapacityUnits !== null && { readCapacityUnits: input.readCapacityUnits }),
838
- ...(input.throughputMode !== undefined &&
839
- input.throughputMode !== null && { throughputMode: input.throughputMode }),
840
- ...(input.writeCapacityUnits !== undefined &&
841
- input.writeCapacityUnits !== null && { writeCapacityUnits: input.writeCapacityUnits }),
849
+ ...(input.readCapacityUnits != null && { readCapacityUnits: input.readCapacityUnits }),
850
+ ...(input.throughputMode != null && { throughputMode: input.throughputMode }),
851
+ ...(input.writeCapacityUnits != null && { writeCapacityUnits: input.writeCapacityUnits }),
842
852
  };
843
853
  };
844
854
  const serializeAws_json1_0ClusteringKey = (input, context) => {
845
855
  return {
846
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
847
- ...(input.orderBy !== undefined && input.orderBy !== null && { orderBy: input.orderBy }),
856
+ ...(input.name != null && { name: input.name }),
857
+ ...(input.orderBy != null && { orderBy: input.orderBy }),
848
858
  };
849
859
  };
850
860
  const serializeAws_json1_0ClusteringKeyList = (input, context) => {
@@ -859,8 +869,8 @@ const serializeAws_json1_0ClusteringKeyList = (input, context) => {
859
869
  };
860
870
  const serializeAws_json1_0ColumnDefinition = (input, context) => {
861
871
  return {
862
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
863
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
872
+ ...(input.name != null && { name: input.name }),
873
+ ...(input.type != null && { type: input.type }),
864
874
  };
865
875
  };
866
876
  const serializeAws_json1_0ColumnDefinitionList = (input, context) => {
@@ -875,95 +885,88 @@ const serializeAws_json1_0ColumnDefinitionList = (input, context) => {
875
885
  };
876
886
  const serializeAws_json1_0Comment = (input, context) => {
877
887
  return {
878
- ...(input.message !== undefined && input.message !== null && { message: input.message }),
888
+ ...(input.message != null && { message: input.message }),
879
889
  };
880
890
  };
881
891
  const serializeAws_json1_0CreateKeyspaceRequest = (input, context) => {
882
892
  return {
883
- ...(input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }),
884
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
893
+ ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
894
+ ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
885
895
  };
886
896
  };
887
897
  const serializeAws_json1_0CreateTableRequest = (input, context) => {
888
898
  return {
889
- ...(input.capacitySpecification !== undefined &&
890
- input.capacitySpecification !== null && {
899
+ ...(input.capacitySpecification != null && {
891
900
  capacitySpecification: serializeAws_json1_0CapacitySpecification(input.capacitySpecification, context),
892
901
  }),
893
- ...(input.comment !== undefined &&
894
- input.comment !== null && { comment: serializeAws_json1_0Comment(input.comment, context) }),
895
- ...(input.defaultTimeToLive !== undefined &&
896
- input.defaultTimeToLive !== null && { defaultTimeToLive: input.defaultTimeToLive }),
897
- ...(input.encryptionSpecification !== undefined &&
898
- input.encryptionSpecification !== null && {
902
+ ...(input.comment != null && { comment: serializeAws_json1_0Comment(input.comment, context) }),
903
+ ...(input.defaultTimeToLive != null && { defaultTimeToLive: input.defaultTimeToLive }),
904
+ ...(input.encryptionSpecification != null && {
899
905
  encryptionSpecification: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecification, context),
900
906
  }),
901
- ...(input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }),
902
- ...(input.pointInTimeRecovery !== undefined &&
903
- input.pointInTimeRecovery !== null && {
907
+ ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
908
+ ...(input.pointInTimeRecovery != null && {
904
909
  pointInTimeRecovery: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecovery, context),
905
910
  }),
906
- ...(input.schemaDefinition !== undefined &&
907
- input.schemaDefinition !== null && {
911
+ ...(input.schemaDefinition != null && {
908
912
  schemaDefinition: serializeAws_json1_0SchemaDefinition(input.schemaDefinition, context),
909
913
  }),
910
- ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }),
911
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
912
- ...(input.ttl !== undefined && input.ttl !== null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }),
914
+ ...(input.tableName != null && { tableName: input.tableName }),
915
+ ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
916
+ ...(input.ttl != null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }),
913
917
  };
914
918
  };
915
919
  const serializeAws_json1_0DeleteKeyspaceRequest = (input, context) => {
916
920
  return {
917
- ...(input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }),
921
+ ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
918
922
  };
919
923
  };
920
924
  const serializeAws_json1_0DeleteTableRequest = (input, context) => {
921
925
  return {
922
- ...(input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }),
923
- ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }),
926
+ ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
927
+ ...(input.tableName != null && { tableName: input.tableName }),
924
928
  };
925
929
  };
926
930
  const serializeAws_json1_0EncryptionSpecification = (input, context) => {
927
931
  return {
928
- ...(input.kmsKeyIdentifier !== undefined &&
929
- input.kmsKeyIdentifier !== null && { kmsKeyIdentifier: input.kmsKeyIdentifier }),
930
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
932
+ ...(input.kmsKeyIdentifier != null && { kmsKeyIdentifier: input.kmsKeyIdentifier }),
933
+ ...(input.type != null && { type: input.type }),
931
934
  };
932
935
  };
933
936
  const serializeAws_json1_0GetKeyspaceRequest = (input, context) => {
934
937
  return {
935
- ...(input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }),
938
+ ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
936
939
  };
937
940
  };
938
941
  const serializeAws_json1_0GetTableRequest = (input, context) => {
939
942
  return {
940
- ...(input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }),
941
- ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }),
943
+ ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
944
+ ...(input.tableName != null && { tableName: input.tableName }),
942
945
  };
943
946
  };
944
947
  const serializeAws_json1_0ListKeyspacesRequest = (input, context) => {
945
948
  return {
946
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
947
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
949
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
950
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
948
951
  };
949
952
  };
950
953
  const serializeAws_json1_0ListTablesRequest = (input, context) => {
951
954
  return {
952
- ...(input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }),
953
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
954
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
955
+ ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
956
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
957
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
955
958
  };
956
959
  };
957
960
  const serializeAws_json1_0ListTagsForResourceRequest = (input, context) => {
958
961
  return {
959
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
960
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
961
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
962
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
963
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
964
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
962
965
  };
963
966
  };
964
967
  const serializeAws_json1_0PartitionKey = (input, context) => {
965
968
  return {
966
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
969
+ ...(input.name != null && { name: input.name }),
967
970
  };
968
971
  };
969
972
  const serializeAws_json1_0PartitionKeyList = (input, context) => {
@@ -978,58 +981,47 @@ const serializeAws_json1_0PartitionKeyList = (input, context) => {
978
981
  };
979
982
  const serializeAws_json1_0PointInTimeRecovery = (input, context) => {
980
983
  return {
981
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
984
+ ...(input.status != null && { status: input.status }),
982
985
  };
983
986
  };
984
987
  const serializeAws_json1_0RestoreTableRequest = (input, context) => {
985
988
  return {
986
- ...(input.capacitySpecificationOverride !== undefined &&
987
- input.capacitySpecificationOverride !== null && {
989
+ ...(input.capacitySpecificationOverride != null && {
988
990
  capacitySpecificationOverride: serializeAws_json1_0CapacitySpecification(input.capacitySpecificationOverride, context),
989
991
  }),
990
- ...(input.encryptionSpecificationOverride !== undefined &&
991
- input.encryptionSpecificationOverride !== null && {
992
+ ...(input.encryptionSpecificationOverride != null && {
992
993
  encryptionSpecificationOverride: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecificationOverride, context),
993
994
  }),
994
- ...(input.pointInTimeRecoveryOverride !== undefined &&
995
- input.pointInTimeRecoveryOverride !== null && {
995
+ ...(input.pointInTimeRecoveryOverride != null && {
996
996
  pointInTimeRecoveryOverride: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecoveryOverride, context),
997
997
  }),
998
- ...(input.restoreTimestamp !== undefined &&
999
- input.restoreTimestamp !== null && { restoreTimestamp: Math.round(input.restoreTimestamp.getTime() / 1000) }),
1000
- ...(input.sourceKeyspaceName !== undefined &&
1001
- input.sourceKeyspaceName !== null && { sourceKeyspaceName: input.sourceKeyspaceName }),
1002
- ...(input.sourceTableName !== undefined &&
1003
- input.sourceTableName !== null && { sourceTableName: input.sourceTableName }),
1004
- ...(input.tagsOverride !== undefined &&
1005
- input.tagsOverride !== null && { tagsOverride: serializeAws_json1_0TagList(input.tagsOverride, context) }),
1006
- ...(input.targetKeyspaceName !== undefined &&
1007
- input.targetKeyspaceName !== null && { targetKeyspaceName: input.targetKeyspaceName }),
1008
- ...(input.targetTableName !== undefined &&
1009
- input.targetTableName !== null && { targetTableName: input.targetTableName }),
998
+ ...(input.restoreTimestamp != null && { restoreTimestamp: Math.round(input.restoreTimestamp.getTime() / 1000) }),
999
+ ...(input.sourceKeyspaceName != null && { sourceKeyspaceName: input.sourceKeyspaceName }),
1000
+ ...(input.sourceTableName != null && { sourceTableName: input.sourceTableName }),
1001
+ ...(input.tagsOverride != null && { tagsOverride: serializeAws_json1_0TagList(input.tagsOverride, context) }),
1002
+ ...(input.targetKeyspaceName != null && { targetKeyspaceName: input.targetKeyspaceName }),
1003
+ ...(input.targetTableName != null && { targetTableName: input.targetTableName }),
1010
1004
  };
1011
1005
  };
1012
1006
  const serializeAws_json1_0SchemaDefinition = (input, context) => {
1013
1007
  return {
1014
- ...(input.allColumns !== undefined &&
1015
- input.allColumns !== null && { allColumns: serializeAws_json1_0ColumnDefinitionList(input.allColumns, context) }),
1016
- ...(input.clusteringKeys !== undefined &&
1017
- input.clusteringKeys !== null && {
1008
+ ...(input.allColumns != null && {
1009
+ allColumns: serializeAws_json1_0ColumnDefinitionList(input.allColumns, context),
1010
+ }),
1011
+ ...(input.clusteringKeys != null && {
1018
1012
  clusteringKeys: serializeAws_json1_0ClusteringKeyList(input.clusteringKeys, context),
1019
1013
  }),
1020
- ...(input.partitionKeys !== undefined &&
1021
- input.partitionKeys !== null && {
1014
+ ...(input.partitionKeys != null && {
1022
1015
  partitionKeys: serializeAws_json1_0PartitionKeyList(input.partitionKeys, context),
1023
1016
  }),
1024
- ...(input.staticColumns !== undefined &&
1025
- input.staticColumns !== null && {
1017
+ ...(input.staticColumns != null && {
1026
1018
  staticColumns: serializeAws_json1_0StaticColumnList(input.staticColumns, context),
1027
1019
  }),
1028
1020
  };
1029
1021
  };
1030
1022
  const serializeAws_json1_0StaticColumn = (input, context) => {
1031
1023
  return {
1032
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
1024
+ ...(input.name != null && { name: input.name }),
1033
1025
  };
1034
1026
  };
1035
1027
  const serializeAws_json1_0StaticColumnList = (input, context) => {
@@ -1044,8 +1036,8 @@ const serializeAws_json1_0StaticColumnList = (input, context) => {
1044
1036
  };
1045
1037
  const serializeAws_json1_0Tag = (input, context) => {
1046
1038
  return {
1047
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
1048
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
1039
+ ...(input.key != null && { key: input.key }),
1040
+ ...(input.value != null && { value: input.value }),
1049
1041
  };
1050
1042
  };
1051
1043
  const serializeAws_json1_0TagList = (input, context) => {
@@ -1060,42 +1052,39 @@ const serializeAws_json1_0TagList = (input, context) => {
1060
1052
  };
1061
1053
  const serializeAws_json1_0TagResourceRequest = (input, context) => {
1062
1054
  return {
1063
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
1064
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
1055
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1056
+ ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
1065
1057
  };
1066
1058
  };
1067
1059
  const serializeAws_json1_0TimeToLive = (input, context) => {
1068
1060
  return {
1069
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
1061
+ ...(input.status != null && { status: input.status }),
1070
1062
  };
1071
1063
  };
1072
1064
  const serializeAws_json1_0UntagResourceRequest = (input, context) => {
1073
1065
  return {
1074
- ...(input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn }),
1075
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
1066
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
1067
+ ...(input.tags != null && { tags: serializeAws_json1_0TagList(input.tags, context) }),
1076
1068
  };
1077
1069
  };
1078
1070
  const serializeAws_json1_0UpdateTableRequest = (input, context) => {
1079
1071
  return {
1080
- ...(input.addColumns !== undefined &&
1081
- input.addColumns !== null && { addColumns: serializeAws_json1_0ColumnDefinitionList(input.addColumns, context) }),
1082
- ...(input.capacitySpecification !== undefined &&
1083
- input.capacitySpecification !== null && {
1072
+ ...(input.addColumns != null && {
1073
+ addColumns: serializeAws_json1_0ColumnDefinitionList(input.addColumns, context),
1074
+ }),
1075
+ ...(input.capacitySpecification != null && {
1084
1076
  capacitySpecification: serializeAws_json1_0CapacitySpecification(input.capacitySpecification, context),
1085
1077
  }),
1086
- ...(input.defaultTimeToLive !== undefined &&
1087
- input.defaultTimeToLive !== null && { defaultTimeToLive: input.defaultTimeToLive }),
1088
- ...(input.encryptionSpecification !== undefined &&
1089
- input.encryptionSpecification !== null && {
1078
+ ...(input.defaultTimeToLive != null && { defaultTimeToLive: input.defaultTimeToLive }),
1079
+ ...(input.encryptionSpecification != null && {
1090
1080
  encryptionSpecification: serializeAws_json1_0EncryptionSpecification(input.encryptionSpecification, context),
1091
1081
  }),
1092
- ...(input.keyspaceName !== undefined && input.keyspaceName !== null && { keyspaceName: input.keyspaceName }),
1093
- ...(input.pointInTimeRecovery !== undefined &&
1094
- input.pointInTimeRecovery !== null && {
1082
+ ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }),
1083
+ ...(input.pointInTimeRecovery != null && {
1095
1084
  pointInTimeRecovery: serializeAws_json1_0PointInTimeRecovery(input.pointInTimeRecovery, context),
1096
1085
  }),
1097
- ...(input.tableName !== undefined && input.tableName !== null && { tableName: input.tableName }),
1098
- ...(input.ttl !== undefined && input.ttl !== null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }),
1086
+ ...(input.tableName != null && { tableName: input.tableName }),
1087
+ ...(input.ttl != null && { ttl: serializeAws_json1_0TimeToLive(input.ttl, context) }),
1099
1088
  };
1100
1089
  };
1101
1090
  const deserializeAws_json1_0AccessDeniedException = (output, context) => {
@@ -1105,7 +1094,7 @@ const deserializeAws_json1_0AccessDeniedException = (output, context) => {
1105
1094
  };
1106
1095
  const deserializeAws_json1_0CapacitySpecificationSummary = (output, context) => {
1107
1096
  return {
1108
- lastUpdateToPayPerRequestTimestamp: output.lastUpdateToPayPerRequestTimestamp !== undefined && output.lastUpdateToPayPerRequestTimestamp !== null
1097
+ lastUpdateToPayPerRequestTimestamp: output.lastUpdateToPayPerRequestTimestamp != null
1109
1098
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdateToPayPerRequestTimestamp)))
1110
1099
  : undefined,
1111
1100
  readCapacityUnits: (0, smithy_client_1.expectLong)(output.readCapacityUnits),
@@ -1187,32 +1176,28 @@ const deserializeAws_json1_0GetKeyspaceResponse = (output, context) => {
1187
1176
  };
1188
1177
  const deserializeAws_json1_0GetTableResponse = (output, context) => {
1189
1178
  return {
1190
- capacitySpecification: output.capacitySpecification !== undefined && output.capacitySpecification !== null
1179
+ capacitySpecification: output.capacitySpecification != null
1191
1180
  ? deserializeAws_json1_0CapacitySpecificationSummary(output.capacitySpecification, context)
1192
1181
  : undefined,
1193
- comment: output.comment !== undefined && output.comment !== null
1194
- ? deserializeAws_json1_0Comment(output.comment, context)
1195
- : undefined,
1196
- creationTimestamp: output.creationTimestamp !== undefined && output.creationTimestamp !== null
1182
+ comment: output.comment != null ? deserializeAws_json1_0Comment(output.comment, context) : undefined,
1183
+ creationTimestamp: output.creationTimestamp != null
1197
1184
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.creationTimestamp)))
1198
1185
  : undefined,
1199
1186
  defaultTimeToLive: (0, smithy_client_1.expectInt32)(output.defaultTimeToLive),
1200
- encryptionSpecification: output.encryptionSpecification !== undefined && output.encryptionSpecification !== null
1187
+ encryptionSpecification: output.encryptionSpecification != null
1201
1188
  ? deserializeAws_json1_0EncryptionSpecification(output.encryptionSpecification, context)
1202
1189
  : undefined,
1203
1190
  keyspaceName: (0, smithy_client_1.expectString)(output.keyspaceName),
1204
- pointInTimeRecovery: output.pointInTimeRecovery !== undefined && output.pointInTimeRecovery !== null
1191
+ pointInTimeRecovery: output.pointInTimeRecovery != null
1205
1192
  ? deserializeAws_json1_0PointInTimeRecoverySummary(output.pointInTimeRecovery, context)
1206
1193
  : undefined,
1207
1194
  resourceArn: (0, smithy_client_1.expectString)(output.resourceArn),
1208
- schemaDefinition: output.schemaDefinition !== undefined && output.schemaDefinition !== null
1195
+ schemaDefinition: output.schemaDefinition != null
1209
1196
  ? deserializeAws_json1_0SchemaDefinition(output.schemaDefinition, context)
1210
1197
  : undefined,
1211
1198
  status: (0, smithy_client_1.expectString)(output.status),
1212
1199
  tableName: (0, smithy_client_1.expectString)(output.tableName),
1213
- ttl: output.ttl !== undefined && output.ttl !== null
1214
- ? deserializeAws_json1_0TimeToLive(output.ttl, context)
1215
- : undefined,
1200
+ ttl: output.ttl != null ? deserializeAws_json1_0TimeToLive(output.ttl, context) : undefined,
1216
1201
  };
1217
1202
  };
1218
1203
  const deserializeAws_json1_0InternalServerException = (output, context) => {
@@ -1239,26 +1224,20 @@ const deserializeAws_json1_0KeyspaceSummaryList = (output, context) => {
1239
1224
  };
1240
1225
  const deserializeAws_json1_0ListKeyspacesResponse = (output, context) => {
1241
1226
  return {
1242
- keyspaces: output.keyspaces !== undefined && output.keyspaces !== null
1243
- ? deserializeAws_json1_0KeyspaceSummaryList(output.keyspaces, context)
1244
- : undefined,
1227
+ keyspaces: output.keyspaces != null ? deserializeAws_json1_0KeyspaceSummaryList(output.keyspaces, context) : undefined,
1245
1228
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1246
1229
  };
1247
1230
  };
1248
1231
  const deserializeAws_json1_0ListTablesResponse = (output, context) => {
1249
1232
  return {
1250
1233
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1251
- tables: output.tables !== undefined && output.tables !== null
1252
- ? deserializeAws_json1_0TableSummaryList(output.tables, context)
1253
- : undefined,
1234
+ tables: output.tables != null ? deserializeAws_json1_0TableSummaryList(output.tables, context) : undefined,
1254
1235
  };
1255
1236
  };
1256
1237
  const deserializeAws_json1_0ListTagsForResourceResponse = (output, context) => {
1257
1238
  return {
1258
1239
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
1259
- tags: output.tags !== undefined && output.tags !== null
1260
- ? deserializeAws_json1_0TagList(output.tags, context)
1261
- : undefined,
1240
+ tags: output.tags != null ? deserializeAws_json1_0TagList(output.tags, context) : undefined,
1262
1241
  };
1263
1242
  };
1264
1243
  const deserializeAws_json1_0PartitionKey = (output, context) => {
@@ -1279,7 +1258,7 @@ const deserializeAws_json1_0PartitionKeyList = (output, context) => {
1279
1258
  };
1280
1259
  const deserializeAws_json1_0PointInTimeRecoverySummary = (output, context) => {
1281
1260
  return {
1282
- earliestRestorableTimestamp: output.earliestRestorableTimestamp !== undefined && output.earliestRestorableTimestamp !== null
1261
+ earliestRestorableTimestamp: output.earliestRestorableTimestamp != null
1283
1262
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.earliestRestorableTimestamp)))
1284
1263
  : undefined,
1285
1264
  status: (0, smithy_client_1.expectString)(output.status),
@@ -1298,18 +1277,12 @@ const deserializeAws_json1_0RestoreTableResponse = (output, context) => {
1298
1277
  };
1299
1278
  const deserializeAws_json1_0SchemaDefinition = (output, context) => {
1300
1279
  return {
1301
- allColumns: output.allColumns !== undefined && output.allColumns !== null
1302
- ? deserializeAws_json1_0ColumnDefinitionList(output.allColumns, context)
1303
- : undefined,
1304
- clusteringKeys: output.clusteringKeys !== undefined && output.clusteringKeys !== null
1280
+ allColumns: output.allColumns != null ? deserializeAws_json1_0ColumnDefinitionList(output.allColumns, context) : undefined,
1281
+ clusteringKeys: output.clusteringKeys != null
1305
1282
  ? deserializeAws_json1_0ClusteringKeyList(output.clusteringKeys, context)
1306
1283
  : undefined,
1307
- partitionKeys: output.partitionKeys !== undefined && output.partitionKeys !== null
1308
- ? deserializeAws_json1_0PartitionKeyList(output.partitionKeys, context)
1309
- : undefined,
1310
- staticColumns: output.staticColumns !== undefined && output.staticColumns !== null
1311
- ? deserializeAws_json1_0StaticColumnList(output.staticColumns, context)
1312
- : undefined,
1284
+ partitionKeys: output.partitionKeys != null ? deserializeAws_json1_0PartitionKeyList(output.partitionKeys, context) : undefined,
1285
+ staticColumns: output.staticColumns != null ? deserializeAws_json1_0StaticColumnList(output.staticColumns, context) : undefined,
1313
1286
  };
1314
1287
  };
1315
1288
  const deserializeAws_json1_0ServiceQuotaExceededException = (output, context) => {
@@ -1451,5 +1424,4 @@ const loadRestJsonErrorCode = (output, data) => {
1451
1424
  if (data["__type"] !== undefined) {
1452
1425
  return sanitizeErrorCode(data["__type"]);
1453
1426
  }
1454
- return "";
1455
1427
  };