@aws-sdk/client-keyspaces 3.141.0 → 3.142.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
7
+
8
+
9
+ ### Features
10
+
11
+ * **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
7
18
 
8
19
 
@@ -154,7 +154,6 @@ const deserializeAws_json1_0CreateKeyspaceCommandError = async (output, context)
154
154
  ...output,
155
155
  body: await parseBody(output.body, context),
156
156
  };
157
- let response;
158
157
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
159
158
  switch (errorCode) {
160
159
  case "AccessDeniedException":
@@ -174,14 +173,12 @@ const deserializeAws_json1_0CreateKeyspaceCommandError = async (output, context)
174
173
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
175
174
  default:
176
175
  const parsedBody = parsedOutput.body;
177
- const $metadata = deserializeMetadata(output);
178
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
179
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
180
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
181
- $fault: "client",
182
- $metadata,
176
+ (0, smithy_client_1.throwDefaultError)({
177
+ output,
178
+ parsedBody,
179
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
180
+ errorCode,
183
181
  });
184
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
185
182
  }
186
183
  };
187
184
  const deserializeAws_json1_0CreateTableCommand = async (output, context) => {
@@ -203,7 +200,6 @@ const deserializeAws_json1_0CreateTableCommandError = async (output, context) =>
203
200
  ...output,
204
201
  body: await parseBody(output.body, context),
205
202
  };
206
- let response;
207
203
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
208
204
  switch (errorCode) {
209
205
  case "AccessDeniedException":
@@ -226,14 +222,12 @@ const deserializeAws_json1_0CreateTableCommandError = async (output, context) =>
226
222
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
227
223
  default:
228
224
  const parsedBody = parsedOutput.body;
229
- const $metadata = deserializeMetadata(output);
230
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
231
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
232
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
233
- $fault: "client",
234
- $metadata,
225
+ (0, smithy_client_1.throwDefaultError)({
226
+ output,
227
+ parsedBody,
228
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
229
+ errorCode,
235
230
  });
236
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
237
231
  }
238
232
  };
239
233
  const deserializeAws_json1_0DeleteKeyspaceCommand = async (output, context) => {
@@ -255,7 +249,6 @@ const deserializeAws_json1_0DeleteKeyspaceCommandError = async (output, context)
255
249
  ...output,
256
250
  body: await parseBody(output.body, context),
257
251
  };
258
- let response;
259
252
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
260
253
  switch (errorCode) {
261
254
  case "AccessDeniedException":
@@ -278,14 +271,12 @@ const deserializeAws_json1_0DeleteKeyspaceCommandError = async (output, context)
278
271
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
279
272
  default:
280
273
  const parsedBody = parsedOutput.body;
281
- const $metadata = deserializeMetadata(output);
282
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
283
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
284
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
285
- $fault: "client",
286
- $metadata,
274
+ (0, smithy_client_1.throwDefaultError)({
275
+ output,
276
+ parsedBody,
277
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
278
+ errorCode,
287
279
  });
288
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
289
280
  }
290
281
  };
291
282
  const deserializeAws_json1_0DeleteTableCommand = async (output, context) => {
@@ -307,7 +298,6 @@ const deserializeAws_json1_0DeleteTableCommandError = async (output, context) =>
307
298
  ...output,
308
299
  body: await parseBody(output.body, context),
309
300
  };
310
- let response;
311
301
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
312
302
  switch (errorCode) {
313
303
  case "AccessDeniedException":
@@ -330,14 +320,12 @@ const deserializeAws_json1_0DeleteTableCommandError = async (output, context) =>
330
320
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
331
321
  default:
332
322
  const parsedBody = parsedOutput.body;
333
- const $metadata = deserializeMetadata(output);
334
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
335
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
336
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
337
- $fault: "client",
338
- $metadata,
323
+ (0, smithy_client_1.throwDefaultError)({
324
+ output,
325
+ parsedBody,
326
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
327
+ errorCode,
339
328
  });
340
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
341
329
  }
342
330
  };
343
331
  const deserializeAws_json1_0GetKeyspaceCommand = async (output, context) => {
@@ -359,7 +347,6 @@ const deserializeAws_json1_0GetKeyspaceCommandError = async (output, context) =>
359
347
  ...output,
360
348
  body: await parseBody(output.body, context),
361
349
  };
