@aws-sdk/client-wisdom 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.
- package/dist-cjs/index.js +73 -1085
- package/dist-es/protocols/Aws_restJson1.js +89 -1101
- package/package.json +3 -3
|
@@ -574,7 +574,7 @@ export const se_UpdateQuickResponseCommand = async (input, context) => {
|
|
|
574
574
|
};
|
|
575
575
|
export const de_CreateAssistantCommand = async (output, context) => {
|
|
576
576
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
577
|
-
return
|
|
577
|
+
return de_CommandError(output, context);
|
|
578
578
|
}
|
|
579
579
|
const contents = map({
|
|
580
580
|
$metadata: deserializeMetadata(output),
|
|
@@ -586,37 +586,9 @@ export const de_CreateAssistantCommand = async (output, context) => {
|
|
|
586
586
|
Object.assign(contents, doc);
|
|
587
587
|
return contents;
|
|
588
588
|
};
|
|
589
|
-
const de_CreateAssistantCommandError = async (output, context) => {
|
|
590
|
-
const parsedOutput = {
|
|
591
|
-
...output,
|
|
592
|
-
body: await parseErrorBody(output.body, context),
|
|
593
|
-
};
|
|
594
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
595
|
-
switch (errorCode) {
|
|
596
|
-
case "AccessDeniedException":
|
|
597
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
598
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
599
|
-
case "ConflictException":
|
|
600
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
601
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
602
|
-
case "ServiceQuotaExceededException":
|
|
603
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
604
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
605
|
-
case "ValidationException":
|
|
606
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
607
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
608
|
-
default:
|
|
609
|
-
const parsedBody = parsedOutput.body;
|
|
610
|
-
return throwDefaultError({
|
|
611
|
-
output,
|
|
612
|
-
parsedBody,
|
|
613
|
-
errorCode,
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
};
|
|
617
589
|
export const de_CreateAssistantAssociationCommand = async (output, context) => {
|
|
618
590
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
619
|
-
return
|
|
591
|
+
return de_CommandError(output, context);
|
|
620
592
|
}
|
|
621
593
|
const contents = map({
|
|
622
594
|
$metadata: deserializeMetadata(output),
|
|
@@ -628,40 +600,9 @@ export const de_CreateAssistantAssociationCommand = async (output, context) => {
|
|
|
628
600
|
Object.assign(contents, doc);
|
|
629
601
|
return contents;
|
|
630
602
|
};
|
|
631
|
-
const de_CreateAssistantAssociationCommandError = async (output, context) => {
|
|
632
|
-
const parsedOutput = {
|
|
633
|
-
...output,
|
|
634
|
-
body: await parseErrorBody(output.body, context),
|
|
635
|
-
};
|
|
636
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
637
|
-
switch (errorCode) {
|
|
638
|
-
case "AccessDeniedException":
|
|
639
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
640
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
641
|
-
case "ConflictException":
|
|
642
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
643
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
644
|
-
case "ResourceNotFoundException":
|
|
645
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
646
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
647
|
-
case "ServiceQuotaExceededException":
|
|
648
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
649
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
650
|
-
case "ValidationException":
|
|
651
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
652
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
653
|
-
default:
|
|
654
|
-
const parsedBody = parsedOutput.body;
|
|
655
|
-
return throwDefaultError({
|
|
656
|
-
output,
|
|
657
|
-
parsedBody,
|
|
658
|
-
errorCode,
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
603
|
export const de_CreateContentCommand = async (output, context) => {
|
|
663
604
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
664
|
-
return
|
|
605
|
+
return de_CommandError(output, context);
|
|
665
606
|
}
|
|
666
607
|
const contents = map({
|
|
667
608
|
$metadata: deserializeMetadata(output),
|
|
@@ -673,40 +614,9 @@ export const de_CreateContentCommand = async (output, context) => {
|
|
|
673
614
|
Object.assign(contents, doc);
|
|
674
615
|
return contents;
|
|
675
616
|
};
|
|
676
|
-
const de_CreateContentCommandError = async (output, context) => {
|
|
677
|
-
const parsedOutput = {
|
|
678
|
-
...output,
|
|
679
|
-
body: await parseErrorBody(output.body, context),
|
|
680
|
-
};
|
|
681
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
682
|
-
switch (errorCode) {
|
|
683
|
-
case "AccessDeniedException":
|
|
684
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
685
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
686
|
-
case "ConflictException":
|
|
687
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
688
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
689
|
-
case "ResourceNotFoundException":
|
|
690
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
691
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
692
|
-
case "ServiceQuotaExceededException":
|
|
693
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
694
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
695
|
-
case "ValidationException":
|
|
696
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
697
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
698
|
-
default:
|
|
699
|
-
const parsedBody = parsedOutput.body;
|
|
700
|
-
return throwDefaultError({
|
|
701
|
-
output,
|
|
702
|
-
parsedBody,
|
|
703
|
-
errorCode,
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
};
|
|
707
617
|
export const de_CreateKnowledgeBaseCommand = async (output, context) => {
|
|
708
618
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
709
|
-
return
|
|
619
|
+
return de_CommandError(output, context);
|
|
710
620
|
}
|
|
711
621
|
const contents = map({
|
|
712
622
|
$metadata: deserializeMetadata(output),
|
|
@@ -718,37 +628,9 @@ export const de_CreateKnowledgeBaseCommand = async (output, context) => {
|
|
|
718
628
|
Object.assign(contents, doc);
|
|
719
629
|
return contents;
|
|
720
630
|
};
|
|
721
|
-
const de_CreateKnowledgeBaseCommandError = async (output, context) => {
|
|
722
|
-
const parsedOutput = {
|
|
723
|
-
...output,
|
|
724
|
-
body: await parseErrorBody(output.body, context),
|
|
725
|
-
};
|
|
726
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
727
|
-
switch (errorCode) {
|
|
728
|
-
case "AccessDeniedException":
|
|
729
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
730
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
731
|
-
case "ConflictException":
|
|
732
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
733
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
734
|
-
case "ServiceQuotaExceededException":
|
|
735
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
736
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
737
|
-
case "ValidationException":
|
|
738
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
739
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
740
|
-
default:
|
|
741
|
-
const parsedBody = parsedOutput.body;
|
|
742
|
-
return throwDefaultError({
|
|
743
|
-
output,
|
|
744
|
-
parsedBody,
|
|
745
|
-
errorCode,
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
};
|
|
749
631
|
export const de_CreateQuickResponseCommand = async (output, context) => {
|
|
750
632
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
751
|
-
return
|
|
633
|
+
return de_CommandError(output, context);
|
|
752
634
|
}
|
|
753
635
|
const contents = map({
|
|
754
636
|
$metadata: deserializeMetadata(output),
|
|
@@ -760,40 +642,9 @@ export const de_CreateQuickResponseCommand = async (output, context) => {
|
|
|
760
642
|
Object.assign(contents, doc);
|
|
761
643
|
return contents;
|
|
762
644
|
};
|
|
763
|
-
const de_CreateQuickResponseCommandError = async (output, context) => {
|
|
764
|
-
const parsedOutput = {
|
|
765
|
-
...output,
|
|
766
|
-
body: await parseErrorBody(output.body, context),
|
|
767
|
-
};
|
|
768
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
769
|
-
switch (errorCode) {
|
|
770
|
-
case "AccessDeniedException":
|
|
771
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
772
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
773
|
-
case "ConflictException":
|
|
774
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
775
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
776
|
-
case "ResourceNotFoundException":
|
|
777
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
778
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
779
|
-
case "ServiceQuotaExceededException":
|
|
780
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
781
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
782
|
-
case "ValidationException":
|
|
783
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
784
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
785
|
-
default:
|
|
786
|
-
const parsedBody = parsedOutput.body;
|
|
787
|
-
return throwDefaultError({
|
|
788
|
-
output,
|
|
789
|
-
parsedBody,
|
|
790
|
-
errorCode,
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
};
|
|
794
645
|
export const de_CreateSessionCommand = async (output, context) => {
|
|
795
646
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
796
|
-
return
|
|
647
|
+
return de_CommandError(output, context);
|
|
797
648
|
}
|
|
798
649
|
const contents = map({
|
|
799
650
|
$metadata: deserializeMetadata(output),
|
|
@@ -805,34 +656,9 @@ export const de_CreateSessionCommand = async (output, context) => {
|
|
|
805
656
|
Object.assign(contents, doc);
|
|
806
657
|
return contents;
|
|
807
658
|
};
|
|
808
|
-
const de_CreateSessionCommandError = async (output, context) => {
|
|
809
|
-
const parsedOutput = {
|
|
810
|
-
...output,
|
|
811
|
-
body: await parseErrorBody(output.body, context),
|
|
812
|
-
};
|
|
813
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
814
|
-
switch (errorCode) {
|
|
815
|
-
case "ConflictException":
|
|
816
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
817
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
818
|
-
case "ResourceNotFoundException":
|
|
819
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
820
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
821
|
-
case "ValidationException":
|
|
822
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
823
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
824
|
-
default:
|
|
825
|
-
const parsedBody = parsedOutput.body;
|
|
826
|
-
return throwDefaultError({
|
|
827
|
-
output,
|
|
828
|
-
parsedBody,
|
|
829
|
-
errorCode,
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
659
|
export const de_DeleteAssistantCommand = async (output, context) => {
|
|
834
660
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
835
|
-
return
|
|
661
|
+
return de_CommandError(output, context);
|
|
836
662
|
}
|
|
837
663
|
const contents = map({
|
|
838
664
|
$metadata: deserializeMetadata(output),
|
|
@@ -840,34 +666,9 @@ export const de_DeleteAssistantCommand = async (output, context) => {
|
|
|
840
666
|
await collectBody(output.body, context);
|
|
841
667
|
return contents;
|
|
842
668
|
};
|
|
843
|
-
const de_DeleteAssistantCommandError = async (output, context) => {
|
|
844
|
-
const parsedOutput = {
|
|
845
|
-
...output,
|
|
846
|
-
body: await parseErrorBody(output.body, context),
|
|
847
|
-
};
|
|
848
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
849
|
-
switch (errorCode) {
|
|
850
|
-
case "AccessDeniedException":
|
|
851
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
852
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
853
|
-
case "ResourceNotFoundException":
|
|
854
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
855
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
856
|
-
case "ValidationException":
|
|
857
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
858
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
859
|
-
default:
|
|
860
|
-
const parsedBody = parsedOutput.body;
|
|
861
|
-
return throwDefaultError({
|
|
862
|
-
output,
|
|
863
|
-
parsedBody,
|
|
864
|
-
errorCode,
|
|
865
|
-
});
|
|
866
|
-
}
|
|
867
|
-
};
|
|
868
669
|
export const de_DeleteAssistantAssociationCommand = async (output, context) => {
|
|
869
670
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
870
|
-
return
|
|
671
|
+
return de_CommandError(output, context);
|
|
871
672
|
}
|
|
872
673
|
const contents = map({
|
|
873
674
|
$metadata: deserializeMetadata(output),
|
|
@@ -875,34 +676,9 @@ export const de_DeleteAssistantAssociationCommand = async (output, context) => {
|
|
|
875
676
|
await collectBody(output.body, context);
|
|
876
677
|
return contents;
|
|
877
678
|
};
|
|
878
|
-
const de_DeleteAssistantAssociationCommandError = async (output, context) => {
|
|
879
|
-
const parsedOutput = {
|
|
880
|
-
...output,
|
|
881
|
-
body: await parseErrorBody(output.body, context),
|
|
882
|
-
};
|
|
883
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
884
|
-
switch (errorCode) {
|
|
885
|
-
case "AccessDeniedException":
|
|
886
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
887
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
888
|
-
case "ResourceNotFoundException":
|
|
889
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
890
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
891
|
-
case "ValidationException":
|
|
892
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
893
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
894
|
-
default:
|
|
895
|
-
const parsedBody = parsedOutput.body;
|
|
896
|
-
return throwDefaultError({
|
|
897
|
-
output,
|
|
898
|
-
parsedBody,
|
|
899
|
-
errorCode,
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
};
|
|
903
679
|
export const de_DeleteContentCommand = async (output, context) => {
|
|
904
680
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
905
|
-
return
|
|
681
|
+
return de_CommandError(output, context);
|
|
906
682
|
}
|
|
907
683
|
const contents = map({
|
|
908
684
|
$metadata: deserializeMetadata(output),
|
|
@@ -910,34 +686,9 @@ export const de_DeleteContentCommand = async (output, context) => {
|
|
|
910
686
|
await collectBody(output.body, context);
|
|
911
687
|
return contents;
|
|
912
688
|
};
|
|
913
|
-
const de_DeleteContentCommandError = async (output, context) => {
|
|
914
|
-
const parsedOutput = {
|
|
915
|
-
...output,
|
|
916
|
-
body: await parseErrorBody(output.body, context),
|
|
917
|
-
};
|
|
918
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
919
|
-
switch (errorCode) {
|
|
920
|
-
case "AccessDeniedException":
|
|
921
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
922
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
923
|
-
case "ResourceNotFoundException":
|
|
924
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
925
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
926
|
-
case "ValidationException":
|
|
927
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
928
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
929
|
-
default:
|
|
930
|
-
const parsedBody = parsedOutput.body;
|
|
931
|
-
return throwDefaultError({
|
|
932
|
-
output,
|
|
933
|
-
parsedBody,
|
|
934
|
-
errorCode,
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
};
|
|
938
689
|
export const de_DeleteImportJobCommand = async (output, context) => {
|
|
939
690
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
940
|
-
return
|
|
691
|
+
return de_CommandError(output, context);
|
|
941
692
|
}
|
|
942
693
|
const contents = map({
|
|
943
694
|
$metadata: deserializeMetadata(output),
|
|
@@ -945,75 +696,19 @@ export const de_DeleteImportJobCommand = async (output, context) => {
|
|
|
945
696
|
await collectBody(output.body, context);
|
|
946
697
|
return contents;
|
|
947
698
|
};
|
|
948
|
-
const de_DeleteImportJobCommandError = async (output, context) => {
|
|
949
|
-
const parsedOutput = {
|
|
950
|
-
...output,
|
|
951
|
-
body: await parseErrorBody(output.body, context),
|
|
952
|
-
};
|
|
953
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
954
|
-
switch (errorCode) {
|
|
955
|
-
case "AccessDeniedException":
|
|
956
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
957
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
958
|
-
case "ConflictException":
|
|
959
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
960
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
961
|
-
case "ResourceNotFoundException":
|
|
962
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
963
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
964
|
-
case "ValidationException":
|
|
965
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
966
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
967
|
-
default:
|
|
968
|
-
const parsedBody = parsedOutput.body;
|
|
969
|
-
return throwDefaultError({
|
|
970
|
-
output,
|
|
971
|
-
parsedBody,
|
|
972
|
-
errorCode,
|
|
973
|
-
});
|
|
974
|
-
}
|
|
975
|
-
};
|
|
976
699
|
export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
977
700
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
978
|
-
return
|
|
701
|
+
return de_CommandError(output, context);
|
|
979
702
|
}
|
|
980
703
|
const contents = map({
|
|
981
|
-
$metadata: deserializeMetadata(output),
|
|
982
|
-
});
|
|
983
|
-
await collectBody(output.body, context);
|
|
984
|
-
return contents;
|
|
985
|
-
};
|
|
986
|
-
const de_DeleteKnowledgeBaseCommandError = async (output, context) => {
|
|
987
|
-
const parsedOutput = {
|
|
988
|
-
...output,
|
|
989
|
-
body: await parseErrorBody(output.body, context),
|
|
990
|
-
};
|
|
991
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
992
|
-
switch (errorCode) {
|
|
993
|
-
case "AccessDeniedException":
|
|
994
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
995
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
996
|
-
case "ConflictException":
|
|
997
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
998
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
999
|
-
case "ResourceNotFoundException":
|
|
1000
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1001
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1002
|
-
case "ValidationException":
|
|
1003
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1004
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1005
|
-
default:
|
|
1006
|
-
const parsedBody = parsedOutput.body;
|
|
1007
|
-
return throwDefaultError({
|
|
1008
|
-
output,
|
|
1009
|
-
parsedBody,
|
|
1010
|
-
errorCode,
|
|
1011
|
-
});
|
|
1012
|
-
}
|
|
704
|
+
$metadata: deserializeMetadata(output),
|
|
705
|
+
});
|
|
706
|
+
await collectBody(output.body, context);
|
|
707
|
+
return contents;
|
|
1013
708
|
};
|
|
1014
709
|
export const de_DeleteQuickResponseCommand = async (output, context) => {
|
|
1015
710
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1016
|
-
return
|
|
711
|
+
return de_CommandError(output, context);
|
|
1017
712
|
}
|
|
1018
713
|
const contents = map({
|
|
1019
714
|
$metadata: deserializeMetadata(output),
|
|
@@ -1021,34 +716,9 @@ export const de_DeleteQuickResponseCommand = async (output, context) => {
|
|
|
1021
716
|
await collectBody(output.body, context);
|
|
1022
717
|
return contents;
|
|
1023
718
|
};
|
|
1024
|
-
const de_DeleteQuickResponseCommandError = async (output, context) => {
|
|
1025
|
-
const parsedOutput = {
|
|
1026
|
-
...output,
|
|
1027
|
-
body: await parseErrorBody(output.body, context),
|
|
1028
|
-
};
|
|
1029
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1030
|
-
switch (errorCode) {
|
|
1031
|
-
case "AccessDeniedException":
|
|
1032
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1033
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1034
|
-
case "ResourceNotFoundException":
|
|
1035
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1036
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1037
|
-
case "ValidationException":
|
|
1038
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1039
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1040
|
-
default:
|
|
1041
|
-
const parsedBody = parsedOutput.body;
|
|
1042
|
-
return throwDefaultError({
|
|
1043
|
-
output,
|
|
1044
|
-
parsedBody,
|
|
1045
|
-
errorCode,
|
|
1046
|
-
});
|
|
1047
|
-
}
|
|
1048
|
-
};
|
|
1049
719
|
export const de_GetAssistantCommand = async (output, context) => {
|
|
1050
720
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1051
|
-
return
|
|
721
|
+
return de_CommandError(output, context);
|
|
1052
722
|
}
|
|
1053
723
|
const contents = map({
|
|
1054
724
|
$metadata: deserializeMetadata(output),
|
|
@@ -1060,34 +730,9 @@ export const de_GetAssistantCommand = async (output, context) => {
|
|
|
1060
730
|
Object.assign(contents, doc);
|
|
1061
731
|
return contents;
|
|
1062
732
|
};
|
|
1063
|
-
const de_GetAssistantCommandError = async (output, context) => {
|
|
1064
|
-
const parsedOutput = {
|
|
1065
|
-
...output,
|
|
1066
|
-
body: await parseErrorBody(output.body, context),
|
|
1067
|
-
};
|
|
1068
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1069
|
-
switch (errorCode) {
|
|
1070
|
-
case "AccessDeniedException":
|
|
1071
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1072
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1073
|
-
case "ResourceNotFoundException":
|
|
1074
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1075
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1076
|
-
case "ValidationException":
|
|
1077
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1078
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1079
|
-
default:
|
|
1080
|
-
const parsedBody = parsedOutput.body;
|
|
1081
|
-
return throwDefaultError({
|
|
1082
|
-
output,
|
|
1083
|
-
parsedBody,
|
|
1084
|
-
errorCode,
|
|
1085
|
-
});
|
|
1086
|
-
}
|
|
1087
|
-
};
|
|
1088
733
|
export const de_GetAssistantAssociationCommand = async (output, context) => {
|
|
1089
734
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1090
|
-
return
|
|
735
|
+
return de_CommandError(output, context);
|
|
1091
736
|
}
|
|
1092
737
|
const contents = map({
|
|
1093
738
|
$metadata: deserializeMetadata(output),
|
|
@@ -1099,34 +744,9 @@ export const de_GetAssistantAssociationCommand = async (output, context) => {
|
|
|
1099
744
|
Object.assign(contents, doc);
|
|
1100
745
|
return contents;
|
|
1101
746
|
};
|
|
1102
|
-
const de_GetAssistantAssociationCommandError = async (output, context) => {
|
|
1103
|
-
const parsedOutput = {
|
|
1104
|
-
...output,
|
|
1105
|
-
body: await parseErrorBody(output.body, context),
|
|
1106
|
-
};
|
|
1107
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1108
|
-
switch (errorCode) {
|
|
1109
|
-
case "AccessDeniedException":
|
|
1110
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1111
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1112
|
-
case "ResourceNotFoundException":
|
|
1113
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1114
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1115
|
-
case "ValidationException":
|
|
1116
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1117
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1118
|
-
default:
|
|
1119
|
-
const parsedBody = parsedOutput.body;
|
|
1120
|
-
return throwDefaultError({
|
|
1121
|
-
output,
|
|
1122
|
-
parsedBody,
|
|
1123
|
-
errorCode,
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
};
|
|
1127
747
|
export const de_GetContentCommand = async (output, context) => {
|
|
1128
748
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1129
|
-
return
|
|
749
|
+
return de_CommandError(output, context);
|
|
1130
750
|
}
|
|
1131
751
|
const contents = map({
|
|
1132
752
|
$metadata: deserializeMetadata(output),
|
|
@@ -1138,34 +758,9 @@ export const de_GetContentCommand = async (output, context) => {
|
|
|
1138
758
|
Object.assign(contents, doc);
|
|
1139
759
|
return contents;
|
|
1140
760
|
};
|
|
1141
|
-
const de_GetContentCommandError = async (output, context) => {
|
|
1142
|
-
const parsedOutput = {
|
|
1143
|
-
...output,
|
|
1144
|
-
body: await parseErrorBody(output.body, context),
|
|
1145
|
-
};
|
|
1146
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1147
|
-
switch (errorCode) {
|
|
1148
|
-
case "AccessDeniedException":
|
|
1149
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1150
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1151
|
-
case "ResourceNotFoundException":
|
|
1152
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1153
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1154
|
-
case "ValidationException":
|
|
1155
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1156
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1157
|
-
default:
|
|
1158
|
-
const parsedBody = parsedOutput.body;
|
|
1159
|
-
return throwDefaultError({
|
|
1160
|
-
output,
|
|
1161
|
-
parsedBody,
|
|
1162
|
-
errorCode,
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1165
|
-
};
|
|
1166
761
|
export const de_GetContentSummaryCommand = async (output, context) => {
|
|
1167
762
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1168
|
-
return
|
|
763
|
+
return de_CommandError(output, context);
|
|
1169
764
|
}
|
|
1170
765
|
const contents = map({
|
|
1171
766
|
$metadata: deserializeMetadata(output),
|
|
@@ -1177,34 +772,9 @@ export const de_GetContentSummaryCommand = async (output, context) => {
|
|
|
1177
772
|
Object.assign(contents, doc);
|
|
1178
773
|
return contents;
|
|
1179
774
|
};
|
|
1180
|
-
const de_GetContentSummaryCommandError = async (output, context) => {
|
|
1181
|
-
const parsedOutput = {
|
|
1182
|
-
...output,
|
|
1183
|
-
body: await parseErrorBody(output.body, context),
|
|
1184
|
-
};
|
|
1185
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1186
|
-
switch (errorCode) {
|
|
1187
|
-
case "AccessDeniedException":
|
|
1188
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1189
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1190
|
-
case "ResourceNotFoundException":
|
|
1191
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1192
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1193
|
-
case "ValidationException":
|
|
1194
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1195
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1196
|
-
default:
|
|
1197
|
-
const parsedBody = parsedOutput.body;
|
|
1198
|
-
return throwDefaultError({
|
|
1199
|
-
output,
|
|
1200
|
-
parsedBody,
|
|
1201
|
-
errorCode,
|
|
1202
|
-
});
|
|
1203
|
-
}
|
|
1204
|
-
};
|
|
1205
775
|
export const de_GetImportJobCommand = async (output, context) => {
|
|
1206
776
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1207
|
-
return
|
|
777
|
+
return de_CommandError(output, context);
|
|
1208
778
|
}
|
|
1209
779
|
const contents = map({
|
|
1210
780
|
$metadata: deserializeMetadata(output),
|
|
@@ -1216,34 +786,9 @@ export const de_GetImportJobCommand = async (output, context) => {
|
|
|
1216
786
|
Object.assign(contents, doc);
|
|
1217
787
|
return contents;
|
|
1218
788
|
};
|
|
1219
|
-
const de_GetImportJobCommandError = async (output, context) => {
|
|
1220
|
-
const parsedOutput = {
|
|
1221
|
-
...output,
|
|
1222
|
-
body: await parseErrorBody(output.body, context),
|
|
1223
|
-
};
|
|
1224
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1225
|
-
switch (errorCode) {
|
|
1226
|
-
case "AccessDeniedException":
|
|
1227
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1228
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1229
|
-
case "ResourceNotFoundException":
|
|
1230
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1231
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1232
|
-
case "ValidationException":
|
|
1233
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1234
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1235
|
-
default:
|
|
1236
|
-
const parsedBody = parsedOutput.body;
|
|
1237
|
-
return throwDefaultError({
|
|
1238
|
-
output,
|
|
1239
|
-
parsedBody,
|
|
1240
|
-
errorCode,
|
|
1241
|
-
});
|
|
1242
|
-
}
|
|
1243
|
-
};
|
|
1244
789
|
export const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
1245
790
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1246
|
-
return
|
|
791
|
+
return de_CommandError(output, context);
|
|
1247
792
|
}
|
|
1248
793
|
const contents = map({
|
|
1249
794
|
$metadata: deserializeMetadata(output),
|
|
@@ -1255,34 +800,9 @@ export const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
|
1255
800
|
Object.assign(contents, doc);
|
|
1256
801
|
return contents;
|
|
1257
802
|
};
|
|
1258
|
-
const de_GetKnowledgeBaseCommandError = async (output, context) => {
|
|
1259
|
-
const parsedOutput = {
|
|
1260
|
-
...output,
|
|
1261
|
-
body: await parseErrorBody(output.body, context),
|
|
1262
|
-
};
|
|
1263
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1264
|
-
switch (errorCode) {
|
|
1265
|
-
case "AccessDeniedException":
|
|
1266
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1267
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1268
|
-
case "ResourceNotFoundException":
|
|
1269
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1270
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1271
|
-
case "ValidationException":
|
|
1272
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1273
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1274
|
-
default:
|
|
1275
|
-
const parsedBody = parsedOutput.body;
|
|
1276
|
-
return throwDefaultError({
|
|
1277
|
-
output,
|
|
1278
|
-
parsedBody,
|
|
1279
|
-
errorCode,
|
|
1280
|
-
});
|
|
1281
|
-
}
|
|
1282
|
-
};
|
|
1283
803
|
export const de_GetQuickResponseCommand = async (output, context) => {
|
|
1284
804
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1285
|
-
return
|
|
805
|
+
return de_CommandError(output, context);
|
|
1286
806
|
}
|
|
1287
807
|
const contents = map({
|
|
1288
808
|
$metadata: deserializeMetadata(output),
|
|
@@ -1294,34 +814,9 @@ export const de_GetQuickResponseCommand = async (output, context) => {
|
|
|
1294
814
|
Object.assign(contents, doc);
|
|
1295
815
|
return contents;
|
|
1296
816
|
};
|
|
1297
|
-
const de_GetQuickResponseCommandError = 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.wisdom#AccessDeniedException":
|
|
1306
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1307
|
-
case "ResourceNotFoundException":
|
|
1308
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1309
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1310
|
-
case "ValidationException":
|
|
1311
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1312
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1313
|
-
default:
|
|
1314
|
-
const parsedBody = parsedOutput.body;
|
|
1315
|
-
return throwDefaultError({
|
|
1316
|
-
output,
|
|
1317
|
-
parsedBody,
|
|
1318
|
-
errorCode,
|
|
1319
|
-
});
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
817
|
export const de_GetRecommendationsCommand = async (output, context) => {
|
|
1323
818
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1324
|
-
return
|
|
819
|
+
return de_CommandError(output, context);
|
|
1325
820
|
}
|
|
1326
821
|
const contents = map({
|
|
1327
822
|
$metadata: deserializeMetadata(output),
|
|
@@ -1333,74 +828,24 @@ export const de_GetRecommendationsCommand = async (output, context) => {
|
|
|
1333
828
|
});
|
|
1334
829
|
Object.assign(contents, doc);
|
|
1335
830
|
return contents;
|
|
1336
|
-
};
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
body: await parseErrorBody(output.body, context),
|
|
1341
|
-
};
|
|
1342
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1343
|
-
switch (errorCode) {
|
|
1344
|
-
case "AccessDeniedException":
|
|
1345
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1346
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1347
|
-
case "ResourceNotFoundException":
|
|
1348
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1349
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1350
|
-
case "ValidationException":
|
|
1351
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1352
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1353
|
-
default:
|
|
1354
|
-
const parsedBody = parsedOutput.body;
|
|
1355
|
-
return throwDefaultError({
|
|
1356
|
-
output,
|
|
1357
|
-
parsedBody,
|
|
1358
|
-
errorCode,
|
|
1359
|
-
});
|
|
1360
|
-
}
|
|
1361
|
-
};
|
|
1362
|
-
export const de_GetSessionCommand = async (output, context) => {
|
|
1363
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1364
|
-
return de_GetSessionCommandError(output, context);
|
|
1365
|
-
}
|
|
1366
|
-
const contents = map({
|
|
1367
|
-
$metadata: deserializeMetadata(output),
|
|
1368
|
-
});
|
|
1369
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1370
|
-
const doc = take(data, {
|
|
1371
|
-
session: _json,
|
|
1372
|
-
});
|
|
1373
|
-
Object.assign(contents, doc);
|
|
1374
|
-
return contents;
|
|
1375
|
-
};
|
|
1376
|
-
const de_GetSessionCommandError = async (output, context) => {
|
|
1377
|
-
const parsedOutput = {
|
|
1378
|
-
...output,
|
|
1379
|
-
body: await parseErrorBody(output.body, context),
|
|
1380
|
-
};
|
|
1381
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1382
|
-
switch (errorCode) {
|
|
1383
|
-
case "AccessDeniedException":
|
|
1384
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1385
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1386
|
-
case "ResourceNotFoundException":
|
|
1387
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1388
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1389
|
-
case "ValidationException":
|
|
1390
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1391
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1392
|
-
default:
|
|
1393
|
-
const parsedBody = parsedOutput.body;
|
|
1394
|
-
return throwDefaultError({
|
|
1395
|
-
output,
|
|
1396
|
-
parsedBody,
|
|
1397
|
-
errorCode,
|
|
1398
|
-
});
|
|
831
|
+
};
|
|
832
|
+
export const de_GetSessionCommand = async (output, context) => {
|
|
833
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
834
|
+
return de_CommandError(output, context);
|
|
1399
835
|
}
|
|
836
|
+
const contents = map({
|
|
837
|
+
$metadata: deserializeMetadata(output),
|
|
838
|
+
});
|
|
839
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
840
|
+
const doc = take(data, {
|
|
841
|
+
session: _json,
|
|
842
|
+
});
|
|
843
|
+
Object.assign(contents, doc);
|
|
844
|
+
return contents;
|
|
1400
845
|
};
|
|
1401
846
|
export const de_ListAssistantAssociationsCommand = async (output, context) => {
|
|
1402
847
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1403
|
-
return
|
|
848
|
+
return de_CommandError(output, context);
|
|
1404
849
|
}
|
|
1405
850
|
const contents = map({
|
|
1406
851
|
$metadata: deserializeMetadata(output),
|
|
@@ -1413,34 +858,9 @@ export const de_ListAssistantAssociationsCommand = async (output, context) => {
|
|
|
1413
858
|
Object.assign(contents, doc);
|
|
1414
859
|
return contents;
|
|
1415
860
|
};
|
|
1416
|
-
const de_ListAssistantAssociationsCommandError = async (output, context) => {
|
|
1417
|
-
const parsedOutput = {
|
|
1418
|
-
...output,
|
|
1419
|
-
body: await parseErrorBody(output.body, context),
|
|
1420
|
-
};
|
|
1421
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1422
|
-
switch (errorCode) {
|
|
1423
|
-
case "AccessDeniedException":
|
|
1424
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1425
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1426
|
-
case "ResourceNotFoundException":
|
|
1427
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1428
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1429
|
-
case "ValidationException":
|
|
1430
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1431
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1432
|
-
default:
|
|
1433
|
-
const parsedBody = parsedOutput.body;
|
|
1434
|
-
return throwDefaultError({
|
|
1435
|
-
output,
|
|
1436
|
-
parsedBody,
|
|
1437
|
-
errorCode,
|
|
1438
|
-
});
|
|
1439
|
-
}
|
|
1440
|
-
};
|
|
1441
861
|
export const de_ListAssistantsCommand = async (output, context) => {
|
|
1442
862
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1443
|
-
return
|
|
863
|
+
return de_CommandError(output, context);
|
|
1444
864
|
}
|
|
1445
865
|
const contents = map({
|
|
1446
866
|
$metadata: deserializeMetadata(output),
|
|
@@ -1453,31 +873,9 @@ export const de_ListAssistantsCommand = async (output, context) => {
|
|
|
1453
873
|
Object.assign(contents, doc);
|
|
1454
874
|
return contents;
|
|
1455
875
|
};
|
|
1456
|
-
const de_ListAssistantsCommandError = async (output, context) => {
|
|
1457
|
-
const parsedOutput = {
|
|
1458
|
-
...output,
|
|
1459
|
-
body: await parseErrorBody(output.body, context),
|
|
1460
|
-
};
|
|
1461
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1462
|
-
switch (errorCode) {
|
|
1463
|
-
case "AccessDeniedException":
|
|
1464
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1465
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1466
|
-
case "ValidationException":
|
|
1467
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1468
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1469
|
-
default:
|
|
1470
|
-
const parsedBody = parsedOutput.body;
|
|
1471
|
-
return throwDefaultError({
|
|
1472
|
-
output,
|
|
1473
|
-
parsedBody,
|
|
1474
|
-
errorCode,
|
|
1475
|
-
});
|
|
1476
|
-
}
|
|
1477
|
-
};
|
|
1478
876
|
export const de_ListContentsCommand = async (output, context) => {
|
|
1479
877
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1480
|
-
return
|
|
878
|
+
return de_CommandError(output, context);
|
|
1481
879
|
}
|
|
1482
880
|
const contents = map({
|
|
1483
881
|
$metadata: deserializeMetadata(output),
|
|
@@ -1490,34 +888,9 @@ export const de_ListContentsCommand = async (output, context) => {
|
|
|
1490
888
|
Object.assign(contents, doc);
|
|
1491
889
|
return contents;
|
|
1492
890
|
};
|
|
1493
|
-
const de_ListContentsCommandError = async (output, context) => {
|
|
1494
|
-
const parsedOutput = {
|
|
1495
|
-
...output,
|
|
1496
|
-
body: await parseErrorBody(output.body, context),
|
|
1497
|
-
};
|
|
1498
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1499
|
-
switch (errorCode) {
|
|
1500
|
-
case "AccessDeniedException":
|
|
1501
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1502
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1503
|
-
case "ResourceNotFoundException":
|
|
1504
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1505
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1506
|
-
case "ValidationException":
|
|
1507
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1508
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1509
|
-
default:
|
|
1510
|
-
const parsedBody = parsedOutput.body;
|
|
1511
|
-
return throwDefaultError({
|
|
1512
|
-
output,
|
|
1513
|
-
parsedBody,
|
|
1514
|
-
errorCode,
|
|
1515
|
-
});
|
|
1516
|
-
}
|
|
1517
|
-
};
|
|
1518
891
|
export const de_ListImportJobsCommand = async (output, context) => {
|
|
1519
892
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1520
|
-
return
|
|
893
|
+
return de_CommandError(output, context);
|
|
1521
894
|
}
|
|
1522
895
|
const contents = map({
|
|
1523
896
|
$metadata: deserializeMetadata(output),
|
|
@@ -1530,31 +903,9 @@ export const de_ListImportJobsCommand = async (output, context) => {
|
|
|
1530
903
|
Object.assign(contents, doc);
|
|
1531
904
|
return contents;
|
|
1532
905
|
};
|
|
1533
|
-
const de_ListImportJobsCommandError = async (output, context) => {
|
|
1534
|
-
const parsedOutput = {
|
|
1535
|
-
...output,
|
|
1536
|
-
body: await parseErrorBody(output.body, context),
|
|
1537
|
-
};
|
|
1538
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1539
|
-
switch (errorCode) {
|
|
1540
|
-
case "AccessDeniedException":
|
|
1541
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1542
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1543
|
-
case "ValidationException":
|
|
1544
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1545
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1546
|
-
default:
|
|
1547
|
-
const parsedBody = parsedOutput.body;
|
|
1548
|
-
return throwDefaultError({
|
|
1549
|
-
output,
|
|
1550
|
-
parsedBody,
|
|
1551
|
-
errorCode,
|
|
1552
|
-
});
|
|
1553
|
-
}
|
|
1554
|
-
};
|
|
1555
906
|
export const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
1556
907
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1557
|
-
return
|
|
908
|
+
return de_CommandError(output, context);
|
|
1558
909
|
}
|
|
1559
910
|
const contents = map({
|
|
1560
911
|
$metadata: deserializeMetadata(output),
|
|
@@ -1567,31 +918,9 @@ export const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
|
1567
918
|
Object.assign(contents, doc);
|
|
1568
919
|
return contents;
|
|
1569
920
|
};
|
|
1570
|
-
const de_ListKnowledgeBasesCommandError = async (output, context) => {
|
|
1571
|
-
const parsedOutput = {
|
|
1572
|
-
...output,
|
|
1573
|
-
body: await parseErrorBody(output.body, context),
|
|
1574
|
-
};
|
|
1575
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1576
|
-
switch (errorCode) {
|
|
1577
|
-
case "AccessDeniedException":
|
|
1578
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1579
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1580
|
-
case "ValidationException":
|
|
1581
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1582
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1583
|
-
default:
|
|
1584
|
-
const parsedBody = parsedOutput.body;
|
|
1585
|
-
return throwDefaultError({
|
|
1586
|
-
output,
|
|
1587
|
-
parsedBody,
|
|
1588
|
-
errorCode,
|
|
1589
|
-
});
|
|
1590
|
-
}
|
|
1591
|
-
};
|
|
1592
921
|
export const de_ListQuickResponsesCommand = async (output, context) => {
|
|
1593
922
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1594
|
-
return
|
|
923
|
+
return de_CommandError(output, context);
|
|
1595
924
|
}
|
|
1596
925
|
const contents = map({
|
|
1597
926
|
$metadata: deserializeMetadata(output),
|
|
@@ -1604,34 +933,9 @@ export const de_ListQuickResponsesCommand = async (output, context) => {
|
|
|
1604
933
|
Object.assign(contents, doc);
|
|
1605
934
|
return contents;
|
|
1606
935
|
};
|
|
1607
|
-
const de_ListQuickResponsesCommandError = async (output, context) => {
|
|
1608
|
-
const parsedOutput = {
|
|
1609
|
-
...output,
|
|
1610
|
-
body: await parseErrorBody(output.body, context),
|
|
1611
|
-
};
|
|
1612
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1613
|
-
switch (errorCode) {
|
|
1614
|
-
case "AccessDeniedException":
|
|
1615
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1616
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1617
|
-
case "ResourceNotFoundException":
|
|
1618
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1619
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1620
|
-
case "ValidationException":
|
|
1621
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1622
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1623
|
-
default:
|
|
1624
|
-
const parsedBody = parsedOutput.body;
|
|
1625
|
-
return throwDefaultError({
|
|
1626
|
-
output,
|
|
1627
|
-
parsedBody,
|
|
1628
|
-
errorCode,
|
|
1629
|
-
});
|
|
1630
|
-
}
|
|
1631
|
-
};
|
|
1632
936
|
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1633
937
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1634
|
-
return
|
|
938
|
+
return de_CommandError(output, context);
|
|
1635
939
|
}
|
|
1636
940
|
const contents = map({
|
|
1637
941
|
$metadata: deserializeMetadata(output),
|
|
@@ -1643,28 +947,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
1643
947
|
Object.assign(contents, doc);
|
|
1644
948
|
return contents;
|
|
1645
949
|
};
|
|
1646
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1647
|
-
const parsedOutput = {
|
|
1648
|
-
...output,
|
|
1649
|
-
body: await parseErrorBody(output.body, context),
|
|
1650
|
-
};
|
|
1651
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1652
|
-
switch (errorCode) {
|
|
1653
|
-
case "ResourceNotFoundException":
|
|
1654
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1655
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1656
|
-
default:
|
|
1657
|
-
const parsedBody = parsedOutput.body;
|
|
1658
|
-
return throwDefaultError({
|
|
1659
|
-
output,
|
|
1660
|
-
parsedBody,
|
|
1661
|
-
errorCode,
|
|
1662
|
-
});
|
|
1663
|
-
}
|
|
1664
|
-
};
|
|
1665
950
|
export const de_NotifyRecommendationsReceivedCommand = async (output, context) => {
|
|
1666
951
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1667
|
-
return
|
|
952
|
+
return de_CommandError(output, context);
|
|
1668
953
|
}
|
|
1669
954
|
const contents = map({
|
|
1670
955
|
$metadata: deserializeMetadata(output),
|
|
@@ -1677,112 +962,34 @@ export const de_NotifyRecommendationsReceivedCommand = async (output, context) =
|
|
|
1677
962
|
Object.assign(contents, doc);
|
|
1678
963
|
return contents;
|
|
1679
964
|
};
|
|
1680
|
-
const de_NotifyRecommendationsReceivedCommandError = async (output, context) => {
|
|
1681
|
-
const parsedOutput = {
|
|
1682
|
-
...output,
|
|
1683
|
-
body: await parseErrorBody(output.body, context),
|
|
1684
|
-
};
|
|
1685
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1686
|
-
switch (errorCode) {
|
|
1687
|
-
case "AccessDeniedException":
|
|
1688
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1689
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1690
|
-
case "ResourceNotFoundException":
|
|
1691
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1692
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1693
|
-
case "ValidationException":
|
|
1694
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1695
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1696
|
-
default:
|
|
1697
|
-
const parsedBody = parsedOutput.body;
|
|
1698
|
-
return throwDefaultError({
|
|
1699
|
-
output,
|
|
1700
|
-
parsedBody,
|
|
1701
|
-
errorCode,
|
|
1702
|
-
});
|
|
1703
|
-
}
|
|
1704
|
-
};
|
|
1705
965
|
export const de_QueryAssistantCommand = async (output, context) => {
|
|
1706
966
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1707
|
-
return
|
|
1708
|
-
}
|
|
1709
|
-
const contents = map({
|
|
1710
|
-
$metadata: deserializeMetadata(output),
|
|
1711
|
-
});
|
|
1712
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1713
|
-
const doc = take(data, {
|
|
1714
|
-
nextToken: __expectString,
|
|
1715
|
-
results: (_) => de_QueryResultsList(_, context),
|
|
1716
|
-
});
|
|
1717
|
-
Object.assign(contents, doc);
|
|
1718
|
-
return contents;
|
|
1719
|
-
};
|
|
1720
|
-
const de_QueryAssistantCommandError = async (output, context) => {
|
|
1721
|
-
const parsedOutput = {
|
|
1722
|
-
...output,
|
|
1723
|
-
body: await parseErrorBody(output.body, context),
|
|
1724
|
-
};
|
|
1725
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1726
|
-
switch (errorCode) {
|
|
1727
|
-
case "AccessDeniedException":
|
|
1728
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1729
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1730
|
-
case "RequestTimeoutException":
|
|
1731
|
-
case "com.amazonaws.wisdom#RequestTimeoutException":
|
|
1732
|
-
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
1733
|
-
case "ResourceNotFoundException":
|
|
1734
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1735
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1736
|
-
case "ValidationException":
|
|
1737
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1738
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1739
|
-
default:
|
|
1740
|
-
const parsedBody = parsedOutput.body;
|
|
1741
|
-
return throwDefaultError({
|
|
1742
|
-
output,
|
|
1743
|
-
parsedBody,
|
|
1744
|
-
errorCode,
|
|
1745
|
-
});
|
|
1746
|
-
}
|
|
1747
|
-
};
|
|
1748
|
-
export const de_RemoveKnowledgeBaseTemplateUriCommand = async (output, context) => {
|
|
1749
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1750
|
-
return de_RemoveKnowledgeBaseTemplateUriCommandError(output, context);
|
|
967
|
+
return de_CommandError(output, context);
|
|
1751
968
|
}
|
|
1752
969
|
const contents = map({
|
|
1753
970
|
$metadata: deserializeMetadata(output),
|
|
1754
|
-
});
|
|
1755
|
-
await
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1767
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1768
|
-
case "ResourceNotFoundException":
|
|
1769
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1770
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1771
|
-
case "ValidationException":
|
|
1772
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1773
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1774
|
-
default:
|
|
1775
|
-
const parsedBody = parsedOutput.body;
|
|
1776
|
-
return throwDefaultError({
|
|
1777
|
-
output,
|
|
1778
|
-
parsedBody,
|
|
1779
|
-
errorCode,
|
|
1780
|
-
});
|
|
971
|
+
});
|
|
972
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
973
|
+
const doc = take(data, {
|
|
974
|
+
nextToken: __expectString,
|
|
975
|
+
results: (_) => de_QueryResultsList(_, context),
|
|
976
|
+
});
|
|
977
|
+
Object.assign(contents, doc);
|
|
978
|
+
return contents;
|
|
979
|
+
};
|
|
980
|
+
export const de_RemoveKnowledgeBaseTemplateUriCommand = async (output, context) => {
|
|
981
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
982
|
+
return de_CommandError(output, context);
|
|
1781
983
|
}
|
|
984
|
+
const contents = map({
|
|
985
|
+
$metadata: deserializeMetadata(output),
|
|
986
|
+
});
|
|
987
|
+
await collectBody(output.body, context);
|
|
988
|
+
return contents;
|
|
1782
989
|
};
|
|
1783
990
|
export const de_SearchContentCommand = async (output, context) => {
|
|
1784
991
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1785
|
-
return
|
|
992
|
+
return de_CommandError(output, context);
|
|
1786
993
|
}
|
|
1787
994
|
const contents = map({
|
|
1788
995
|
$metadata: deserializeMetadata(output),
|
|
@@ -1795,34 +1002,9 @@ export const de_SearchContentCommand = async (output, context) => {
|
|
|
1795
1002
|
Object.assign(contents, doc);
|
|
1796
1003
|
return contents;
|
|
1797
1004
|
};
|
|
1798
|
-
const de_SearchContentCommandError = async (output, context) => {
|
|
1799
|
-
const parsedOutput = {
|
|
1800
|
-
...output,
|
|
1801
|
-
body: await parseErrorBody(output.body, context),
|
|
1802
|
-
};
|
|
1803
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1804
|
-
switch (errorCode) {
|
|
1805
|
-
case "AccessDeniedException":
|
|
1806
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1807
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1808
|
-
case "ResourceNotFoundException":
|
|
1809
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1810
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1811
|
-
case "ValidationException":
|
|
1812
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1813
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1814
|
-
default:
|
|
1815
|
-
const parsedBody = parsedOutput.body;
|
|
1816
|
-
return throwDefaultError({
|
|
1817
|
-
output,
|
|
1818
|
-
parsedBody,
|
|
1819
|
-
errorCode,
|
|
1820
|
-
});
|
|
1821
|
-
}
|
|
1822
|
-
};
|
|
1823
1005
|
export const de_SearchQuickResponsesCommand = async (output, context) => {
|
|
1824
1006
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1825
|
-
return
|
|
1007
|
+
return de_CommandError(output, context);
|
|
1826
1008
|
}
|
|
1827
1009
|
const contents = map({
|
|
1828
1010
|
$metadata: deserializeMetadata(output),
|
|
@@ -1835,37 +1017,9 @@ export const de_SearchQuickResponsesCommand = async (output, context) => {
|
|
|
1835
1017
|
Object.assign(contents, doc);
|
|
1836
1018
|
return contents;
|
|
1837
1019
|
};
|
|
1838
|
-
const de_SearchQuickResponsesCommandError = async (output, context) => {
|
|
1839
|
-
const parsedOutput = {
|
|
1840
|
-
...output,
|
|
1841
|
-
body: await parseErrorBody(output.body, context),
|
|
1842
|
-
};
|
|
1843
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1844
|
-
switch (errorCode) {
|
|
1845
|
-
case "AccessDeniedException":
|
|
1846
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1847
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1848
|
-
case "RequestTimeoutException":
|
|
1849
|
-
case "com.amazonaws.wisdom#RequestTimeoutException":
|
|
1850
|
-
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
1851
|
-
case "ResourceNotFoundException":
|
|
1852
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1853
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1854
|
-
case "ValidationException":
|
|
1855
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1856
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1857
|
-
default:
|
|
1858
|
-
const parsedBody = parsedOutput.body;
|
|
1859
|
-
return throwDefaultError({
|
|
1860
|
-
output,
|
|
1861
|
-
parsedBody,
|
|
1862
|
-
errorCode,
|
|
1863
|
-
});
|
|
1864
|
-
}
|
|
1865
|
-
};
|
|
1866
1020
|
export const de_SearchSessionsCommand = async (output, context) => {
|
|
1867
1021
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1868
|
-
return
|
|
1022
|
+
return de_CommandError(output, context);
|
|
1869
1023
|
}
|
|
1870
1024
|
const contents = map({
|
|
1871
1025
|
$metadata: deserializeMetadata(output),
|
|
@@ -1878,34 +1032,9 @@ export const de_SearchSessionsCommand = async (output, context) => {
|
|
|
1878
1032
|
Object.assign(contents, doc);
|
|
1879
1033
|
return contents;
|
|
1880
1034
|
};
|
|
1881
|
-
const de_SearchSessionsCommandError = async (output, context) => {
|
|
1882
|
-
const parsedOutput = {
|
|
1883
|
-
...output,
|
|
1884
|
-
body: await parseErrorBody(output.body, context),
|
|
1885
|
-
};
|
|
1886
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1887
|
-
switch (errorCode) {
|
|
1888
|
-
case "AccessDeniedException":
|
|
1889
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1890
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1891
|
-
case "ResourceNotFoundException":
|
|
1892
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1893
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1894
|
-
case "ValidationException":
|
|
1895
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1896
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1897
|
-
default:
|
|
1898
|
-
const parsedBody = parsedOutput.body;
|
|
1899
|
-
return throwDefaultError({
|
|
1900
|
-
output,
|
|
1901
|
-
parsedBody,
|
|
1902
|
-
errorCode,
|
|
1903
|
-
});
|
|
1904
|
-
}
|
|
1905
|
-
};
|
|
1906
1035
|
export const de_StartContentUploadCommand = async (output, context) => {
|
|
1907
1036
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1908
|
-
return
|
|
1037
|
+
return de_CommandError(output, context);
|
|
1909
1038
|
}
|
|
1910
1039
|
const contents = map({
|
|
1911
1040
|
$metadata: deserializeMetadata(output),
|
|
@@ -1920,34 +1049,9 @@ export const de_StartContentUploadCommand = async (output, context) => {
|
|
|
1920
1049
|
Object.assign(contents, doc);
|
|
1921
1050
|
return contents;
|
|
1922
1051
|
};
|
|
1923
|
-
const de_StartContentUploadCommandError = async (output, context) => {
|
|
1924
|
-
const parsedOutput = {
|
|
1925
|
-
...output,
|
|
1926
|
-
body: await parseErrorBody(output.body, context),
|
|
1927
|
-
};
|
|
1928
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1929
|
-
switch (errorCode) {
|
|
1930
|
-
case "AccessDeniedException":
|
|
1931
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1932
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1933
|
-
case "ResourceNotFoundException":
|
|
1934
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1935
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1936
|
-
case "ValidationException":
|
|
1937
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1938
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1939
|
-
default:
|
|
1940
|
-
const parsedBody = parsedOutput.body;
|
|
1941
|
-
return throwDefaultError({
|
|
1942
|
-
output,
|
|
1943
|
-
parsedBody,
|
|
1944
|
-
errorCode,
|
|
1945
|
-
});
|
|
1946
|
-
}
|
|
1947
|
-
};
|
|
1948
1052
|
export const de_StartImportJobCommand = async (output, context) => {
|
|
1949
1053
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1950
|
-
return
|
|
1054
|
+
return de_CommandError(output, context);
|
|
1951
1055
|
}
|
|
1952
1056
|
const contents = map({
|
|
1953
1057
|
$metadata: deserializeMetadata(output),
|
|
@@ -1959,40 +1063,9 @@ export const de_StartImportJobCommand = async (output, context) => {
|
|
|
1959
1063
|
Object.assign(contents, doc);
|
|
1960
1064
|
return contents;
|
|
1961
1065
|
};
|
|
1962
|
-
const de_StartImportJobCommandError = async (output, context) => {
|
|
1963
|
-
const parsedOutput = {
|
|
1964
|
-
...output,
|
|
1965
|
-
body: await parseErrorBody(output.body, context),
|
|
1966
|
-
};
|
|
1967
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1968
|
-
switch (errorCode) {
|
|
1969
|
-
case "AccessDeniedException":
|
|
1970
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1971
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1972
|
-
case "ConflictException":
|
|
1973
|
-
case "com.amazonaws.wisdom#ConflictException":
|
|
1974
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1975
|
-
case "ResourceNotFoundException":
|
|
1976
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1977
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1978
|
-
case "ServiceQuotaExceededException":
|
|
1979
|
-
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
1980
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1981
|
-
case "ValidationException":
|
|
1982
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
1983
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1984
|
-
default:
|
|
1985
|
-
const parsedBody = parsedOutput.body;
|
|
1986
|
-
return throwDefaultError({
|
|
1987
|
-
output,
|
|
1988
|
-
parsedBody,
|
|
1989
|
-
errorCode,
|
|
1990
|
-
});
|
|
1991
|
-
}
|
|
1992
|
-
};
|
|
1993
1066
|
export const de_TagResourceCommand = async (output, context) => {
|
|
1994
1067
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1995
|
-
return
|
|
1068
|
+
return de_CommandError(output, context);
|
|
1996
1069
|
}
|
|
1997
1070
|
const contents = map({
|
|
1998
1071
|
$metadata: deserializeMetadata(output),
|
|
@@ -2000,31 +1073,9 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
2000
1073
|
await collectBody(output.body, context);
|
|
2001
1074
|
return contents;
|
|
2002
1075
|
};
|
|
2003
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
2004
|
-
const parsedOutput = {
|
|
2005
|
-
...output,
|
|
2006
|
-
body: await parseErrorBody(output.body, context),
|
|
2007
|
-
};
|
|
2008
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2009
|
-
switch (errorCode) {
|
|
2010
|
-
case "ResourceNotFoundException":
|
|
2011
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2012
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2013
|
-
case "TooManyTagsException":
|
|
2014
|
-
case "com.amazonaws.wisdom#TooManyTagsException":
|
|
2015
|
-
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
2016
|
-
default:
|
|
2017
|
-
const parsedBody = parsedOutput.body;
|
|
2018
|
-
return throwDefaultError({
|
|
2019
|
-
output,
|
|
2020
|
-
parsedBody,
|
|
2021
|
-
errorCode,
|
|
2022
|
-
});
|
|
2023
|
-
}
|
|
2024
|
-
};
|
|
2025
1076
|
export const de_UntagResourceCommand = async (output, context) => {
|
|
2026
1077
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2027
|
-
return
|
|
1078
|
+
return de_CommandError(output, context);
|
|
2028
1079
|
}
|
|
2029
1080
|
const contents = map({
|
|
2030
1081
|
$metadata: deserializeMetadata(output),
|
|
@@ -2032,28 +1083,9 @@ export const de_UntagResourceCommand = async (output, context) => {
|
|
|
2032
1083
|
await collectBody(output.body, context);
|
|
2033
1084
|
return contents;
|
|
2034
1085
|
};
|
|
2035
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
2036
|
-
const parsedOutput = {
|
|
2037
|
-
...output,
|
|
2038
|
-
body: await parseErrorBody(output.body, context),
|
|
2039
|
-
};
|
|
2040
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2041
|
-
switch (errorCode) {
|
|
2042
|
-
case "ResourceNotFoundException":
|
|
2043
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2044
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2045
|
-
default:
|
|
2046
|
-
const parsedBody = parsedOutput.body;
|
|
2047
|
-
return throwDefaultError({
|
|
2048
|
-
output,
|
|
2049
|
-
parsedBody,
|
|
2050
|
-
errorCode,
|
|
2051
|
-
});
|
|
2052
|
-
}
|
|
2053
|
-
};
|
|
2054
1086
|
export const de_UpdateContentCommand = async (output, context) => {
|
|
2055
1087
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2056
|
-
return
|
|
1088
|
+
return de_CommandError(output, context);
|
|
2057
1089
|
}
|
|
2058
1090
|
const contents = map({
|
|
2059
1091
|
$metadata: deserializeMetadata(output),
|
|
@@ -2065,37 +1097,9 @@ export const de_UpdateContentCommand = async (output, context) => {
|
|
|
2065
1097
|
Object.assign(contents, doc);
|
|
2066
1098
|
return contents;
|
|
2067
1099
|
};
|
|
2068
|
-
const de_UpdateContentCommandError = async (output, context) => {
|
|
2069
|
-
const parsedOutput = {
|
|
2070
|
-
...output,
|
|
2071
|
-
body: await parseErrorBody(output.body, context),
|
|
2072
|
-
};
|
|
2073
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2074
|
-
switch (errorCode) {
|
|
2075
|
-
case "AccessDeniedException":
|
|
2076
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
2077
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2078
|
-
case "PreconditionFailedException":
|
|
2079
|
-
case "com.amazonaws.wisdom#PreconditionFailedException":
|
|
2080
|
-
throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
|
|
2081
|
-
case "ResourceNotFoundException":
|
|
2082
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2083
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2084
|
-
case "ValidationException":
|
|
2085
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
2086
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2087
|
-
default:
|
|
2088
|
-
const parsedBody = parsedOutput.body;
|
|
2089
|
-
return throwDefaultError({
|
|
2090
|
-
output,
|
|
2091
|
-
parsedBody,
|
|
2092
|
-
errorCode,
|
|
2093
|
-
});
|
|
2094
|
-
}
|
|
2095
|
-
};
|
|
2096
1100
|
export const de_UpdateKnowledgeBaseTemplateUriCommand = async (output, context) => {
|
|
2097
1101
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2098
|
-
return
|
|
1102
|
+
return de_CommandError(output, context);
|
|
2099
1103
|
}
|
|
2100
1104
|
const contents = map({
|
|
2101
1105
|
$metadata: deserializeMetadata(output),
|
|
@@ -2107,34 +1111,9 @@ export const de_UpdateKnowledgeBaseTemplateUriCommand = async (output, context)
|
|
|
2107
1111
|
Object.assign(contents, doc);
|
|
2108
1112
|
return contents;
|
|
2109
1113
|
};
|
|
2110
|
-
const de_UpdateKnowledgeBaseTemplateUriCommandError = async (output, context) => {
|
|
2111
|
-
const parsedOutput = {
|
|
2112
|
-
...output,
|
|
2113
|
-
body: await parseErrorBody(output.body, context),
|
|
2114
|
-
};
|
|
2115
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2116
|
-
switch (errorCode) {
|
|
2117
|
-
case "AccessDeniedException":
|
|
2118
|
-
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
2119
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2120
|
-
case "ResourceNotFoundException":
|
|
2121
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2122
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2123
|
-
case "ValidationException":
|
|
2124
|
-
case "com.amazonaws.wisdom#ValidationException":
|
|
2125
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
2126
|
-
default:
|
|
2127
|
-
const parsedBody = parsedOutput.body;
|
|
2128
|
-
return throwDefaultError({
|
|
2129
|
-
output,
|
|
2130
|
-
parsedBody,
|
|
2131
|
-
errorCode,
|
|
2132
|
-
});
|
|
2133
|
-
}
|
|
2134
|
-
};
|
|
2135
1114
|
export const de_UpdateQuickResponseCommand = async (output, context) => {
|
|
2136
1115
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2137
|
-
return
|
|
1116
|
+
return de_CommandError(output, context);
|
|
2138
1117
|
}
|
|
2139
1118
|
const contents = map({
|
|
2140
1119
|
$metadata: deserializeMetadata(output),
|
|
@@ -2146,7 +1125,7 @@ export const de_UpdateQuickResponseCommand = async (output, context) => {
|
|
|
2146
1125
|
Object.assign(contents, doc);
|
|
2147
1126
|
return contents;
|
|
2148
1127
|
};
|
|
2149
|
-
const
|
|
1128
|
+
const de_CommandError = async (output, context) => {
|
|
2150
1129
|
const parsedOutput = {
|
|
2151
1130
|
...output,
|
|
2152
1131
|
body: await parseErrorBody(output.body, context),
|
|
@@ -2159,15 +1138,24 @@ const de_UpdateQuickResponseCommandError = async (output, context) => {
|
|
|
2159
1138
|
case "ConflictException":
|
|
2160
1139
|
case "com.amazonaws.wisdom#ConflictException":
|
|
2161
1140
|
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
2162
|
-
case "
|
|
2163
|
-
case "com.amazonaws.wisdom#
|
|
2164
|
-
throw await
|
|
2165
|
-
case "ResourceNotFoundException":
|
|
2166
|
-
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
2167
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1141
|
+
case "ServiceQuotaExceededException":
|
|
1142
|
+
case "com.amazonaws.wisdom#ServiceQuotaExceededException":
|
|
1143
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
2168
1144
|
case "ValidationException":
|
|
2169
1145
|
case "com.amazonaws.wisdom#ValidationException":
|
|
2170
1146
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1147
|
+
case "ResourceNotFoundException":
|
|
1148
|
+
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1149
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1150
|
+
case "RequestTimeoutException":
|
|
1151
|
+
case "com.amazonaws.wisdom#RequestTimeoutException":
|
|
1152
|
+
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
1153
|
+
case "TooManyTagsException":
|
|
1154
|
+
case "com.amazonaws.wisdom#TooManyTagsException":
|
|
1155
|
+
throw await de_TooManyTagsExceptionRes(parsedOutput, context);
|
|
1156
|
+
case "PreconditionFailedException":
|
|
1157
|
+
case "com.amazonaws.wisdom#PreconditionFailedException":
|
|
1158
|
+
throw await de_PreconditionFailedExceptionRes(parsedOutput, context);
|
|
2171
1159
|
default:
|
|
2172
1160
|
const parsedBody = parsedOutput.body;
|
|
2173
1161
|
return throwDefaultError({
|