@aws-sdk/client-neptune-graph 3.505.0 → 3.507.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.
@@ -424,7 +424,7 @@ export const se_UpdateGraphCommand = async (input, context) => {
424
424
  };
425
425
  export const de_CancelImportTaskCommand = async (output, context) => {
426
426
  if (output.statusCode !== 200 && output.statusCode >= 300) {
427
- return de_CancelImportTaskCommandError(output, context);
427
+ return de_CommandError(output, context);
428
428
  }
429
429
  const contents = map({
430
430
  $metadata: deserializeMetadata(output),
@@ -441,40 +441,9 @@ export const de_CancelImportTaskCommand = async (output, context) => {
441
441
  Object.assign(contents, doc);
442
442
  return contents;
443
443
  };
444
- const de_CancelImportTaskCommandError = async (output, context) => {
445
- const parsedOutput = {
446
- ...output,
447
- body: await parseErrorBody(output.body, context),
448
- };
449
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
450
- switch (errorCode) {
451
- case "ConflictException":
452
- case "com.amazonaws.neptunegraph#ConflictException":
453
- throw await de_ConflictExceptionRes(parsedOutput, context);
454
- case "InternalServerException":
455
- case "com.amazonaws.neptunegraph#InternalServerException":
456
- throw await de_InternalServerExceptionRes(parsedOutput, context);
457
- case "ResourceNotFoundException":
458
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
459
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
460
- case "ThrottlingException":
461
- case "com.amazonaws.neptunegraph#ThrottlingException":
462
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
463
- case "ValidationException":
464
- case "com.amazonaws.neptunegraph#ValidationException":
465
- throw await de_ValidationExceptionRes(parsedOutput, context);
466
- default:
467
- const parsedBody = parsedOutput.body;
468
- return throwDefaultError({
469
- output,
470
- parsedBody,
471
- errorCode,
472
- });
473
- }
474
- };
475
444
  export const de_CancelQueryCommand = async (output, context) => {
476
445
  if (output.statusCode !== 200 && output.statusCode >= 300) {
477
- return de_CancelQueryCommandError(output, context);
446
+ return de_CommandError(output, context);
478
447
  }
479
448
  const contents = map({
480
449
  $metadata: deserializeMetadata(output),
@@ -482,40 +451,9 @@ export const de_CancelQueryCommand = async (output, context) => {
482
451
  await collectBody(output.body, context);
483
452
  return contents;
484
453
  };
485
- const de_CancelQueryCommandError = async (output, context) => {
486
- const parsedOutput = {
487
- ...output,
488
- body: await parseErrorBody(output.body, context),
489
- };
490
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
491
- switch (errorCode) {
492
- case "AccessDeniedException":
493
- case "com.amazonaws.neptunegraph#AccessDeniedException":
494
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
495
- case "InternalServerException":
496
- case "com.amazonaws.neptunegraph#InternalServerException":
497
- throw await de_InternalServerExceptionRes(parsedOutput, context);
498
- case "ResourceNotFoundException":
499
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
500
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
501
- case "ThrottlingException":
502
- case "com.amazonaws.neptunegraph#ThrottlingException":
503
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
504
- case "ValidationException":
505
- case "com.amazonaws.neptunegraph#ValidationException":
506
- throw await de_ValidationExceptionRes(parsedOutput, context);
507
- default:
508
- const parsedBody = parsedOutput.body;
509
- return throwDefaultError({
510
- output,
511
- parsedBody,
512
- errorCode,
513
- });
514
- }
515
- };
516
454
  export const de_CreateGraphCommand = async (output, context) => {
517
455
  if (output.statusCode !== 201 && output.statusCode >= 300) {
518
- return de_CreateGraphCommandError(output, context);
456
+ return de_CommandError(output, context);
519
457
  }
520
458
  const contents = map({
521
459
  $metadata: deserializeMetadata(output),
@@ -541,40 +479,9 @@ export const de_CreateGraphCommand = async (output, context) => {
541
479
  Object.assign(contents, doc);
542
480
  return contents;
543
481
  };
544
- const de_CreateGraphCommandError = async (output, context) => {
545
- const parsedOutput = {
546
- ...output,
547
- body: await parseErrorBody(output.body, context),
548
- };
549
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
550
- switch (errorCode) {
551
- case "ConflictException":
552
- case "com.amazonaws.neptunegraph#ConflictException":
553
- throw await de_ConflictExceptionRes(parsedOutput, context);
554
- case "InternalServerException":
555
- case "com.amazonaws.neptunegraph#InternalServerException":
556
- throw await de_InternalServerExceptionRes(parsedOutput, context);
557
- case "ServiceQuotaExceededException":
558
- case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
559
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
560
- case "ThrottlingException":
561
- case "com.amazonaws.neptunegraph#ThrottlingException":
562
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
563
- case "ValidationException":
564
- case "com.amazonaws.neptunegraph#ValidationException":
565
- throw await de_ValidationExceptionRes(parsedOutput, context);
566
- default:
567
- const parsedBody = parsedOutput.body;
568
- return throwDefaultError({
569
- output,
570
- parsedBody,
571
- errorCode,
572
- });
573
- }
574
- };
575
482
  export const de_CreateGraphSnapshotCommand = async (output, context) => {
576
483
  if (output.statusCode !== 201 && output.statusCode >= 300) {
577
- return de_CreateGraphSnapshotCommandError(output, context);
484
+ return de_CommandError(output, context);
578
485
  }
579
486
  const contents = map({
580
487
  $metadata: deserializeMetadata(output),
@@ -592,43 +499,9 @@ export const de_CreateGraphSnapshotCommand = async (output, context) => {
592
499
  Object.assign(contents, doc);
593
500
  return contents;
594
501
  };
595
- const de_CreateGraphSnapshotCommandError = async (output, context) => {
596
- const parsedOutput = {
597
- ...output,
598
- body: await parseErrorBody(output.body, context),
599
- };
600
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
601
- switch (errorCode) {
602
- case "ConflictException":
603
- case "com.amazonaws.neptunegraph#ConflictException":
604
- throw await de_ConflictExceptionRes(parsedOutput, context);
605
- case "InternalServerException":
606
- case "com.amazonaws.neptunegraph#InternalServerException":
607
- throw await de_InternalServerExceptionRes(parsedOutput, context);
608
- case "ResourceNotFoundException":
609
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
610
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
611
- case "ServiceQuotaExceededException":
612
- case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
613
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
614
- case "ThrottlingException":
615
- case "com.amazonaws.neptunegraph#ThrottlingException":
616
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
617
- case "ValidationException":
618
- case "com.amazonaws.neptunegraph#ValidationException":
619
- throw await de_ValidationExceptionRes(parsedOutput, context);
620
- default:
621
- const parsedBody = parsedOutput.body;
622
- return throwDefaultError({
623
- output,
624
- parsedBody,
625
- errorCode,
626
- });
627
- }
628
- };
629
502
  export const de_CreateGraphUsingImportTaskCommand = async (output, context) => {
630
503
  if (output.statusCode !== 201 && output.statusCode >= 300) {
631
- return de_CreateGraphUsingImportTaskCommandError(output, context);
504
+ return de_CommandError(output, context);
632
505
  }
633
506
  const contents = map({
634
507
  $metadata: deserializeMetadata(output),
@@ -646,40 +519,9 @@ export const de_CreateGraphUsingImportTaskCommand = async (output, context) => {
646
519
  Object.assign(contents, doc);
647
520
  return contents;
648
521
  };
649
- const de_CreateGraphUsingImportTaskCommandError = async (output, context) => {
650
- const parsedOutput = {
651
- ...output,
652
- body: await parseErrorBody(output.body, context),
653
- };
654
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
655
- switch (errorCode) {
656
- case "ConflictException":
657
- case "com.amazonaws.neptunegraph#ConflictException":
658
- throw await de_ConflictExceptionRes(parsedOutput, context);
659
- case "InternalServerException":
660
- case "com.amazonaws.neptunegraph#InternalServerException":
661
- throw await de_InternalServerExceptionRes(parsedOutput, context);
662
- case "ServiceQuotaExceededException":
663
- case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
664
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
665
- case "ThrottlingException":
666
- case "com.amazonaws.neptunegraph#ThrottlingException":
667
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
668
- case "ValidationException":
669
- case "com.amazonaws.neptunegraph#ValidationException":
670
- throw await de_ValidationExceptionRes(parsedOutput, context);
671
- default:
672
- const parsedBody = parsedOutput.body;
673
- return throwDefaultError({
674
- output,
675
- parsedBody,
676
- errorCode,
677
- });
678
- }
679
- };
680
522
  export const de_CreatePrivateGraphEndpointCommand = async (output, context) => {
681
523
  if (output.statusCode !== 201 && output.statusCode >= 300) {
682
- return de_CreatePrivateGraphEndpointCommandError(output, context);
524
+ return de_CommandError(output, context);
683
525
  }
684
526
  const contents = map({
685
527
  $metadata: deserializeMetadata(output),
@@ -694,43 +536,9 @@ export const de_CreatePrivateGraphEndpointCommand = async (output, context) => {
694
536
  Object.assign(contents, doc);
695
537
  return contents;
696
538
  };
697
- const de_CreatePrivateGraphEndpointCommandError = async (output, context) => {
698
- const parsedOutput = {
699
- ...output,
700
- body: await parseErrorBody(output.body, context),
701
- };
702
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
703
- switch (errorCode) {
704
- case "ConflictException":
705
- case "com.amazonaws.neptunegraph#ConflictException":
706
- throw await de_ConflictExceptionRes(parsedOutput, context);
707
- case "InternalServerException":
708
- case "com.amazonaws.neptunegraph#InternalServerException":
709
- throw await de_InternalServerExceptionRes(parsedOutput, context);
710
- case "ResourceNotFoundException":
711
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
712
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
713
- case "ServiceQuotaExceededException":
714
- case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
715
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
716
- case "ThrottlingException":
717
- case "com.amazonaws.neptunegraph#ThrottlingException":
718
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
719
- case "ValidationException":
720
- case "com.amazonaws.neptunegraph#ValidationException":
721
- throw await de_ValidationExceptionRes(parsedOutput, context);
722
- default:
723
- const parsedBody = parsedOutput.body;
724
- return throwDefaultError({
725
- output,
726
- parsedBody,
727
- errorCode,
728
- });
729
- }
730
- };
731
539
  export const de_DeleteGraphCommand = async (output, context) => {
732
540
  if (output.statusCode !== 200 && output.statusCode >= 300) {
733
- return de_DeleteGraphCommandError(output, context);
541
+ return de_CommandError(output, context);
734
542
  }
735
543
  const contents = map({
736
544
  $metadata: deserializeMetadata(output),
@@ -756,40 +564,9 @@ export const de_DeleteGraphCommand = async (output, context) => {
756
564
  Object.assign(contents, doc);
757
565
  return contents;
758
566
  };
759
- const de_DeleteGraphCommandError = async (output, context) => {
760
- const parsedOutput = {
761
- ...output,
762
- body: await parseErrorBody(output.body, context),
763
- };
764
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
765
- switch (errorCode) {
766
- case "ConflictException":
767
- case "com.amazonaws.neptunegraph#ConflictException":
768
- throw await de_ConflictExceptionRes(parsedOutput, context);
769
- case "InternalServerException":
770
- case "com.amazonaws.neptunegraph#InternalServerException":
771
- throw await de_InternalServerExceptionRes(parsedOutput, context);
772
- case "ResourceNotFoundException":
773
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
774
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
775
- case "ThrottlingException":
776
- case "com.amazonaws.neptunegraph#ThrottlingException":
777
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
778
- case "ValidationException":
779
- case "com.amazonaws.neptunegraph#ValidationException":
780
- throw await de_ValidationExceptionRes(parsedOutput, context);
781
- default:
782
- const parsedBody = parsedOutput.body;
783
- return throwDefaultError({
784
- output,
785
- parsedBody,
786
- errorCode,
787
- });
788
- }
789
- };
790
567
  export const de_DeleteGraphSnapshotCommand = async (output, context) => {
791
568
  if (output.statusCode !== 200 && output.statusCode >= 300) {
792
- return de_DeleteGraphSnapshotCommandError(output, context);
569
+ return de_CommandError(output, context);
793
570
  }
794
571
  const contents = map({
795
572
  $metadata: deserializeMetadata(output),
@@ -807,40 +584,9 @@ export const de_DeleteGraphSnapshotCommand = async (output, context) => {
807
584
  Object.assign(contents, doc);
808
585
  return contents;
809
586
  };
810
- const de_DeleteGraphSnapshotCommandError = async (output, context) => {
811
- const parsedOutput = {
812
- ...output,
813
- body: await parseErrorBody(output.body, context),
814
- };
815
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
816
- switch (errorCode) {
817
- case "ConflictException":
818
- case "com.amazonaws.neptunegraph#ConflictException":
819
- throw await de_ConflictExceptionRes(parsedOutput, context);
820
- case "InternalServerException":
821
- case "com.amazonaws.neptunegraph#InternalServerException":
822
- throw await de_InternalServerExceptionRes(parsedOutput, context);
823
- case "ResourceNotFoundException":
824
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
825
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
826
- case "ThrottlingException":
827
- case "com.amazonaws.neptunegraph#ThrottlingException":
828
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
829
- case "ValidationException":
830
- case "com.amazonaws.neptunegraph#ValidationException":
831
- throw await de_ValidationExceptionRes(parsedOutput, context);
832
- default:
833
- const parsedBody = parsedOutput.body;
834
- return throwDefaultError({
835
- output,
836
- parsedBody,
837
- errorCode,
838
- });
839
- }
840
- };
841
587
  export const de_DeletePrivateGraphEndpointCommand = async (output, context) => {
842
588
  if (output.statusCode !== 200 && output.statusCode >= 300) {
843
- return de_DeletePrivateGraphEndpointCommandError(output, context);
589
+ return de_CommandError(output, context);
844
590
  }
845
591
  const contents = map({
846
592
  $metadata: deserializeMetadata(output),
@@ -855,40 +601,9 @@ export const de_DeletePrivateGraphEndpointCommand = async (output, context) => {
855
601
  Object.assign(contents, doc);
856
602
  return contents;
857
603
  };
858
- const de_DeletePrivateGraphEndpointCommandError = async (output, context) => {
859
- const parsedOutput = {
860
- ...output,
861
- body: await parseErrorBody(output.body, context),
862
- };
863
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
864
- switch (errorCode) {
865
- case "ConflictException":
866
- case "com.amazonaws.neptunegraph#ConflictException":
867
- throw await de_ConflictExceptionRes(parsedOutput, context);
868
- case "InternalServerException":
869
- case "com.amazonaws.neptunegraph#InternalServerException":
870
- throw await de_InternalServerExceptionRes(parsedOutput, context);
871
- case "ResourceNotFoundException":
872
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
873
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
874
- case "ThrottlingException":
875
- case "com.amazonaws.neptunegraph#ThrottlingException":
876
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
877
- case "ValidationException":
878
- case "com.amazonaws.neptunegraph#ValidationException":
879
- throw await de_ValidationExceptionRes(parsedOutput, context);
880
- default:
881
- const parsedBody = parsedOutput.body;
882
- return throwDefaultError({
883
- output,
884
- parsedBody,
885
- errorCode,
886
- });
887
- }
888
- };
889
604
  export const de_ExecuteQueryCommand = async (output, context) => {
890
605
  if (output.statusCode !== 200 && output.statusCode >= 300) {
891
- return de_ExecuteQueryCommandError(output, context);
606
+ return de_CommandError(output, context);
892
607
  }
893
608
  const contents = map({
894
609
  $metadata: deserializeMetadata(output),
@@ -898,43 +613,9 @@ export const de_ExecuteQueryCommand = async (output, context) => {
898
613
  contents.payload = data;
899
614
  return contents;
900
615
  };
901
- const de_ExecuteQueryCommandError = async (output, context) => {
902
- const parsedOutput = {
903
- ...output,
904
- body: await parseErrorBody(output.body, context),
905
- };
906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- switch (errorCode) {
908
- case "AccessDeniedException":
909
- case "com.amazonaws.neptunegraph#AccessDeniedException":
910
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
911
- case "ConflictException":
912
- case "com.amazonaws.neptunegraph#ConflictException":
913
- throw await de_ConflictExceptionRes(parsedOutput, context);
914
- case "InternalServerException":
915
- case "com.amazonaws.neptunegraph#InternalServerException":
916
- throw await de_InternalServerExceptionRes(parsedOutput, context);
917
- case "ThrottlingException":
918
- case "com.amazonaws.neptunegraph#ThrottlingException":
919
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
920
- case "UnprocessableException":
921
- case "com.amazonaws.neptunegraph#UnprocessableException":
922
- throw await de_UnprocessableExceptionRes(parsedOutput, context);
923
- case "ValidationException":
924
- case "com.amazonaws.neptunegraph#ValidationException":
925
- throw await de_ValidationExceptionRes(parsedOutput, context);
926
- default:
927
- const parsedBody = parsedOutput.body;
928
- return throwDefaultError({
929
- output,
930
- parsedBody,
931
- errorCode,
932
- });
933
- }
934
- };
935
616
  export const de_GetGraphCommand = async (output, context) => {
936
617
  if (output.statusCode !== 200 && output.statusCode >= 300) {
937
- return de_GetGraphCommandError(output, context);
618
+ return de_CommandError(output, context);
938
619
  }
939
620
  const contents = map({
940
621
  $metadata: deserializeMetadata(output),
@@ -960,37 +641,9 @@ export const de_GetGraphCommand = async (output, context) => {
960
641
  Object.assign(contents, doc);
961
642
  return contents;
962
643
  };
963
- const de_GetGraphCommandError = async (output, context) => {
964
- const parsedOutput = {
965
- ...output,
966
- body: await parseErrorBody(output.body, context),
967
- };
968
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
969
- switch (errorCode) {
970
- case "InternalServerException":
971
- case "com.amazonaws.neptunegraph#InternalServerException":
972
- throw await de_InternalServerExceptionRes(parsedOutput, context);
973
- case "ResourceNotFoundException":
974
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
975
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
976
- case "ThrottlingException":
977
- case "com.amazonaws.neptunegraph#ThrottlingException":
978
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
979
- case "ValidationException":
980
- case "com.amazonaws.neptunegraph#ValidationException":
981
- throw await de_ValidationExceptionRes(parsedOutput, context);
982
- default:
983
- const parsedBody = parsedOutput.body;
984
- return throwDefaultError({
985
- output,
986
- parsedBody,
987
- errorCode,
988
- });
989
- }
990
- };
991
644
  export const de_GetGraphSnapshotCommand = async (output, context) => {
992
645
  if (output.statusCode !== 200 && output.statusCode >= 300) {
993
- return de_GetGraphSnapshotCommandError(output, context);
646
+ return de_CommandError(output, context);
994
647
  }
995
648
  const contents = map({
996
649
  $metadata: deserializeMetadata(output),
@@ -1008,37 +661,9 @@ export const de_GetGraphSnapshotCommand = async (output, context) => {
1008
661
  Object.assign(contents, doc);
1009
662
  return contents;
1010
663
  };
1011
- const de_GetGraphSnapshotCommandError = async (output, context) => {
1012
- const parsedOutput = {
1013
- ...output,
1014
- body: await parseErrorBody(output.body, context),
1015
- };
1016
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1017
- switch (errorCode) {
1018
- case "InternalServerException":
1019
- case "com.amazonaws.neptunegraph#InternalServerException":
1020
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1021
- case "ResourceNotFoundException":
1022
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1023
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1024
- case "ThrottlingException":
1025
- case "com.amazonaws.neptunegraph#ThrottlingException":
1026
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1027
- case "ValidationException":
1028
- case "com.amazonaws.neptunegraph#ValidationException":
1029
- throw await de_ValidationExceptionRes(parsedOutput, context);
1030
- default:
1031
- const parsedBody = parsedOutput.body;
1032
- return throwDefaultError({
1033
- output,
1034
- parsedBody,
1035
- errorCode,
1036
- });
1037
- }
1038
- };
1039
664
  export const de_GetGraphSummaryCommand = async (output, context) => {
1040
665
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1041
- return de_GetGraphSummaryCommandError(output, context);
666
+ return de_CommandError(output, context);
1042
667
  }
1043
668
  const contents = map({
1044
669
  $metadata: deserializeMetadata(output),
@@ -1052,40 +677,9 @@ export const de_GetGraphSummaryCommand = async (output, context) => {
1052
677
  Object.assign(contents, doc);
1053
678
  return contents;
1054
679
  };
1055
- const de_GetGraphSummaryCommandError = async (output, context) => {
1056
- const parsedOutput = {
1057
- ...output,
1058
- body: await parseErrorBody(output.body, context),
1059
- };
1060
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1061
- switch (errorCode) {
1062
- case "AccessDeniedException":
1063
- case "com.amazonaws.neptunegraph#AccessDeniedException":
1064
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1065
- case "InternalServerException":
1066
- case "com.amazonaws.neptunegraph#InternalServerException":
1067
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1068
- case "ResourceNotFoundException":
1069
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1070
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1071
- case "ThrottlingException":
1072
- case "com.amazonaws.neptunegraph#ThrottlingException":
1073
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1074
- case "ValidationException":
1075
- case "com.amazonaws.neptunegraph#ValidationException":
1076
- throw await de_ValidationExceptionRes(parsedOutput, context);
1077
- default:
1078
- const parsedBody = parsedOutput.body;
1079
- return throwDefaultError({
1080
- output,
1081
- parsedBody,
1082
- errorCode,
1083
- });
1084
- }
1085
- };
1086
680
  export const de_GetImportTaskCommand = async (output, context) => {
1087
681
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1088
- return de_GetImportTaskCommandError(output, context);
682
+ return de_CommandError(output, context);
1089
683
  }
1090
684
  const contents = map({
1091
685
  $metadata: deserializeMetadata(output),
@@ -1106,37 +700,9 @@ export const de_GetImportTaskCommand = async (output, context) => {
1106
700
  Object.assign(contents, doc);
1107
701
  return contents;
1108
702
  };
1109
- const de_GetImportTaskCommandError = async (output, context) => {
1110
- const parsedOutput = {
1111
- ...output,
1112
- body: await parseErrorBody(output.body, context),
1113
- };
1114
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1115
- switch (errorCode) {
1116
- case "InternalServerException":
1117
- case "com.amazonaws.neptunegraph#InternalServerException":
1118
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1119
- case "ResourceNotFoundException":
1120
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1121
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1122
- case "ThrottlingException":
1123
- case "com.amazonaws.neptunegraph#ThrottlingException":
1124
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1125
- case "ValidationException":
1126
- case "com.amazonaws.neptunegraph#ValidationException":
1127
- throw await de_ValidationExceptionRes(parsedOutput, context);
1128
- default:
1129
- const parsedBody = parsedOutput.body;
1130
- return throwDefaultError({
1131
- output,
1132
- parsedBody,
1133
- errorCode,
1134
- });
1135
- }
1136
- };
1137
703
  export const de_GetPrivateGraphEndpointCommand = async (output, context) => {
1138
704
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1139
- return de_GetPrivateGraphEndpointCommandError(output, context);
705
+ return de_CommandError(output, context);
1140
706
  }
1141
707
  const contents = map({
1142
708
  $metadata: deserializeMetadata(output),
@@ -1151,37 +717,9 @@ export const de_GetPrivateGraphEndpointCommand = async (output, context) => {
1151
717
  Object.assign(contents, doc);
1152
718
  return contents;
1153
719
  };
1154
- const de_GetPrivateGraphEndpointCommandError = async (output, context) => {
1155
- const parsedOutput = {
1156
- ...output,
1157
- body: await parseErrorBody(output.body, context),
1158
- };
1159
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1160
- switch (errorCode) {
1161
- case "InternalServerException":
1162
- case "com.amazonaws.neptunegraph#InternalServerException":
1163
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1164
- case "ResourceNotFoundException":
1165
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1166
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1167
- case "ThrottlingException":
1168
- case "com.amazonaws.neptunegraph#ThrottlingException":
1169
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1170
- case "ValidationException":
1171
- case "com.amazonaws.neptunegraph#ValidationException":
1172
- throw await de_ValidationExceptionRes(parsedOutput, context);
1173
- default:
1174
- const parsedBody = parsedOutput.body;
1175
- return throwDefaultError({
1176
- output,
1177
- parsedBody,
1178
- errorCode,
1179
- });
1180
- }
1181
- };
1182
720
  export const de_GetQueryCommand = async (output, context) => {
1183
721
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1184
- return de_GetQueryCommandError(output, context);
722
+ return de_CommandError(output, context);
1185
723
  }
1186
724
  const contents = map({
1187
725
  $metadata: deserializeMetadata(output),
@@ -1197,123 +735,39 @@ export const de_GetQueryCommand = async (output, context) => {
1197
735
  Object.assign(contents, doc);
1198
736
  return contents;
1199
737
  };
1200
- const de_GetQueryCommandError = async (output, context) => {
1201
- const parsedOutput = {
1202
- ...output,
1203
- body: await parseErrorBody(output.body, context),
1204
- };
1205
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1206
- switch (errorCode) {
1207
- case "AccessDeniedException":
1208
- case "com.amazonaws.neptunegraph#AccessDeniedException":
1209
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1210
- case "InternalServerException":
1211
- case "com.amazonaws.neptunegraph#InternalServerException":
1212
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1213
- case "ResourceNotFoundException":
1214
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1215
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1216
- case "ThrottlingException":
1217
- case "com.amazonaws.neptunegraph#ThrottlingException":
1218
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1219
- case "ValidationException":
1220
- case "com.amazonaws.neptunegraph#ValidationException":
1221
- throw await de_ValidationExceptionRes(parsedOutput, context);
1222
- default:
1223
- const parsedBody = parsedOutput.body;
1224
- return throwDefaultError({
1225
- output,
1226
- parsedBody,
1227
- errorCode,
1228
- });
1229
- }
1230
- };
1231
738
  export const de_ListGraphsCommand = async (output, context) => {
1232
739
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1233
- return de_ListGraphsCommandError(output, context);
740
+ return de_CommandError(output, context);
1234
741
  }
1235
742
  const contents = map({
1236
- $metadata: deserializeMetadata(output),
1237
- });
1238
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1239
- const doc = take(data, {
1240
- graphs: _json,
1241
- nextToken: __expectString,
1242
- });
1243
- Object.assign(contents, doc);
1244
- return contents;
1245
- };
1246
- const de_ListGraphsCommandError = async (output, context) => {
1247
- const parsedOutput = {
1248
- ...output,
1249
- body: await parseErrorBody(output.body, context),
1250
- };
1251
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1252
- switch (errorCode) {
1253
- case "InternalServerException":
1254
- case "com.amazonaws.neptunegraph#InternalServerException":
1255
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1256
- case "ResourceNotFoundException":
1257
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1258
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1259
- case "ThrottlingException":
1260
- case "com.amazonaws.neptunegraph#ThrottlingException":
1261
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1262
- default:
1263
- const parsedBody = parsedOutput.body;
1264
- return throwDefaultError({
1265
- output,
1266
- parsedBody,
1267
- errorCode,
1268
- });
1269
- }
1270
- };
1271
- export const de_ListGraphSnapshotsCommand = async (output, context) => {
1272
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1273
- return de_ListGraphSnapshotsCommandError(output, context);
1274
- }
1275
- const contents = map({
1276
- $metadata: deserializeMetadata(output),
1277
- });
1278
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1279
- const doc = take(data, {
1280
- graphSnapshots: (_) => de_GraphSnapshotSummaryList(_, context),
1281
- nextToken: __expectString,
1282
- });
1283
- Object.assign(contents, doc);
1284
- return contents;
1285
- };
1286
- const de_ListGraphSnapshotsCommandError = async (output, context) => {
1287
- const parsedOutput = {
1288
- ...output,
1289
- body: await parseErrorBody(output.body, context),
1290
- };
1291
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1292
- switch (errorCode) {
1293
- case "InternalServerException":
1294
- case "com.amazonaws.neptunegraph#InternalServerException":
1295
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1296
- case "ResourceNotFoundException":
1297
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1298
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1299
- case "ThrottlingException":
1300
- case "com.amazonaws.neptunegraph#ThrottlingException":
1301
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1302
- case "ValidationException":
1303
- case "com.amazonaws.neptunegraph#ValidationException":
1304
- throw await de_ValidationExceptionRes(parsedOutput, context);
1305
- default:
1306
- const parsedBody = parsedOutput.body;
1307
- return throwDefaultError({
1308
- output,
1309
- parsedBody,
1310
- errorCode,
1311
- });
743
+ $metadata: deserializeMetadata(output),
744
+ });
745
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
746
+ const doc = take(data, {
747
+ graphs: _json,
748
+ nextToken: __expectString,
749
+ });
750
+ Object.assign(contents, doc);
751
+ return contents;
752
+ };
753
+ export const de_ListGraphSnapshotsCommand = async (output, context) => {
754
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
755
+ return de_CommandError(output, context);
1312
756
  }
757
+ const contents = map({
758
+ $metadata: deserializeMetadata(output),
759
+ });
760
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
761
+ const doc = take(data, {
762
+ graphSnapshots: (_) => de_GraphSnapshotSummaryList(_, context),
763
+ nextToken: __expectString,
764
+ });
765
+ Object.assign(contents, doc);
766
+ return contents;
1313
767
  };
1314
768
  export const de_ListImportTasksCommand = async (output, context) => {
1315
769
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1316
- return de_ListImportTasksCommandError(output, context);
770
+ return de_CommandError(output, context);
1317
771
  }
1318
772
  const contents = map({
1319
773
  $metadata: deserializeMetadata(output),
@@ -1326,37 +780,9 @@ export const de_ListImportTasksCommand = async (output, context) => {
1326
780
  Object.assign(contents, doc);
1327
781
  return contents;
1328
782
  };
1329
- const de_ListImportTasksCommandError = async (output, context) => {
1330
- const parsedOutput = {
1331
- ...output,
1332
- body: await parseErrorBody(output.body, context),
1333
- };
1334
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1335
- switch (errorCode) {
1336
- case "InternalServerException":
1337
- case "com.amazonaws.neptunegraph#InternalServerException":
1338
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1339
- case "ResourceNotFoundException":
1340
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1341
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1342
- case "ThrottlingException":
1343
- case "com.amazonaws.neptunegraph#ThrottlingException":
1344
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1345
- case "ValidationException":
1346
- case "com.amazonaws.neptunegraph#ValidationException":
1347
- throw await de_ValidationExceptionRes(parsedOutput, context);
1348
- default:
1349
- const parsedBody = parsedOutput.body;
1350
- return throwDefaultError({
1351
- output,
1352
- parsedBody,
1353
- errorCode,
1354
- });
1355
- }
1356
- };
1357
783
  export const de_ListPrivateGraphEndpointsCommand = async (output, context) => {
1358
784
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1359
- return de_ListPrivateGraphEndpointsCommandError(output, context);
785
+ return de_CommandError(output, context);
1360
786
  }
1361
787
  const contents = map({
1362
788
  $metadata: deserializeMetadata(output),
@@ -1369,37 +795,9 @@ export const de_ListPrivateGraphEndpointsCommand = async (output, context) => {
1369
795
  Object.assign(contents, doc);
1370
796
  return contents;
1371
797
  };
1372
- const de_ListPrivateGraphEndpointsCommandError = async (output, context) => {
1373
- const parsedOutput = {
1374
- ...output,
1375
- body: await parseErrorBody(output.body, context),
1376
- };
1377
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1378
- switch (errorCode) {
1379
- case "InternalServerException":
1380
- case "com.amazonaws.neptunegraph#InternalServerException":
1381
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1382
- case "ResourceNotFoundException":
1383
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1384
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1385
- case "ThrottlingException":
1386
- case "com.amazonaws.neptunegraph#ThrottlingException":
1387
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1388
- case "ValidationException":
1389
- case "com.amazonaws.neptunegraph#ValidationException":
1390
- throw await de_ValidationExceptionRes(parsedOutput, context);
1391
- default:
1392
- const parsedBody = parsedOutput.body;
1393
- return throwDefaultError({
1394
- output,
1395
- parsedBody,
1396
- errorCode,
1397
- });
1398
- }
1399
- };
1400
798
  export const de_ListQueriesCommand = async (output, context) => {
1401
799
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1402
- return de_ListQueriesCommandError(output, context);
800
+ return de_CommandError(output, context);
1403
801
  }
1404
802
  const contents = map({
1405
803
  $metadata: deserializeMetadata(output),
@@ -1411,37 +809,9 @@ export const de_ListQueriesCommand = async (output, context) => {
1411
809
  Object.assign(contents, doc);
1412
810
  return contents;
1413
811
  };
1414
- const de_ListQueriesCommandError = async (output, context) => {
1415
- const parsedOutput = {
1416
- ...output,
1417
- body: await parseErrorBody(output.body, context),
1418
- };
1419
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1420
- switch (errorCode) {
1421
- case "AccessDeniedException":
1422
- case "com.amazonaws.neptunegraph#AccessDeniedException":
1423
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1424
- case "InternalServerException":
1425
- case "com.amazonaws.neptunegraph#InternalServerException":
1426
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1427
- case "ThrottlingException":
1428
- case "com.amazonaws.neptunegraph#ThrottlingException":
1429
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1430
- case "ValidationException":
1431
- case "com.amazonaws.neptunegraph#ValidationException":
1432
- throw await de_ValidationExceptionRes(parsedOutput, context);
1433
- default:
1434
- const parsedBody = parsedOutput.body;
1435
- return throwDefaultError({
1436
- output,
1437
- parsedBody,
1438
- errorCode,
1439
- });
1440
- }
1441
- };
1442
812
  export const de_ListTagsForResourceCommand = async (output, context) => {
1443
813
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1444
- return de_ListTagsForResourceCommandError(output, context);
814
+ return de_CommandError(output, context);
1445
815
  }
1446
816
  const contents = map({
1447
817
  $metadata: deserializeMetadata(output),
@@ -1453,37 +823,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1453
823
  Object.assign(contents, doc);
1454
824
  return contents;
1455
825
  };
1456
- const de_ListTagsForResourceCommandError = async (output, context) => {
1457
- const parsedOutput = {
1458
- ...output,
1459
- body: await parseErrorBody(output.body, context),
1460
- };
1461
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1462
- switch (errorCode) {
1463
- case "InternalServerException":
1464
- case "com.amazonaws.neptunegraph#InternalServerException":
1465
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1466
- case "ResourceNotFoundException":
1467
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1468
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1469
- case "ThrottlingException":
1470
- case "com.amazonaws.neptunegraph#ThrottlingException":
1471
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1472
- case "ValidationException":
1473
- case "com.amazonaws.neptunegraph#ValidationException":
1474
- throw await de_ValidationExceptionRes(parsedOutput, context);
1475
- default:
1476
- const parsedBody = parsedOutput.body;
1477
- return throwDefaultError({
1478
- output,
1479
- parsedBody,
1480
- errorCode,
1481
- });
1482
- }
1483
- };
1484
826
  export const de_ResetGraphCommand = async (output, context) => {
1485
827
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1486
- return de_ResetGraphCommandError(output, context);
828
+ return de_CommandError(output, context);
1487
829
  }
1488
830
  const contents = map({
1489
831
  $metadata: deserializeMetadata(output),
@@ -1509,40 +851,9 @@ export const de_ResetGraphCommand = async (output, context) => {
1509
851
  Object.assign(contents, doc);
1510
852
  return contents;
1511
853
  };
1512
- const de_ResetGraphCommandError = async (output, context) => {
1513
- const parsedOutput = {
1514
- ...output,
1515
- body: await parseErrorBody(output.body, context),
1516
- };
1517
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1518
- switch (errorCode) {
1519
- case "ConflictException":
1520
- case "com.amazonaws.neptunegraph#ConflictException":
1521
- throw await de_ConflictExceptionRes(parsedOutput, context);
1522
- case "InternalServerException":
1523
- case "com.amazonaws.neptunegraph#InternalServerException":
1524
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1525
- case "ResourceNotFoundException":
1526
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1527
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1528
- case "ThrottlingException":
1529
- case "com.amazonaws.neptunegraph#ThrottlingException":
1530
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1531
- case "ValidationException":
1532
- case "com.amazonaws.neptunegraph#ValidationException":
1533
- throw await de_ValidationExceptionRes(parsedOutput, context);
1534
- default:
1535
- const parsedBody = parsedOutput.body;
1536
- return throwDefaultError({
1537
- output,
1538
- parsedBody,
1539
- errorCode,
1540
- });
1541
- }
1542
- };
1543
854
  export const de_RestoreGraphFromSnapshotCommand = async (output, context) => {
1544
855
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1545
- return de_RestoreGraphFromSnapshotCommandError(output, context);
856
+ return de_CommandError(output, context);
1546
857
  }
1547
858
  const contents = map({
1548
859
  $metadata: deserializeMetadata(output),
@@ -1568,43 +879,9 @@ export const de_RestoreGraphFromSnapshotCommand = async (output, context) => {
1568
879
  Object.assign(contents, doc);
1569
880
  return contents;
1570
881
  };
1571
- const de_RestoreGraphFromSnapshotCommandError = async (output, context) => {
1572
- const parsedOutput = {
1573
- ...output,
1574
- body: await parseErrorBody(output.body, context),
1575
- };
1576
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1577
- switch (errorCode) {
1578
- case "ConflictException":
1579
- case "com.amazonaws.neptunegraph#ConflictException":
1580
- throw await de_ConflictExceptionRes(parsedOutput, context);
1581
- case "InternalServerException":
1582
- case "com.amazonaws.neptunegraph#InternalServerException":
1583
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1584
- case "ResourceNotFoundException":
1585
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1586
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1587
- case "ServiceQuotaExceededException":
1588
- case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
1589
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1590
- case "ThrottlingException":
1591
- case "com.amazonaws.neptunegraph#ThrottlingException":
1592
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1593
- case "ValidationException":
1594
- case "com.amazonaws.neptunegraph#ValidationException":
1595
- throw await de_ValidationExceptionRes(parsedOutput, context);
1596
- default:
1597
- const parsedBody = parsedOutput.body;
1598
- return throwDefaultError({
1599
- output,
1600
- parsedBody,
1601
- errorCode,
1602
- });
1603
- }
1604
- };
1605
882
  export const de_TagResourceCommand = async (output, context) => {
1606
883
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1607
- return de_TagResourceCommandError(output, context);
884
+ return de_CommandError(output, context);
1608
885
  }
1609
886
  const contents = map({
1610
887
  $metadata: deserializeMetadata(output),
@@ -1612,37 +889,9 @@ export const de_TagResourceCommand = async (output, context) => {
1612
889
  await collectBody(output.body, context);
1613
890
  return contents;
1614
891
  };
1615
- const de_TagResourceCommandError = async (output, context) => {
1616
- const parsedOutput = {
1617
- ...output,
1618
- body: await parseErrorBody(output.body, context),
1619
- };
1620
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1621
- switch (errorCode) {
1622
- case "InternalServerException":
1623
- case "com.amazonaws.neptunegraph#InternalServerException":
1624
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1625
- case "ResourceNotFoundException":
1626
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1627
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1628
- case "ThrottlingException":
1629
- case "com.amazonaws.neptunegraph#ThrottlingException":
1630
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1631
- case "ValidationException":
1632
- case "com.amazonaws.neptunegraph#ValidationException":
1633
- throw await de_ValidationExceptionRes(parsedOutput, context);
1634
- default:
1635
- const parsedBody = parsedOutput.body;
1636
- return throwDefaultError({
1637
- output,
1638
- parsedBody,
1639
- errorCode,
1640
- });
1641
- }
1642
- };
1643
892
  export const de_UntagResourceCommand = async (output, context) => {
1644
893
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1645
- return de_UntagResourceCommandError(output, context);
894
+ return de_CommandError(output, context);
1646
895
  }
1647
896
  const contents = map({
1648
897
  $metadata: deserializeMetadata(output),
@@ -1650,37 +899,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1650
899
  await collectBody(output.body, context);
1651
900
  return contents;
1652
901
  };
1653
- const de_UntagResourceCommandError = async (output, context) => {
1654
- const parsedOutput = {
1655
- ...output,
1656
- body: await parseErrorBody(output.body, context),
1657
- };
1658
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1659
- switch (errorCode) {
1660
- case "InternalServerException":
1661
- case "com.amazonaws.neptunegraph#InternalServerException":
1662
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1663
- case "ResourceNotFoundException":
1664
- case "com.amazonaws.neptunegraph#ResourceNotFoundException":
1665
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1666
- case "ThrottlingException":
1667
- case "com.amazonaws.neptunegraph#ThrottlingException":
1668
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1669
- case "ValidationException":
1670
- case "com.amazonaws.neptunegraph#ValidationException":
1671
- throw await de_ValidationExceptionRes(parsedOutput, context);
1672
- default:
1673
- const parsedBody = parsedOutput.body;
1674
- return throwDefaultError({
1675
- output,
1676
- parsedBody,
1677
- errorCode,
1678
- });
1679
- }
1680
- };
1681
902
  export const de_UpdateGraphCommand = async (output, context) => {
1682
903
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1683
- return de_UpdateGraphCommandError(output, context);
904
+ return de_CommandError(output, context);
1684
905
  }
1685
906
  const contents = map({
1686
907
  $metadata: deserializeMetadata(output),
@@ -1706,7 +927,7 @@ export const de_UpdateGraphCommand = async (output, context) => {
1706
927
  Object.assign(contents, doc);
1707
928
  return contents;
1708
929
  };
1709
- const de_UpdateGraphCommandError = async (output, context) => {
930
+ const de_CommandError = async (output, context) => {
1710
931
  const parsedOutput = {
1711
932
  ...output,
1712
933
  body: await parseErrorBody(output.body, context),
@@ -1728,6 +949,15 @@ const de_UpdateGraphCommandError = async (output, context) => {
1728
949
  case "ValidationException":
1729
950
  case "com.amazonaws.neptunegraph#ValidationException":
1730
951
  throw await de_ValidationExceptionRes(parsedOutput, context);
952
+ case "AccessDeniedException":
953
+ case "com.amazonaws.neptunegraph#AccessDeniedException":
954
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
955
+ case "ServiceQuotaExceededException":
956
+ case "com.amazonaws.neptunegraph#ServiceQuotaExceededException":
957
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
958
+ case "UnprocessableException":
959
+ case "com.amazonaws.neptunegraph#UnprocessableException":
960
+ throw await de_UnprocessableExceptionRes(parsedOutput, context);
1731
961
  default:
1732
962
  const parsedBody = parsedOutput.body;
1733
963
  return throwDefaultError({