362
- let response;
363
350
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
364
351
  switch (errorCode) {
365
352
  case "AccessDeniedException":
@@ -379,14 +366,12 @@ const deserializeAws_json1_0GetKeyspaceCommandError = async (output, context) =>
379
366
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
380
367
  default:
381
368
  const parsedBody = parsedOutput.body;
382
- const $metadata = deserializeMetadata(output);
383
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
384
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
385
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
386
- $fault: "client",
387
- $metadata,
369
+ (0, smithy_client_1.throwDefaultError)({
370
+ output,
371
+ parsedBody,
372
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
373
+ errorCode,
388
374
  });
389
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
390
375
  }
391
376
  };
392
377
  const deserializeAws_json1_0GetTableCommand = async (output, context) => {
@@ -408,7 +393,6 @@ const deserializeAws_json1_0GetTableCommandError = async (output, context) => {
408
393
  ...output,
409
394
  body: await parseBody(output.body, context),
410
395
  };
411
- let response;
412
396
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
413
397
  switch (errorCode) {
414
398
  case "AccessDeniedException":
@@ -428,14 +412,12 @@ const deserializeAws_json1_0GetTableCommandError = async (output, context) => {
428
412
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
429
413
  default:
430
414
  const parsedBody = parsedOutput.body;
431
- const $metadata = deserializeMetadata(output);
432
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
433
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
434
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
435
- $fault: "client",
436
- $metadata,
415
+ (0, smithy_client_1.throwDefaultError)({
416
+ output,
417
+ parsedBody,
418
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
419
+ errorCode,
437
420
  });
438
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
439
421
  }
440
422
  };
441
423
  const deserializeAws_json1_0ListKeyspacesCommand = async (output, context) => {
@@ -457,7 +439,6 @@ const deserializeAws_json1_0ListKeyspacesCommandError = async (output, context)
457
439
  ...output,
458
440
  body: await parseBody(output.body, context),
459
441
  };
460
- let response;
461
442
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
462
443
  switch (errorCode) {
463
444
  case "AccessDeniedException":
@@ -477,14 +458,12 @@ const deserializeAws_json1_0ListKeyspacesCommandError = async (output, context)
477
458
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
478
459
  default:
479
460
  const parsedBody = parsedOutput.body;
480
- const $metadata = deserializeMetadata(output);
481
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
482
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
483
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
484
- $fault: "client",
485
- $metadata,
461
+ (0, smithy_client_1.throwDefaultError)({
462
+ output,
463
+ parsedBody,
464
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
465
+ errorCode,
486
466
  });
487
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
488
467
  }
489
468
  };
490
469
  const deserializeAws_json1_0ListTablesCommand = async (output, context) => {
@@ -506,7 +485,6 @@ const deserializeAws_json1_0ListTablesCommandError = async (output, context) =>
506
485
  ...output,
507
486
  body: await parseBody(output.body, context),
508
487
  };
509
- let response;
510
488
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
511
489
  switch (errorCode) {
512
490
  case "AccessDeniedException":
@@ -526,14 +504,12 @@ const deserializeAws_json1_0ListTablesCommandError = async (output, context) =>
526
504
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
527
505
  default:
528
506
  const parsedBody = parsedOutput.body;
529
- const $metadata = deserializeMetadata(output);
530
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
531
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
532
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
533
- $fault: "client",
534
- $metadata,
507
+ (0, smithy_client_1.throwDefaultError)({
508
+ output,
509
+ parsedBody,
510
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
511
+ errorCode,
535
512
  });
536
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
537
513
  }
538
514
  };
539
515
  const deserializeAws_json1_0ListTagsForResourceCommand = async (output, context) => {
@@ -555,7 +531,6 @@ const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, con
555
531
  ...output,
556
532
  body: await parseBody(output.body, context),
557
533
  };
558
- let response;
559
534
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
560
535
  switch (errorCode) {
561
536
  case "AccessDeniedException":
@@ -575,14 +550,12 @@ const deserializeAws_json1_0ListTagsForResourceCommandError = async (output, con
575
550
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
576
551
  default:
577
552
  const parsedBody = parsedOutput.body;
578
- const $metadata = deserializeMetadata(output);
579
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
580
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
581
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
582
- $fault: "client",
583
- $metadata,
553
+ (0, smithy_client_1.throwDefaultError)({
554
+ output,
555
+ parsedBody,
556
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
557
+ errorCode,
584
558
  });
585
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
586
559
  }
587
560
  };
