@aws-sdk/client-rekognition 3.504.0 → 3.509.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.
@@ -456,7 +456,7 @@ export const se_UpdateStreamProcessorCommand = async (input, context) => {
456
456
  };
457
457
  export const de_AssociateFacesCommand = async (output, context) => {
458
458
  if (output.statusCode >= 300) {
459
- return de_AssociateFacesCommandError(output, context);
459
+ return de_CommandError(output, context);
460
460
  }
461
461
  const data = await parseBody(output.body, context);
462
462
  let contents = {};
@@ -467,52 +467,9 @@ export const de_AssociateFacesCommand = async (output, context) => {
467
467
  };
468
468
  return response;
469
469
  };
470
- const de_AssociateFacesCommandError = async (output, context) => {
471
- const parsedOutput = {
472
- ...output,
473
- body: await parseErrorBody(output.body, context),
474
- };
475
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
476
- switch (errorCode) {
477
- case "AccessDeniedException":
478
- case "com.amazonaws.rekognition#AccessDeniedException":
479
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
480
- case "ConflictException":
481
- case "com.amazonaws.rekognition#ConflictException":
482
- throw await de_ConflictExceptionRes(parsedOutput, context);
483
- case "IdempotentParameterMismatchException":
484
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
485
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
486
- case "InternalServerError":
487
- case "com.amazonaws.rekognition#InternalServerError":
488
- throw await de_InternalServerErrorRes(parsedOutput, context);
489
- case "InvalidParameterException":
490
- case "com.amazonaws.rekognition#InvalidParameterException":
491
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
492
- case "ProvisionedThroughputExceededException":
493
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
494
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
495
- case "ResourceNotFoundException":
496
- case "com.amazonaws.rekognition#ResourceNotFoundException":
497
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
498
- case "ServiceQuotaExceededException":
499
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
500
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
501
- case "ThrottlingException":
502
- case "com.amazonaws.rekognition#ThrottlingException":
503
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
504
- default:
505
- const parsedBody = parsedOutput.body;
506
- return throwDefaultError({
507
- output,
508
- parsedBody,
509
- errorCode,
510
- });
511
- }
512
- };
513
470
  export const de_CompareFacesCommand = async (output, context) => {
514
471
  if (output.statusCode >= 300) {
515
- return de_CompareFacesCommandError(output, context);
472
+ return de_CommandError(output, context);
516
473
  }
517
474
  const data = await parseBody(output.body, context);
518
475
  let contents = {};
@@ -523,49 +480,9 @@ export const de_CompareFacesCommand = async (output, context) => {
523
480
  };
524
481
  return response;
525
482
  };
526
- const de_CompareFacesCommandError = async (output, context) => {
527
- const parsedOutput = {
528
- ...output,
529
- body: await parseErrorBody(output.body, context),
530
- };
531
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
532
- switch (errorCode) {
533
- case "AccessDeniedException":
534
- case "com.amazonaws.rekognition#AccessDeniedException":
535
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
536
- case "ImageTooLargeException":
537
- case "com.amazonaws.rekognition#ImageTooLargeException":
538
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
539
- case "InternalServerError":
540
- case "com.amazonaws.rekognition#InternalServerError":
541
- throw await de_InternalServerErrorRes(parsedOutput, context);
542
- case "InvalidImageFormatException":
543
- case "com.amazonaws.rekognition#InvalidImageFormatException":
544
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
545
- case "InvalidParameterException":
546
- case "com.amazonaws.rekognition#InvalidParameterException":
547
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
548
- case "InvalidS3ObjectException":
549
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
550
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
551
- case "ProvisionedThroughputExceededException":
552
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
553
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
554
- case "ThrottlingException":
555
- case "com.amazonaws.rekognition#ThrottlingException":
556
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
557
- default:
558
- const parsedBody = parsedOutput.body;
559
- return throwDefaultError({
560
- output,
561
- parsedBody,
562
- errorCode,
563
- });
564
- }
565
- };
566
483
  export const de_CopyProjectVersionCommand = async (output, context) => {
567
484
  if (output.statusCode >= 300) {
568
- return de_CopyProjectVersionCommandError(output, context);
485
+ return de_CommandError(output, context);
569
486
  }
570
487
  const data = await parseBody(output.body, context);
571
488
  let contents = {};
@@ -576,52 +493,9 @@ export const de_CopyProjectVersionCommand = async (output, context) => {
576
493
  };
577
494
  return response;
578
495
  };
579
- const de_CopyProjectVersionCommandError = async (output, context) => {
580
- const parsedOutput = {
581
- ...output,
582
- body: await parseErrorBody(output.body, context),
583
- };
584
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
585
- switch (errorCode) {
586
- case "AccessDeniedException":
587
- case "com.amazonaws.rekognition#AccessDeniedException":
588
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
589
- case "InternalServerError":
590
- case "com.amazonaws.rekognition#InternalServerError":
591
- throw await de_InternalServerErrorRes(parsedOutput, context);
592
- case "InvalidParameterException":
593
- case "com.amazonaws.rekognition#InvalidParameterException":
594
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
595
- case "LimitExceededException":
596
- case "com.amazonaws.rekognition#LimitExceededException":
597
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
598
- case "ProvisionedThroughputExceededException":
599
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
600
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
601
- case "ResourceInUseException":
602
- case "com.amazonaws.rekognition#ResourceInUseException":
603
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
604
- case "ResourceNotFoundException":
605
- case "com.amazonaws.rekognition#ResourceNotFoundException":
606
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
607
- case "ServiceQuotaExceededException":
608
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
609
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
610
- case "ThrottlingException":
611
- case "com.amazonaws.rekognition#ThrottlingException":
612
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
613
- default:
614
- const parsedBody = parsedOutput.body;
615
- return throwDefaultError({
616
- output,
617
- parsedBody,
618
- errorCode,
619
- });
620
- }
621
- };
622
496
  export const de_CreateCollectionCommand = async (output, context) => {
623
497
  if (output.statusCode >= 300) {
624
- return de_CreateCollectionCommandError(output, context);
498
+ return de_CommandError(output, context);
625
499
  }
626
500
  const data = await parseBody(output.body, context);
627
501
  let contents = {};
@@ -632,46 +506,9 @@ export const de_CreateCollectionCommand = async (output, context) => {
632
506
  };
633
507
  return response;
634
508
  };
635
- const de_CreateCollectionCommandError = async (output, context) => {
636
- const parsedOutput = {
637
- ...output,
638
- body: await parseErrorBody(output.body, context),
639
- };
640
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
641
- switch (errorCode) {
642
- case "AccessDeniedException":
643
- case "com.amazonaws.rekognition#AccessDeniedException":
644
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
645
- case "InternalServerError":
646
- case "com.amazonaws.rekognition#InternalServerError":
647
- throw await de_InternalServerErrorRes(parsedOutput, context);
648
- case "InvalidParameterException":
649
- case "com.amazonaws.rekognition#InvalidParameterException":
650
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
651
- case "ProvisionedThroughputExceededException":
652
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
653
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
654
- case "ResourceAlreadyExistsException":
655
- case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
656
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
657
- case "ServiceQuotaExceededException":
658
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
659
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
660
- case "ThrottlingException":
661
- case "com.amazonaws.rekognition#ThrottlingException":
662
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
663
- default:
664
- const parsedBody = parsedOutput.body;
665
- return throwDefaultError({
666
- output,
667
- parsedBody,
668
- errorCode,
669
- });
670
- }
671
- };
672
509
  export const de_CreateDatasetCommand = async (output, context) => {
673
510
  if (output.statusCode >= 300) {
674
- return de_CreateDatasetCommandError(output, context);
511
+ return de_CommandError(output, context);
675
512
  }
676
513
  const data = await parseBody(output.body, context);
677
514
  let contents = {};
@@ -682,52 +519,9 @@ export const de_CreateDatasetCommand = async (output, context) => {
682
519
  };
683
520
  return response;
684
521
  };
685
- const de_CreateDatasetCommandError = async (output, context) => {
686
- const parsedOutput = {
687
- ...output,
688
- body: await parseErrorBody(output.body, context),
689
- };
690
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
691
- switch (errorCode) {
692
- case "AccessDeniedException":
693
- case "com.amazonaws.rekognition#AccessDeniedException":
694
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
695
- case "InternalServerError":
696
- case "com.amazonaws.rekognition#InternalServerError":
697
- throw await de_InternalServerErrorRes(parsedOutput, context);
698
- case "InvalidParameterException":
699
- case "com.amazonaws.rekognition#InvalidParameterException":
700
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
701
- case "InvalidS3ObjectException":
702
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
703
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
704
- case "LimitExceededException":
705
- case "com.amazonaws.rekognition#LimitExceededException":
706
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
707
- case "ProvisionedThroughputExceededException":
708
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
709
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
710
- case "ResourceAlreadyExistsException":
711
- case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
712
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
713
- case "ResourceNotFoundException":
714
- case "com.amazonaws.rekognition#ResourceNotFoundException":
715
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
716
- case "ThrottlingException":
717
- case "com.amazonaws.rekognition#ThrottlingException":
718
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
719
- default:
720
- const parsedBody = parsedOutput.body;
721
- return throwDefaultError({
722
- output,
723
- parsedBody,
724
- errorCode,
725
- });
726
- }
727
- };
728
522
  export const de_CreateFaceLivenessSessionCommand = async (output, context) => {
729
523
  if (output.statusCode >= 300) {
730
- return de_CreateFaceLivenessSessionCommandError(output, context);
524
+ return de_CommandError(output, context);
731
525
  }
732
526
  const data = await parseBody(output.body, context);
733
527
  let contents = {};
@@ -738,40 +532,22 @@ export const de_CreateFaceLivenessSessionCommand = async (output, context) => {
738
532
  };
739
533
  return response;
740
534
  };
