@aws-sdk/client-detective 3.504.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.
@@ -408,7 +408,7 @@ export const se_UpdateOrganizationConfigurationCommand = async (input, context)
408
408
  };
409
409
  export const de_AcceptInvitationCommand = async (output, context) => {
410
410
  if (output.statusCode !== 200 && output.statusCode >= 300) {
411
- return de_AcceptInvitationCommandError(output, context);
411
+ return de_CommandError(output, context);
412
412
  }
413
413
  const contents = map({
414
414
  $metadata: deserializeMetadata(output),
@@ -416,40 +416,9 @@ export const de_AcceptInvitationCommand = async (output, context) => {
416
416
  await collectBody(output.body, context);
417
417
  return contents;
418
418
  };
419
- const de_AcceptInvitationCommandError = async (output, context) => {
420
- const parsedOutput = {
421
- ...output,
422
- body: await parseErrorBody(output.body, context),
423
- };
424
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
425
- switch (errorCode) {
426
- case "AccessDeniedException":
427
- case "com.amazonaws.detective#AccessDeniedException":
428
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
429
- case "ConflictException":
430
- case "com.amazonaws.detective#ConflictException":
431
- throw await de_ConflictExceptionRes(parsedOutput, context);
432
- case "InternalServerException":
433
- case "com.amazonaws.detective#InternalServerException":
434
- throw await de_InternalServerExceptionRes(parsedOutput, context);
435
- case "ResourceNotFoundException":
436
- case "com.amazonaws.detective#ResourceNotFoundException":
437
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
438
- case "ValidationException":
439
- case "com.amazonaws.detective#ValidationException":
440
- throw await de_ValidationExceptionRes(parsedOutput, context);
441
- default:
442
- const parsedBody = parsedOutput.body;
443
- return throwDefaultError({
444
- output,
445
- parsedBody,
446
- errorCode,
447
- });
448
- }
449
- };
450
419
  export const de_BatchGetGraphMemberDatasourcesCommand = async (output, context) => {
451
420
  if (output.statusCode !== 200 && output.statusCode >= 300) {
452
- return de_BatchGetGraphMemberDatasourcesCommandError(output, context);
421
+ return de_CommandError(output, context);
453
422
  }
454
423
  const contents = map({
455
424
  $metadata: deserializeMetadata(output),
@@ -462,37 +431,9 @@ export const de_BatchGetGraphMemberDatasourcesCommand = async (output, context)
462
431
  Object.assign(contents, doc);
463
432
  return contents;
464
433
  };
465
- const de_BatchGetGraphMemberDatasourcesCommandError = async (output, context) => {
466
- const parsedOutput = {
467
- ...output,
468
- body: await parseErrorBody(output.body, context),
469
- };
470
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
471
- switch (errorCode) {
472
- case "AccessDeniedException":
473
- case "com.amazonaws.detective#AccessDeniedException":
474
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
475
- case "InternalServerException":
476
- case "com.amazonaws.detective#InternalServerException":
477
- throw await de_InternalServerExceptionRes(parsedOutput, context);
478
- case "ResourceNotFoundException":
479
- case "com.amazonaws.detective#ResourceNotFoundException":
480
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
481
- case "ValidationException":
482
- case "com.amazonaws.detective#ValidationException":
483
- throw await de_ValidationExceptionRes(parsedOutput, context);
484
- default:
485
- const parsedBody = parsedOutput.body;
486
- return throwDefaultError({
487
- output,
488
- parsedBody,
489
- errorCode,
490
- });
491
- }
492
- };
493
434
  export const de_BatchGetMembershipDatasourcesCommand = async (output, context) => {
494
435
  if (output.statusCode !== 200 && output.statusCode >= 300) {
495
- return de_BatchGetMembershipDatasourcesCommandError(output, context);
436
+ return de_CommandError(output, context);
496
437
  }
497
438
  const contents = map({
498
439
  $metadata: deserializeMetadata(output),
@@ -505,37 +446,9 @@ export const de_BatchGetMembershipDatasourcesCommand = async (output, context) =
505
446
  Object.assign(contents, doc);
506
447
  return contents;
507
448
  };
508
- const de_BatchGetMembershipDatasourcesCommandError = async (output, context) => {
509
- const parsedOutput = {
510
- ...output,
511
- body: await parseErrorBody(output.body, context),
512
- };
513
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
514
- switch (errorCode) {
515
- case "AccessDeniedException":
516
- case "com.amazonaws.detective#AccessDeniedException":
517
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
518
- case "InternalServerException":
519
- case "com.amazonaws.detective#InternalServerException":
520
- throw await de_InternalServerExceptionRes(parsedOutput, context);
521
- case "ResourceNotFoundException":
522
- case "com.amazonaws.detective#ResourceNotFoundException":
523
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
524
- case "ValidationException":
525
- case "com.amazonaws.detective#ValidationException":
526
- throw await de_ValidationExceptionRes(parsedOutput, context);
527
- default:
528
- const parsedBody = parsedOutput.body;
529
- return throwDefaultError({
530
- output,
531
- parsedBody,
532
- errorCode,
533
- });
534
- }
535
- };
536
449
  export const de_CreateGraphCommand = async (output, context) => {
537
450
  if (output.statusCode !== 200 && output.statusCode >= 300) {
538
- return de_CreateGraphCommandError(output, context);
451
+ return de_CommandError(output, context);
539
452
  }
540
453
  const contents = map({
541
454
  $metadata: deserializeMetadata(output),
@@ -547,37 +460,9 @@ export const de_CreateGraphCommand = async (output, context) => {
547
460
  Object.assign(contents, doc);
548
461
  return contents;
549
462
  };
550
- const de_CreateGraphCommandError = async (output, context) => {
551
- const parsedOutput = {
552
- ...output,
553
- body: await parseErrorBody(output.body, context),
554
- };
555
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
556
- switch (errorCode) {
557
- case "AccessDeniedException":
558
- case "com.amazonaws.detective#AccessDeniedException":
559
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
560
- case "ConflictException":
561
- case "com.amazonaws.detective#ConflictException":
562
- throw await de_ConflictExceptionRes(parsedOutput, context);
563
- case "InternalServerException":
564
- case "com.amazonaws.detective#InternalServerException":
565
- throw await de_InternalServerExceptionRes(parsedOutput, context);
566
- case "ServiceQuotaExceededException":
567
- case "com.amazonaws.detective#ServiceQuotaExceededException":
568
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
569
- default:
570
- const parsedBody = parsedOutput.body;
571
- return throwDefaultError({
572
- output,
573
- parsedBody,
574
- errorCode,
575
- });
576
- }
577
- };
578
463
  export const de_CreateMembersCommand = async (output, context) => {
579
464
  if (output.statusCode !== 200 && output.statusCode >= 300) {
580
- return de_CreateMembersCommandError(output, context);
465
+ return de_CommandError(output, context);
581
466
  }
582
467
  const contents = map({
583
468
  $metadata: deserializeMetadata(output),
@@ -590,40 +475,9 @@ export const de_CreateMembersCommand = async (output, context) => {
590
475
  Object.assign(contents, doc);
591
476
  return contents;
592
477
  };
593
- const de_CreateMembersCommandError = async (output, context) => {
594
- const parsedOutput = {
595
- ...output,
596
- body: await parseErrorBody(output.body, context),
597
- };
598
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
599
- switch (errorCode) {
600
- case "AccessDeniedException":
601
- case "com.amazonaws.detective#AccessDeniedException":
602
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
603
- case "InternalServerException":
604
- case "com.amazonaws.detective#InternalServerException":
605
- throw await de_InternalServerExceptionRes(parsedOutput, context);
606
- case "ResourceNotFoundException":
607
- case "com.amazonaws.detective#ResourceNotFoundException":
608
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
609
- case "ServiceQuotaExceededException":
610
- case "com.amazonaws.detective#ServiceQuotaExceededException":
611
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
612
- case "ValidationException":
613
- case "com.amazonaws.detective#ValidationException":
614
- throw await de_ValidationExceptionRes(parsedOutput, context);
615
- default:
616
- const parsedBody = parsedOutput.body;
617
- return throwDefaultError({
618
- output,
619
- parsedBody,
620
- errorCode,
621
- });
622
- }
623
- };
624
478
  export const de_DeleteGraphCommand = async (output, context) => {
625
479
  if (output.statusCode !== 200 && output.statusCode >= 300) {
626
- return de_DeleteGraphCommandError(output, context);
480
+ return de_CommandError(output, context);
627
481
  }
628
482
  const contents = map({
629
483
  $metadata: deserializeMetadata(output),
@@ -631,37 +485,9 @@ export const de_DeleteGraphCommand = async (output, context) => {
631
485
  await collectBody(output.body, context);
632
486
  return contents;
633
487
  };
634
- const de_DeleteGraphCommandError = async (output, context) => {
635
- const parsedOutput = {
636
- ...output,
637
- body: await parseErrorBody(output.body, context),
638
- };
639
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
640
- switch (errorCode) {
641
- case "AccessDeniedException":
642
- case "com.amazonaws.detective#AccessDeniedException":
643
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
644
- case "InternalServerException":
645
- case "com.amazonaws.detective#InternalServerException":
646
- throw await de_InternalServerExceptionRes(parsedOutput, context);
647
- case "ResourceNotFoundException":
648
- case "com.amazonaws.detective#ResourceNotFoundException":
649
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
650
- case "ValidationException":
651
- case "com.amazonaws.detective#ValidationException":
652
- throw await de_ValidationExceptionRes(parsedOutput, context);
653
- default:
654
- const parsedBody = parsedOutput.body;
655
- return throwDefaultError({
656
- output,
657
- parsedBody,
658
- errorCode,
659
- });
660
- }
661
- };
662
488
  export const de_DeleteMembersCommand = async (output, context) => {
663
489
  if (output.statusCode !== 200 && output.statusCode >= 300) {
664
- return de_DeleteMembersCommandError(output, context);
490
+ return de_CommandError(output, context);
665
491
  }
666
492
  const contents = map({
667
493
  $metadata: deserializeMetadata(output),
@@ -674,40 +500,9 @@ export const de_DeleteMembersCommand = async (output, context) => {
674
500
  Object.assign(contents, doc);
675
501
  return contents;
676
502
  };
677
- const de_DeleteMembersCommandError = async (output, context) => {
678
- const parsedOutput = {
679
- ...output,
680
- body: await parseErrorBody(output.body, context),
681
- };
682
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
683
- switch (errorCode) {
684
- case "AccessDeniedException":
685
- case "com.amazonaws.detective#AccessDeniedException":
686
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
687
- case "ConflictException":
688
- case "com.amazonaws.detective#ConflictException":
689
- throw await de_ConflictExceptionRes(parsedOutput, context);
690
- case "InternalServerException":
691
- case "com.amazonaws.detective#InternalServerException":
692
- throw await de_InternalServerExceptionRes(parsedOutput, context);
693
- case "ResourceNotFoundException":
694
- case "com.amazonaws.detective#ResourceNotFoundException":
695
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
696
- case "ValidationException":
697
- case "com.amazonaws.detective#ValidationException":
698
- throw await de_ValidationExceptionRes(parsedOutput, context);
699
- default:
700
- const parsedBody = parsedOutput.body;
701
- return throwDefaultError({
702
- output,
703
- parsedBody,
704
- errorCode,
705
- });
706
- }
707
- };
708
503
  export const de_DescribeOrganizationConfigurationCommand = async (output, context) => {
709
504
  if (output.statusCode !== 200 && output.statusCode >= 300) {
710
- return de_DescribeOrganizationConfigurationCommandError(output, context);
505
+ return de_CommandError(output, context);
711
506
  }
712
507
  const contents = map({
713
508
  $metadata: deserializeMetadata(output),
@@ -719,37 +514,9 @@ export const de_DescribeOrganizationConfigurationCommand = async (output, contex
719
514
  Object.assign(contents, doc);
720
515
  return contents;
721
516
  };
722
- const de_DescribeOrganizationConfigurationCommandError = async (output, context) => {
723
- const parsedOutput = {
724
- ...output,
725
- body: await parseErrorBody(output.body, context),
726
- };
727
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
728
- switch (errorCode) {
729
- case "AccessDeniedException":
730
- case "com.amazonaws.detective#AccessDeniedException":
731
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
732
- case "InternalServerException":
733
- case "com.amazonaws.detective#InternalServerException":
734
- throw await de_InternalServerExceptionRes(parsedOutput, context);
735
- case "TooManyRequestsException":
736
- case "com.amazonaws.detective#TooManyRequestsException":
737
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
738
- case "ValidationException":
739
- case "com.amazonaws.detective#ValidationException":
740
- throw await de_ValidationExceptionRes(parsedOutput, context);
741
- default:
742
- const parsedBody = parsedOutput.body;
743
- return throwDefaultError({
744
- output,
745
- parsedBody,
746
- errorCode,
747
- });
748
- }
749
- };
750
517
  export const de_DisableOrganizationAdminAccountCommand = async (output, context) => {
751
518
  if (output.statusCode !== 200 && output.statusCode >= 300) {
752
- return de_DisableOrganizationAdminAccountCommandError(output, context);
519
+ return de_CommandError(output, context);
753
520
  }
754
521
  const contents = map({
755
522
  $metadata: deserializeMetadata(output),
@@ -757,37 +524,9 @@ export const de_DisableOrganizationAdminAccountCommand = async (output, context)
757
524
  await collectBody(output.body, context);
758
525
  return contents;
759
526
  };
760
- const de_DisableOrganizationAdminAccountCommandError = async (output, context) => {
761
- const parsedOutput = {
762
- ...output,
763
- body: await parseErrorBody(output.body, context),
764
- };
765
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
766
- switch (errorCode) {
767
- case "AccessDeniedException":
768
- case "com.amazonaws.detective#AccessDeniedException":
769
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
770
- case "InternalServerException":
771
- case "com.amazonaws.detective#InternalServerException":
772
- throw await de_InternalServerExceptionRes(parsedOutput, context);
773
- case "TooManyRequestsException":
774
- case "com.amazonaws.detective#TooManyRequestsException":
775
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
776
- case "ValidationException":
777
- case "com.amazonaws.detective#ValidationException":
778
- throw await de_ValidationExceptionRes(parsedOutput, context);
779
- default:
780
- const parsedBody = parsedOutput.body;
781
- return throwDefaultError({
782
- output,
783
- parsedBody,
784
- errorCode,
785
- });
786
- }
787
- };
788
527
  export const de_DisassociateMembershipCommand = async (output, context) => {
789
528
  if (output.statusCode !== 200 && output.statusCode >= 300) {
790
- return de_DisassociateMembershipCommandError(output, context);
529
+ return de_CommandError(output, context);
791
530
  }
792
531
  const contents = map({
793
532
  $metadata: deserializeMetadata(output),
@@ -795,40 +534,9 @@ export const de_DisassociateMembershipCommand = async (output, context) => {
795
534
  await collectBody(output.body, context);
796
535
  return contents;
797
536
  };
798
- const de_DisassociateMembershipCommandError = async (output, context) => {
799
- const parsedOutput = {
800
- ...output,
801
- body: await parseErrorBody(output.body, context),
802
- };
803
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
804
- switch (errorCode) {
805
- case "AccessDeniedException":
806
- case "com.amazonaws.detective#AccessDeniedException":
807
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
808
- case "ConflictException":
809
- case "com.amazonaws.detective#ConflictException":
810
- throw await de_ConflictExceptionRes(parsedOutput, context);
811
- case "InternalServerException":
812
- case "com.amazonaws.detective#InternalServerException":
813
- throw await de_InternalServerExceptionRes(parsedOutput, context);
814
- case "ResourceNotFoundException":
815
- case "com.amazonaws.detective#ResourceNotFoundException":
816
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
817
- case "ValidationException":
818
- case "com.amazonaws.detective#ValidationException":
819
- throw await de_ValidationExceptionRes(parsedOutput, context);
820
- default:
821
- const parsedBody = parsedOutput.body;
822
- return throwDefaultError({
823
- output,
824
- parsedBody,
825
- errorCode,
826
- });
827
- }
828
- };
829
537
  export const de_EnableOrganizationAdminAccountCommand = async (output, context) => {
830
538
  if (output.statusCode !== 200 && output.statusCode >= 300) {
831
- return de_EnableOrganizationAdminAccountCommandError(output, context);
539
+ return de_CommandError(output, context);
832
540
  }
833
541
  const contents = map({
834
542
  $metadata: deserializeMetadata(output),
@@ -836,37 +544,9 @@ export const de_EnableOrganizationAdminAccountCommand = async (output, context)
836
544
  await collectBody(output.body, context);
837
545
  return contents;
838
546
  };
839
- const de_EnableOrganizationAdminAccountCommandError = async (output, context) => {
840
- const parsedOutput = {
841
- ...output,
842
- body: await parseErrorBody(output.body, context),
843
- };
844
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
845
- switch (errorCode) {
846
- case "AccessDeniedException":
847
- case "com.amazonaws.detective#AccessDeniedException":
848
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
849
- case "InternalServerException":
850
- case "com.amazonaws.detective#InternalServerException":
851
- throw await de_InternalServerExceptionRes(parsedOutput, context);
852
- case "TooManyRequestsException":
853
- case "com.amazonaws.detective#TooManyRequestsException":
854
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
855
- case "ValidationException":
856
- case "com.amazonaws.detective#ValidationException":
857
- throw await de_ValidationExceptionRes(parsedOutput, context);
858
- default:
859
- const parsedBody = parsedOutput.body;
860
- return throwDefaultError({
861
- output,
862
- parsedBody,
863
- errorCode,
864
- });
865
- }
866
- };
867
547
  export const de_GetInvestigationCommand = async (output, context) => {
868
548
  if (output.statusCode !== 200 && output.statusCode >= 300) {
869
- return de_GetInvestigationCommandError(output, context);
549
+ return de_CommandError(output, context);
870
550
  }
871
551
  const contents = map({
872
552
  $metadata: deserializeMetadata(output),
@@ -887,40 +567,9 @@ export const de_GetInvestigationCommand = async (output, context) => {
887
567
  Object.assign(contents, doc);
888
568
  return contents;
889
569
  };
890
- const de_GetInvestigationCommandError = async (output, context) => {
891
- const parsedOutput = {
892
- ...output,
893
- body: await parseErrorBody(output.body, context),
894
- };
895
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
896
- switch (errorCode) {
897
- case "AccessDeniedException":
898
- case "com.amazonaws.detective#AccessDeniedException":
899
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
900
- case "InternalServerException":
901
- case "com.amazonaws.detective#InternalServerException":
902
- throw await de_InternalServerExceptionRes(parsedOutput, context);
903
- case "ResourceNotFoundException":
904
- case "com.amazonaws.detective#ResourceNotFoundException":
905
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
906
- case "TooManyRequestsException":
907
- case "com.amazonaws.detective#TooManyRequestsException":
908
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
909
- case "ValidationException":
910
- case "com.amazonaws.detective#ValidationException":
911
- throw await de_ValidationExceptionRes(parsedOutput, context);
912
- default:
913
- const parsedBody = parsedOutput.body;
914
- return throwDefaultError({
915
- output,
916
- parsedBody,
917
- errorCode,
918
- });
919
- }
920
- };
921
570
  export const de_GetMembersCommand = async (output, context) => {
922
571
  if (output.statusCode !== 200 && output.statusCode >= 300) {
923
- return de_GetMembersCommandError(output, context);
572
+ return de_CommandError(output, context);
924
573
  }
925
574
  const contents = map({
926
575
  $metadata: deserializeMetadata(output),
@@ -933,37 +582,9 @@ export const de_GetMembersCommand = async (output, context) => {
933
582
  Object.assign(contents, doc);
934
583
  return contents;
935
584
  };
936
- const de_GetMembersCommandError = async (output, context) => {
937
- const parsedOutput = {
938
- ...output,
939
- body: await parseErrorBody(output.body, context),
940
- };
941
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
942
- switch (errorCode) {
943
- case "AccessDeniedException":
944
- case "com.amazonaws.detective#AccessDeniedException":
945
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
946
- case "InternalServerException":
947
- case "com.amazonaws.detective#InternalServerException":
948
- throw await de_InternalServerExceptionRes(parsedOutput, context);
949
- case "ResourceNotFoundException":
950
- case "com.amazonaws.detective#ResourceNotFoundException":
951
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
952
- case "ValidationException":
953
- case "com.amazonaws.detective#ValidationException":
954
- throw await de_ValidationExceptionRes(parsedOutput, context);
955
- default:
956
- const parsedBody = parsedOutput.body;
957
- return throwDefaultError({
958
- output,
959
- parsedBody,
960
- errorCode,
961
- });
962
- }
963
- };
964
585
  export const de_ListDatasourcePackagesCommand = async (output, context) => {
965
586
  if (output.statusCode !== 200 && output.statusCode >= 300) {
966
- return de_ListDatasourcePackagesCommandError(output, context);
587
+ return de_CommandError(output, context);
967
588
  }
968
589
  const contents = map({
969
590
  $metadata: deserializeMetadata(output),
@@ -976,37 +597,9 @@ export const de_ListDatasourcePackagesCommand = async (output, context) => {
976
597
  Object.assign(contents, doc);
977
598
  return contents;
978
599
  };
979
- const de_ListDatasourcePackagesCommandError = async (output, context) => {
980
- const parsedOutput = {
981
- ...output,
982
- body: await parseErrorBody(output.body, context),
983
- };
984
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
985
- switch (errorCode) {
986
- case "AccessDeniedException":
987
- case "com.amazonaws.detective#AccessDeniedException":
988
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
989
- case "InternalServerException":
990
- case "com.amazonaws.detective#InternalServerException":
991
- throw await de_InternalServerExceptionRes(parsedOutput, context);
992
- case "ResourceNotFoundException":
993
- case "com.amazonaws.detective#ResourceNotFoundException":
994
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
995
- case "ValidationException":
996
- case "com.amazonaws.detective#ValidationException":
997
- throw await de_ValidationExceptionRes(parsedOutput, context);
998
- default:
999
- const parsedBody = parsedOutput.body;
1000
- return throwDefaultError({
1001
- output,
1002
- parsedBody,
1003
- errorCode,
1004
- });
1005
- }
1006
- };
1007
600
  export const de_ListGraphsCommand = async (output, context) => {
1008
601
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1009
- return de_ListGraphsCommandError(output, context);
602
+ return de_CommandError(output, context);
1010
603
  }
1011
604
  const contents = map({
1012
605
  $metadata: deserializeMetadata(output),
@@ -1019,34 +612,9 @@ export const de_ListGraphsCommand = async (output, context) => {
1019
612
  Object.assign(contents, doc);
1020
613
  return contents;
1021
614
  };
1022
- const de_ListGraphsCommandError = async (output, context) => {
1023
- const parsedOutput = {
1024
- ...output,
1025
- body: await parseErrorBody(output.body, context),
1026
- };
1027
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1028
- switch (errorCode) {
1029
- case "AccessDeniedException":
1030
- case "com.amazonaws.detective#AccessDeniedException":
1031
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1032
- case "InternalServerException":
1033
- case "com.amazonaws.detective#InternalServerException":
1034
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1035
- case "ValidationException":
1036
- case "com.amazonaws.detective#ValidationException":
1037
- throw await de_ValidationExceptionRes(parsedOutput, context);
1038
- default:
1039
- const parsedBody = parsedOutput.body;
1040
- return throwDefaultError({
1041
- output,
1042
- parsedBody,
1043
- errorCode,
1044
- });
1045
- }
1046
- };
1047
615
  export const de_ListIndicatorsCommand = async (output, context) => {
1048
616
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1049
- return de_ListIndicatorsCommandError(output, context);
617
+ return de_CommandError(output, context);
1050
618
  }
1051
619
  const contents = map({
1052
620
  $metadata: deserializeMetadata(output),
@@ -1061,40 +629,9 @@ export const de_ListIndicatorsCommand = async (output, context) => {
1061
629
  Object.assign(contents, doc);
1062
630
  return contents;
1063
631
  };
1064
- const de_ListIndicatorsCommandError = async (output, context) => {
1065
- const parsedOutput = {
1066
- ...output,
1067
- body: await parseErrorBody(output.body, context),
1068
- };
1069
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1070
- switch (errorCode) {
1071
- case "AccessDeniedException":
1072
- case "com.amazonaws.detective#AccessDeniedException":
1073
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1074
- case "InternalServerException":
1075
- case "com.amazonaws.detective#InternalServerException":
1076
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1077
- case "ResourceNotFoundException":
1078
- case "com.amazonaws.detective#ResourceNotFoundException":
1079
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1080
- case "TooManyRequestsException":
1081
- case "com.amazonaws.detective#TooManyRequestsException":
1082
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1083
- case "ValidationException":
1084
- case "com.amazonaws.detective#ValidationException":
1085
- throw await de_ValidationExceptionRes(parsedOutput, context);
1086
- default:
1087
- const parsedBody = parsedOutput.body;
1088
- return throwDefaultError({
1089
- output,
1090
- parsedBody,
1091
- errorCode,
1092
- });
1093
- }
1094
- };
1095
632
  export const de_ListInvestigationsCommand = async (output, context) => {
1096
633
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1097
- return de_ListInvestigationsCommandError(output, context);
634
+ return de_CommandError(output, context);
1098
635
  }
1099
636
  const contents = map({
1100
637
  $metadata: deserializeMetadata(output),
@@ -1107,40 +644,9 @@ export const de_ListInvestigationsCommand = async (output, context) => {
1107
644
  Object.assign(contents, doc);
1108
645
  return contents;
1109
646
  };
1110
- const de_ListInvestigationsCommandError = async (output, context) => {
1111
- const parsedOutput = {
1112
- ...output,
1113
- body: await parseErrorBody(output.body, context),
1114
- };
1115
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1116
- switch (errorCode) {
1117
- case "AccessDeniedException":
1118
- case "com.amazonaws.detective#AccessDeniedException":
1119
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1120
- case "InternalServerException":
1121
- case "com.amazonaws.detective#InternalServerException":
1122
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1123
- case "ResourceNotFoundException":
1124
- case "com.amazonaws.detective#ResourceNotFoundException":
1125
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1126
- case "TooManyRequestsException":
1127
- case "com.amazonaws.detective#TooManyRequestsException":
1128
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1129
- case "ValidationException":
1130
- case "com.amazonaws.detective#ValidationException":
1131
- throw await de_ValidationExceptionRes(parsedOutput, context);
1132
- default:
1133
- const parsedBody = parsedOutput.body;
1134
- return throwDefaultError({
1135
- output,
1136
- parsedBody,
1137
- errorCode,
1138
- });
1139
- }
1140
- };
1141
647
  export const de_ListInvitationsCommand = async (output, context) => {
1142
648
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1143
- return de_ListInvitationsCommandError(output, context);
649
+ return de_CommandError(output, context);
1144
650
  }
1145
651
  const contents = map({
1146
652
  $metadata: deserializeMetadata(output),
@@ -1153,34 +659,9 @@ export const de_ListInvitationsCommand = async (output, context) => {
1153
659
  Object.assign(contents, doc);
1154
660
  return contents;
1155
661
  };
1156
- const de_ListInvitationsCommandError = async (output, context) => {
1157
- const parsedOutput = {
1158
- ...output,
1159
- body: await parseErrorBody(output.body, context),
1160
- };
1161
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1162
- switch (errorCode) {
1163
- case "AccessDeniedException":
1164
- case "com.amazonaws.detective#AccessDeniedException":
1165
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1166
- case "InternalServerException":
1167
- case "com.amazonaws.detective#InternalServerException":
1168
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1169
- case "ValidationException":
1170
- case "com.amazonaws.detective#ValidationException":
1171
- throw await de_ValidationExceptionRes(parsedOutput, context);
1172
- default:
1173
- const parsedBody = parsedOutput.body;
1174
- return throwDefaultError({
1175
- output,
1176
- parsedBody,
1177
- errorCode,
1178
- });
1179
- }
1180
- };
1181
662
  export const de_ListMembersCommand = async (output, context) => {
1182
663
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1183
- return de_ListMembersCommandError(output, context);
664
+ return de_CommandError(output, context);
1184
665
  }
1185
666
  const contents = map({
1186
667
  $metadata: deserializeMetadata(output),
@@ -1193,37 +674,9 @@ export const de_ListMembersCommand = async (output, context) => {
1193
674
  Object.assign(contents, doc);
1194
675
  return contents;
1195
676
  };
1196
- const de_ListMembersCommandError = async (output, context) => {
1197
- const parsedOutput = {
1198
- ...output,
1199
- body: await parseErrorBody(output.body, context),
1200
- };
1201
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1202
- switch (errorCode) {
1203
- case "AccessDeniedException":
1204
- case "com.amazonaws.detective#AccessDeniedException":
1205
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1206
- case "InternalServerException":
1207
- case "com.amazonaws.detective#InternalServerException":
1208
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1209
- case "ResourceNotFoundException":
1210
- case "com.amazonaws.detective#ResourceNotFoundException":
1211
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1212
- case "ValidationException":
1213
- case "com.amazonaws.detective#ValidationException":
1214
- throw await de_ValidationExceptionRes(parsedOutput, context);
1215
- default:
1216
- const parsedBody = parsedOutput.body;
1217
- return throwDefaultError({
1218
- output,
1219
- parsedBody,
1220
- errorCode,
1221
- });
1222
- }
1223
- };
1224
677
  export const de_ListOrganizationAdminAccountsCommand = async (output, context) => {
1225
678
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1226
- return de_ListOrganizationAdminAccountsCommandError(output, context);
679
+ return de_CommandError(output, context);
1227
680
  }
1228
681
  const contents = map({
1229
682
  $metadata: deserializeMetadata(output),
@@ -1236,37 +689,9 @@ export const de_ListOrganizationAdminAccountsCommand = async (output, context) =
1236
689
  Object.assign(contents, doc);
1237
690
  return contents;
1238
691
  };
1239
- const de_ListOrganizationAdminAccountsCommandError = async (output, context) => {
1240
- const parsedOutput = {
1241
- ...output,
1242
- body: await parseErrorBody(output.body, context),
1243
- };
1244
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1245
- switch (errorCode) {
1246
- case "AccessDeniedException":
1247
- case "com.amazonaws.detective#AccessDeniedException":
1248
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1249
- case "InternalServerException":
1250
- case "com.amazonaws.detective#InternalServerException":
1251
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1252
- case "TooManyRequestsException":
1253
- case "com.amazonaws.detective#TooManyRequestsException":
1254
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1255
- case "ValidationException":
1256
- case "com.amazonaws.detective#ValidationException":
1257
- throw await de_ValidationExceptionRes(parsedOutput, context);
1258
- default:
1259
- const parsedBody = parsedOutput.body;
1260
- return throwDefaultError({
1261
- output,
1262
- parsedBody,
1263
- errorCode,
1264
- });
1265
- }
1266
- };
1267
692
  export const de_ListTagsForResourceCommand = async (output, context) => {
1268
693
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1269
- return de_ListTagsForResourceCommandError(output, context);
694
+ return de_CommandError(output, context);
1270
695
  }
1271
696
  const contents = map({
1272
697
  $metadata: deserializeMetadata(output),
@@ -1278,37 +703,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1278
703
  Object.assign(contents, doc);
1279
704
  return contents;
1280
705
  };
1281
- const de_ListTagsForResourceCommandError = async (output, context) => {
1282
- const parsedOutput = {
1283
- ...output,
1284
- body: await parseErrorBody(output.body, context),
1285
- };
1286
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1287
- switch (errorCode) {
1288
- case "AccessDeniedException":
1289
- case "com.amazonaws.detective#AccessDeniedException":
1290
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1291
- case "InternalServerException":
1292
- case "com.amazonaws.detective#InternalServerException":
1293
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1294
- case "ResourceNotFoundException":
1295
- case "com.amazonaws.detective#ResourceNotFoundException":
1296
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1297
- case "ValidationException":
1298
- case "com.amazonaws.detective#ValidationException":
1299
- throw await de_ValidationExceptionRes(parsedOutput, context);
1300
- default:
1301
- const parsedBody = parsedOutput.body;
1302
- return throwDefaultError({
1303
- output,
1304
- parsedBody,
1305
- errorCode,
1306
- });
1307
- }
1308
- };
1309
706
  export const de_RejectInvitationCommand = async (output, context) => {
1310
707
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1311
- return de_RejectInvitationCommandError(output, context);
708
+ return de_CommandError(output, context);
1312
709
  }
1313
710
  const contents = map({
1314
711
  $metadata: deserializeMetadata(output),
@@ -1316,40 +713,9 @@ export const de_RejectInvitationCommand = async (output, context) => {
1316
713
  await collectBody(output.body, context);
1317
714
  return contents;
1318
715
  };
1319
- const de_RejectInvitationCommandError = async (output, context) => {
1320
- const parsedOutput = {
1321
- ...output,
1322
- body: await parseErrorBody(output.body, context),
1323
- };
1324
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1325
- switch (errorCode) {
1326
- case "AccessDeniedException":
1327
- case "com.amazonaws.detective#AccessDeniedException":
1328
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1329
- case "ConflictException":
1330
- case "com.amazonaws.detective#ConflictException":
1331
- throw await de_ConflictExceptionRes(parsedOutput, context);
1332
- case "InternalServerException":
1333
- case "com.amazonaws.detective#InternalServerException":
1334
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1335
- case "ResourceNotFoundException":
1336
- case "com.amazonaws.detective#ResourceNotFoundException":
1337
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1338
- case "ValidationException":
1339
- case "com.amazonaws.detective#ValidationException":
1340
- throw await de_ValidationExceptionRes(parsedOutput, context);
1341
- default:
1342
- const parsedBody = parsedOutput.body;
1343
- return throwDefaultError({
1344
- output,
1345
- parsedBody,
1346
- errorCode,
1347
- });
1348
- }
1349
- };
1350
716
  export const de_StartInvestigationCommand = async (output, context) => {
1351
717
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1352
- return de_StartInvestigationCommandError(output, context);
718
+ return de_CommandError(output, context);
1353
719
  }
1354
720
  const contents = map({
1355
721
  $metadata: deserializeMetadata(output),
@@ -1361,40 +727,9 @@ export const de_StartInvestigationCommand = async (output, context) => {
1361
727
  Object.assign(contents, doc);
1362
728
  return contents;
1363
729
  };
1364
- const de_StartInvestigationCommandError = async (output, context) => {
1365
- const parsedOutput = {
1366
- ...output,
1367
- body: await parseErrorBody(output.body, context),
1368
- };
1369
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1370
- switch (errorCode) {
1371
- case "AccessDeniedException":
1372
- case "com.amazonaws.detective#AccessDeniedException":
1373
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1374
- case "InternalServerException":
1375
- case "com.amazonaws.detective#InternalServerException":
1376
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1377
- case "ResourceNotFoundException":
1378
- case "com.amazonaws.detective#ResourceNotFoundException":
1379
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1380
- case "TooManyRequestsException":
1381
- case "com.amazonaws.detective#TooManyRequestsException":
1382
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1383
- case "ValidationException":
1384
- case "com.amazonaws.detective#ValidationException":
1385
- throw await de_ValidationExceptionRes(parsedOutput, context);
1386
- default:
1387
- const parsedBody = parsedOutput.body;
1388
- return throwDefaultError({
1389
- output,
1390
- parsedBody,
1391
- errorCode,
1392
- });
1393
- }
1394
- };
1395
730
  export const de_StartMonitoringMemberCommand = async (output, context) => {
1396
731
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1397
- return de_StartMonitoringMemberCommandError(output, context);
732
+ return de_CommandError(output, context);
1398
733
  }
1399
734
  const contents = map({
1400
735
  $metadata: deserializeMetadata(output),
@@ -1402,43 +737,9 @@ export const de_StartMonitoringMemberCommand = async (output, context) => {
1402
737
  await collectBody(output.body, context);
1403
738
  return contents;
1404
739
  };
1405
- const de_StartMonitoringMemberCommandError = async (output, context) => {
1406
- const parsedOutput = {
1407
- ...output,
1408
- body: await parseErrorBody(output.body, context),
1409
- };
1410
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1411
- switch (errorCode) {
1412
- case "AccessDeniedException":
1413
- case "com.amazonaws.detective#AccessDeniedException":
1414
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1415
- case "ConflictException":
1416
- case "com.amazonaws.detective#ConflictException":
1417
- throw await de_ConflictExceptionRes(parsedOutput, context);
1418
- case "InternalServerException":
1419
- case "com.amazonaws.detective#InternalServerException":
1420
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1421
- case "ResourceNotFoundException":
1422
- case "com.amazonaws.detective#ResourceNotFoundException":
1423
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1424
- case "ServiceQuotaExceededException":
1425
- case "com.amazonaws.detective#ServiceQuotaExceededException":
1426
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1427
- case "ValidationException":
1428
- case "com.amazonaws.detective#ValidationException":
1429
- throw await de_ValidationExceptionRes(parsedOutput, context);
1430
- default:
1431
- const parsedBody = parsedOutput.body;
1432
- return throwDefaultError({
1433
- output,
1434
- parsedBody,
1435
- errorCode,
1436
- });
1437
- }
1438
- };
1439
740
  export const de_TagResourceCommand = async (output, context) => {
1440
741
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1441
- return de_TagResourceCommandError(output, context);
742
+ return de_CommandError(output, context);
1442
743
  }
1443
744
  const contents = map({
1444
745
  $metadata: deserializeMetadata(output),
@@ -1446,37 +747,9 @@ export const de_TagResourceCommand = async (output, context) => {
1446
747
  await collectBody(output.body, context);
1447
748
  return contents;
1448
749
  };
1449
- const de_TagResourceCommandError = async (output, context) => {
1450
- const parsedOutput = {
1451
- ...output,
1452
- body: await parseErrorBody(output.body, context),
1453
- };
1454
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1455
- switch (errorCode) {
1456
- case "AccessDeniedException":
1457
- case "com.amazonaws.detective#AccessDeniedException":
1458
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1459
- case "InternalServerException":
1460
- case "com.amazonaws.detective#InternalServerException":
1461
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1462
- case "ResourceNotFoundException":
1463
- case "com.amazonaws.detective#ResourceNotFoundException":
1464
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1465
- case "ValidationException":
1466
- case "com.amazonaws.detective#ValidationException":
1467
- throw await de_ValidationExceptionRes(parsedOutput, context);
1468
- default:
1469
- const parsedBody = parsedOutput.body;
1470
- return throwDefaultError({
1471
- output,
1472
- parsedBody,
1473
- errorCode,
1474
- });
1475
- }
1476
- };
1477
750
  export const de_UntagResourceCommand = async (output, context) => {
1478
751
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1479
- return de_UntagResourceCommandError(output, context);
752
+ return de_CommandError(output, context);
1480
753
  }
1481
754
  const contents = map({
1482
755
  $metadata: deserializeMetadata(output),
@@ -1484,37 +757,9 @@ export const de_UntagResourceCommand = async (output, context) => {
1484
757
  await collectBody(output.body, context);
1485
758
  return contents;
1486
759
  };
1487
- const de_UntagResourceCommandError = async (output, context) => {
1488
- const parsedOutput = {
1489
- ...output,
1490
- body: await parseErrorBody(output.body, context),
1491
- };
1492
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1493
- switch (errorCode) {
1494
- case "AccessDeniedException":
1495
- case "com.amazonaws.detective#AccessDeniedException":
1496
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1497
- case "InternalServerException":
1498
- case "com.amazonaws.detective#InternalServerException":
1499
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1500
- case "ResourceNotFoundException":
1501
- case "com.amazonaws.detective#ResourceNotFoundException":
1502
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1503
- case "ValidationException":
1504
- case "com.amazonaws.detective#ValidationException":
1505
- throw await de_ValidationExceptionRes(parsedOutput, context);
1506
- default:
1507
- const parsedBody = parsedOutput.body;
1508
- return throwDefaultError({
1509
- output,
1510
- parsedBody,
1511
- errorCode,
1512
- });
1513
- }
1514
- };
1515
760
  export const de_UpdateDatasourcePackagesCommand = async (output, context) => {
1516
761
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1517
- return de_UpdateDatasourcePackagesCommandError(output, context);
762
+ return de_CommandError(output, context);
1518
763
  }
1519
764
  const contents = map({
1520
765
  $metadata: deserializeMetadata(output),
@@ -1522,40 +767,9 @@ export const de_UpdateDatasourcePackagesCommand = async (output, context) => {
1522
767
  await collectBody(output.body, context);
1523
768
  return contents;
1524
769
  };
1525
- const de_UpdateDatasourcePackagesCommandError = async (output, context) => {
1526
- const parsedOutput = {
1527
- ...output,
1528
- body: await parseErrorBody(output.body, context),
1529
- };
1530
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1531
- switch (errorCode) {
1532
- case "AccessDeniedException":
1533
- case "com.amazonaws.detective#AccessDeniedException":
1534
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1535
- case "InternalServerException":
1536
- case "com.amazonaws.detective#InternalServerException":
1537
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1538
- case "ResourceNotFoundException":
1539
- case "com.amazonaws.detective#ResourceNotFoundException":
1540
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1541
- case "ServiceQuotaExceededException":
1542
- case "com.amazonaws.detective#ServiceQuotaExceededException":
1543
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1544
- case "ValidationException":
1545
- case "com.amazonaws.detective#ValidationException":
1546
- throw await de_ValidationExceptionRes(parsedOutput, context);
1547
- default:
1548
- const parsedBody = parsedOutput.body;
1549
- return throwDefaultError({
1550
- output,
1551
- parsedBody,
1552
- errorCode,
1553
- });
1554
- }
1555
- };
1556
770
  export const de_UpdateInvestigationStateCommand = async (output, context) => {
1557
771
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1558
- return de_UpdateInvestigationStateCommandError(output, context);
772
+ return de_CommandError(output, context);
1559
773
  }
1560
774
  const contents = map({
1561
775
  $metadata: deserializeMetadata(output),
@@ -1563,40 +777,9 @@ export const de_UpdateInvestigationStateCommand = async (output, context) => {
1563
777
  await collectBody(output.body, context);
1564
778
  return contents;
1565
779
  };
1566
- const de_UpdateInvestigationStateCommandError = async (output, context) => {
1567
- const parsedOutput = {
1568
- ...output,
1569
- body: await parseErrorBody(output.body, context),
1570
- };
1571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1572
- switch (errorCode) {
1573
- case "AccessDeniedException":
1574
- case "com.amazonaws.detective#AccessDeniedException":
1575
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1576
- case "InternalServerException":
1577
- case "com.amazonaws.detective#InternalServerException":
1578
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1579
- case "ResourceNotFoundException":
1580
- case "com.amazonaws.detective#ResourceNotFoundException":
1581
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1582
- case "TooManyRequestsException":
1583
- case "com.amazonaws.detective#TooManyRequestsException":
1584
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1585
- case "ValidationException":
1586
- case "com.amazonaws.detective#ValidationException":
1587
- throw await de_ValidationExceptionRes(parsedOutput, context);
1588
- default:
1589
- const parsedBody = parsedOutput.body;
1590
- return throwDefaultError({
1591
- output,
1592
- parsedBody,
1593
- errorCode,
1594
- });
1595
- }
1596
- };
1597
780
  export const de_UpdateOrganizationConfigurationCommand = async (output, context) => {
1598
781
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1599
- return de_UpdateOrganizationConfigurationCommandError(output, context);
782
+ return de_CommandError(output, context);
1600
783
  }
1601
784
  const contents = map({
1602
785
  $metadata: deserializeMetadata(output),
@@ -1604,7 +787,7 @@ export const de_UpdateOrganizationConfigurationCommand = async (output, context)
1604
787
  await collectBody(output.body, context);
1605
788
  return contents;
1606
789
  };
1607
- const de_UpdateOrganizationConfigurationCommandError = async (output, context) => {
790
+ const de_CommandError = async (output, context) => {
1608
791
  const parsedOutput = {
1609
792
  ...output,
1610
793
  body: await parseErrorBody(output.body, context),
@@ -1614,15 +797,24 @@ const de_UpdateOrganizationConfigurationCommandError = async (output, context) =
1614
797
  case "AccessDeniedException":
1615
798
  case "com.amazonaws.detective#AccessDeniedException":
1616
799
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
800
+ case "ConflictException":
801
+ case "com.amazonaws.detective#ConflictException":
802
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1617
803
  case "InternalServerException":
1618
804
  case "com.amazonaws.detective#InternalServerException":
1619
805
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1620
- case "TooManyRequestsException":
1621
- case "com.amazonaws.detective#TooManyRequestsException":
1622
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
806
+ case "ResourceNotFoundException":
807
+ case "com.amazonaws.detective#ResourceNotFoundException":
808
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1623
809
  case "ValidationException":
1624
810
  case "com.amazonaws.detective#ValidationException":
1625
811
  throw await de_ValidationExceptionRes(parsedOutput, context);
812
+ case "ServiceQuotaExceededException":
813
+ case "com.amazonaws.detective#ServiceQuotaExceededException":
814
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
815
+ case "TooManyRequestsException":
816
+ case "com.amazonaws.detective#TooManyRequestsException":
817
+ throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1626
818
  default:
1627
819
  const parsedBody = parsedOutput.body;
1628
820
  return throwDefaultError({