588
561
  const deserializeAws_json1_0RestoreTableCommand = async (output, context) => {
@@ -604,7 +577,6 @@ const deserializeAws_json1_0RestoreTableCommandError = async (output, context) =
604
577
  ...output,
605
578
  body: await parseBody(output.body, context),
606
579
  };
607
- let response;
608
580
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
609
581
  switch (errorCode) {
610
582
  case "AccessDeniedException":
@@ -627,14 +599,12 @@ const deserializeAws_json1_0RestoreTableCommandError = async (output, context) =
627
599
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
628
600
  default:
629
601
  const parsedBody = parsedOutput.body;
630
- const $metadata = deserializeMetadata(output);
631
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
632
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
633
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
634
- $fault: "client",
635
- $metadata,
602
+ (0, smithy_client_1.throwDefaultError)({
603
+ output,
604
+ parsedBody,
605
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
606
+ errorCode,
636
607
  });
637
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
638
608
  }
639
609
  };
640
610
  const deserializeAws_json1_0TagResourceCommand = async (output, context) => {
@@ -656,7 +626,6 @@ const deserializeAws_json1_0TagResourceCommandError = async (output, context) =>
656
626
  ...output,
657
627
  body: await parseBody(output.body, context),
658
628
  };
659
- let response;
660
629
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
661
630
  switch (errorCode) {
662
631
  case "AccessDeniedException":
@@ -676,14 +645,12 @@ const deserializeAws_json1_0TagResourceCommandError = async (output, context) =>
676
645
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
677
646
  default:
678
647
  const parsedBody = parsedOutput.body;
679
- const $metadata = deserializeMetadata(output);
680
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
681
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
682
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
683
- $fault: "client",
684
- $metadata,
648
+ (0, smithy_client_1.throwDefaultError)({
649
+ output,
650
+ parsedBody,
651
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
652
+ errorCode,
685
653
  });
686
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
687
654
  }
688
655
  };
689
656
  const deserializeAws_json1_0UntagResourceCommand = async (output, context) => {
@@ -705,7 +672,6 @@ const deserializeAws_json1_0UntagResourceCommandError = async (output, context)
705
672
  ...output,
706
673
  body: await parseBody(output.body, context),
707
674
  };
708
- let response;
709
675
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
710
676
  switch (errorCode) {
711
677
  case "AccessDeniedException":
@@ -728,14 +694,12 @@ const deserializeAws_json1_0UntagResourceCommandError = async (output, context)
728
694
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
729
695
  default:
730
696
  const parsedBody = parsedOutput.body;
731
- const $metadata = deserializeMetadata(output);
732
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
733
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
734
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
735
- $fault: "client",
736
- $metadata,
697
+ (0, smithy_client_1.throwDefaultError)({
698
+ output,
699
+ parsedBody,
700
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
701
+ errorCode,
737
702
  });
738
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
739
703
  }
740
704
  };
741
705
  const deserializeAws_json1_0UpdateTableCommand = async (output, context) => {
@@ -757,7 +721,6 @@ const deserializeAws_json1_0UpdateTableCommandError = async (output, context) =>
757
721
  ...output,
758
722
  body: await parseBody(output.body, context),
759
723
  };