741
- const de_CreateFaceLivenessSessionCommandError = async (output, context) => {
742
- const parsedOutput = {
743
- ...output,
744
- body: await parseErrorBody(output.body, context),
745
- };
746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
747
- switch (errorCode) {
748
- case "AccessDeniedException":
749
- case "com.amazonaws.rekognition#AccessDeniedException":
750
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
751
- case "InternalServerError":
752
- case "com.amazonaws.rekognition#InternalServerError":
753
- throw await de_InternalServerErrorRes(parsedOutput, context);
754
- case "InvalidParameterException":
755
- case "com.amazonaws.rekognition#InvalidParameterException":
756
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
757
- case "ProvisionedThroughputExceededException":
758
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
759
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
760
- case "ThrottlingException":
761
- case "com.amazonaws.rekognition#ThrottlingException":
762
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
763
- default:
764
- const parsedBody = parsedOutput.body;
765
- return throwDefaultError({
766
- output,
767
- parsedBody,
768
- errorCode,
769
- });
535
+ export const de_CreateProjectCommand = async (output, context) => {
536
+ if (output.statusCode >= 300) {
537
+ return de_CommandError(output, context);
770
538
  }
539
+ const data = await parseBody(output.body, context);
540
+ let contents = {};
541
+ contents = _json(data);
542
+ const response = {
543
+ $metadata: deserializeMetadata(output),
544
+ ...contents,
545
+ };
546
+ return response;
771
547
  };
772
- export const de_CreateProjectCommand = async (output, context) => {
548
+ export const de_CreateProjectVersionCommand = async (output, context) => {
773
549
  if (output.statusCode >= 300) {
774
- return de_CreateProjectCommandError(output, context);
550
+ return de_CommandError(output, context);
775
551
  }
776
552
  const data = await parseBody(output.body, context);
777
553
  let contents = {};
@@ -782,46 +558,22 @@ export const de_CreateProjectCommand = async (output, context) => {
782
558
  };
783
559
  return response;
784
560
  };
785
- const de_CreateProjectCommandError = async (output, context) => {
786
- const parsedOutput = {
787
- ...output,
788
- body: await parseErrorBody(output.body, context),
561
+ export const de_CreateStreamProcessorCommand = async (output, context) => {
562
+ if (output.statusCode >= 300) {
563
+ return de_CommandError(output, context);
564
+ }
565
+ const data = await parseBody(output.body, context);
566
+ let contents = {};
567
+ contents = _json(data);
568
+ const response = {
569
+ $metadata: deserializeMetadata(output),
570
+ ...contents,
789
571
  };
790
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
791
- switch (errorCode) {
792
- case "AccessDeniedException":
793
- case "com.amazonaws.rekognition#AccessDeniedException":
794
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
795
- case "InternalServerError":
796
- case "com.amazonaws.rekognition#InternalServerError":
797
- throw await de_InternalServerErrorRes(parsedOutput, context);
798
- case "InvalidParameterException":
799
- case "com.amazonaws.rekognition#InvalidParameterException":
800
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
801
- case "LimitExceededException":
802
- case "com.amazonaws.rekognition#LimitExceededException":
803
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
804
- case "ProvisionedThroughputExceededException":
805
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
806
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
807
- case "ResourceInUseException":
808
- case "com.amazonaws.rekognition#ResourceInUseException":
809
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
810
- case "ThrottlingException":
811
- case "com.amazonaws.rekognition#ThrottlingException":
812
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
813
- default:
814
- const parsedBody = parsedOutput.body;
815
- return throwDefaultError({
816
- output,
817
- parsedBody,
818
- errorCode,
819
- });
820
- }
572
+ return response;
821
573
  };
822
- export const de_CreateProjectVersionCommand = async (output, context) => {
574
+ export const de_CreateUserCommand = async (output, context) => {
823
575
  if (output.statusCode >= 300) {
824
- return de_CreateProjectVersionCommandError(output, context);
576
+ return de_CommandError(output, context);
825
577
  }
826
578
  const data = await parseBody(output.body, context);
827
579
  let contents = {};
@@ -832,52 +584,9 @@ export const de_CreateProjectVersionCommand = async (output, context) => {
832
584
  };
833
585
  return response;
834
586
  };
835
- const de_CreateProjectVersionCommandError = async (output, context) => {
836
- const parsedOutput = {
837
- ...output,
838
- body: await parseErrorBody(output.body, context),
839
- };
840
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
841
- switch (errorCode) {
842
- case "AccessDeniedException":
843
- case "com.amazonaws.rekognition#AccessDeniedException":
844
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
845
- case "InternalServerError":
846
- case "com.amazonaws.rekognition#InternalServerError":
847
- throw await de_InternalServerErrorRes(parsedOutput, context);
848
- case "InvalidParameterException":
849
- case "com.amazonaws.rekognition#InvalidParameterException":
850
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
851
- case "LimitExceededException":
852
- case "com.amazonaws.rekognition#LimitExceededException":
853
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
854
- case "ProvisionedThroughputExceededException":
855
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
856
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
857
- case "ResourceInUseException":
858
- case "com.amazonaws.rekognition#ResourceInUseException":
859
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
860
- case "ResourceNotFoundException":
861
- case "com.amazonaws.rekognition#ResourceNotFoundException":
862
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
863
- case "ServiceQuotaExceededException":
864
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
865
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
866
- case "ThrottlingException":
867
- case "com.amazonaws.rekognition#ThrottlingException":
868
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
869
- default:
870
- const parsedBody = parsedOutput.body;
871
- return throwDefaultError({
872
- output,
873
- parsedBody,
874
- errorCode,
875
- });
876
- }
877
- };
878
- export const de_CreateStreamProcessorCommand = async (output, context) => {
587
+ export const de_DeleteCollectionCommand = async (output, context) => {
879
588
  if (output.statusCode >= 300) {
880
- return de_CreateStreamProcessorCommandError(output, context);
589
+ return de_CommandError(output, context);
881
590
  }
882
591
  const data = await parseBody(output.body, context);
883
592
  let contents = {};
@@ -888,49 +597,9 @@ export const de_CreateStreamProcessorCommand = async (output, context) => {
888
597
  };
889
598
  return response;
890
599
  };
891
- const de_CreateStreamProcessorCommandError = async (output, context) => {
892
- const parsedOutput = {
893
- ...output,
894
- body: await parseErrorBody(output.body, context),
895
- };
896
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
- switch (errorCode) {
898
- case "AccessDeniedException":
899
- case "com.amazonaws.rekognition#AccessDeniedException":
900
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
901
- case "InternalServerError":
902
- case "com.amazonaws.rekognition#InternalServerError":
903
- throw await de_InternalServerErrorRes(parsedOutput, context);
904
- case "InvalidParameterException":
905
- case "com.amazonaws.rekognition#InvalidParameterException":
906
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
907
- case "LimitExceededException":
908
- case "com.amazonaws.rekognition#LimitExceededException":
909
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
910
- case "ProvisionedThroughputExceededException":
911
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
912
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
913
- case "ResourceInUseException":
914
- case "com.amazonaws.rekognition#ResourceInUseException":
915
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
916
- case "ServiceQuotaExceededException":
917
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
918
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
919
- case "ThrottlingException":
920
- case "com.amazonaws.rekognition#ThrottlingException":
921
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
922
- default:
923
- const parsedBody = parsedOutput.body;
924
- return throwDefaultError({
925
- output,
926
- parsedBody,
927
- errorCode,
928
- });
929
- }
930
- };
931
- export const de_CreateUserCommand = async (output, context) => {
600
+ export const de_DeleteDatasetCommand = async (output, context) => {
932
601
  if (output.statusCode >= 300) {
933
- return de_CreateUserCommandError(output, context);
602
+ return de_CommandError(output, context);
934
603
  }
935
604
  const data = await parseBody(output.body, context);
936
605
  let contents = {};
@@ -941,52 +610,9 @@ export const de_CreateUserCommand = async (output, context) => {
941
610
  };
942
611
  return response;
943
612
  };
944
- const de_CreateUserCommandError = async (output, context) => {
945
- const parsedOutput = {
946
- ...output,
947
- body: await parseErrorBody(output.body, context),
948
- };
949
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
950
- switch (errorCode) {
951
- case "AccessDeniedException":
952
- case "com.amazonaws.rekognition#AccessDeniedException":
953
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
954
- case "ConflictException":
955
- case "com.amazonaws.rekognition#ConflictException":
956
- throw await de_ConflictExceptionRes(parsedOutput, context);
957
- case "IdempotentParameterMismatchException":
958
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
959
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
960
- case "InternalServerError":
961
- case "com.amazonaws.rekognition#InternalServerError":
962
- throw await de_InternalServerErrorRes(parsedOutput, context);
963
- case "InvalidParameterException":
964
- case "com.amazonaws.rekognition#InvalidParameterException":
965
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
966
- case "ProvisionedThroughputExceededException":
967
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
968
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
969
- case "ResourceNotFoundException":
970
- case "com.amazonaws.rekognition#ResourceNotFoundException":
971
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
972
- case "ServiceQuotaExceededException":
973
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
974
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
975
- case "ThrottlingException":
976
- case "com.amazonaws.rekognition#ThrottlingException":
977
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
978
- default:
979
- const parsedBody = parsedOutput.body;
980
- return throwDefaultError({
981
- output,
982
- parsedBody,
983
- errorCode,
984
- });
985
- }
986
- };
987
- export const de_DeleteCollectionCommand = async (output, context) => {
613
+ export const de_DeleteFacesCommand = async (output, context) => {
988
614
  if (output.statusCode >= 300) {
989
- return de_DeleteCollectionCommandError(output, context);
615
+ return de_CommandError(output, context);
990
616
  }
991
617
  const data = await parseBody(output.body, context);
992
618
  let contents = {};
@@ -997,43 +623,22 @@ export const de_DeleteCollectionCommand = async (output, context) => {
997
623
  };
998
624
  return response;
999
625
  };
1000
- const de_DeleteCollectionCommandError = async (output, context) => {
1001
- const parsedOutput = {
1002
- ...output,
1003
- body: await parseErrorBody(output.body, context),
1004
- };
1005
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1006
- switch (errorCode) {
1007
- case "AccessDeniedException":
1008
- case "com.amazonaws.rekognition#AccessDeniedException":
1009
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1010
- case "InternalServerError":
1011
- case "com.amazonaws.rekognition#InternalServerError":
1012
- throw await de_InternalServerErrorRes(parsedOutput, context);
1013
- case "InvalidParameterException":
1014
- case "com.amazonaws.rekognition#InvalidParameterException":
1015
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1016
- case "ProvisionedThroughputExceededException":
1017
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1018
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1019
- case "ResourceNotFoundException":
1020
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1021
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1022
- case "ThrottlingException":
1023
- case "com.amazonaws.rekognition#ThrottlingException":
1024
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1025
- default:
1026
- const parsedBody = parsedOutput.body;
1027
- return throwDefaultError({
1028
- output,
1029
- parsedBody,
1030
- errorCode,
1031
- });
626
+ export const de_DeleteProjectCommand = async (output, context) => {
627
+ if (output.statusCode >= 300) {
628
+ return de_CommandError(output, context);
1032
629
  }
630
+ const data = await parseBody(output.body, context);
631
+ let contents = {};
632
+ contents = _json(data);
633
+ const response = {
634
+ $metadata: deserializeMetadata(output),
635
+ ...contents,
636
+ };
637
+ return response;
1033
638
  };
1034
- export const de_DeleteDatasetCommand = async (output, context) => {
639
+ export const de_DeleteProjectPolicyCommand = async (output, context) => {
1035
640
  if (output.statusCode >= 300) {
1036
- return de_DeleteDatasetCommandError(output, context);
641
+ return de_CommandError(output, context);
1037
642
  }
1038
643
  const data = await parseBody(output.body, context);
1039
644
  let contents = {};
@@ -1044,49 +649,22 @@ export const de_DeleteDatasetCommand = async (output, context) => {
1044
649
  };
1045
650
  return response;
1046
651
  };
1047
- const de_DeleteDatasetCommandError = async (output, context) => {
1048
- const parsedOutput = {
1049
- ...output,
1050
- body: await parseErrorBody(output.body, context),
1051
- };
1052
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1053
- switch (errorCode) {
1054
- case "AccessDeniedException":
1055
- case "com.amazonaws.rekognition#AccessDeniedException":
1056
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1057
- case "InternalServerError":
1058
- case "com.amazonaws.rekognition#InternalServerError":
1059
- throw await de_InternalServerErrorRes(parsedOutput, context);
1060
- case "InvalidParameterException":
1061
- case "com.amazonaws.rekognition#InvalidParameterException":
1062
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1063
- case "LimitExceededException":
1064
- case "com.amazonaws.rekognition#LimitExceededException":
1065
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1066
- case "ProvisionedThroughputExceededException":
1067
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1068
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1069
- case "ResourceInUseException":
1070
- case "com.amazonaws.rekognition#ResourceInUseException":
1071
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1072
- case "ResourceNotFoundException":
1073
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1074
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1075
- case "ThrottlingException":
1076
- case "com.amazonaws.rekognition#ThrottlingException":
1077
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1078
- default:
1079
- const parsedBody = parsedOutput.body;
1080
- return throwDefaultError({
1081
- output,
1082
- parsedBody,
1083
- errorCode,
1084
- });
652
+ export const de_DeleteProjectVersionCommand = async (output, context) => {
653
+ if (output.statusCode >= 300) {
654
+ return de_CommandError(output, context);
1085
655
  }
656
+ const data = await parseBody(output.body, context);
657
+ let contents = {};
658
+ contents = _json(data);
659
+ const response = {
660
+ $metadata: deserializeMetadata(output),
661
+ ...contents,
662
+ };
663
+ return response;
1086
664
  };
1087
- export const de_DeleteFacesCommand = async (output, context) => {
665
+ export const de_DeleteStreamProcessorCommand = async (output, context) => {
1088
666
  if (output.statusCode >= 300) {
1089
- return de_DeleteFacesCommandError(output, context);
667
+ return de_CommandError(output, context);
1090
668
  }
1091
669
  const data = await parseBody(output.body, context);
1092
670
  let contents = {};
@@ -1097,43 +675,9 @@ export const de_DeleteFacesCommand = async (output, context) => {
1097
675
  };
1098
676
  return response;
1099
677
  };
1100
- const de_DeleteFacesCommandError = async (output, context) => {
1101
- const parsedOutput = {
1102
- ...output,
1103
- body: await parseErrorBody(output.body, context),
1104
- };
1105
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1106
- switch (errorCode) {
1107
- case "AccessDeniedException":
1108
- case "com.amazonaws.rekognition#AccessDeniedException":
1109
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1110
- case "InternalServerError":
1111
- case "com.amazonaws.rekognition#InternalServerError":
1112
- throw await de_InternalServerErrorRes(parsedOutput, context);
1113
- case "InvalidParameterException":
1114
- case "com.amazonaws.rekognition#InvalidParameterException":
1115
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1116
- case "ProvisionedThroughputExceededException":
1117
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1118
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1119
- case "ResourceNotFoundException":
1120
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1121
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1122
- case "ThrottlingException":
1123
- case "com.amazonaws.rekognition#ThrottlingException":
1124
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1125
- default:
1126
- const parsedBody = parsedOutput.body;
1127
- return throwDefaultError({
1128
- output,
1129
- parsedBody,
1130
- errorCode,
1131
- });
1132
- }
1133
- };
1134
- export const de_DeleteProjectCommand = async (output, context) => {
678
+ export const de_DeleteUserCommand = async (output, context) => {
1135
679
  if (output.statusCode >= 300) {
1136
- return de_DeleteProjectCommandError(output, context);
680
+ return de_CommandError(output, context);
1137
681
  }
1138
682
  const data = await parseBody(output.body, context);
1139
683
  let contents = {};
@@ -1144,2356 +688,412 @@ export const de_DeleteProjectCommand = async (output, context) => {
1144
688
  };
1145
689
  return response;
1146
690
  };
1147
- const de_DeleteProjectCommandError = async (output, context) => {
1148
- const parsedOutput = {
1149
- ...output,
1150
- body: await parseErrorBody(output.body, context),
1151
- };
1152
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1153
- switch (errorCode) {
1154
- case "AccessDeniedException":
1155
- case "com.amazonaws.rekognition#AccessDeniedException":
1156
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1157
- case "InternalServerError":
1158
- case "com.amazonaws.rekognition#InternalServerError":
1159
- throw await de_InternalServerErrorRes(parsedOutput, context);
1160
- case "InvalidParameterException":
1161
- case "com.amazonaws.rekognition#InvalidParameterException":
1162
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1163
- case "ProvisionedThroughputExceededException":
1164
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1165
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1166
- case "ResourceInUseException":
1167
- case "com.amazonaws.rekognition#ResourceInUseException":
1168
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1169
- case "ResourceNotFoundException":
1170
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1171
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1172
- case "ThrottlingException":
1173
- case "com.amazonaws.rekognition#ThrottlingException":
1174
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1175
- default:
1176
- const parsedBody = parsedOutput.body;
1177
- return throwDefaultError({
1178
- output,
1179
- parsedBody,
1180
- errorCode,
1181
- });
1182
- }
1183
- };
1184
- export const de_DeleteProjectPolicyCommand = async (output, context) => {
691
+ export const de_DescribeCollectionCommand = async (output, context) => {
1185
692
  if (output.statusCode >= 300) {
1186
- return de_DeleteProjectPolicyCommandError(output, context);
693
+ return de_CommandError(output, context);
1187
694
  }
1188
695
  const data = await parseBody(output.body, context);
1189
696
  let contents = {};
1190
- contents = _json(data);
697
+ contents = de_DescribeCollectionResponse(data, context);
1191
698
  const response = {
1192
699
  $metadata: deserializeMetadata(output),
1193
700
  ...contents,
1194
701
  };
1195
702
  return response;
1196
703
  };
1197
- const de_DeleteProjectPolicyCommandError = async (output, context) => {
1198
- const parsedOutput = {
1199
- ...output,
1200
- body: await parseErrorBody(output.body, context),
1201
- };
1202
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1203
- switch (errorCode) {
1204
- case "AccessDeniedException":
1205
- case "com.amazonaws.rekognition#AccessDeniedException":
1206
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1207
- case "InternalServerError":
1208
- case "com.amazonaws.rekognition#InternalServerError":
1209
- throw await de_InternalServerErrorRes(parsedOutput, context);
1210
- case "InvalidParameterException":
1211
- case "com.amazonaws.rekognition#InvalidParameterException":
1212
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1213
- case "InvalidPolicyRevisionIdException":
1214
- case "com.amazonaws.rekognition#InvalidPolicyRevisionIdException":
1215
- throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context);
1216
- case "ProvisionedThroughputExceededException":
1217
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1218
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1219
- case "ResourceNotFoundException":
1220
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1221
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1222
- case "ThrottlingException":
1223
- case "com.amazonaws.rekognition#ThrottlingException":
1224
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1225
- default:
1226
- const parsedBody = parsedOutput.body;
1227
- return throwDefaultError({
1228
- output,
1229
- parsedBody,
1230
- errorCode,
1231
- });
1232
- }
1233
- };
1234
- export const de_DeleteProjectVersionCommand = async (output, context) => {
704
+ export const de_DescribeDatasetCommand = async (output, context) => {
1235
705
  if (output.statusCode >= 300) {
1236
- return de_DeleteProjectVersionCommandError(output, context);
706
+ return de_CommandError(output, context);
1237
707
  }
1238
708
  const data = await parseBody(output.body, context);
1239
709
  let contents = {};
1240
- contents = _json(data);
710
+ contents = de_DescribeDatasetResponse(data, context);
1241
711
  const response = {
1242
712
  $metadata: deserializeMetadata(output),
1243
713
  ...contents,
1244
714
  };
1245
715
  return response;
1246
716
  };
1247
- const de_DeleteProjectVersionCommandError = async (output, context) => {
1248
- const parsedOutput = {
1249
- ...output,
1250
- body: await parseErrorBody(output.body, context),
1251
- };
1252
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1253
- switch (errorCode) {
1254
- case "AccessDeniedException":
1255
- case "com.amazonaws.rekognition#AccessDeniedException":
1256
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1257
- case "InternalServerError":
1258
- case "com.amazonaws.rekognition#InternalServerError":
1259
- throw await de_InternalServerErrorRes(parsedOutput, context);
1260
- case "InvalidParameterException":
1261
- case "com.amazonaws.rekognition#InvalidParameterException":
1262
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1263
- case "ProvisionedThroughputExceededException":
1264
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1265
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1266
- case "ResourceInUseException":
1267
- case "com.amazonaws.rekognition#ResourceInUseException":
1268
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1269
- case "ResourceNotFoundException":
1270
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1271
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1272
- case "ThrottlingException":
1273
- case "com.amazonaws.rekognition#ThrottlingException":
1274
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1275
- default:
1276
- const parsedBody = parsedOutput.body;
1277
- return throwDefaultError({
1278
- output,
1279
- parsedBody,
1280
- errorCode,
1281
- });
1282
- }
1283
- };
1284
- export const de_DeleteStreamProcessorCommand = async (output, context) => {
717
+ export const de_DescribeProjectsCommand = async (output, context) => {
1285
718
  if (output.statusCode >= 300) {
1286
- return de_DeleteStreamProcessorCommandError(output, context);
719
+ return de_CommandError(output, context);
1287
720
  }
1288
721
  const data = await parseBody(output.body, context);
1289
722
  let contents = {};
1290
- contents = _json(data);
723
+ contents = de_DescribeProjectsResponse(data, context);
1291
724
  const response = {
1292
725
  $metadata: deserializeMetadata(output),
1293
726
  ...contents,
1294
727
  };
1295
728
  return response;
1296
729
  };
1297
- const de_DeleteStreamProcessorCommandError = async (output, context) => {
1298
- const parsedOutput = {
1299
- ...output,
1300
- body: await parseErrorBody(output.body, context),
1301
- };
1302
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1303
- switch (errorCode) {
1304
- case "AccessDeniedException":
1305
- case "com.amazonaws.rekognition#AccessDeniedException":
1306
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1307
- case "InternalServerError":
1308
- case "com.amazonaws.rekognition#InternalServerError":
1309
- throw await de_InternalServerErrorRes(parsedOutput, context);
1310
- case "InvalidParameterException":
1311
- case "com.amazonaws.rekognition#InvalidParameterException":
1312
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1313
- case "ProvisionedThroughputExceededException":
1314
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1315
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1316
- case "ResourceInUseException":
1317
- case "com.amazonaws.rekognition#ResourceInUseException":
1318
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1319
- case "ResourceNotFoundException":
1320
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1321
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1322
- case "ThrottlingException":
1323
- case "com.amazonaws.rekognition#ThrottlingException":
1324
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1325
- default:
1326
- const parsedBody = parsedOutput.body;
1327
- return throwDefaultError({
1328
- output,
1329
- parsedBody,
1330
- errorCode,
1331
- });
730
+ export const de_DescribeProjectVersionsCommand = async (output, context) => {
731
+ if (output.statusCode >= 300) {
732
+ return de_CommandError(output, context);
1332
733
  }
734
+ const data = await parseBody(output.body, context);
735
+ let contents = {};
736
+ contents = de_DescribeProjectVersionsResponse(data, context);
737
+ const response = {
738
+ $metadata: deserializeMetadata(output),
739
+ ...contents,
740
+ };
741
+ return response;
1333
742
  };
1334
- export const de_DeleteUserCommand = async (output, context) => {
743
+ export const de_DescribeStreamProcessorCommand = async (output, context) => {
1335
744
  if (output.statusCode >= 300) {
1336
- return de_DeleteUserCommandError(output, context);
745
+ return de_CommandError(output, context);
1337
746
  }
1338
747
  const data = await parseBody(output.body, context);
1339
748
  let contents = {};
1340
- contents = _json(data);
749
+ contents = de_DescribeStreamProcessorResponse(data, context);
1341
750
  const response = {
1342
751
  $metadata: deserializeMetadata(output),
1343
752
  ...contents,
1344
753
  };
1345
754
  return response;
1346
755
  };
1347
- const de_DeleteUserCommandError = async (output, context) => {
1348
- const parsedOutput = {
1349
- ...output,
1350
- body: await parseErrorBody(output.body, context),
1351
- };
1352
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1353
- switch (errorCode) {
1354
- case "AccessDeniedException":
1355
- case "com.amazonaws.rekognition#AccessDeniedException":
1356
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1357
- case "ConflictException":
1358
- case "com.amazonaws.rekognition#ConflictException":
1359
- throw await de_ConflictExceptionRes(parsedOutput, context);
1360
- case "IdempotentParameterMismatchException":
1361
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
1362
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1363
- case "InternalServerError":
1364
- case "com.amazonaws.rekognition#InternalServerError":
1365
- throw await de_InternalServerErrorRes(parsedOutput, context);
1366
- case "InvalidParameterException":
1367
- case "com.amazonaws.rekognition#InvalidParameterException":
1368
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1369
- case "ProvisionedThroughputExceededException":
1370
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1371
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1372
- case "ResourceNotFoundException":
1373
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1374
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1375
- case "ThrottlingException":
1376
- case "com.amazonaws.rekognition#ThrottlingException":
1377
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1378
- default:
1379
- const parsedBody = parsedOutput.body;
1380
- return throwDefaultError({
1381
- output,
1382
- parsedBody,
1383
- errorCode,
1384
- });
756
+ export const de_DetectCustomLabelsCommand = async (output, context) => {
757
+ if (output.statusCode >= 300) {
758
+ return de_CommandError(output, context);
1385
759
  }
760
+ const data = await parseBody(output.body, context);
761
+ let contents = {};
762
+ contents = de_DetectCustomLabelsResponse(data, context);
763
+ const response = {
764
+ $metadata: deserializeMetadata(output),
765
+ ...contents,
766
+ };
767
+ return response;
1386
768
  };
1387
- export const de_DescribeCollectionCommand = async (output, context) => {
769
+ export const de_DetectFacesCommand = async (output, context) => {
1388
770
  if (output.statusCode >= 300) {
1389
- return de_DescribeCollectionCommandError(output, context);
771
+ return de_CommandError(output, context);
1390
772
  }
1391
773
  const data = await parseBody(output.body, context);
1392
774
  let contents = {};
1393
- contents = de_DescribeCollectionResponse(data, context);
775
+ contents = de_DetectFacesResponse(data, context);
1394
776
  const response = {
1395
777
  $metadata: deserializeMetadata(output),
1396
778
  ...contents,
1397
779
  };
1398
780
  return response;
1399
781
  };
1400
- const de_DescribeCollectionCommandError = async (output, context) => {
1401
- const parsedOutput = {
1402
- ...output,
1403
- body: await parseErrorBody(output.body, context),
1404
- };
1405
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1406
- switch (errorCode) {
1407
- case "AccessDeniedException":
1408
- case "com.amazonaws.rekognition#AccessDeniedException":
1409
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1410
- case "InternalServerError":
1411
- case "com.amazonaws.rekognition#InternalServerError":
1412
- throw await de_InternalServerErrorRes(parsedOutput, context);
1413
- case "InvalidParameterException":
1414
- case "com.amazonaws.rekognition#InvalidParameterException":
1415
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1416
- case "ProvisionedThroughputExceededException":
1417
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1418
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1419
- case "ResourceNotFoundException":
1420
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1421
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1422
- case "ThrottlingException":
1423
- case "com.amazonaws.rekognition#ThrottlingException":
1424
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1425
- default:
1426
- const parsedBody = parsedOutput.body;
1427
- return throwDefaultError({
1428
- output,
1429
- parsedBody,
1430
- errorCode,
1431
- });
1432
- }
1433
- };
1434
- export const de_DescribeDatasetCommand = async (output, context) => {
782
+ export const de_DetectLabelsCommand = async (output, context) => {
1435
783
  if (output.statusCode >= 300) {
1436
- return de_DescribeDatasetCommandError(output, context);
784
+ return de_CommandError(output, context);
1437
785
  }
1438
786
  const data = await parseBody(output.body, context);
1439
787
  let contents = {};
1440
- contents = de_DescribeDatasetResponse(data, context);
788
+ contents = de_DetectLabelsResponse(data, context);
1441
789
  const response = {
1442
790
  $metadata: deserializeMetadata(output),
1443
791
  ...contents,
1444
792
  };
1445
793
  return response;
1446
794
  };
1447
- const de_DescribeDatasetCommandError = async (output, context) => {
1448
- const parsedOutput = {
1449
- ...output,
1450
- body: await parseErrorBody(output.body, context),
1451
- };
1452
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1453
- switch (errorCode) {
1454
- case "AccessDeniedException":
1455
- case "com.amazonaws.rekognition#AccessDeniedException":
1456
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1457
- case "InternalServerError":
1458
- case "com.amazonaws.rekognition#InternalServerError":
1459
- throw await de_InternalServerErrorRes(parsedOutput, context);
1460
- case "InvalidParameterException":
1461
- case "com.amazonaws.rekognition#InvalidParameterException":
1462
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1463
- case "ProvisionedThroughputExceededException":
1464
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1465
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1466
- case "ResourceNotFoundException":
1467
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1468
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1469
- case "ThrottlingException":
1470
- case "com.amazonaws.rekognition#ThrottlingException":
1471
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1472
- default:
1473
- const parsedBody = parsedOutput.body;
1474
- return throwDefaultError({
1475
- output,
1476
- parsedBody,
1477
- errorCode,
1478
- });
1479
- }
1480
- };
1481
- export const de_DescribeProjectsCommand = async (output, context) => {
795
+ export const de_DetectModerationLabelsCommand = async (output, context) => {
1482
796
  if (output.statusCode >= 300) {
1483
- return de_DescribeProjectsCommandError(output, context);
797
+ return de_CommandError(output, context);
1484
798
  }
1485
799
  const data = await parseBody(output.body, context);
1486
800
  let contents = {};
1487
- contents = de_DescribeProjectsResponse(data, context);
801
+ contents = de_DetectModerationLabelsResponse(data, context);
1488
802
  const response = {
1489
803
  $metadata: deserializeMetadata(output),
1490
804
  ...contents,
1491
805
  };
1492
806
  return response;
1493
807
  };
1494
- const de_DescribeProjectsCommandError = async (output, context) => {
1495
- const parsedOutput = {
1496
- ...output,
1497
- body: await parseErrorBody(output.body, context),
1498
- };
1499
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1500
- switch (errorCode) {
1501
- case "AccessDeniedException":
1502
- case "com.amazonaws.rekognition#AccessDeniedException":
1503
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1504
- case "InternalServerError":
1505
- case "com.amazonaws.rekognition#InternalServerError":
1506
- throw await de_InternalServerErrorRes(parsedOutput, context);
1507
- case "InvalidPaginationTokenException":
1508
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
1509
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
1510
- case "InvalidParameterException":
1511
- case "com.amazonaws.rekognition#InvalidParameterException":
1512
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1513
- case "ProvisionedThroughputExceededException":
1514
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1515
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1516
- case "ThrottlingException":
1517
- case "com.amazonaws.rekognition#ThrottlingException":
1518
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1519
- default:
1520
- const parsedBody = parsedOutput.body;
1521
- return throwDefaultError({
1522
- output,
1523
- parsedBody,
1524
- errorCode,
1525
- });
1526
- }
1527
- };
1528
- export const de_DescribeProjectVersionsCommand = async (output, context) => {
808
+ export const de_DetectProtectiveEquipmentCommand = async (output, context) => {
1529
809
  if (output.statusCode >= 300) {
1530
- return de_DescribeProjectVersionsCommandError(output, context);
810
+ return de_CommandError(output, context);
1531
811
  }
1532
812
  const data = await parseBody(output.body, context);
1533
813
  let contents = {};
1534
- contents = de_DescribeProjectVersionsResponse(data, context);
814
+ contents = de_DetectProtectiveEquipmentResponse(data, context);
1535
815
  const response = {
1536
816
  $metadata: deserializeMetadata(output),
1537
817
  ...contents,
1538
818
  };
1539
819
  return response;
1540
820
  };
1541
- const de_DescribeProjectVersionsCommandError = async (output, context) => {
1542
- const parsedOutput = {
1543
- ...output,
1544
- body: await parseErrorBody(output.body, context),
1545
- };
1546
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1547
- switch (errorCode) {
1548
- case "AccessDeniedException":
1549
- case "com.amazonaws.rekognition#AccessDeniedException":
1550
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1551
- case "InternalServerError":
1552
- case "com.amazonaws.rekognition#InternalServerError":
1553
- throw await de_InternalServerErrorRes(parsedOutput, context);
1554
- case "InvalidPaginationTokenException":
1555
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
1556
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
1557
- case "InvalidParameterException":
1558
- case "com.amazonaws.rekognition#InvalidParameterException":
1559
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1560
- case "ProvisionedThroughputExceededException":
1561
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1562
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1563
- case "ResourceNotFoundException":
1564
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1565
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1566
- case "ThrottlingException":
1567
- case "com.amazonaws.rekognition#ThrottlingException":
1568
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1569
- default:
1570
- const parsedBody = parsedOutput.body;
1571
- return throwDefaultError({
1572
- output,
1573
- parsedBody,
1574
- errorCode,
1575
- });
1576
- }
1577
- };
1578
- export const de_DescribeStreamProcessorCommand = async (output, context) => {
821
+ export const de_DetectTextCommand = async (output, context) => {
1579
822
  if (output.statusCode >= 300) {
1580
- return de_DescribeStreamProcessorCommandError(output, context);
823
+ return de_CommandError(output, context);
1581
824
  }
1582
825
  const data = await parseBody(output.body, context);
1583
826
  let contents = {};
1584
- contents = de_DescribeStreamProcessorResponse(data, context);
827
+ contents = de_DetectTextResponse(data, context);
1585
828
  const response = {
1586
829
  $metadata: deserializeMetadata(output),
1587
830
  ...contents,
1588
831
  };
1589
832
  return response;
1590
833
  };
1591
- const de_DescribeStreamProcessorCommandError = async (output, context) => {
1592
- const parsedOutput = {
1593
- ...output,
1594
- body: await parseErrorBody(output.body, context),
1595
- };
1596
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1597
- switch (errorCode) {
1598
- case "AccessDeniedException":
1599
- case "com.amazonaws.rekognition#AccessDeniedException":
1600
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1601
- case "InternalServerError":
1602
- case "com.amazonaws.rekognition#InternalServerError":
1603
- throw await de_InternalServerErrorRes(parsedOutput, context);
1604
- case "InvalidParameterException":
1605
- case "com.amazonaws.rekognition#InvalidParameterException":
1606
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1607
- case "ProvisionedThroughputExceededException":
1608
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1609
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1610
- case "ResourceNotFoundException":
1611
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1612
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1613
- case "ThrottlingException":
1614
- case "com.amazonaws.rekognition#ThrottlingException":
1615
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1616
- default:
1617
- const parsedBody = parsedOutput.body;
1618
- return throwDefaultError({
1619
- output,
1620
- parsedBody,
1621
- errorCode,
1622
- });
834
+ export const de_DisassociateFacesCommand = async (output, context) => {
835
+ if (output.statusCode >= 300) {
836
+ return de_CommandError(output, context);
1623
837
  }
838
+ const data = await parseBody(output.body, context);
839
+ let contents = {};
840
+ contents = _json(data);
841
+ const response = {
842
+ $metadata: deserializeMetadata(output),
843
+ ...contents,
844
+ };
845
+ return response;
1624
846
  };
1625
- export const de_DetectCustomLabelsCommand = async (output, context) => {
847
+ export const de_DistributeDatasetEntriesCommand = async (output, context) => {
1626
848
  if (output.statusCode >= 300) {
1627
- return de_DetectCustomLabelsCommandError(output, context);
849
+ return de_CommandError(output, context);
1628
850
  }
1629
851
  const data = await parseBody(output.body, context);
1630
852
  let contents = {};
1631
- contents = de_DetectCustomLabelsResponse(data, context);
853
+ contents = _json(data);
1632
854
  const response = {
1633
855
  $metadata: deserializeMetadata(output),
1634
856
  ...contents,
1635
857
  };
1636
858
  return response;
1637
859
  };
1638
- const de_DetectCustomLabelsCommandError = async (output, context) => {
1639
- const parsedOutput = {
1640
- ...output,
1641
- body: await parseErrorBody(output.body, context),
1642
- };
1643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1644
- switch (errorCode) {
1645
- case "AccessDeniedException":
1646
- case "com.amazonaws.rekognition#AccessDeniedException":
1647
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1648
- case "ImageTooLargeException":
1649
- case "com.amazonaws.rekognition#ImageTooLargeException":
1650
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
1651
- case "InternalServerError":
1652
- case "com.amazonaws.rekognition#InternalServerError":
1653
- throw await de_InternalServerErrorRes(parsedOutput, context);
1654
- case "InvalidImageFormatException":
1655
- case "com.amazonaws.rekognition#InvalidImageFormatException":
1656
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
1657
- case "InvalidParameterException":
1658
- case "com.amazonaws.rekognition#InvalidParameterException":
1659
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1660
- case "InvalidS3ObjectException":
1661
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
1662
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1663
- case "LimitExceededException":
1664
- case "com.amazonaws.rekognition#LimitExceededException":
1665
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1666
- case "ProvisionedThroughputExceededException":
1667
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1668
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1669
- case "ResourceNotFoundException":
1670
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1671
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1672
- case "ResourceNotReadyException":
1673
- case "com.amazonaws.rekognition#ResourceNotReadyException":
1674
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
1675
- case "ThrottlingException":
1676
- case "com.amazonaws.rekognition#ThrottlingException":
1677
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1678
- default:
1679
- const parsedBody = parsedOutput.body;
1680
- return throwDefaultError({
1681
- output,
1682
- parsedBody,
1683
- errorCode,
1684
- });
860
+ export const de_GetCelebrityInfoCommand = async (output, context) => {
861
+ if (output.statusCode >= 300) {
862
+ return de_CommandError(output, context);
1685
863
  }
864
+ const data = await parseBody(output.body, context);
865
+ let contents = {};
866
+ contents = _json(data);
867
+ const response = {
868
+ $metadata: deserializeMetadata(output),
869
+ ...contents,
870
+ };
871
+ return response;
1686
872
  };
1687
- export const de_DetectFacesCommand = async (output, context) => {
873
+ export const de_GetCelebrityRecognitionCommand = async (output, context) => {
1688
874
  if (output.statusCode >= 300) {
1689
- return de_DetectFacesCommandError(output, context);
875
+ return de_CommandError(output, context);
1690
876
  }
1691
877
  const data = await parseBody(output.body, context);
1692
878
  let contents = {};
1693
- contents = de_DetectFacesResponse(data, context);
879
+ contents = de_GetCelebrityRecognitionResponse(data, context);
1694
880
  const response = {
1695
881
  $metadata: deserializeMetadata(output),
1696
882
  ...contents,
1697
883
  };
1698
884
  return response;
1699
885
  };
1700
- const de_DetectFacesCommandError = async (output, context) => {
1701
- const parsedOutput = {
1702
- ...output,
1703
- body: await parseErrorBody(output.body, context),
1704
- };
1705
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1706
- switch (errorCode) {
1707
- case "AccessDeniedException":
1708
- case "com.amazonaws.rekognition#AccessDeniedException":
1709
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1710
- case "ImageTooLargeException":
1711
- case "com.amazonaws.rekognition#ImageTooLargeException":
1712
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
1713
- case "InternalServerError":
1714
- case "com.amazonaws.rekognition#InternalServerError":
1715
- throw await de_InternalServerErrorRes(parsedOutput, context);
1716
- case "InvalidImageFormatException":
1717
- case "com.amazonaws.rekognition#InvalidImageFormatException":
1718
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
1719
- case "InvalidParameterException":
1720
- case "com.amazonaws.rekognition#InvalidParameterException":
1721
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1722
- case "InvalidS3ObjectException":
1723
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
1724
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1725
- case "ProvisionedThroughputExceededException":
1726
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1727
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1728
- case "ThrottlingException":
1729
- case "com.amazonaws.rekognition#ThrottlingException":
1730
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1731
- default:
1732
- const parsedBody = parsedOutput.body;
1733
- return throwDefaultError({
1734
- output,
1735
- parsedBody,
1736
- errorCode,
1737
- });
1738
- }
1739
- };
1740
- export const de_DetectLabelsCommand = async (output, context) => {
1741
- if (output.statusCode >= 300) {
1742
- return de_DetectLabelsCommandError(output, context);
1743
- }
1744
- const data = await parseBody(output.body, context);
1745
- let contents = {};
1746
- contents = de_DetectLabelsResponse(data, context);
1747
- const response = {
1748
- $metadata: deserializeMetadata(output),
1749
- ...contents,
1750
- };
1751
- return response;
1752
- };
1753
- const de_DetectLabelsCommandError = async (output, context) => {
1754
- const parsedOutput = {
1755
- ...output,
1756
- body: await parseErrorBody(output.body, context),
1757
- };
1758
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1759
- switch (errorCode) {
1760
- case "AccessDeniedException":
1761
- case "com.amazonaws.rekognition#AccessDeniedException":
1762
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1763
- case "ImageTooLargeException":
1764
- case "com.amazonaws.rekognition#ImageTooLargeException":
1765
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
1766
- case "InternalServerError":
1767
- case "com.amazonaws.rekognition#InternalServerError":
1768
- throw await de_InternalServerErrorRes(parsedOutput, context);
1769
- case "InvalidImageFormatException":
1770
- case "com.amazonaws.rekognition#InvalidImageFormatException":
1771
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
1772
- case "InvalidParameterException":
1773
- case "com.amazonaws.rekognition#InvalidParameterException":
1774
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1775
- case "InvalidS3ObjectException":
1776
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
1777
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1778
- case "ProvisionedThroughputExceededException":
1779
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1780
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1781
- case "ThrottlingException":
1782
- case "com.amazonaws.rekognition#ThrottlingException":
1783
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1784
- default:
1785
- const parsedBody = parsedOutput.body;
1786
- return throwDefaultError({
1787
- output,
1788
- parsedBody,
1789
- errorCode,
1790
- });
1791
- }
1792
- };
1793
- export const de_DetectModerationLabelsCommand = async (output, context) => {
1794
- if (output.statusCode >= 300) {
1795
- return de_DetectModerationLabelsCommandError(output, context);
1796
- }
1797
- const data = await parseBody(output.body, context);
1798
- let contents = {};
1799
- contents = de_DetectModerationLabelsResponse(data, context);
1800
- const response = {
1801
- $metadata: deserializeMetadata(output),
1802
- ...contents,
1803
- };
1804
- return response;
1805
- };
1806
- const de_DetectModerationLabelsCommandError = async (output, context) => {
1807
- const parsedOutput = {
1808
- ...output,
1809
- body: await parseErrorBody(output.body, context),
1810
- };
1811
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1812
- switch (errorCode) {
1813
- case "AccessDeniedException":
1814
- case "com.amazonaws.rekognition#AccessDeniedException":
1815
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1816
- case "HumanLoopQuotaExceededException":
1817
- case "com.amazonaws.rekognition#HumanLoopQuotaExceededException":
1818
- throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
1819
- case "ImageTooLargeException":
1820
- case "com.amazonaws.rekognition#ImageTooLargeException":
1821
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
1822
- case "InternalServerError":
1823
- case "com.amazonaws.rekognition#InternalServerError":
1824
- throw await de_InternalServerErrorRes(parsedOutput, context);
1825
- case "InvalidImageFormatException":
1826
- case "com.amazonaws.rekognition#InvalidImageFormatException":
1827
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
1828
- case "InvalidParameterException":
1829
- case "com.amazonaws.rekognition#InvalidParameterException":
1830
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1831
- case "InvalidS3ObjectException":
1832
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
1833
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1834
- case "ProvisionedThroughputExceededException":
1835
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1836
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1837
- case "ResourceNotFoundException":
1838
- case "com.amazonaws.rekognition#ResourceNotFoundException":
1839
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1840
- case "ResourceNotReadyException":
1841
- case "com.amazonaws.rekognition#ResourceNotReadyException":
1842
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
1843
- case "ThrottlingException":
1844
- case "com.amazonaws.rekognition#ThrottlingException":
1845
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1846
- default:
1847
- const parsedBody = parsedOutput.body;
1848
- return throwDefaultError({
1849
- output,
1850
- parsedBody,
1851
- errorCode,
1852
- });
1853
- }
1854
- };
1855
- export const de_DetectProtectiveEquipmentCommand = async (output, context) => {
1856
- if (output.statusCode >= 300) {
1857
- return de_DetectProtectiveEquipmentCommandError(output, context);
1858
- }
1859
- const data = await parseBody(output.body, context);
1860
- let contents = {};
1861
- contents = de_DetectProtectiveEquipmentResponse(data, context);
1862
- const response = {
1863
- $metadata: deserializeMetadata(output),
1864
- ...contents,
1865
- };
1866
- return response;
1867
- };
1868
- const de_DetectProtectiveEquipmentCommandError = async (output, context) => {
1869
- const parsedOutput = {
1870
- ...output,
1871
- body: await parseErrorBody(output.body, context),
1872
- };
1873
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1874
- switch (errorCode) {
1875
- case "AccessDeniedException":
1876
- case "com.amazonaws.rekognition#AccessDeniedException":
1877
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1878
- case "ImageTooLargeException":
1879
- case "com.amazonaws.rekognition#ImageTooLargeException":
1880
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
1881
- case "InternalServerError":
1882
- case "com.amazonaws.rekognition#InternalServerError":
1883
- throw await de_InternalServerErrorRes(parsedOutput, context);
1884
- case "InvalidImageFormatException":
1885
- case "com.amazonaws.rekognition#InvalidImageFormatException":
1886
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
1887
- case "InvalidParameterException":
1888
- case "com.amazonaws.rekognition#InvalidParameterException":
1889
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1890
- case "InvalidS3ObjectException":
1891
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
1892
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1893
- case "ProvisionedThroughputExceededException":
1894
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1895
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1896
- case "ThrottlingException":
1897
- case "com.amazonaws.rekognition#ThrottlingException":
1898
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1899
- default:
1900
- const parsedBody = parsedOutput.body;
1901
- return throwDefaultError({
1902
- output,
1903
- parsedBody,
1904
- errorCode,
1905
- });
1906
- }
1907
- };
1908
- export const de_DetectTextCommand = async (output, context) => {
1909
- if (output.statusCode >= 300) {
1910
- return de_DetectTextCommandError(output, context);
1911
- }
1912
- const data = await parseBody(output.body, context);
1913
- let contents = {};
1914
- contents = de_DetectTextResponse(data, context);
1915
- const response = {
1916
- $metadata: deserializeMetadata(output),
1917
- ...contents,
1918
- };
1919
- return response;
1920
- };
1921
- const de_DetectTextCommandError = async (output, context) => {
1922
- const parsedOutput = {
1923
- ...output,
1924
- body: await parseErrorBody(output.body, context),
1925
- };
1926
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1927
- switch (errorCode) {
1928
- case "AccessDeniedException":
1929
- case "com.amazonaws.rekognition#AccessDeniedException":
1930
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1931
- case "ImageTooLargeException":
1932
- case "com.amazonaws.rekognition#ImageTooLargeException":
1933
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
1934
- case "InternalServerError":
1935
- case "com.amazonaws.rekognition#InternalServerError":
1936
- throw await de_InternalServerErrorRes(parsedOutput, context);
1937
- case "InvalidImageFormatException":
1938
- case "com.amazonaws.rekognition#InvalidImageFormatException":
1939
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
1940
- case "InvalidParameterException":
1941
- case "com.amazonaws.rekognition#InvalidParameterException":
1942
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1943
- case "InvalidS3ObjectException":
1944
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
1945
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1946
- case "ProvisionedThroughputExceededException":
1947
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1948
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1949
- case "ThrottlingException":
1950
- case "com.amazonaws.rekognition#ThrottlingException":
1951
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1952
- default:
1953
- const parsedBody = parsedOutput.body;
1954
- return throwDefaultError({
1955
- output,
1956
- parsedBody,
1957
- errorCode,
1958
- });
1959
- }
1960
- };
1961
- export const de_DisassociateFacesCommand = async (output, context) => {
1962
- if (output.statusCode >= 300) {
1963
- return de_DisassociateFacesCommandError(output, context);
1964
- }
1965
- const data = await parseBody(output.body, context);
1966
- let contents = {};
1967
- contents = _json(data);
1968
- const response = {
1969
- $metadata: deserializeMetadata(output),
1970
- ...contents,
1971
- };
1972
- return response;
1973
- };
1974
- const de_DisassociateFacesCommandError = async (output, context) => {
1975
- const parsedOutput = {
1976
- ...output,
1977
- body: await parseErrorBody(output.body, context),
1978
- };
1979
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1980
- switch (errorCode) {
1981
- case "AccessDeniedException":
1982
- case "com.amazonaws.rekognition#AccessDeniedException":
1983
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1984
- case "ConflictException":
1985
- case "com.amazonaws.rekognition#ConflictException":
1986
- throw await de_ConflictExceptionRes(parsedOutput, context);
1987
- case "IdempotentParameterMismatchException":
1988
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
1989
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1990
- case "InternalServerError":
1991
- case "com.amazonaws.rekognition#InternalServerError":
1992
- throw await de_InternalServerErrorRes(parsedOutput, context);
1993
- case "InvalidParameterException":
1994
- case "com.amazonaws.rekognition#InvalidParameterException":
1995
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1996
- case "ProvisionedThroughputExceededException":
1997
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1998
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1999
- case "ResourceNotFoundException":
2000
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2001
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2002
- case "ThrottlingException":
2003
- case "com.amazonaws.rekognition#ThrottlingException":
2004
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2005
- default:
2006
- const parsedBody = parsedOutput.body;
2007
- return throwDefaultError({
2008
- output,
2009
- parsedBody,
2010
- errorCode,
2011
- });
2012
- }
2013
- };
2014
- export const de_DistributeDatasetEntriesCommand = async (output, context) => {
2015
- if (output.statusCode >= 300) {
2016
- return de_DistributeDatasetEntriesCommandError(output, context);
2017
- }
2018
- const data = await parseBody(output.body, context);
2019
- let contents = {};
2020
- contents = _json(data);
2021
- const response = {
2022
- $metadata: deserializeMetadata(output),
2023
- ...contents,
2024
- };
2025
- return response;
2026
- };
2027
- const de_DistributeDatasetEntriesCommandError = async (output, context) => {
2028
- const parsedOutput = {
2029
- ...output,
2030
- body: await parseErrorBody(output.body, context),
2031
- };
2032
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2033
- switch (errorCode) {
2034
- case "AccessDeniedException":
2035
- case "com.amazonaws.rekognition#AccessDeniedException":
2036
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2037
- case "InternalServerError":
2038
- case "com.amazonaws.rekognition#InternalServerError":
2039
- throw await de_InternalServerErrorRes(parsedOutput, context);
2040
- case "InvalidParameterException":
2041
- case "com.amazonaws.rekognition#InvalidParameterException":
2042
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2043
- case "ProvisionedThroughputExceededException":
2044
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2045
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2046
- case "ResourceNotFoundException":
2047
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2048
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2049
- case "ResourceNotReadyException":
2050
- case "com.amazonaws.rekognition#ResourceNotReadyException":
2051
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
2052
- case "ThrottlingException":
2053
- case "com.amazonaws.rekognition#ThrottlingException":
2054
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2055
- default:
2056
- const parsedBody = parsedOutput.body;
2057
- return throwDefaultError({
2058
- output,
2059
- parsedBody,
2060
- errorCode,
2061
- });
2062
- }
2063
- };
2064
- export const de_GetCelebrityInfoCommand = async (output, context) => {
2065
- if (output.statusCode >= 300) {
2066
- return de_GetCelebrityInfoCommandError(output, context);
2067
- }
2068
- const data = await parseBody(output.body, context);
2069
- let contents = {};
2070
- contents = _json(data);
2071
- const response = {
2072
- $metadata: deserializeMetadata(output),
2073
- ...contents,
2074
- };
2075
- return response;
2076
- };
2077
- const de_GetCelebrityInfoCommandError = async (output, context) => {
2078
- const parsedOutput = {
2079
- ...output,
2080
- body: await parseErrorBody(output.body, context),
2081
- };
2082
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2083
- switch (errorCode) {
2084
- case "AccessDeniedException":
2085
- case "com.amazonaws.rekognition#AccessDeniedException":
2086
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2087
- case "InternalServerError":
2088
- case "com.amazonaws.rekognition#InternalServerError":
2089
- throw await de_InternalServerErrorRes(parsedOutput, context);
2090
- case "InvalidParameterException":
2091
- case "com.amazonaws.rekognition#InvalidParameterException":
2092
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2093
- case "ProvisionedThroughputExceededException":
2094
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2095
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2096
- case "ResourceNotFoundException":
2097
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2098
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2099
- case "ThrottlingException":
2100
- case "com.amazonaws.rekognition#ThrottlingException":
2101
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2102
- default:
2103
- const parsedBody = parsedOutput.body;
2104
- return throwDefaultError({
2105
- output,
2106
- parsedBody,
2107
- errorCode,
2108
- });
2109
- }
2110
- };
2111
- export const de_GetCelebrityRecognitionCommand = async (output, context) => {
2112
- if (output.statusCode >= 300) {
2113
- return de_GetCelebrityRecognitionCommandError(output, context);
2114
- }
2115
- const data = await parseBody(output.body, context);
2116
- let contents = {};
2117
- contents = de_GetCelebrityRecognitionResponse(data, context);
2118
- const response = {
2119
- $metadata: deserializeMetadata(output),
2120
- ...contents,
2121
- };
2122
- return response;
2123
- };
2124
- const de_GetCelebrityRecognitionCommandError = async (output, context) => {
2125
- const parsedOutput = {
2126
- ...output,
2127
- body: await parseErrorBody(output.body, context),
2128
- };
2129
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2130
- switch (errorCode) {
2131
- case "AccessDeniedException":
2132
- case "com.amazonaws.rekognition#AccessDeniedException":
2133
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2134
- case "InternalServerError":
2135
- case "com.amazonaws.rekognition#InternalServerError":
2136
- throw await de_InternalServerErrorRes(parsedOutput, context);
2137
- case "InvalidPaginationTokenException":
2138
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2139
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2140
- case "InvalidParameterException":
2141
- case "com.amazonaws.rekognition#InvalidParameterException":
2142
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2143
- case "ProvisionedThroughputExceededException":
2144
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2145
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2146
- case "ResourceNotFoundException":
2147
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2148
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2149
- case "ThrottlingException":
2150
- case "com.amazonaws.rekognition#ThrottlingException":
2151
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2152
- default:
2153
- const parsedBody = parsedOutput.body;
2154
- return throwDefaultError({
2155
- output,
2156
- parsedBody,
2157
- errorCode,
2158
- });
2159
- }
2160
- };
2161
- export const de_GetContentModerationCommand = async (output, context) => {
2162
- if (output.statusCode >= 300) {
2163
- return de_GetContentModerationCommandError(output, context);
2164
- }
2165
- const data = await parseBody(output.body, context);
2166
- let contents = {};
2167
- contents = de_GetContentModerationResponse(data, context);
2168
- const response = {
2169
- $metadata: deserializeMetadata(output),
2170
- ...contents,
2171
- };
2172
- return response;
2173
- };
2174
- const de_GetContentModerationCommandError = async (output, context) => {
2175
- const parsedOutput = {
2176
- ...output,
2177
- body: await parseErrorBody(output.body, context),
2178
- };
2179
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2180
- switch (errorCode) {
2181
- case "AccessDeniedException":
2182
- case "com.amazonaws.rekognition#AccessDeniedException":
2183
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2184
- case "InternalServerError":
2185
- case "com.amazonaws.rekognition#InternalServerError":
2186
- throw await de_InternalServerErrorRes(parsedOutput, context);
2187
- case "InvalidPaginationTokenException":
2188
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2189
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2190
- case "InvalidParameterException":
2191
- case "com.amazonaws.rekognition#InvalidParameterException":
2192
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2193
- case "ProvisionedThroughputExceededException":
2194
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2195
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2196
- case "ResourceNotFoundException":
2197
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2198
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2199
- case "ThrottlingException":
2200
- case "com.amazonaws.rekognition#ThrottlingException":
2201
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2202
- default:
2203
- const parsedBody = parsedOutput.body;
2204
- return throwDefaultError({
2205
- output,
2206
- parsedBody,
2207
- errorCode,
2208
- });
2209
- }
2210
- };
2211
- export const de_GetFaceDetectionCommand = async (output, context) => {
2212
- if (output.statusCode >= 300) {
2213
- return de_GetFaceDetectionCommandError(output, context);
2214
- }
2215
- const data = await parseBody(output.body, context);
2216
- let contents = {};
2217
- contents = de_GetFaceDetectionResponse(data, context);
2218
- const response = {
2219
- $metadata: deserializeMetadata(output),
2220
- ...contents,
2221
- };
2222
- return response;
2223
- };
2224
- const de_GetFaceDetectionCommandError = async (output, context) => {
2225
- const parsedOutput = {
2226
- ...output,
2227
- body: await parseErrorBody(output.body, context),
2228
- };
2229
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2230
- switch (errorCode) {
2231
- case "AccessDeniedException":
2232
- case "com.amazonaws.rekognition#AccessDeniedException":
2233
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2234
- case "InternalServerError":
2235
- case "com.amazonaws.rekognition#InternalServerError":
2236
- throw await de_InternalServerErrorRes(parsedOutput, context);
2237
- case "InvalidPaginationTokenException":
2238
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2239
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2240
- case "InvalidParameterException":
2241
- case "com.amazonaws.rekognition#InvalidParameterException":
2242
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2243
- case "ProvisionedThroughputExceededException":
2244
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2245
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2246
- case "ResourceNotFoundException":
2247
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2248
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2249
- case "ThrottlingException":
2250
- case "com.amazonaws.rekognition#ThrottlingException":
2251
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2252
- default:
2253
- const parsedBody = parsedOutput.body;
2254
- return throwDefaultError({
2255
- output,
2256
- parsedBody,
2257
- errorCode,
2258
- });
2259
- }
2260
- };
2261
- export const de_GetFaceLivenessSessionResultsCommand = async (output, context) => {
2262
- if (output.statusCode >= 300) {
2263
- return de_GetFaceLivenessSessionResultsCommandError(output, context);
2264
- }
2265
- const data = await parseBody(output.body, context);
2266
- let contents = {};
2267
- contents = de_GetFaceLivenessSessionResultsResponse(data, context);
2268
- const response = {
2269
- $metadata: deserializeMetadata(output),
2270
- ...contents,
2271
- };
2272
- return response;
2273
- };
2274
- const de_GetFaceLivenessSessionResultsCommandError = async (output, context) => {
2275
- const parsedOutput = {
2276
- ...output,
2277
- body: await parseErrorBody(output.body, context),
2278
- };
2279
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2280
- switch (errorCode) {
2281
- case "AccessDeniedException":
2282
- case "com.amazonaws.rekognition#AccessDeniedException":
2283
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2284
- case "InternalServerError":
2285
- case "com.amazonaws.rekognition#InternalServerError":
2286
- throw await de_InternalServerErrorRes(parsedOutput, context);
2287
- case "InvalidParameterException":
2288
- case "com.amazonaws.rekognition#InvalidParameterException":
2289
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2290
- case "ProvisionedThroughputExceededException":
2291
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2292
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2293
- case "SessionNotFoundException":
2294
- case "com.amazonaws.rekognition#SessionNotFoundException":
2295
- throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
2296
- case "ThrottlingException":
2297
- case "com.amazonaws.rekognition#ThrottlingException":
2298
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2299
- default:
2300
- const parsedBody = parsedOutput.body;
2301
- return throwDefaultError({
2302
- output,
2303
- parsedBody,
2304
- errorCode,
2305
- });
2306
- }
2307
- };
2308
- export const de_GetFaceSearchCommand = async (output, context) => {
2309
- if (output.statusCode >= 300) {
2310
- return de_GetFaceSearchCommandError(output, context);
2311
- }
2312
- const data = await parseBody(output.body, context);
2313
- let contents = {};
2314
- contents = de_GetFaceSearchResponse(data, context);
2315
- const response = {
2316
- $metadata: deserializeMetadata(output),
2317
- ...contents,
2318
- };
2319
- return response;
2320
- };
2321
- const de_GetFaceSearchCommandError = async (output, context) => {
2322
- const parsedOutput = {
2323
- ...output,
2324
- body: await parseErrorBody(output.body, context),
2325
- };
2326
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2327
- switch (errorCode) {
2328
- case "AccessDeniedException":
2329
- case "com.amazonaws.rekognition#AccessDeniedException":
2330
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2331
- case "InternalServerError":
2332
- case "com.amazonaws.rekognition#InternalServerError":
2333
- throw await de_InternalServerErrorRes(parsedOutput, context);
2334
- case "InvalidPaginationTokenException":
2335
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2336
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2337
- case "InvalidParameterException":
2338
- case "com.amazonaws.rekognition#InvalidParameterException":
2339
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2340
- case "ProvisionedThroughputExceededException":
2341
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2342
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2343
- case "ResourceNotFoundException":
2344
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2345
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2346
- case "ThrottlingException":
2347
- case "com.amazonaws.rekognition#ThrottlingException":
2348
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2349
- default:
2350
- const parsedBody = parsedOutput.body;
2351
- return throwDefaultError({
2352
- output,
2353
- parsedBody,
2354
- errorCode,
2355
- });
2356
- }
2357
- };
2358
- export const de_GetLabelDetectionCommand = async (output, context) => {
2359
- if (output.statusCode >= 300) {
2360
- return de_GetLabelDetectionCommandError(output, context);
2361
- }
2362
- const data = await parseBody(output.body, context);
2363
- let contents = {};
2364
- contents = de_GetLabelDetectionResponse(data, context);
2365
- const response = {
2366
- $metadata: deserializeMetadata(output),
2367
- ...contents,
2368
- };
2369
- return response;
2370
- };
2371
- const de_GetLabelDetectionCommandError = async (output, context) => {
2372
- const parsedOutput = {
2373
- ...output,
2374
- body: await parseErrorBody(output.body, context),
2375
- };
2376
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2377
- switch (errorCode) {
2378
- case "AccessDeniedException":
2379
- case "com.amazonaws.rekognition#AccessDeniedException":
2380
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2381
- case "InternalServerError":
2382
- case "com.amazonaws.rekognition#InternalServerError":
2383
- throw await de_InternalServerErrorRes(parsedOutput, context);
2384
- case "InvalidPaginationTokenException":
2385
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2386
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2387
- case "InvalidParameterException":
2388
- case "com.amazonaws.rekognition#InvalidParameterException":
2389
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2390
- case "ProvisionedThroughputExceededException":
2391
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2392
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2393
- case "ResourceNotFoundException":
2394
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2395
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2396
- case "ThrottlingException":
2397
- case "com.amazonaws.rekognition#ThrottlingException":
2398
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2399
- default:
2400
- const parsedBody = parsedOutput.body;
2401
- return throwDefaultError({
2402
- output,
2403
- parsedBody,
2404
- errorCode,
2405
- });
2406
- }
2407
- };
2408
- export const de_GetMediaAnalysisJobCommand = async (output, context) => {
2409
- if (output.statusCode >= 300) {
2410
- return de_GetMediaAnalysisJobCommandError(output, context);
2411
- }
2412
- const data = await parseBody(output.body, context);
2413
- let contents = {};
2414
- contents = de_GetMediaAnalysisJobResponse(data, context);
2415
- const response = {
2416
- $metadata: deserializeMetadata(output),
2417
- ...contents,
2418
- };
2419
- return response;
2420
- };
2421
- const de_GetMediaAnalysisJobCommandError = async (output, context) => {
2422
- const parsedOutput = {
2423
- ...output,
2424
- body: await parseErrorBody(output.body, context),
2425
- };
2426
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2427
- switch (errorCode) {
2428
- case "AccessDeniedException":
2429
- case "com.amazonaws.rekognition#AccessDeniedException":
2430
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2431
- case "InternalServerError":
2432
- case "com.amazonaws.rekognition#InternalServerError":
2433
- throw await de_InternalServerErrorRes(parsedOutput, context);
2434
- case "InvalidParameterException":
2435
- case "com.amazonaws.rekognition#InvalidParameterException":
2436
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2437
- case "ProvisionedThroughputExceededException":
2438
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2439
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2440
- case "ResourceNotFoundException":
2441
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2442
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2443
- case "ThrottlingException":
2444
- case "com.amazonaws.rekognition#ThrottlingException":
2445
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2446
- default:
2447
- const parsedBody = parsedOutput.body;
2448
- return throwDefaultError({
2449
- output,
2450
- parsedBody,
2451
- errorCode,
2452
- });
2453
- }
2454
- };
2455
- export const de_GetPersonTrackingCommand = async (output, context) => {
2456
- if (output.statusCode >= 300) {
2457
- return de_GetPersonTrackingCommandError(output, context);
2458
- }
2459
- const data = await parseBody(output.body, context);
2460
- let contents = {};
2461
- contents = de_GetPersonTrackingResponse(data, context);
2462
- const response = {
2463
- $metadata: deserializeMetadata(output),
2464
- ...contents,
2465
- };
2466
- return response;
2467
- };
2468
- const de_GetPersonTrackingCommandError = async (output, context) => {
2469
- const parsedOutput = {
2470
- ...output,
2471
- body: await parseErrorBody(output.body, context),
2472
- };
2473
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2474
- switch (errorCode) {
2475
- case "AccessDeniedException":
2476
- case "com.amazonaws.rekognition#AccessDeniedException":
2477
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2478
- case "InternalServerError":
2479
- case "com.amazonaws.rekognition#InternalServerError":
2480
- throw await de_InternalServerErrorRes(parsedOutput, context);
2481
- case "InvalidPaginationTokenException":
2482
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2483
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2484
- case "InvalidParameterException":
2485
- case "com.amazonaws.rekognition#InvalidParameterException":
2486
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2487
- case "ProvisionedThroughputExceededException":
2488
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2489
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2490
- case "ResourceNotFoundException":
2491
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2492
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2493
- case "ThrottlingException":
2494
- case "com.amazonaws.rekognition#ThrottlingException":
2495
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2496
- default:
2497
- const parsedBody = parsedOutput.body;
2498
- return throwDefaultError({
2499
- output,
2500
- parsedBody,
2501
- errorCode,
2502
- });
2503
- }
2504
- };
2505
- export const de_GetSegmentDetectionCommand = async (output, context) => {
2506
- if (output.statusCode >= 300) {
2507
- return de_GetSegmentDetectionCommandError(output, context);
2508
- }
2509
- const data = await parseBody(output.body, context);
2510
- let contents = {};
2511
- contents = de_GetSegmentDetectionResponse(data, context);
2512
- const response = {
2513
- $metadata: deserializeMetadata(output),
2514
- ...contents,
2515
- };
2516
- return response;
2517
- };
2518
- const de_GetSegmentDetectionCommandError = async (output, context) => {
2519
- const parsedOutput = {
2520
- ...output,
2521
- body: await parseErrorBody(output.body, context),
2522
- };
2523
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2524
- switch (errorCode) {
2525
- case "AccessDeniedException":
2526
- case "com.amazonaws.rekognition#AccessDeniedException":
2527
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2528
- case "InternalServerError":
2529
- case "com.amazonaws.rekognition#InternalServerError":
2530
- throw await de_InternalServerErrorRes(parsedOutput, context);
2531
- case "InvalidPaginationTokenException":
2532
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2533
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2534
- case "InvalidParameterException":
2535
- case "com.amazonaws.rekognition#InvalidParameterException":
2536
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2537
- case "ProvisionedThroughputExceededException":
2538
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2539
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2540
- case "ResourceNotFoundException":
2541
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2542
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2543
- case "ThrottlingException":
2544
- case "com.amazonaws.rekognition#ThrottlingException":
2545
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2546
- default:
2547
- const parsedBody = parsedOutput.body;
2548
- return throwDefaultError({
2549
- output,
2550
- parsedBody,
2551
- errorCode,
2552
- });
2553
- }
2554
- };
2555
- export const de_GetTextDetectionCommand = async (output, context) => {
2556
- if (output.statusCode >= 300) {
2557
- return de_GetTextDetectionCommandError(output, context);
2558
- }
2559
- const data = await parseBody(output.body, context);
2560
- let contents = {};
2561
- contents = de_GetTextDetectionResponse(data, context);
2562
- const response = {
2563
- $metadata: deserializeMetadata(output),
2564
- ...contents,
2565
- };
2566
- return response;
2567
- };
2568
- const de_GetTextDetectionCommandError = async (output, context) => {
2569
- const parsedOutput = {
2570
- ...output,
2571
- body: await parseErrorBody(output.body, context),
2572
- };
2573
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2574
- switch (errorCode) {
2575
- case "AccessDeniedException":
2576
- case "com.amazonaws.rekognition#AccessDeniedException":
2577
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2578
- case "InternalServerError":
2579
- case "com.amazonaws.rekognition#InternalServerError":
2580
- throw await de_InternalServerErrorRes(parsedOutput, context);
2581
- case "InvalidPaginationTokenException":
2582
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2583
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2584
- case "InvalidParameterException":
2585
- case "com.amazonaws.rekognition#InvalidParameterException":
2586
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2587
- case "ProvisionedThroughputExceededException":
2588
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2589
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2590
- case "ResourceNotFoundException":
2591
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2592
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2593
- case "ThrottlingException":
2594
- case "com.amazonaws.rekognition#ThrottlingException":
2595
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2596
- default:
2597
- const parsedBody = parsedOutput.body;
2598
- return throwDefaultError({
2599
- output,
2600
- parsedBody,
2601
- errorCode,
2602
- });
2603
- }
2604
- };
2605
- export const de_IndexFacesCommand = async (output, context) => {
2606
- if (output.statusCode >= 300) {
2607
- return de_IndexFacesCommandError(output, context);
2608
- }
2609
- const data = await parseBody(output.body, context);
2610
- let contents = {};
2611
- contents = de_IndexFacesResponse(data, context);
2612
- const response = {
2613
- $metadata: deserializeMetadata(output),
2614
- ...contents,
2615
- };
2616
- return response;
2617
- };
2618
- const de_IndexFacesCommandError = async (output, context) => {
2619
- const parsedOutput = {
2620
- ...output,
2621
- body: await parseErrorBody(output.body, context),
2622
- };
2623
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2624
- switch (errorCode) {
2625
- case "AccessDeniedException":
2626
- case "com.amazonaws.rekognition#AccessDeniedException":
2627
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2628
- case "ImageTooLargeException":
2629
- case "com.amazonaws.rekognition#ImageTooLargeException":
2630
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
2631
- case "InternalServerError":
2632
- case "com.amazonaws.rekognition#InternalServerError":
2633
- throw await de_InternalServerErrorRes(parsedOutput, context);
2634
- case "InvalidImageFormatException":
2635
- case "com.amazonaws.rekognition#InvalidImageFormatException":
2636
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
2637
- case "InvalidParameterException":
2638
- case "com.amazonaws.rekognition#InvalidParameterException":
2639
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2640
- case "InvalidS3ObjectException":
2641
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
2642
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
2643
- case "ProvisionedThroughputExceededException":
2644
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2645
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2646
- case "ResourceNotFoundException":
2647
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2648
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2649
- case "ServiceQuotaExceededException":
2650
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
2651
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
2652
- case "ThrottlingException":
2653
- case "com.amazonaws.rekognition#ThrottlingException":
2654
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2655
- default:
2656
- const parsedBody = parsedOutput.body;
2657
- return throwDefaultError({
2658
- output,
2659
- parsedBody,
2660
- errorCode,
2661
- });
2662
- }
2663
- };
2664
- export const de_ListCollectionsCommand = async (output, context) => {
2665
- if (output.statusCode >= 300) {
2666
- return de_ListCollectionsCommandError(output, context);
2667
- }
2668
- const data = await parseBody(output.body, context);
2669
- let contents = {};
2670
- contents = _json(data);
2671
- const response = {
2672
- $metadata: deserializeMetadata(output),
2673
- ...contents,
2674
- };
2675
- return response;
2676
- };
2677
- const de_ListCollectionsCommandError = async (output, context) => {
2678
- const parsedOutput = {
2679
- ...output,
2680
- body: await parseErrorBody(output.body, context),
2681
- };
2682
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2683
- switch (errorCode) {
2684
- case "AccessDeniedException":
2685
- case "com.amazonaws.rekognition#AccessDeniedException":
2686
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2687
- case "InternalServerError":
2688
- case "com.amazonaws.rekognition#InternalServerError":
2689
- throw await de_InternalServerErrorRes(parsedOutput, context);
2690
- case "InvalidPaginationTokenException":
2691
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2692
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2693
- case "InvalidParameterException":
2694
- case "com.amazonaws.rekognition#InvalidParameterException":
2695
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2696
- case "ProvisionedThroughputExceededException":
2697
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2698
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2699
- case "ResourceNotFoundException":
2700
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2701
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2702
- case "ThrottlingException":
2703
- case "com.amazonaws.rekognition#ThrottlingException":
2704
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2705
- default:
2706
- const parsedBody = parsedOutput.body;
2707
- return throwDefaultError({
2708
- output,
2709
- parsedBody,
2710
- errorCode,
2711
- });
2712
- }
2713
- };
2714
- export const de_ListDatasetEntriesCommand = async (output, context) => {
2715
- if (output.statusCode >= 300) {
2716
- return de_ListDatasetEntriesCommandError(output, context);
2717
- }
2718
- const data = await parseBody(output.body, context);
2719
- let contents = {};
2720
- contents = _json(data);
2721
- const response = {
2722
- $metadata: deserializeMetadata(output),
2723
- ...contents,
2724
- };
2725
- return response;
2726
- };
2727
- const de_ListDatasetEntriesCommandError = async (output, context) => {
2728
- const parsedOutput = {
2729
- ...output,
2730
- body: await parseErrorBody(output.body, context),
2731
- };
2732
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2733
- switch (errorCode) {
2734
- case "AccessDeniedException":
2735
- case "com.amazonaws.rekognition#AccessDeniedException":
2736
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2737
- case "InternalServerError":
2738
- case "com.amazonaws.rekognition#InternalServerError":
2739
- throw await de_InternalServerErrorRes(parsedOutput, context);
2740
- case "InvalidPaginationTokenException":
2741
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2742
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2743
- case "InvalidParameterException":
2744
- case "com.amazonaws.rekognition#InvalidParameterException":
2745
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2746
- case "ProvisionedThroughputExceededException":
2747
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2748
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2749
- case "ResourceInUseException":
2750
- case "com.amazonaws.rekognition#ResourceInUseException":
2751
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2752
- case "ResourceNotFoundException":
2753
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2754
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2755
- case "ResourceNotReadyException":
2756
- case "com.amazonaws.rekognition#ResourceNotReadyException":
2757
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
2758
- case "ThrottlingException":
2759
- case "com.amazonaws.rekognition#ThrottlingException":
2760
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2761
- default:
2762
- const parsedBody = parsedOutput.body;
2763
- return throwDefaultError({
2764
- output,
2765
- parsedBody,
2766
- errorCode,
2767
- });
2768
- }
2769
- };
2770
- export const de_ListDatasetLabelsCommand = async (output, context) => {
2771
- if (output.statusCode >= 300) {
2772
- return de_ListDatasetLabelsCommandError(output, context);
2773
- }
2774
- const data = await parseBody(output.body, context);
2775
- let contents = {};
2776
- contents = _json(data);
2777
- const response = {
2778
- $metadata: deserializeMetadata(output),
2779
- ...contents,
2780
- };
2781
- return response;
2782
- };
2783
- const de_ListDatasetLabelsCommandError = async (output, context) => {
2784
- const parsedOutput = {
2785
- ...output,
2786
- body: await parseErrorBody(output.body, context),
2787
- };
2788
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2789
- switch (errorCode) {
2790
- case "AccessDeniedException":
2791
- case "com.amazonaws.rekognition#AccessDeniedException":
2792
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2793
- case "InternalServerError":
2794
- case "com.amazonaws.rekognition#InternalServerError":
2795
- throw await de_InternalServerErrorRes(parsedOutput, context);
2796
- case "InvalidPaginationTokenException":
2797
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2798
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2799
- case "InvalidParameterException":
2800
- case "com.amazonaws.rekognition#InvalidParameterException":
2801
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2802
- case "ProvisionedThroughputExceededException":
2803
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2804
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2805
- case "ResourceInUseException":
2806
- case "com.amazonaws.rekognition#ResourceInUseException":
2807
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2808
- case "ResourceNotFoundException":
2809
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2810
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2811
- case "ResourceNotReadyException":
2812
- case "com.amazonaws.rekognition#ResourceNotReadyException":
2813
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
2814
- case "ThrottlingException":
2815
- case "com.amazonaws.rekognition#ThrottlingException":
2816
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2817
- default:
2818
- const parsedBody = parsedOutput.body;
2819
- return throwDefaultError({
2820
- output,
2821
- parsedBody,
2822
- errorCode,
2823
- });
2824
- }
2825
- };
2826
- export const de_ListFacesCommand = async (output, context) => {
2827
- if (output.statusCode >= 300) {
2828
- return de_ListFacesCommandError(output, context);
2829
- }
2830
- const data = await parseBody(output.body, context);
2831
- let contents = {};
2832
- contents = de_ListFacesResponse(data, context);
2833
- const response = {
2834
- $metadata: deserializeMetadata(output),
2835
- ...contents,
2836
- };
2837
- return response;
2838
- };
2839
- const de_ListFacesCommandError = async (output, context) => {
2840
- const parsedOutput = {
2841
- ...output,
2842
- body: await parseErrorBody(output.body, context),
2843
- };
2844
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2845
- switch (errorCode) {
2846
- case "AccessDeniedException":
2847
- case "com.amazonaws.rekognition#AccessDeniedException":
2848
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2849
- case "InternalServerError":
2850
- case "com.amazonaws.rekognition#InternalServerError":
2851
- throw await de_InternalServerErrorRes(parsedOutput, context);
2852
- case "InvalidPaginationTokenException":
2853
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2854
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2855
- case "InvalidParameterException":
2856
- case "com.amazonaws.rekognition#InvalidParameterException":
2857
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2858
- case "ProvisionedThroughputExceededException":
2859
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2860
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2861
- case "ResourceNotFoundException":
2862
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2863
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2864
- case "ThrottlingException":
2865
- case "com.amazonaws.rekognition#ThrottlingException":
2866
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2867
- default:
2868
- const parsedBody = parsedOutput.body;
2869
- return throwDefaultError({
2870
- output,
2871
- parsedBody,
2872
- errorCode,
2873
- });
2874
- }
2875
- };
2876
- export const de_ListMediaAnalysisJobsCommand = async (output, context) => {
2877
- if (output.statusCode >= 300) {
2878
- return de_ListMediaAnalysisJobsCommandError(output, context);
2879
- }
2880
- const data = await parseBody(output.body, context);
2881
- let contents = {};
2882
- contents = de_ListMediaAnalysisJobsResponse(data, context);
2883
- const response = {
2884
- $metadata: deserializeMetadata(output),
2885
- ...contents,
2886
- };
2887
- return response;
2888
- };
2889
- const de_ListMediaAnalysisJobsCommandError = async (output, context) => {
2890
- const parsedOutput = {
2891
- ...output,
2892
- body: await parseErrorBody(output.body, context),
2893
- };
2894
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2895
- switch (errorCode) {
2896
- case "AccessDeniedException":
2897
- case "com.amazonaws.rekognition#AccessDeniedException":
2898
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2899
- case "InternalServerError":
2900
- case "com.amazonaws.rekognition#InternalServerError":
2901
- throw await de_InternalServerErrorRes(parsedOutput, context);
2902
- case "InvalidPaginationTokenException":
2903
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2904
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2905
- case "InvalidParameterException":
2906
- case "com.amazonaws.rekognition#InvalidParameterException":
2907
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2908
- case "ProvisionedThroughputExceededException":
2909
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2910
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2911
- case "ThrottlingException":
2912
- case "com.amazonaws.rekognition#ThrottlingException":
2913
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2914
- default:
2915
- const parsedBody = parsedOutput.body;
2916
- return throwDefaultError({
2917
- output,
2918
- parsedBody,
2919
- errorCode,
2920
- });
2921
- }
2922
- };
2923
- export const de_ListProjectPoliciesCommand = async (output, context) => {
886
+ export const de_GetContentModerationCommand = async (output, context) => {
2924
887
  if (output.statusCode >= 300) {
2925
- return de_ListProjectPoliciesCommandError(output, context);
888
+ return de_CommandError(output, context);
2926
889
  }
2927
890
  const data = await parseBody(output.body, context);
2928
891
  let contents = {};
2929
- contents = de_ListProjectPoliciesResponse(data, context);
892
+ contents = de_GetContentModerationResponse(data, context);
2930
893
  const response = {
2931
894
  $metadata: deserializeMetadata(output),
2932
895
  ...contents,
2933
896
  };
2934
897
  return response;
2935
898
  };
2936
- const de_ListProjectPoliciesCommandError = async (output, context) => {
2937
- const parsedOutput = {
2938
- ...output,
2939
- body: await parseErrorBody(output.body, context),
2940
- };
2941
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2942
- switch (errorCode) {
2943
- case "AccessDeniedException":
2944
- case "com.amazonaws.rekognition#AccessDeniedException":
2945
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2946
- case "InternalServerError":
2947
- case "com.amazonaws.rekognition#InternalServerError":
2948
- throw await de_InternalServerErrorRes(parsedOutput, context);
2949
- case "InvalidPaginationTokenException":
2950
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2951
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2952
- case "InvalidParameterException":
2953
- case "com.amazonaws.rekognition#InvalidParameterException":
2954
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2955
- case "ProvisionedThroughputExceededException":
2956
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2957
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2958
- case "ResourceNotFoundException":
2959
- case "com.amazonaws.rekognition#ResourceNotFoundException":
2960
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2961
- case "ThrottlingException":
2962
- case "com.amazonaws.rekognition#ThrottlingException":
2963
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
2964
- default:
2965
- const parsedBody = parsedOutput.body;
2966
- return throwDefaultError({
2967
- output,
2968
- parsedBody,
2969
- errorCode,
2970
- });
2971
- }
2972
- };
2973
- export const de_ListStreamProcessorsCommand = async (output, context) => {
899
+ export const de_GetFaceDetectionCommand = async (output, context) => {
2974
900
  if (output.statusCode >= 300) {
2975
- return de_ListStreamProcessorsCommandError(output, context);
901
+ return de_CommandError(output, context);
2976
902
  }
2977
903
  const data = await parseBody(output.body, context);
2978
904
  let contents = {};
2979
- contents = _json(data);
905
+ contents = de_GetFaceDetectionResponse(data, context);
2980
906
  const response = {
2981
907
  $metadata: deserializeMetadata(output),
2982
908
  ...contents,
2983
909
  };
2984
910
  return response;
2985
911
  };
2986
- const de_ListStreamProcessorsCommandError = async (output, context) => {
2987
- const parsedOutput = {
2988
- ...output,
2989
- body: await parseErrorBody(output.body, context),
2990
- };
2991
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2992
- switch (errorCode) {
2993
- case "AccessDeniedException":
2994
- case "com.amazonaws.rekognition#AccessDeniedException":
2995
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2996
- case "InternalServerError":
2997
- case "com.amazonaws.rekognition#InternalServerError":
2998
- throw await de_InternalServerErrorRes(parsedOutput, context);
2999
- case "InvalidPaginationTokenException":
3000
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3001
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3002
- case "InvalidParameterException":
3003
- case "com.amazonaws.rekognition#InvalidParameterException":
3004
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3005
- case "ProvisionedThroughputExceededException":
3006
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3007
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3008
- case "ThrottlingException":
3009
- case "com.amazonaws.rekognition#ThrottlingException":
3010
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3011
- default:
3012
- const parsedBody = parsedOutput.body;
3013
- return throwDefaultError({
3014
- output,
3015
- parsedBody,
3016
- errorCode,
3017
- });
3018
- }
3019
- };
3020
- export const de_ListTagsForResourceCommand = async (output, context) => {
912
+ export const de_GetFaceLivenessSessionResultsCommand = async (output, context) => {
3021
913
  if (output.statusCode >= 300) {
3022
- return de_ListTagsForResourceCommandError(output, context);
914
+ return de_CommandError(output, context);
3023
915
  }
3024
916
  const data = await parseBody(output.body, context);
3025
917
  let contents = {};
3026
- contents = _json(data);
918
+ contents = de_GetFaceLivenessSessionResultsResponse(data, context);
3027
919
  const response = {
3028
920
  $metadata: deserializeMetadata(output),
3029
921
  ...contents,
3030
922
  };
3031
923
  return response;
3032
924
  };
3033
- const de_ListTagsForResourceCommandError = async (output, context) => {
3034
- const parsedOutput = {
3035
- ...output,
3036
- body: await parseErrorBody(output.body, context),
3037
- };
3038
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3039
- switch (errorCode) {
3040
- case "AccessDeniedException":
3041
- case "com.amazonaws.rekognition#AccessDeniedException":
3042
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3043
- case "InternalServerError":
3044
- case "com.amazonaws.rekognition#InternalServerError":
3045
- throw await de_InternalServerErrorRes(parsedOutput, context);
3046
- case "InvalidParameterException":
3047
- case "com.amazonaws.rekognition#InvalidParameterException":
3048
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3049
- case "ProvisionedThroughputExceededException":
3050
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3051
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3052
- case "ResourceNotFoundException":
3053
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3054
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3055
- case "ThrottlingException":
3056
- case "com.amazonaws.rekognition#ThrottlingException":
3057
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3058
- default:
3059
- const parsedBody = parsedOutput.body;
3060
- return throwDefaultError({
3061
- output,
3062
- parsedBody,
3063
- errorCode,
3064
- });
3065
- }
3066
- };
3067
- export const de_ListUsersCommand = async (output, context) => {
925
+ export const de_GetFaceSearchCommand = async (output, context) => {
3068
926
  if (output.statusCode >= 300) {
3069
- return de_ListUsersCommandError(output, context);
927
+ return de_CommandError(output, context);
3070
928
  }
3071
929
  const data = await parseBody(output.body, context);
3072
930
  let contents = {};
3073
- contents = _json(data);
931
+ contents = de_GetFaceSearchResponse(data, context);
3074
932
  const response = {
3075
933
  $metadata: deserializeMetadata(output),
3076
934
  ...contents,
3077
935
  };
3078
936
  return response;
3079
937
  };
3080
- const de_ListUsersCommandError = async (output, context) => {
3081
- const parsedOutput = {
3082
- ...output,
3083
- body: await parseErrorBody(output.body, context),
3084
- };
3085
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3086
- switch (errorCode) {
3087
- case "AccessDeniedException":
3088
- case "com.amazonaws.rekognition#AccessDeniedException":
3089
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3090
- case "InternalServerError":
3091
- case "com.amazonaws.rekognition#InternalServerError":
3092
- throw await de_InternalServerErrorRes(parsedOutput, context);
3093
- case "InvalidPaginationTokenException":
3094
- case "com.amazonaws.rekognition#InvalidPaginationTokenException":
3095
- throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
3096
- case "InvalidParameterException":
3097
- case "com.amazonaws.rekognition#InvalidParameterException":
3098
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3099
- case "ProvisionedThroughputExceededException":
3100
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3101
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3102
- case "ResourceNotFoundException":
3103
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3104
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3105
- case "ThrottlingException":
3106
- case "com.amazonaws.rekognition#ThrottlingException":
3107
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3108
- default:
3109
- const parsedBody = parsedOutput.body;
3110
- return throwDefaultError({
3111
- output,
3112
- parsedBody,
3113
- errorCode,
3114
- });
3115
- }
3116
- };
3117
- export const de_PutProjectPolicyCommand = async (output, context) => {
938
+ export const de_GetLabelDetectionCommand = async (output, context) => {
3118
939
  if (output.statusCode >= 300) {
3119
- return de_PutProjectPolicyCommandError(output, context);
940
+ return de_CommandError(output, context);
3120
941
  }
3121
942
  const data = await parseBody(output.body, context);
3122
943
  let contents = {};
3123
- contents = _json(data);
944
+ contents = de_GetLabelDetectionResponse(data, context);
3124
945
  const response = {
3125
946
  $metadata: deserializeMetadata(output),
3126
947
  ...contents,
3127
948
  };
3128
949
  return response;
3129
950
  };
3130
- const de_PutProjectPolicyCommandError = async (output, context) => {
3131
- const parsedOutput = {
3132
- ...output,
3133
- body: await parseErrorBody(output.body, context),
3134
- };
3135
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3136
- switch (errorCode) {
3137
- case "AccessDeniedException":
3138
- case "com.amazonaws.rekognition#AccessDeniedException":
3139
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3140
- case "InternalServerError":
3141
- case "com.amazonaws.rekognition#InternalServerError":
3142
- throw await de_InternalServerErrorRes(parsedOutput, context);
3143
- case "InvalidParameterException":
3144
- case "com.amazonaws.rekognition#InvalidParameterException":
3145
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3146
- case "InvalidPolicyRevisionIdException":
3147
- case "com.amazonaws.rekognition#InvalidPolicyRevisionIdException":
3148
- throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context);
3149
- case "LimitExceededException":
3150
- case "com.amazonaws.rekognition#LimitExceededException":
3151
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3152
- case "MalformedPolicyDocumentException":
3153
- case "com.amazonaws.rekognition#MalformedPolicyDocumentException":
3154
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
3155
- case "ProvisionedThroughputExceededException":
3156
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3157
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3158
- case "ResourceAlreadyExistsException":
3159
- case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
3160
- throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
3161
- case "ResourceNotFoundException":
3162
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3163
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3164
- case "ServiceQuotaExceededException":
3165
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
3166
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
3167
- case "ThrottlingException":
3168
- case "com.amazonaws.rekognition#ThrottlingException":
3169
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3170
- default:
3171
- const parsedBody = parsedOutput.body;
3172
- return throwDefaultError({
3173
- output,
3174
- parsedBody,
3175
- errorCode,
3176
- });
3177
- }
3178
- };
3179
- export const de_RecognizeCelebritiesCommand = async (output, context) => {
951
+ export const de_GetMediaAnalysisJobCommand = async (output, context) => {
3180
952
  if (output.statusCode >= 300) {
3181
- return de_RecognizeCelebritiesCommandError(output, context);
3182
- }
3183
- const data = await parseBody(output.body, context);
3184
- let contents = {};
3185
- contents = de_RecognizeCelebritiesResponse(data, context);
3186
- const response = {
3187
- $metadata: deserializeMetadata(output),
3188
- ...contents,
3189
- };
3190
- return response;
3191
- };
3192
- const de_RecognizeCelebritiesCommandError = async (output, context) => {
3193
- const parsedOutput = {
3194
- ...output,
3195
- body: await parseErrorBody(output.body, context),
3196
- };
3197
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3198
- switch (errorCode) {
3199
- case "AccessDeniedException":
3200
- case "com.amazonaws.rekognition#AccessDeniedException":
3201
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3202
- case "ImageTooLargeException":
3203
- case "com.amazonaws.rekognition#ImageTooLargeException":
3204
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
3205
- case "InternalServerError":
3206
- case "com.amazonaws.rekognition#InternalServerError":
3207
- throw await de_InternalServerErrorRes(parsedOutput, context);
3208
- case "InvalidImageFormatException":
3209
- case "com.amazonaws.rekognition#InvalidImageFormatException":
3210
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
3211
- case "InvalidParameterException":
3212
- case "com.amazonaws.rekognition#InvalidParameterException":
3213
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3214
- case "InvalidS3ObjectException":
3215
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3216
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3217
- case "ProvisionedThroughputExceededException":
3218
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3219
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3220
- case "ThrottlingException":
3221
- case "com.amazonaws.rekognition#ThrottlingException":
3222
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3223
- default:
3224
- const parsedBody = parsedOutput.body;
3225
- return throwDefaultError({
3226
- output,
3227
- parsedBody,
3228
- errorCode,
3229
- });
953
+ return de_CommandError(output, context);
3230
954
  }
955
+ const data = await parseBody(output.body, context);
956
+ let contents = {};
957
+ contents = de_GetMediaAnalysisJobResponse(data, context);
958
+ const response = {
959
+ $metadata: deserializeMetadata(output),
960
+ ...contents,
961
+ };
962
+ return response;
3231
963
  };
3232
- export const de_SearchFacesCommand = async (output, context) => {
964
+ export const de_GetPersonTrackingCommand = async (output, context) => {
3233
965
  if (output.statusCode >= 300) {
3234
- return de_SearchFacesCommandError(output, context);
966
+ return de_CommandError(output, context);
3235
967
  }
3236
968
  const data = await parseBody(output.body, context);
3237
969
  let contents = {};
3238
- contents = de_SearchFacesResponse(data, context);
970
+ contents = de_GetPersonTrackingResponse(data, context);
3239
971
  const response = {
3240
972
  $metadata: deserializeMetadata(output),
3241
973
  ...contents,
3242
974
  };
3243
975
  return response;
3244
976
  };
3245
- const de_SearchFacesCommandError = async (output, context) => {
3246
- const parsedOutput = {
3247
- ...output,
3248
- body: await parseErrorBody(output.body, context),
3249
- };
3250
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3251
- switch (errorCode) {
3252
- case "AccessDeniedException":
3253
- case "com.amazonaws.rekognition#AccessDeniedException":
3254
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3255
- case "InternalServerError":
3256
- case "com.amazonaws.rekognition#InternalServerError":
3257
- throw await de_InternalServerErrorRes(parsedOutput, context);
3258
- case "InvalidParameterException":
3259
- case "com.amazonaws.rekognition#InvalidParameterException":
3260
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3261
- case "ProvisionedThroughputExceededException":
3262
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3263
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3264
- case "ResourceNotFoundException":
3265
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3266
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3267
- case "ThrottlingException":
3268
- case "com.amazonaws.rekognition#ThrottlingException":
3269
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3270
- default:
3271
- const parsedBody = parsedOutput.body;
3272
- return throwDefaultError({
3273
- output,
3274
- parsedBody,
3275
- errorCode,
3276
- });
977
+ export const de_GetSegmentDetectionCommand = async (output, context) => {
978
+ if (output.statusCode >= 300) {
979
+ return de_CommandError(output, context);
3277
980
  }
981
+ const data = await parseBody(output.body, context);
982
+ let contents = {};
983
+ contents = de_GetSegmentDetectionResponse(data, context);
984
+ const response = {
985
+ $metadata: deserializeMetadata(output),
986
+ ...contents,
987
+ };
988
+ return response;
3278
989
  };
3279
- export const de_SearchFacesByImageCommand = async (output, context) => {
990
+ export const de_GetTextDetectionCommand = async (output, context) => {
3280
991
  if (output.statusCode >= 300) {
3281
- return de_SearchFacesByImageCommandError(output, context);
992
+ return de_CommandError(output, context);
3282
993
  }
3283
994
  const data = await parseBody(output.body, context);
3284
995
  let contents = {};
3285
- contents = de_SearchFacesByImageResponse(data, context);
996
+ contents = de_GetTextDetectionResponse(data, context);
3286
997
  const response = {
3287
998
  $metadata: deserializeMetadata(output),
3288
999
  ...contents,
3289
1000
  };
3290
1001
  return response;
3291
1002
  };
3292
- const de_SearchFacesByImageCommandError = async (output, context) => {
3293
- const parsedOutput = {
3294
- ...output,
3295
- body: await parseErrorBody(output.body, context),
3296
- };
3297
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3298
- switch (errorCode) {
3299
- case "AccessDeniedException":
3300
- case "com.amazonaws.rekognition#AccessDeniedException":
3301
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3302
- case "ImageTooLargeException":
3303
- case "com.amazonaws.rekognition#ImageTooLargeException":
3304
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
3305
- case "InternalServerError":
3306
- case "com.amazonaws.rekognition#InternalServerError":
3307
- throw await de_InternalServerErrorRes(parsedOutput, context);
3308
- case "InvalidImageFormatException":
3309
- case "com.amazonaws.rekognition#InvalidImageFormatException":
3310
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
3311
- case "InvalidParameterException":
3312
- case "com.amazonaws.rekognition#InvalidParameterException":
3313
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3314
- case "InvalidS3ObjectException":
3315
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3316
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3317
- case "ProvisionedThroughputExceededException":
3318
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3319
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3320
- case "ResourceNotFoundException":
3321
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3322
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3323
- case "ThrottlingException":
3324
- case "com.amazonaws.rekognition#ThrottlingException":
3325
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3326
- default:
3327
- const parsedBody = parsedOutput.body;
3328
- return throwDefaultError({
3329
- output,
3330
- parsedBody,
3331
- errorCode,
3332
- });
1003
+ export const de_IndexFacesCommand = async (output, context) => {
1004
+ if (output.statusCode >= 300) {
1005
+ return de_CommandError(output, context);
3333
1006
  }
1007
+ const data = await parseBody(output.body, context);
1008
+ let contents = {};
1009
+ contents = de_IndexFacesResponse(data, context);
1010
+ const response = {
1011
+ $metadata: deserializeMetadata(output),
1012
+ ...contents,
1013
+ };
1014
+ return response;
3334
1015
  };
3335
- export const de_SearchUsersCommand = async (output, context) => {
1016
+ export const de_ListCollectionsCommand = async (output, context) => {
3336
1017
  if (output.statusCode >= 300) {
3337
- return de_SearchUsersCommandError(output, context);
1018
+ return de_CommandError(output, context);
3338
1019
  }
3339
1020
  const data = await parseBody(output.body, context);
3340
1021
  let contents = {};
3341
- contents = de_SearchUsersResponse(data, context);
1022
+ contents = _json(data);
3342
1023
  const response = {
3343
1024
  $metadata: deserializeMetadata(output),
3344
1025
  ...contents,
3345
1026
  };
3346
1027
  return response;
3347
1028
  };
3348
- const de_SearchUsersCommandError = async (output, context) => {
3349
- const parsedOutput = {
3350
- ...output,
3351
- body: await parseErrorBody(output.body, context),
3352
- };
3353
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3354
- switch (errorCode) {
3355
- case "AccessDeniedException":
3356
- case "com.amazonaws.rekognition#AccessDeniedException":
3357
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3358
- case "InternalServerError":
3359
- case "com.amazonaws.rekognition#InternalServerError":
3360
- throw await de_InternalServerErrorRes(parsedOutput, context);
3361
- case "InvalidParameterException":
3362
- case "com.amazonaws.rekognition#InvalidParameterException":
3363
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3364
- case "ProvisionedThroughputExceededException":
3365
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3366
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3367
- case "ResourceNotFoundException":
3368
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3369
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3370
- case "ThrottlingException":
3371
- case "com.amazonaws.rekognition#ThrottlingException":
3372
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3373
- default:
3374
- const parsedBody = parsedOutput.body;
3375
- return throwDefaultError({
3376
- output,
3377
- parsedBody,
3378
- errorCode,
3379
- });
1029
+ export const de_ListDatasetEntriesCommand = async (output, context) => {
1030
+ if (output.statusCode >= 300) {
1031
+ return de_CommandError(output, context);
3380
1032
  }
1033
+ const data = await parseBody(output.body, context);
1034
+ let contents = {};
1035
+ contents = _json(data);
1036
+ const response = {
1037
+ $metadata: deserializeMetadata(output),
1038
+ ...contents,
1039
+ };
1040
+ return response;
3381
1041
  };
3382
- export const de_SearchUsersByImageCommand = async (output, context) => {
1042
+ export const de_ListDatasetLabelsCommand = async (output, context) => {
3383
1043
  if (output.statusCode >= 300) {
3384
- return de_SearchUsersByImageCommandError(output, context);
1044
+ return de_CommandError(output, context);
3385
1045
  }
3386
1046
  const data = await parseBody(output.body, context);
3387
1047
  let contents = {};
3388
- contents = de_SearchUsersByImageResponse(data, context);
1048
+ contents = _json(data);
3389
1049
  const response = {
3390
1050
  $metadata: deserializeMetadata(output),
3391
1051
  ...contents,
3392
1052
  };
3393
1053
  return response;
3394
1054
  };
3395
- const de_SearchUsersByImageCommandError = async (output, context) => {
3396
- const parsedOutput = {
3397
- ...output,
3398
- body: await parseErrorBody(output.body, context),
3399
- };
3400
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3401
- switch (errorCode) {
3402
- case "AccessDeniedException":
3403
- case "com.amazonaws.rekognition#AccessDeniedException":
3404
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3405
- case "ImageTooLargeException":
3406
- case "com.amazonaws.rekognition#ImageTooLargeException":
3407
- throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
3408
- case "InternalServerError":
3409
- case "com.amazonaws.rekognition#InternalServerError":
3410
- throw await de_InternalServerErrorRes(parsedOutput, context);
3411
- case "InvalidImageFormatException":
3412
- case "com.amazonaws.rekognition#InvalidImageFormatException":
3413
- throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
3414
- case "InvalidParameterException":
3415
- case "com.amazonaws.rekognition#InvalidParameterException":
3416
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3417
- case "InvalidS3ObjectException":
3418
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3419
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3420
- case "ProvisionedThroughputExceededException":
3421
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3422
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3423
- case "ResourceNotFoundException":
3424
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3425
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3426
- case "ThrottlingException":
3427
- case "com.amazonaws.rekognition#ThrottlingException":
3428
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3429
- default:
3430
- const parsedBody = parsedOutput.body;
3431
- return throwDefaultError({
3432
- output,
3433
- parsedBody,
3434
- errorCode,
3435
- });
1055
+ export const de_ListFacesCommand = async (output, context) => {
1056
+ if (output.statusCode >= 300) {
1057
+ return de_CommandError(output, context);
3436
1058
  }
1059
+ const data = await parseBody(output.body, context);
1060
+ let contents = {};
1061
+ contents = de_ListFacesResponse(data, context);
1062
+ const response = {
1063
+ $metadata: deserializeMetadata(output),
1064
+ ...contents,
1065
+ };
1066
+ return response;
3437
1067
  };
3438
- export const de_StartCelebrityRecognitionCommand = async (output, context) => {
1068
+ export const de_ListMediaAnalysisJobsCommand = async (output, context) => {
3439
1069
  if (output.statusCode >= 300) {
3440
- return de_StartCelebrityRecognitionCommandError(output, context);
1070
+ return de_CommandError(output, context);
3441
1071
  }
3442
1072
  const data = await parseBody(output.body, context);
3443
1073
  let contents = {};
3444
- contents = _json(data);
1074
+ contents = de_ListMediaAnalysisJobsResponse(data, context);
3445
1075
  const response = {
3446
1076
  $metadata: deserializeMetadata(output),
3447
1077
  ...contents,
3448
1078
  };
3449
1079
  return response;
3450
1080
  };
3451
- const de_StartCelebrityRecognitionCommandError = async (output, context) => {
3452
- const parsedOutput = {
3453
- ...output,
3454
- body: await parseErrorBody(output.body, context),
3455
- };
3456
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3457
- switch (errorCode) {
3458
- case "AccessDeniedException":
3459
- case "com.amazonaws.rekognition#AccessDeniedException":
3460
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3461
- case "IdempotentParameterMismatchException":
3462
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3463
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3464
- case "InternalServerError":
3465
- case "com.amazonaws.rekognition#InternalServerError":
3466
- throw await de_InternalServerErrorRes(parsedOutput, context);
3467
- case "InvalidParameterException":
3468
- case "com.amazonaws.rekognition#InvalidParameterException":
3469
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3470
- case "InvalidS3ObjectException":
3471
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3472
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3473
- case "LimitExceededException":
3474
- case "com.amazonaws.rekognition#LimitExceededException":
3475
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3476
- case "ProvisionedThroughputExceededException":
3477
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3478
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3479
- case "ThrottlingException":
3480
- case "com.amazonaws.rekognition#ThrottlingException":
3481
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3482
- case "VideoTooLargeException":
3483
- case "com.amazonaws.rekognition#VideoTooLargeException":
3484
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
3485
- default:
3486
- const parsedBody = parsedOutput.body;
3487
- return throwDefaultError({
3488
- output,
3489
- parsedBody,
3490
- errorCode,
3491
- });
1081
+ export const de_ListProjectPoliciesCommand = async (output, context) => {
1082
+ if (output.statusCode >= 300) {
1083
+ return de_CommandError(output, context);
3492
1084
  }
1085
+ const data = await parseBody(output.body, context);
1086
+ let contents = {};
1087
+ contents = de_ListProjectPoliciesResponse(data, context);
1088
+ const response = {
1089
+ $metadata: deserializeMetadata(output),
1090
+ ...contents,
1091
+ };
1092
+ return response;
3493
1093
  };
3494
- export const de_StartContentModerationCommand = async (output, context) => {
1094
+ export const de_ListStreamProcessorsCommand = async (output, context) => {
3495
1095
  if (output.statusCode >= 300) {
3496
- return de_StartContentModerationCommandError(output, context);
1096
+ return de_CommandError(output, context);
3497
1097
  }
3498
1098
  const data = await parseBody(output.body, context);
3499
1099
  let contents = {};
@@ -3504,52 +1104,9 @@ export const de_StartContentModerationCommand = async (output, context) => {
3504
1104
  };
3505
1105
  return response;
3506
1106
  };
3507
- const de_StartContentModerationCommandError = async (output, context) => {
3508
- const parsedOutput = {
3509
- ...output,
3510
- body: await parseErrorBody(output.body, context),
3511
- };
3512
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3513
- switch (errorCode) {
3514
- case "AccessDeniedException":
3515
- case "com.amazonaws.rekognition#AccessDeniedException":
3516
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3517
- case "IdempotentParameterMismatchException":
3518
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3519
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3520
- case "InternalServerError":
3521
- case "com.amazonaws.rekognition#InternalServerError":
3522
- throw await de_InternalServerErrorRes(parsedOutput, context);
3523
- case "InvalidParameterException":
3524
- case "com.amazonaws.rekognition#InvalidParameterException":
3525
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3526
- case "InvalidS3ObjectException":
3527
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3528
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3529
- case "LimitExceededException":
3530
- case "com.amazonaws.rekognition#LimitExceededException":
3531
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3532
- case "ProvisionedThroughputExceededException":
3533
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3534
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3535
- case "ThrottlingException":
3536
- case "com.amazonaws.rekognition#ThrottlingException":
3537
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3538
- case "VideoTooLargeException":
3539
- case "com.amazonaws.rekognition#VideoTooLargeException":
3540
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
3541
- default:
3542
- const parsedBody = parsedOutput.body;
3543
- return throwDefaultError({
3544
- output,
3545
- parsedBody,
3546
- errorCode,
3547
- });
3548
- }
3549
- };
3550
- export const de_StartFaceDetectionCommand = async (output, context) => {
1107
+ export const de_ListTagsForResourceCommand = async (output, context) => {
3551
1108
  if (output.statusCode >= 300) {
3552
- return de_StartFaceDetectionCommandError(output, context);
1109
+ return de_CommandError(output, context);
3553
1110
  }
3554
1111
  const data = await parseBody(output.body, context);
3555
1112
  let contents = {};
@@ -3560,52 +1117,9 @@ export const de_StartFaceDetectionCommand = async (output, context) => {
3560
1117
  };
3561
1118
  return response;
3562
1119
  };
3563
- const de_StartFaceDetectionCommandError = async (output, context) => {
3564
- const parsedOutput = {
3565
- ...output,
3566
- body: await parseErrorBody(output.body, context),
3567
- };
3568
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3569
- switch (errorCode) {
3570
- case "AccessDeniedException":
3571
- case "com.amazonaws.rekognition#AccessDeniedException":
3572
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3573
- case "IdempotentParameterMismatchException":
3574
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3575
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3576
- case "InternalServerError":
3577
- case "com.amazonaws.rekognition#InternalServerError":
3578
- throw await de_InternalServerErrorRes(parsedOutput, context);
3579
- case "InvalidParameterException":
3580
- case "com.amazonaws.rekognition#InvalidParameterException":
3581
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3582
- case "InvalidS3ObjectException":
3583
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3584
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3585
- case "LimitExceededException":
3586
- case "com.amazonaws.rekognition#LimitExceededException":
3587
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3588
- case "ProvisionedThroughputExceededException":
3589
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3590
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3591
- case "ThrottlingException":
3592
- case "com.amazonaws.rekognition#ThrottlingException":
3593
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3594
- case "VideoTooLargeException":
3595
- case "com.amazonaws.rekognition#VideoTooLargeException":
3596
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
3597
- default:
3598
- const parsedBody = parsedOutput.body;
3599
- return throwDefaultError({
3600
- output,
3601
- parsedBody,
3602
- errorCode,
3603
- });
3604
- }
3605
- };
3606
- export const de_StartFaceSearchCommand = async (output, context) => {
1120
+ export const de_ListUsersCommand = async (output, context) => {
3607
1121
  if (output.statusCode >= 300) {
3608
- return de_StartFaceSearchCommandError(output, context);
1122
+ return de_CommandError(output, context);
3609
1123
  }
3610
1124
  const data = await parseBody(output.body, context);
3611
1125
  let contents = {};
@@ -3616,55 +1130,9 @@ export const de_StartFaceSearchCommand = async (output, context) => {
3616
1130
  };
3617
1131
  return response;
3618
1132
  };
3619
- const de_StartFaceSearchCommandError = async (output, context) => {
3620
- const parsedOutput = {
3621
- ...output,
3622
- body: await parseErrorBody(output.body, context),
3623
- };
3624
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3625
- switch (errorCode) {
3626
- case "AccessDeniedException":
3627
- case "com.amazonaws.rekognition#AccessDeniedException":
3628
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3629
- case "IdempotentParameterMismatchException":
3630
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3631
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3632
- case "InternalServerError":
3633
- case "com.amazonaws.rekognition#InternalServerError":
3634
- throw await de_InternalServerErrorRes(parsedOutput, context);
3635
- case "InvalidParameterException":
3636
- case "com.amazonaws.rekognition#InvalidParameterException":
3637
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3638
- case "InvalidS3ObjectException":
3639
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3640
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3641
- case "LimitExceededException":
3642
- case "com.amazonaws.rekognition#LimitExceededException":
3643
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3644
- case "ProvisionedThroughputExceededException":
3645
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3646
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3647
- case "ResourceNotFoundException":
3648
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3649
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3650
- case "ThrottlingException":
3651
- case "com.amazonaws.rekognition#ThrottlingException":
3652
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3653
- case "VideoTooLargeException":
3654
- case "com.amazonaws.rekognition#VideoTooLargeException":
3655
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
3656
- default:
3657
- const parsedBody = parsedOutput.body;
3658
- return throwDefaultError({
3659
- output,
3660
- parsedBody,
3661
- errorCode,
3662
- });
3663
- }
3664
- };
3665
- export const de_StartLabelDetectionCommand = async (output, context) => {
1133
+ export const de_PutProjectPolicyCommand = async (output, context) => {
3666
1134
  if (output.statusCode >= 300) {
3667
- return de_StartLabelDetectionCommandError(output, context);
1135
+ return de_CommandError(output, context);
3668
1136
  }
3669
1137
  const data = await parseBody(output.body, context);
3670
1138
  let contents = {};
@@ -3675,170 +1143,87 @@ export const de_StartLabelDetectionCommand = async (output, context) => {
3675
1143
  };
3676
1144
  return response;
3677
1145
  };
3678
- const de_StartLabelDetectionCommandError = async (output, context) => {
3679
- const parsedOutput = {
3680
- ...output,
3681
- body: await parseErrorBody(output.body, context),
3682
- };
3683
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3684
- switch (errorCode) {
3685
- case "AccessDeniedException":
3686
- case "com.amazonaws.rekognition#AccessDeniedException":
3687
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3688
- case "IdempotentParameterMismatchException":
3689
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3690
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3691
- case "InternalServerError":
3692
- case "com.amazonaws.rekognition#InternalServerError":
3693
- throw await de_InternalServerErrorRes(parsedOutput, context);
3694
- case "InvalidParameterException":
3695
- case "com.amazonaws.rekognition#InvalidParameterException":
3696
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3697
- case "InvalidS3ObjectException":
3698
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3699
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3700
- case "LimitExceededException":
3701
- case "com.amazonaws.rekognition#LimitExceededException":
3702
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3703
- case "ProvisionedThroughputExceededException":
3704
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3705
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3706
- case "ThrottlingException":
3707
- case "com.amazonaws.rekognition#ThrottlingException":
3708
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3709
- case "VideoTooLargeException":
3710
- case "com.amazonaws.rekognition#VideoTooLargeException":
3711
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
3712
- default:
3713
- const parsedBody = parsedOutput.body;
3714
- return throwDefaultError({
3715
- output,
3716
- parsedBody,
3717
- errorCode,
3718
- });
1146
+ export const de_RecognizeCelebritiesCommand = async (output, context) => {
1147
+ if (output.statusCode >= 300) {
1148
+ return de_CommandError(output, context);
3719
1149
  }
1150
+ const data = await parseBody(output.body, context);
1151
+ let contents = {};
1152
+ contents = de_RecognizeCelebritiesResponse(data, context);
1153
+ const response = {
1154
+ $metadata: deserializeMetadata(output),
1155
+ ...contents,
1156
+ };
1157
+ return response;
3720
1158
  };
3721
- export const de_StartMediaAnalysisJobCommand = async (output, context) => {
1159
+ export const de_SearchFacesCommand = async (output, context) => {
3722
1160
  if (output.statusCode >= 300) {
3723
- return de_StartMediaAnalysisJobCommandError(output, context);
1161
+ return de_CommandError(output, context);
3724
1162
  }
3725
1163
  const data = await parseBody(output.body, context);
3726
1164
  let contents = {};
3727
- contents = _json(data);
1165
+ contents = de_SearchFacesResponse(data, context);
3728
1166
  const response = {
3729
1167
  $metadata: deserializeMetadata(output),
3730
1168
  ...contents,
3731
1169
  };
3732
1170
  return response;
3733
1171
  };
3734
- const de_StartMediaAnalysisJobCommandError = async (output, context) => {
3735
- const parsedOutput = {
3736
- ...output,
3737
- body: await parseErrorBody(output.body, context),
1172
+ export const de_SearchFacesByImageCommand = async (output, context) => {
1173
+ if (output.statusCode >= 300) {
1174
+ return de_CommandError(output, context);
1175
+ }
1176
+ const data = await parseBody(output.body, context);
1177
+ let contents = {};
1178
+ contents = de_SearchFacesByImageResponse(data, context);
1179
+ const response = {
1180
+ $metadata: deserializeMetadata(output),
1181
+ ...contents,
3738
1182
  };
3739
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3740
- switch (errorCode) {
3741
- case "AccessDeniedException":
3742
- case "com.amazonaws.rekognition#AccessDeniedException":
3743
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3744
- case "IdempotentParameterMismatchException":
3745
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3746
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3747
- case "InternalServerError":
3748
- case "com.amazonaws.rekognition#InternalServerError":
3749
- throw await de_InternalServerErrorRes(parsedOutput, context);
3750
- case "InvalidManifestException":
3751
- case "com.amazonaws.rekognition#InvalidManifestException":
3752
- throw await de_InvalidManifestExceptionRes(parsedOutput, context);
3753
- case "InvalidParameterException":
3754
- case "com.amazonaws.rekognition#InvalidParameterException":
3755
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3756
- case "InvalidS3ObjectException":
3757
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3758
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3759
- case "LimitExceededException":
3760
- case "com.amazonaws.rekognition#LimitExceededException":
3761
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3762
- case "ProvisionedThroughputExceededException":
3763
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3764
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3765
- case "ResourceNotFoundException":
3766
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3767
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3768
- case "ResourceNotReadyException":
3769
- case "com.amazonaws.rekognition#ResourceNotReadyException":
3770
- throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
3771
- case "ThrottlingException":
3772
- case "com.amazonaws.rekognition#ThrottlingException":
3773
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3774
- default:
3775
- const parsedBody = parsedOutput.body;
3776
- return throwDefaultError({
3777
- output,
3778
- parsedBody,
3779
- errorCode,
3780
- });
1183
+ return response;
1184
+ };
1185
+ export const de_SearchUsersCommand = async (output, context) => {
1186
+ if (output.statusCode >= 300) {
1187
+ return de_CommandError(output, context);
3781
1188
  }
1189
+ const data = await parseBody(output.body, context);
1190
+ let contents = {};
1191
+ contents = de_SearchUsersResponse(data, context);
1192
+ const response = {
1193
+ $metadata: deserializeMetadata(output),
1194
+ ...contents,
1195
+ };
1196
+ return response;
3782
1197
  };
3783
- export const de_StartPersonTrackingCommand = async (output, context) => {
1198
+ export const de_SearchUsersByImageCommand = async (output, context) => {
3784
1199
  if (output.statusCode >= 300) {
3785
- return de_StartPersonTrackingCommandError(output, context);
1200
+ return de_CommandError(output, context);
3786
1201
  }
3787
1202
  const data = await parseBody(output.body, context);
3788
1203
  let contents = {};
3789
- contents = _json(data);
1204
+ contents = de_SearchUsersByImageResponse(data, context);
3790
1205
  const response = {
3791
1206
  $metadata: deserializeMetadata(output),
3792
1207
  ...contents,
3793
1208
  };
3794
1209
  return response;
3795
1210
  };
3796
- const de_StartPersonTrackingCommandError = async (output, context) => {
3797
- const parsedOutput = {
3798
- ...output,
3799
- body: await parseErrorBody(output.body, context),
3800
- };
3801
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3802
- switch (errorCode) {
3803
- case "AccessDeniedException":
3804
- case "com.amazonaws.rekognition#AccessDeniedException":
3805
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3806
- case "IdempotentParameterMismatchException":
3807
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3808
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3809
- case "InternalServerError":
3810
- case "com.amazonaws.rekognition#InternalServerError":
3811
- throw await de_InternalServerErrorRes(parsedOutput, context);
3812
- case "InvalidParameterException":
3813
- case "com.amazonaws.rekognition#InvalidParameterException":
3814
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3815
- case "InvalidS3ObjectException":
3816
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3817
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3818
- case "LimitExceededException":
3819
- case "com.amazonaws.rekognition#LimitExceededException":
3820
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3821
- case "ProvisionedThroughputExceededException":
3822
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3823
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3824
- case "ThrottlingException":
3825
- case "com.amazonaws.rekognition#ThrottlingException":
3826
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3827
- case "VideoTooLargeException":
3828
- case "com.amazonaws.rekognition#VideoTooLargeException":
3829
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
3830
- default:
3831
- const parsedBody = parsedOutput.body;
3832
- return throwDefaultError({
3833
- output,
3834
- parsedBody,
3835
- errorCode,
3836
- });
1211
+ export const de_StartCelebrityRecognitionCommand = async (output, context) => {
1212
+ if (output.statusCode >= 300) {
1213
+ return de_CommandError(output, context);
3837
1214
  }
1215
+ const data = await parseBody(output.body, context);
1216
+ let contents = {};
1217
+ contents = _json(data);
1218
+ const response = {
1219
+ $metadata: deserializeMetadata(output),
1220
+ ...contents,
1221
+ };
1222
+ return response;
3838
1223
  };
3839
- export const de_StartProjectVersionCommand = async (output, context) => {
1224
+ export const de_StartContentModerationCommand = async (output, context) => {
3840
1225
  if (output.statusCode >= 300) {
3841
- return de_StartProjectVersionCommandError(output, context);
1226
+ return de_CommandError(output, context);
3842
1227
  }
3843
1228
  const data = await parseBody(output.body, context);
3844
1229
  let contents = {};
@@ -3849,49 +1234,22 @@ export const de_StartProjectVersionCommand = async (output, context) => {
3849
1234
  };
3850
1235
  return response;
3851
1236
  };
3852
- const de_StartProjectVersionCommandError = async (output, context) => {
3853
- const parsedOutput = {
3854
- ...output,
3855
- body: await parseErrorBody(output.body, context),
3856
- };
3857
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3858
- switch (errorCode) {
3859
- case "AccessDeniedException":
3860
- case "com.amazonaws.rekognition#AccessDeniedException":
3861
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3862
- case "InternalServerError":
3863
- case "com.amazonaws.rekognition#InternalServerError":
3864
- throw await de_InternalServerErrorRes(parsedOutput, context);
3865
- case "InvalidParameterException":
3866
- case "com.amazonaws.rekognition#InvalidParameterException":
3867
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3868
- case "LimitExceededException":
3869
- case "com.amazonaws.rekognition#LimitExceededException":
3870
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3871
- case "ProvisionedThroughputExceededException":
3872
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3873
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3874
- case "ResourceInUseException":
3875
- case "com.amazonaws.rekognition#ResourceInUseException":
3876
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
3877
- case "ResourceNotFoundException":
3878
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3879
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3880
- case "ThrottlingException":
3881
- case "com.amazonaws.rekognition#ThrottlingException":
3882
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3883
- default:
3884
- const parsedBody = parsedOutput.body;
3885
- return throwDefaultError({
3886
- output,
3887
- parsedBody,
3888
- errorCode,
3889
- });
1237
+ export const de_StartFaceDetectionCommand = async (output, context) => {
1238
+ if (output.statusCode >= 300) {
1239
+ return de_CommandError(output, context);
3890
1240
  }
1241
+ const data = await parseBody(output.body, context);
1242
+ let contents = {};
1243
+ contents = _json(data);
1244
+ const response = {
1245
+ $metadata: deserializeMetadata(output),
1246
+ ...contents,
1247
+ };
1248
+ return response;
3891
1249
  };
3892
- export const de_StartSegmentDetectionCommand = async (output, context) => {
1250
+ export const de_StartFaceSearchCommand = async (output, context) => {
3893
1251
  if (output.statusCode >= 300) {
3894
- return de_StartSegmentDetectionCommandError(output, context);
1252
+ return de_CommandError(output, context);
3895
1253
  }
3896
1254
  const data = await parseBody(output.body, context);
3897
1255
  let contents = {};
@@ -3902,52 +1260,22 @@ export const de_StartSegmentDetectionCommand = async (output, context) => {
3902
1260
  };
3903
1261
  return response;
3904
1262
  };
3905
- const de_StartSegmentDetectionCommandError = async (output, context) => {
3906
- const parsedOutput = {
3907
- ...output,
3908
- body: await parseErrorBody(output.body, context),
3909
- };
3910
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3911
- switch (errorCode) {
3912
- case "AccessDeniedException":
3913
- case "com.amazonaws.rekognition#AccessDeniedException":
3914
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3915
- case "IdempotentParameterMismatchException":
3916
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
3917
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
3918
- case "InternalServerError":
3919
- case "com.amazonaws.rekognition#InternalServerError":
3920
- throw await de_InternalServerErrorRes(parsedOutput, context);
3921
- case "InvalidParameterException":
3922
- case "com.amazonaws.rekognition#InvalidParameterException":
3923
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3924
- case "InvalidS3ObjectException":
3925
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
3926
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3927
- case "LimitExceededException":
3928
- case "com.amazonaws.rekognition#LimitExceededException":
3929
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3930
- case "ProvisionedThroughputExceededException":
3931
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3932
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3933
- case "ThrottlingException":
3934
- case "com.amazonaws.rekognition#ThrottlingException":
3935
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3936
- case "VideoTooLargeException":
3937
- case "com.amazonaws.rekognition#VideoTooLargeException":
3938
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
3939
- default:
3940
- const parsedBody = parsedOutput.body;
3941
- return throwDefaultError({
3942
- output,
3943
- parsedBody,
3944
- errorCode,
3945
- });
1263
+ export const de_StartLabelDetectionCommand = async (output, context) => {
1264
+ if (output.statusCode >= 300) {
1265
+ return de_CommandError(output, context);
3946
1266
  }
1267
+ const data = await parseBody(output.body, context);
1268
+ let contents = {};
1269
+ contents = _json(data);
1270
+ const response = {
1271
+ $metadata: deserializeMetadata(output),
1272
+ ...contents,
1273
+ };
1274
+ return response;
3947
1275
  };
3948
- export const de_StartStreamProcessorCommand = async (output, context) => {
1276
+ export const de_StartMediaAnalysisJobCommand = async (output, context) => {
3949
1277
  if (output.statusCode >= 300) {
3950
- return de_StartStreamProcessorCommandError(output, context);
1278
+ return de_CommandError(output, context);
3951
1279
  }
3952
1280
  const data = await parseBody(output.body, context);
3953
1281
  let contents = {};
@@ -3958,46 +1286,22 @@ export const de_StartStreamProcessorCommand = async (output, context) => {
3958
1286
  };
3959
1287
  return response;
3960
1288
  };
3961
- const de_StartStreamProcessorCommandError = async (output, context) => {
3962
- const parsedOutput = {
3963
- ...output,
3964
- body: await parseErrorBody(output.body, context),
3965
- };
3966
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3967
- switch (errorCode) {
3968
- case "AccessDeniedException":
3969
- case "com.amazonaws.rekognition#AccessDeniedException":
3970
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3971
- case "InternalServerError":
3972
- case "com.amazonaws.rekognition#InternalServerError":
3973
- throw await de_InternalServerErrorRes(parsedOutput, context);
3974
- case "InvalidParameterException":
3975
- case "com.amazonaws.rekognition#InvalidParameterException":
3976
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3977
- case "ProvisionedThroughputExceededException":
3978
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3979
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3980
- case "ResourceInUseException":
3981
- case "com.amazonaws.rekognition#ResourceInUseException":
3982
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
3983
- case "ResourceNotFoundException":
3984
- case "com.amazonaws.rekognition#ResourceNotFoundException":
3985
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3986
- case "ThrottlingException":
3987
- case "com.amazonaws.rekognition#ThrottlingException":
3988
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
3989
- default:
3990
- const parsedBody = parsedOutput.body;
3991
- return throwDefaultError({
3992
- output,
3993
- parsedBody,
3994
- errorCode,
3995
- });
1289
+ export const de_StartPersonTrackingCommand = async (output, context) => {
1290
+ if (output.statusCode >= 300) {
1291
+ return de_CommandError(output, context);
3996
1292
  }
1293
+ const data = await parseBody(output.body, context);
1294
+ let contents = {};
1295
+ contents = _json(data);
1296
+ const response = {
1297
+ $metadata: deserializeMetadata(output),
1298
+ ...contents,
1299
+ };
1300
+ return response;
3997
1301
  };
3998
- export const de_StartTextDetectionCommand = async (output, context) => {
1302
+ export const de_StartProjectVersionCommand = async (output, context) => {
3999
1303
  if (output.statusCode >= 300) {
4000
- return de_StartTextDetectionCommandError(output, context);
1304
+ return de_CommandError(output, context);
4001
1305
  }
4002
1306
  const data = await parseBody(output.body, context);
4003
1307
  let contents = {};
@@ -4008,52 +1312,22 @@ export const de_StartTextDetectionCommand = async (output, context) => {
4008
1312
  };
4009
1313
  return response;
4010
1314
  };
4011
- const de_StartTextDetectionCommandError = async (output, context) => {
4012
- const parsedOutput = {
4013
- ...output,
4014
- body: await parseErrorBody(output.body, context),
4015
- };
4016
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4017
- switch (errorCode) {
4018
- case "AccessDeniedException":
4019
- case "com.amazonaws.rekognition#AccessDeniedException":
4020
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4021
- case "IdempotentParameterMismatchException":
4022
- case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
4023
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4024
- case "InternalServerError":
4025
- case "com.amazonaws.rekognition#InternalServerError":
4026
- throw await de_InternalServerErrorRes(parsedOutput, context);
4027
- case "InvalidParameterException":
4028
- case "com.amazonaws.rekognition#InvalidParameterException":
4029
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4030
- case "InvalidS3ObjectException":
4031
- case "com.amazonaws.rekognition#InvalidS3ObjectException":
4032
- throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
4033
- case "LimitExceededException":
4034
- case "com.amazonaws.rekognition#LimitExceededException":
4035
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4036
- case "ProvisionedThroughputExceededException":
4037
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4038
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4039
- case "ThrottlingException":
4040
- case "com.amazonaws.rekognition#ThrottlingException":
4041
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4042
- case "VideoTooLargeException":
4043
- case "com.amazonaws.rekognition#VideoTooLargeException":
4044
- throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
4045
- default:
4046
- const parsedBody = parsedOutput.body;
4047
- return throwDefaultError({
4048
- output,
4049
- parsedBody,
4050
- errorCode,
4051
- });
1315
+ export const de_StartSegmentDetectionCommand = async (output, context) => {
1316
+ if (output.statusCode >= 300) {
1317
+ return de_CommandError(output, context);
4052
1318
  }
1319
+ const data = await parseBody(output.body, context);
1320
+ let contents = {};
1321
+ contents = _json(data);
1322
+ const response = {
1323
+ $metadata: deserializeMetadata(output),
1324
+ ...contents,
1325
+ };
1326
+ return response;
4053
1327
  };
4054
- export const de_StopProjectVersionCommand = async (output, context) => {
1328
+ export const de_StartStreamProcessorCommand = async (output, context) => {
4055
1329
  if (output.statusCode >= 300) {
4056
- return de_StopProjectVersionCommandError(output, context);
1330
+ return de_CommandError(output, context);
4057
1331
  }
4058
1332
  const data = await parseBody(output.body, context);
4059
1333
  let contents = {};
@@ -4064,46 +1338,22 @@ export const de_StopProjectVersionCommand = async (output, context) => {
4064
1338
  };
4065
1339
  return response;
4066
1340
  };
4067
- const de_StopProjectVersionCommandError = async (output, context) => {
4068
- const parsedOutput = {
4069
- ...output,
4070
- body: await parseErrorBody(output.body, context),
4071
- };
4072
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4073
- switch (errorCode) {
4074
- case "AccessDeniedException":
4075
- case "com.amazonaws.rekognition#AccessDeniedException":
4076
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4077
- case "InternalServerError":
4078
- case "com.amazonaws.rekognition#InternalServerError":
4079
- throw await de_InternalServerErrorRes(parsedOutput, context);
4080
- case "InvalidParameterException":
4081
- case "com.amazonaws.rekognition#InvalidParameterException":
4082
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4083
- case "ProvisionedThroughputExceededException":
4084
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4085
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4086
- case "ResourceInUseException":
4087
- case "com.amazonaws.rekognition#ResourceInUseException":
4088
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
4089
- case "ResourceNotFoundException":
4090
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4091
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4092
- case "ThrottlingException":
4093
- case "com.amazonaws.rekognition#ThrottlingException":
4094
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4095
- default:
4096
- const parsedBody = parsedOutput.body;
4097
- return throwDefaultError({
4098
- output,
4099
- parsedBody,
4100
- errorCode,
4101
- });
1341
+ export const de_StartTextDetectionCommand = async (output, context) => {
1342
+ if (output.statusCode >= 300) {
1343
+ return de_CommandError(output, context);
4102
1344
  }
1345
+ const data = await parseBody(output.body, context);
1346
+ let contents = {};
1347
+ contents = _json(data);
1348
+ const response = {
1349
+ $metadata: deserializeMetadata(output),
1350
+ ...contents,
1351
+ };
1352
+ return response;
4103
1353
  };
4104
- export const de_StopStreamProcessorCommand = async (output, context) => {
1354
+ export const de_StopProjectVersionCommand = async (output, context) => {
4105
1355
  if (output.statusCode >= 300) {
4106
- return de_StopStreamProcessorCommandError(output, context);
1356
+ return de_CommandError(output, context);
4107
1357
  }
4108
1358
  const data = await parseBody(output.body, context);
4109
1359
  let contents = {};
@@ -4114,46 +1364,22 @@ export const de_StopStreamProcessorCommand = async (output, context) => {
4114
1364
  };
4115
1365
  return response;
4116
1366
  };
4117
- const de_StopStreamProcessorCommandError = async (output, context) => {
4118
- const parsedOutput = {
4119
- ...output,
4120
- body: await parseErrorBody(output.body, context),
4121
- };
4122
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4123
- switch (errorCode) {
4124
- case "AccessDeniedException":
4125
- case "com.amazonaws.rekognition#AccessDeniedException":
4126
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4127
- case "InternalServerError":
4128
- case "com.amazonaws.rekognition#InternalServerError":
4129
- throw await de_InternalServerErrorRes(parsedOutput, context);
4130
- case "InvalidParameterException":
4131
- case "com.amazonaws.rekognition#InvalidParameterException":
4132
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4133
- case "ProvisionedThroughputExceededException":
4134
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4135
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4136
- case "ResourceInUseException":
4137
- case "com.amazonaws.rekognition#ResourceInUseException":
4138
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
4139
- case "ResourceNotFoundException":
4140
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4141
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4142
- case "ThrottlingException":
4143
- case "com.amazonaws.rekognition#ThrottlingException":
4144
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4145
- default:
4146
- const parsedBody = parsedOutput.body;
4147
- return throwDefaultError({
4148
- output,
4149
- parsedBody,
4150
- errorCode,
4151
- });
1367
+ export const de_StopStreamProcessorCommand = async (output, context) => {
1368
+ if (output.statusCode >= 300) {
1369
+ return de_CommandError(output, context);
4152
1370
  }
1371
+ const data = await parseBody(output.body, context);
1372
+ let contents = {};
1373
+ contents = _json(data);
1374
+ const response = {
1375
+ $metadata: deserializeMetadata(output),
1376
+ ...contents,
1377
+ };
1378
+ return response;
4153
1379
  };
4154
1380
  export const de_TagResourceCommand = async (output, context) => {
4155
1381
  if (output.statusCode >= 300) {
4156
- return de_TagResourceCommandError(output, context);
1382
+ return de_CommandError(output, context);
4157
1383
  }
4158
1384
  const data = await parseBody(output.body, context);
4159
1385
  let contents = {};
@@ -4164,46 +1390,9 @@ export const de_TagResourceCommand = async (output, context) => {
4164
1390
  };
4165
1391
  return response;
4166
1392
  };
4167
- const de_TagResourceCommandError = async (output, context) => {
4168
- const parsedOutput = {
4169
- ...output,
4170
- body: await parseErrorBody(output.body, context),
4171
- };
4172
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4173
- switch (errorCode) {
4174
- case "AccessDeniedException":
4175
- case "com.amazonaws.rekognition#AccessDeniedException":
4176
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4177
- case "InternalServerError":
4178
- case "com.amazonaws.rekognition#InternalServerError":
4179
- throw await de_InternalServerErrorRes(parsedOutput, context);
4180
- case "InvalidParameterException":
4181
- case "com.amazonaws.rekognition#InvalidParameterException":
4182
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4183
- case "ProvisionedThroughputExceededException":
4184
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4185
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4186
- case "ResourceNotFoundException":
4187
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4188
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4189
- case "ServiceQuotaExceededException":
4190
- case "com.amazonaws.rekognition#ServiceQuotaExceededException":
4191
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4192
- case "ThrottlingException":
4193
- case "com.amazonaws.rekognition#ThrottlingException":
4194
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4195
- default:
4196
- const parsedBody = parsedOutput.body;
4197
- return throwDefaultError({
4198
- output,
4199
- parsedBody,
4200
- errorCode,
4201
- });
4202
- }
4203
- };
4204
1393
  export const de_UntagResourceCommand = async (output, context) => {
4205
1394
  if (output.statusCode >= 300) {
4206
- return de_UntagResourceCommandError(output, context);
1395
+ return de_CommandError(output, context);
4207
1396
  }
4208
1397
  const data = await parseBody(output.body, context);
4209
1398
  let contents = {};
@@ -4214,43 +1403,9 @@ export const de_UntagResourceCommand = async (output, context) => {
4214
1403
  };
4215
1404
  return response;
4216
1405
  };
4217
- const de_UntagResourceCommandError = async (output, context) => {
4218
- const parsedOutput = {
4219
- ...output,
4220
- body: await parseErrorBody(output.body, context),
4221
- };
4222
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4223
- switch (errorCode) {
4224
- case "AccessDeniedException":
4225
- case "com.amazonaws.rekognition#AccessDeniedException":
4226
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4227
- case "InternalServerError":
4228
- case "com.amazonaws.rekognition#InternalServerError":
4229
- throw await de_InternalServerErrorRes(parsedOutput, context);
4230
- case "InvalidParameterException":
4231
- case "com.amazonaws.rekognition#InvalidParameterException":
4232
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4233
- case "ProvisionedThroughputExceededException":
4234
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4235
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4236
- case "ResourceNotFoundException":
4237
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4238
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4239
- case "ThrottlingException":
4240
- case "com.amazonaws.rekognition#ThrottlingException":
4241
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4242
- default:
4243
- const parsedBody = parsedOutput.body;
4244
- return throwDefaultError({
4245
- output,
4246
- parsedBody,
4247
- errorCode,
4248
- });
4249
- }
4250
- };
4251
1406
  export const de_UpdateDatasetEntriesCommand = async (output, context) => {
4252
1407
  if (output.statusCode >= 300) {
4253
- return de_UpdateDatasetEntriesCommandError(output, context);
1408
+ return de_CommandError(output, context);
4254
1409
  }
4255
1410
  const data = await parseBody(output.body, context);
4256
1411
  let contents = {};
@@ -4261,49 +1416,9 @@ export const de_UpdateDatasetEntriesCommand = async (output, context) => {
4261
1416
  };
4262
1417
  return response;
4263
1418
  };
4264
- const de_UpdateDatasetEntriesCommandError = async (output, context) => {
4265
- const parsedOutput = {
4266
- ...output,
4267
- body: await parseErrorBody(output.body, context),
4268
- };
4269
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4270
- switch (errorCode) {
4271
- case "AccessDeniedException":
4272
- case "com.amazonaws.rekognition#AccessDeniedException":
4273
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
4274
- case "InternalServerError":
4275
- case "com.amazonaws.rekognition#InternalServerError":
4276
- throw await de_InternalServerErrorRes(parsedOutput, context);
4277
- case "InvalidParameterException":
4278
- case "com.amazonaws.rekognition#InvalidParameterException":
4279
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
4280
- case "LimitExceededException":
4281
- case "com.amazonaws.rekognition#LimitExceededException":
4282
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
4283
- case "ProvisionedThroughputExceededException":
4284
- case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4285
- throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4286
- case "ResourceInUseException":
4287
- case "com.amazonaws.rekognition#ResourceInUseException":
4288
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
4289
- case "ResourceNotFoundException":
4290
- case "com.amazonaws.rekognition#ResourceNotFoundException":
4291
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
4292
- case "ThrottlingException":
4293
- case "com.amazonaws.rekognition#ThrottlingException":
4294
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
4295
- default:
4296
- const parsedBody = parsedOutput.body;
4297
- return throwDefaultError({
4298
- output,
4299
- parsedBody,
4300
- errorCode,
4301
- });
4302
- }
4303
- };
4304
1419
  export const de_UpdateStreamProcessorCommand = async (output, context) => {
4305
1420
  if (output.statusCode >= 300) {
4306
- return de_UpdateStreamProcessorCommandError(output, context);
1421
+ return de_CommandError(output, context);
4307
1422
  }
4308
1423
  const data = await parseBody(output.body, context);
4309
1424
  let contents = {};
@@ -4314,7 +1429,7 @@ export const de_UpdateStreamProcessorCommand = async (output, context) => {
4314
1429
  };
4315
1430
  return response;
4316
1431
  };
4317
- const de_UpdateStreamProcessorCommandError = async (output, context) => {
1432
+ const de_CommandError = async (output, context) => {
4318
1433
  const parsedOutput = {
4319
1434
  ...output,
4320
1435
  body: await parseErrorBody(output.body, context),
@@ -4324,6 +1439,12 @@ const de_UpdateStreamProcessorCommandError = async (output, context) => {
4324
1439
  case "AccessDeniedException":
4325
1440
  case "com.amazonaws.rekognition#AccessDeniedException":
4326
1441
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1442
+ case "ConflictException":
1443
+ case "com.amazonaws.rekognition#ConflictException":
1444
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1445
+ case "IdempotentParameterMismatchException":
1446
+ case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
1447
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
4327
1448
  case "InternalServerError":
4328
1449
  case "com.amazonaws.rekognition#InternalServerError":
4329
1450
  throw await de_InternalServerErrorRes(parsedOutput, context);
@@ -4333,15 +1454,57 @@ const de_UpdateStreamProcessorCommandError = async (output, context) => {
4333
1454
  case "ProvisionedThroughputExceededException":
4334
1455
  case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4335
1456
  throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4336
- case "ResourceInUseException":
4337
- case "com.amazonaws.rekognition#ResourceInUseException":
4338
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
4339
1457
  case "ResourceNotFoundException":
4340
1458
  case "com.amazonaws.rekognition#ResourceNotFoundException":
4341
1459
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1460
+ case "ServiceQuotaExceededException":
1461
+ case "com.amazonaws.rekognition#ServiceQuotaExceededException":
1462
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
4342
1463
  case "ThrottlingException":
4343
1464
  case "com.amazonaws.rekognition#ThrottlingException":
4344
1465
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1466
+ case "ImageTooLargeException":
1467
+ case "com.amazonaws.rekognition#ImageTooLargeException":
1468
+ throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
1469
+ case "InvalidImageFormatException":
1470
+ case "com.amazonaws.rekognition#InvalidImageFormatException":
1471
+ throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
1472
+ case "InvalidS3ObjectException":
1473
+ case "com.amazonaws.rekognition#InvalidS3ObjectException":
1474
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
1475
+ case "LimitExceededException":
1476
+ case "com.amazonaws.rekognition#LimitExceededException":
1477
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1478
+ case "ResourceInUseException":
1479
+ case "com.amazonaws.rekognition#ResourceInUseException":
1480
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1481
+ case "ResourceAlreadyExistsException":
1482
+ case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
1483
+ throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
1484
+ case "InvalidPolicyRevisionIdException":
1485
+ case "com.amazonaws.rekognition#InvalidPolicyRevisionIdException":
1486
+ throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context);
1487
+ case "InvalidPaginationTokenException":
1488
+ case "com.amazonaws.rekognition#InvalidPaginationTokenException":
1489
+ throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
1490
+ case "ResourceNotReadyException":
1491
+ case "com.amazonaws.rekognition#ResourceNotReadyException":
1492
+ throw await de_ResourceNotReadyExceptionRes(parsedOutput, context);
1493
+ case "HumanLoopQuotaExceededException":
1494
+ case "com.amazonaws.rekognition#HumanLoopQuotaExceededException":
1495
+ throw await de_HumanLoopQuotaExceededExceptionRes(parsedOutput, context);
1496
+ case "SessionNotFoundException":
1497
+ case "com.amazonaws.rekognition#SessionNotFoundException":
1498
+ throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
1499
+ case "MalformedPolicyDocumentException":
1500
+ case "com.amazonaws.rekognition#MalformedPolicyDocumentException":
1501
+ throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
1502
+ case "VideoTooLargeException":
1503
+ case "com.amazonaws.rekognition#VideoTooLargeException":
1504
+ throw await de_VideoTooLargeExceptionRes(parsedOutput, context);
1505
+ case "InvalidManifestException":
1506
+ case "com.amazonaws.rekognition#InvalidManifestException":
1507
+ throw await de_InvalidManifestExceptionRes(parsedOutput, context);
4345
1508
  default:
4346
1509
  const parsedBody = parsedOutput.body;
4347
1510
  return throwDefaultError({