760
- let response;
761
724
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
762
725
  switch (errorCode) {
763
726
  case "AccessDeniedException":
@@ -780,14 +743,12 @@ const deserializeAws_json1_0UpdateTableCommandError = async (output, context) =>
780
743
  throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
781
744
  default:
782
745
  const parsedBody = parsedOutput.body;
783
- const $metadata = deserializeMetadata(output);
784
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
785
- response = new KeyspacesServiceException_1.KeyspacesServiceException({
786
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
787
- $fault: "client",
788
- $metadata,
746
+ (0, smithy_client_1.throwDefaultError)({
747
+ output,
748
+ parsedBody,
749
+ exceptionCtor: KeyspacesServiceException_1.KeyspacesServiceException,
750
+ errorCode,
789
751
  });
790
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
791
752
  }
792
753
  };
793
754
  const deserializeAws_json1_0AccessDeniedExceptionResponse = async (parsedOutput, context) => {
@@ -861,9 +822,6 @@ const serializeAws_json1_0ClusteringKeyList = (input, context) => {
861
822
  return input
862
823
  .filter((e) => e != null)
863
824
  .map((entry) => {
864
- if (entry === null) {
865
- return null;
866
- }
867
825
  return serializeAws_json1_0ClusteringKey(entry, context);
868
826
  });
869
827
  };
@@ -877,9 +835,6 @@ const serializeAws_json1_0ColumnDefinitionList = (input, context) => {
877
835
  return input
878
836
  .filter((e) => e != null)
879
837
  .map((entry) => {
880
- if (entry === null) {
881
- return null;
882
- }
883
838
  return serializeAws_json1_0ColumnDefinition(entry, context);
884
839
  });
885
840
  };
@@ -973,9 +928,6 @@ const serializeAws_json1_0PartitionKeyList = (input, context) => {
973
928
  return input
974
929
  .filter((e) => e != null)
975
930
  .map((entry) => {
976
- if (entry === null) {
977
- return null;
978
- }
979
931
  return serializeAws_json1_0PartitionKey(entry, context);
980
932
  });
981
933
  };
@@ -1028,9 +980,6 @@ const serializeAws_json1_0StaticColumnList = (input, context) => {
1028
980
  return input
1029
981
  .filter((e) => e != null)
1030
982
  .map((entry) => {
1031
- if (entry === null) {
1032
- return null;
1033
- }
1034
983
  return serializeAws_json1_0StaticColumn(entry, context);
1035
984
  });
1036
985
  };
@@ -1044,9 +993,6 @@ const serializeAws_json1_0TagList = (input, context) => {
1044
993
  return input
1045
994
  .filter((e) => e != null)
1046
995
  .map((entry) => {
1047
- if (entry === null) {
1048
- return null;
1049
- }
1050
996
  return serializeAws_json1_0Tag(entry, context);
1051
997
  });
1052
998
  };
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, } from "@aws-sdk/smithy-client";
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";
4
4
  import { KeyspacesServiceException as __BaseException } from "../models/KeyspacesServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
6
6
  export var serializeAws_json1_0CreateKeyspaceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -165,7 +165,7 @@ export var deserializeAws_json1_0CreateKeyspaceCommand = function (output, conte
165
165
  });
166
166
  }); };
167
167
  var deserializeAws_json1_0CreateKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
168
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
168
+ var parsedOutput, _a, errorCode, _b, parsedBody;
169
169
  var _c;
170
170
  return __generator(this, function (_d) {
171
171
  switch (_d.label) {
@@ -202,14 +202,14 @@ var deserializeAws_json1_0CreateKeyspaceCommandError = function (output, context
202
202
  case 11: throw _d.sent();
203
203
  case 12:
204
204
  parsedBody = parsedOutput.body;
205
- $metadata = deserializeMetadata(output);
206
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
207
- response = new __BaseException({
208
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
209
- $fault: "client",
210
- $metadata: $metadata,
205
+ throwDefaultError({
206
+ output: output,
207
+ parsedBody: parsedBody,
208
+ exceptionCtor: __BaseException,
209
+ errorCode: errorCode,
211
210
  });
212
- throw __decorateServiceException(response, parsedBody);
211
+ _d.label = 13;
212
+ case 13: return [2];
213
213
  }
214
214
  });
215
215
  }); };
@@ -232,7 +232,7 @@ export var deserializeAws_json1_0CreateTableCommand = function (output, context)
232
232
  });
233
233
  }); };
234
234
  var deserializeAws_json1_0CreateTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
235
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
235
+ var parsedOutput, _a, errorCode, _b, parsedBody;
236
236
  var _c;
237
237
  return __generator(this, function (_d) {
238
238
  switch (_d.label) {
@@ -273,14 +273,14 @@ var deserializeAws_json1_0CreateTableCommandError = function (output, context) {
273
273
  case 13: throw _d.sent();
274
274
  case 14:
275
275
  parsedBody = parsedOutput.body;
276
- $metadata = deserializeMetadata(output);
277
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
278
- response = new __BaseException({
279
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
280
- $fault: "client",
281
- $metadata: $metadata,
276
+ throwDefaultError({
277
+ output: output,
278
+ parsedBody: parsedBody,
279
+ exceptionCtor: __BaseException,
280
+ errorCode: errorCode,
282
281
  });
283
- throw __decorateServiceException(response, parsedBody);
282
+ _d.label = 15;
283
+ case 15: return [2];
284
284
  }
285
285
  });
286
286
  }); };
@@ -303,7 +303,7 @@ export var deserializeAws_json1_0DeleteKeyspaceCommand = function (output, conte
303
303
  });
304
304
  }); };
305
305
  var deserializeAws_json1_0DeleteKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
306
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
306
+ var parsedOutput, _a, errorCode, _b, parsedBody;
307
307
  var _c;
308
308
  return __generator(this, function (_d) {
309
309
  switch (_d.label) {
@@ -344,14 +344,14 @@ var deserializeAws_json1_0DeleteKeyspaceCommandError = function (output, context
344
344
  case 13: throw _d.sent();
345
345
  case 14:
346
346
  parsedBody = parsedOutput.body;
347
- $metadata = deserializeMetadata(output);
348
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
349
- response = new __BaseException({
350
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
351
- $fault: "client",
352
- $metadata: $metadata,
347
+ throwDefaultError({
348
+ output: output,
349
+ parsedBody: parsedBody,
350
+ exceptionCtor: __BaseException,
351
+ errorCode: errorCode,
353
352
  });
354
- throw __decorateServiceException(response, parsedBody);
353
+ _d.label = 15;
354
+ case 15: return [2];
355
355
  }
356
356
  });
357
357
  }); };
@@ -374,7 +374,7 @@ export var deserializeAws_json1_0DeleteTableCommand = function (output, context)
374
374
  });
375
375
  }); };
376
376
  var deserializeAws_json1_0DeleteTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
377
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
377
+ var parsedOutput, _a, errorCode, _b, parsedBody;
378
378
  var _c;
379
379
  return __generator(this, function (_d) {
380
380
  switch (_d.label) {
@@ -415,14 +415,14 @@ var deserializeAws_json1_0DeleteTableCommandError = function (output, context) {
415
415
  case 13: throw _d.sent();
416
416
  case 14:
417
417
  parsedBody = parsedOutput.body;
418
- $metadata = deserializeMetadata(output);
419
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
420
- response = new __BaseException({
421
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
422
- $fault: "client",
423
- $metadata: $metadata,
418
+ throwDefaultError({
419
+ output: output,
420
+ parsedBody: parsedBody,
421
+ exceptionCtor: __BaseException,
422
+ errorCode: errorCode,
424
423
  });
425
- throw __decorateServiceException(response, parsedBody);
424
+ _d.label = 15;
425
+ case 15: return [2];
426
426
  }
427
427
  });
428
428
  }); };
@@ -445,7 +445,7 @@ export var deserializeAws_json1_0GetKeyspaceCommand = function (output, context)
445
445
  });
446
446
  }); };
447
447
  var deserializeAws_json1_0GetKeyspaceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
448
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
448
+ var parsedOutput, _a, errorCode, _b, parsedBody;
449
449
  var _c;
450
450
  return __generator(this, function (_d) {
451
451
  switch (_d.label) {
@@ -482,14 +482,14 @@ var deserializeAws_json1_0GetKeyspaceCommandError = function (output, context) {
482
482
  case 11: throw _d.sent();
483
483
  case 12:
484
484
  parsedBody = parsedOutput.body;
485
- $metadata = deserializeMetadata(output);
486
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
487
- response = new __BaseException({
488
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
489
- $fault: "client",
490
- $metadata: $metadata,
485
+ throwDefaultError({
486
+ output: output,
487
+ parsedBody: parsedBody,
488
+ exceptionCtor: __BaseException,
489
+ errorCode: errorCode,
491
490
  });
492
- throw __decorateServiceException(response, parsedBody);
491
+ _d.label = 13;
492
+ case 13: return [2];
493
493
  }
494
494
  });
495
495
  }); };
@@ -512,7 +512,7 @@ export var deserializeAws_json1_0GetTableCommand = function (output, context) {
512
512
  });
513
513
  }); };
514
514
  var deserializeAws_json1_0GetTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
515
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
515
+ var parsedOutput, _a, errorCode, _b, parsedBody;
516
516
  var _c;
517
517
  return __generator(this, function (_d) {
518
518
  switch (_d.label) {
@@ -549,14 +549,14 @@ var deserializeAws_json1_0GetTableCommandError = function (output, context) { re
549
549
  case 11: throw _d.sent();
550
550
  case 12:
551
551
  parsedBody = parsedOutput.body;
552
- $metadata = deserializeMetadata(output);
553
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
554
- response = new __BaseException({
555
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
556
- $fault: "client",
557
- $metadata: $metadata,
552
+ throwDefaultError({
553
+ output: output,
554
+ parsedBody: parsedBody,
555
+ exceptionCtor: __BaseException,
556
+ errorCode: errorCode,
558
557
  });
559
- throw __decorateServiceException(response, parsedBody);
558
+ _d.label = 13;
559
+ case 13: return [2];
560
560
  }
561
561
  });
562
562
  }); };
@@ -579,7 +579,7 @@ export var deserializeAws_json1_0ListKeyspacesCommand = function (output, contex
579
579
  });
580
580
  }); };
581
581
  var deserializeAws_json1_0ListKeyspacesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
582
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
582
+ var parsedOutput, _a, errorCode, _b, parsedBody;
583
583
  var _c;
584
584
  return __generator(this, function (_d) {
585
585
  switch (_d.label) {
@@ -616,14 +616,14 @@ var deserializeAws_json1_0ListKeyspacesCommandError = function (output, context)
616
616
  case 11: throw _d.sent();
617
617
  case 12:
618
618
  parsedBody = parsedOutput.body;
619
- $metadata = deserializeMetadata(output);
620
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
621
- response = new __BaseException({
622
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
623
- $fault: "client",
624
- $metadata: $metadata,
619
+ throwDefaultError({
620
+ output: output,
621
+ parsedBody: parsedBody,
622
+ exceptionCtor: __BaseException,
623
+ errorCode: errorCode,
625
624
  });
626
- throw __decorateServiceException(response, parsedBody);
625
+ _d.label = 13;
626
+ case 13: return [2];
627
627
  }
628
628
  });
629
629
  }); };
@@ -646,7 +646,7 @@ export var deserializeAws_json1_0ListTablesCommand = function (output, context)
646
646
  });
647
647
  }); };
648
648
  var deserializeAws_json1_0ListTablesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
649
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
649
+ var parsedOutput, _a, errorCode, _b, parsedBody;
650
650
  var _c;
651
651
  return __generator(this, function (_d) {
652
652
  switch (_d.label) {
@@ -683,14 +683,14 @@ var deserializeAws_json1_0ListTablesCommandError = function (output, context) {
683
683
  case 11: throw _d.sent();
684
684
  case 12:
685
685
  parsedBody = parsedOutput.body;
686
- $metadata = deserializeMetadata(output);
687
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
688
- response = new __BaseException({
689
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
690
- $fault: "client",
691
- $metadata: $metadata,
686
+ throwDefaultError({
687
+ output: output,
688
+ parsedBody: parsedBody,
689
+ exceptionCtor: __BaseException,
690
+ errorCode: errorCode,
692
691
  });
693
- throw __decorateServiceException(response, parsedBody);
692
+ _d.label = 13;
693
+ case 13: return [2];
694
694
  }
695
695
  });
696
696
  }); };
@@ -713,7 +713,7 @@ export var deserializeAws_json1_0ListTagsForResourceCommand = function (output,
713
713
  });
714
714
  }); };
715
715
  var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
716
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
716
+ var parsedOutput, _a, errorCode, _b, parsedBody;
717
717
  var _c;
718
718
  return __generator(this, function (_d) {
719
719
  switch (_d.label) {
@@ -750,14 +750,14 @@ var deserializeAws_json1_0ListTagsForResourceCommandError = function (output, co
750
750
  case 11: throw _d.sent();
751
751
  case 12:
752
752
  parsedBody = parsedOutput.body;
753
- $metadata = deserializeMetadata(output);
754
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
755
- response = new __BaseException({
756
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
757
- $fault: "client",
758
- $metadata: $metadata,
753
+ throwDefaultError({
754
+ output: output,
755
+ parsedBody: parsedBody,
756
+ exceptionCtor: __BaseException,
757
+ errorCode: errorCode,
759
758
  });
760
- throw __decorateServiceException(response, parsedBody);
759
+ _d.label = 13;
760
+ case 13: return [2];
761
761
  }
762
762
  });
763
763
  }); };
@@ -780,7 +780,7 @@ export var deserializeAws_json1_0RestoreTableCommand = function (output, context
780
780
  });
781
781
  }); };
782
782
  var deserializeAws_json1_0RestoreTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
783
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
783
+ var parsedOutput, _a, errorCode, _b, parsedBody;
784
784
  var _c;
785
785
  return __generator(this, function (_d) {
786
786
  switch (_d.label) {
@@ -821,14 +821,14 @@ var deserializeAws_json1_0RestoreTableCommandError = function (output, context)
821
821
  case 13: throw _d.sent();
822
822
  case 14:
823
823
  parsedBody = parsedOutput.body;
824
- $metadata = deserializeMetadata(output);
825
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
826
- response = new __BaseException({
827
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
828
- $fault: "client",
829
- $metadata: $metadata,
824
+ throwDefaultError({
825
+ output: output,
826
+ parsedBody: parsedBody,
827
+ exceptionCtor: __BaseException,
828
+ errorCode: errorCode,
830
829
  });
831
- throw __decorateServiceException(response, parsedBody);
830
+ _d.label = 15;
831
+ case 15: return [2];
832
832
  }
833
833
  });
834
834
  }); };
@@ -851,7 +851,7 @@ export var deserializeAws_json1_0TagResourceCommand = function (output, context)
851
851
  });
852
852
  }); };
853
853
  var deserializeAws_json1_0TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
854
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
854
+ var parsedOutput, _a, errorCode, _b, parsedBody;
855
855
  var _c;
856
856
  return __generator(this, function (_d) {
857
857
  switch (_d.label) {
@@ -888,14 +888,14 @@ var deserializeAws_json1_0TagResourceCommandError = function (output, context) {
888
888
  case 11: throw _d.sent();
889
889
  case 12:
890
890
  parsedBody = parsedOutput.body;
891
- $metadata = deserializeMetadata(output);
892
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
893
- response = new __BaseException({
894
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
895
- $fault: "client",
896
- $metadata: $metadata,
891
+ throwDefaultError({
892
+ output: output,
893
+ parsedBody: parsedBody,
894
+ exceptionCtor: __BaseException,
895
+ errorCode: errorCode,
897
896
  });
898
- throw __decorateServiceException(response, parsedBody);
897
+ _d.label = 13;
898
+ case 13: return [2];
899
899
  }
900
900
  });
901
901
  }); };
@@ -918,7 +918,7 @@ export var deserializeAws_json1_0UntagResourceCommand = function (output, contex
918
918
  });
919
919
  }); };
920
920
  var deserializeAws_json1_0UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
921
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
921
+ var parsedOutput, _a, errorCode, _b, parsedBody;
922
922
  var _c;
923
923
  return __generator(this, function (_d) {
924
924
  switch (_d.label) {
@@ -959,14 +959,14 @@ var deserializeAws_json1_0UntagResourceCommandError = function (output, context)
959
959
  case 13: throw _d.sent();
960
960
  case 14:
961
961
  parsedBody = parsedOutput.body;
962
- $metadata = deserializeMetadata(output);
963
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
964
- response = new __BaseException({
965
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
966
- $fault: "client",
967
- $metadata: $metadata,
962
+ throwDefaultError({
963
+ output: output,
964
+ parsedBody: parsedBody,
965
+ exceptionCtor: __BaseException,
966
+ errorCode: errorCode,
968
967
  });
969
- throw __decorateServiceException(response, parsedBody);
968
+ _d.label = 15;
969
+ case 15: return [2];
970
970
  }
971
971
  });
972
972
  }); };
@@ -989,7 +989,7 @@ export var deserializeAws_json1_0UpdateTableCommand = function (output, context)
989
989
  });
990
990
  }); };
991
991
  var deserializeAws_json1_0UpdateTableCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
992
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
992
+ var parsedOutput, _a, errorCode, _b, parsedBody;
993
993
  var _c;
994
994
  return __generator(this, function (_d) {
995
995
  switch (_d.label) {
@@ -1030,14 +1030,14 @@ var deserializeAws_json1_0UpdateTableCommandError = function (output, context) {
1030
1030
  case 13: throw _d.sent();
1031
1031
  case 14:
1032
1032
  parsedBody = parsedOutput.body;
1033
- $metadata = deserializeMetadata(output);
1034
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1035
- response = new __BaseException({
1036
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1037
- $fault: "client",
1038
- $metadata: $metadata,
1033
+ throwDefaultError({
1034
+ output: output,
1035
+ parsedBody: parsedBody,
1036
+ exceptionCtor: __BaseException,
1037
+ errorCode: errorCode,
1039
1038
  });
1040
- throw __decorateServiceException(response, parsedBody);
1039
+ _d.label = 15;
1040
+ case 15: return [2];
1041
1041
  }
1042
1042
  });
1043
1043
  }); };
@@ -1105,9 +1105,6 @@ var serializeAws_json1_0ClusteringKeyList = function (input, context) {
1105
1105
  return input
1106
1106
  .filter(function (e) { return e != null; })
1107
1107
  .map(function (entry) {
1108
- if (entry === null) {
1109
- return null;
1110
- }
1111
1108
  return serializeAws_json1_0ClusteringKey(entry, context);
1112
1109
  });
1113
1110
  };
@@ -1118,9 +1115,6 @@ var serializeAws_json1_0ColumnDefinitionList = function (input, context) {
1118
1115
  return input
1119
1116
  .filter(function (e) { return e != null; })
1120
1117
  .map(function (entry) {
1121
- if (entry === null) {
1122
- return null;
1123
- }
1124
1118
  return serializeAws_json1_0ColumnDefinition(entry, context);
1125
1119
  });
1126
1120
  };
@@ -1172,9 +1166,6 @@ var serializeAws_json1_0PartitionKeyList = function (input, context) {
1172
1166
  return input
1173
1167
  .filter(function (e) { return e != null; })
1174
1168
  .map(function (entry) {
1175
- if (entry === null) {
1176
- return null;
1177
- }
1178
1169
  return serializeAws_json1_0PartitionKey(entry, context);
1179
1170
  });
1180
1171
  };
@@ -1208,9 +1199,6 @@ var serializeAws_json1_0StaticColumnList = function (input, context) {
1208
1199
  return input
1209
1200
  .filter(function (e) { return e != null; })
1210
1201
  .map(function (entry) {
1211
- if (entry === null) {
1212
- return null;
1213
- }
1214
1202
  return serializeAws_json1_0StaticColumn(entry, context);
1215
1203
  });
1216
1204
  };
@@ -1221,9 +1209,6 @@ var serializeAws_json1_0TagList = function (input, context) {
1221
1209
  return input
1222
1210
  .filter(function (e) { return e != null; })
1223
1211
  .map(function (entry) {
1224
- if (entry === null) {
1225
- return null;
1226
- }
1227
1212
  return serializeAws_json1_0Tag(entry, context);
1228
1213
  });
1229
1214
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-keyspaces",
3
3
  "description": "AWS SDK for JavaScript Keyspaces Client for Node.js, Browser and React Native",
4
- "version": "3.141.0",
4
+ "version": "3.142.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -18,9 +18,9 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.141.0",
21
+ "@aws-sdk/client-sts": "3.142.0",
22
22
  "@aws-sdk/config-resolver": "3.130.0",
23
- "@aws-sdk/credential-provider-node": "3.141.0",
23
+ "@aws-sdk/credential-provider-node": "3.142.0",
24
24
  "@aws-sdk/fetch-http-handler": "3.131.0",
25
25
  "@aws-sdk/hash-node": "3.127.0",
26
26
  "@aws-sdk/invalid-dependency": "3.127.0",
@@ -36,15 +36,15 @@
36
36
  "@aws-sdk/node-config-provider": "3.127.0",
37
37
  "@aws-sdk/node-http-handler": "3.127.0",
38
38
  "@aws-sdk/protocol-http": "3.127.0",
39
- "@aws-sdk/smithy-client": "3.137.0",
39
+ "@aws-sdk/smithy-client": "3.142.0",
40
40
  "@aws-sdk/types": "3.127.0",
41
41
  "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.137.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.137.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.142.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.142.0",
48
48
  "@aws-sdk/util-user-agent-browser": "3.127.0",
49
49
  "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",