@aws-sdk/client-inspector2 3.52.0 → 3.54.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/Inspector2ServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +116 -4
- package/dist-cjs/protocols/Aws_restJson1.js +372 -1196
- package/dist-es/index.js +1 -0
- package/dist-es/models/Inspector2ServiceException.js +12 -0
- package/dist-es/models/models_0.js +105 -1
- package/dist-es/protocols/Aws_restJson1.js +731 -1326
- package/dist-types/Inspector2Client.d.ts +2 -2
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/Inspector2ServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +58 -33
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/Inspector2Client.d.ts +2 -2
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/Inspector2ServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +42 -33
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/package.json +27 -27
|
@@ -5,6 +5,7 @@ exports.deserializeAws_restJson1UpdateOrganizationConfigurationCommand = exports
|
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const uuid_1 = require("uuid");
|
|
8
|
+
const Inspector2ServiceException_1 = require("../models/Inspector2ServiceException");
|
|
8
9
|
const models_0_1 = require("../models/models_0");
|
|
9
10
|
const serializeAws_restJson1AssociateMemberCommand = async (input, context) => {
|
|
10
11
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -764,51 +765,25 @@ const deserializeAws_restJson1AssociateMemberCommandError = async (output, conte
|
|
|
764
765
|
switch (errorCode) {
|
|
765
766
|
case "AccessDeniedException":
|
|
766
767
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
767
|
-
|
|
768
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
769
|
-
name: errorCode,
|
|
770
|
-
$metadata: deserializeMetadata(output),
|
|
771
|
-
};
|
|
772
|
-
break;
|
|
768
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
773
769
|
case "InternalServerException":
|
|
774
770
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
775
|
-
|
|
776
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
777
|
-
name: errorCode,
|
|
778
|
-
$metadata: deserializeMetadata(output),
|
|
779
|
-
};
|
|
780
|
-
break;
|
|
771
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
781
772
|
case "ThrottlingException":
|
|
782
773
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
783
|
-
|
|
784
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
785
|
-
name: errorCode,
|
|
786
|
-
$metadata: deserializeMetadata(output),
|
|
787
|
-
};
|
|
788
|
-
break;
|
|
774
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
789
775
|
case "ValidationException":
|
|
790
776
|
case "com.amazonaws.inspector2#ValidationException":
|
|
791
|
-
|
|
792
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
793
|
-
name: errorCode,
|
|
794
|
-
$metadata: deserializeMetadata(output),
|
|
795
|
-
};
|
|
796
|
-
break;
|
|
777
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
797
778
|
default:
|
|
798
779
|
const parsedBody = parsedOutput.body;
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
...parsedBody,
|
|
802
|
-
name: `${errorCode}`,
|
|
803
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
780
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
781
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
804
782
|
$fault: "client",
|
|
805
783
|
$metadata: deserializeMetadata(output),
|
|
806
|
-
};
|
|
784
|
+
});
|
|
785
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
807
786
|
}
|
|
808
|
-
const message = response.message || response.Message || errorCode;
|
|
809
|
-
response.message = message;
|
|
810
|
-
delete response.Message;
|
|
811
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
812
787
|
};
|
|
813
788
|
const deserializeAws_restJson1BatchGetAccountStatusCommand = async (output, context) => {
|
|
814
789
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -840,59 +815,28 @@ const deserializeAws_restJson1BatchGetAccountStatusCommandError = async (output,
|
|
|
840
815
|
switch (errorCode) {
|
|
841
816
|
case "AccessDeniedException":
|
|
842
817
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
843
|
-
|
|
844
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
845
|
-
name: errorCode,
|
|
846
|
-
$metadata: deserializeMetadata(output),
|
|
847
|
-
};
|
|
848
|
-
break;
|
|
818
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
849
819
|
case "InternalServerException":
|
|
850
820
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
851
|
-
|
|
852
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
853
|
-
name: errorCode,
|
|
854
|
-
$metadata: deserializeMetadata(output),
|
|
855
|
-
};
|
|
856
|
-
break;
|
|
821
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
857
822
|
case "ResourceNotFoundException":
|
|
858
823
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
859
|
-
|
|
860
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
861
|
-
name: errorCode,
|
|
862
|
-
$metadata: deserializeMetadata(output),
|
|
863
|
-
};
|
|
864
|
-
break;
|
|
824
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
865
825
|
case "ThrottlingException":
|
|
866
826
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
867
|
-
|
|
868
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
869
|
-
name: errorCode,
|
|
870
|
-
$metadata: deserializeMetadata(output),
|
|
871
|
-
};
|
|
872
|
-
break;
|
|
827
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
873
828
|
case "ValidationException":
|
|
874
829
|
case "com.amazonaws.inspector2#ValidationException":
|
|
875
|
-
|
|
876
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
877
|
-
name: errorCode,
|
|
878
|
-
$metadata: deserializeMetadata(output),
|
|
879
|
-
};
|
|
880
|
-
break;
|
|
830
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
881
831
|
default:
|
|
882
832
|
const parsedBody = parsedOutput.body;
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
...parsedBody,
|
|
886
|
-
name: `${errorCode}`,
|
|
887
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
833
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
834
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
888
835
|
$fault: "client",
|
|
889
836
|
$metadata: deserializeMetadata(output),
|
|
890
|
-
};
|
|
837
|
+
});
|
|
838
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
891
839
|
}
|
|
892
|
-
const message = response.message || response.Message || errorCode;
|
|
893
|
-
response.message = message;
|
|
894
|
-
delete response.Message;
|
|
895
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
896
840
|
};
|
|
897
841
|
const deserializeAws_restJson1BatchGetFreeTrialInfoCommand = async (output, context) => {
|
|
898
842
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -924,51 +868,25 @@ const deserializeAws_restJson1BatchGetFreeTrialInfoCommandError = async (output,
|
|
|
924
868
|
switch (errorCode) {
|
|
925
869
|
case "AccessDeniedException":
|
|
926
870
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
927
|
-
|
|
928
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
929
|
-
name: errorCode,
|
|
930
|
-
$metadata: deserializeMetadata(output),
|
|
931
|
-
};
|
|
932
|
-
break;
|
|
871
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
933
872
|
case "InternalServerException":
|
|
934
873
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
935
|
-
|
|
936
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
937
|
-
name: errorCode,
|
|
938
|
-
$metadata: deserializeMetadata(output),
|
|
939
|
-
};
|
|
940
|
-
break;
|
|
874
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
941
875
|
case "ThrottlingException":
|
|
942
876
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
943
|
-
|
|
944
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
945
|
-
name: errorCode,
|
|
946
|
-
$metadata: deserializeMetadata(output),
|
|
947
|
-
};
|
|
948
|
-
break;
|
|
877
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
949
878
|
case "ValidationException":
|
|
950
879
|
case "com.amazonaws.inspector2#ValidationException":
|
|
951
|
-
|
|
952
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
953
|
-
name: errorCode,
|
|
954
|
-
$metadata: deserializeMetadata(output),
|
|
955
|
-
};
|
|
956
|
-
break;
|
|
880
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
957
881
|
default:
|
|
958
882
|
const parsedBody = parsedOutput.body;
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
...parsedBody,
|
|
962
|
-
name: `${errorCode}`,
|
|
963
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
883
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
884
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
964
885
|
$fault: "client",
|
|
965
886
|
$metadata: deserializeMetadata(output),
|
|
966
|
-
};
|
|
887
|
+
});
|
|
888
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
967
889
|
}
|
|
968
|
-
const message = response.message || response.Message || errorCode;
|
|
969
|
-
response.message = message;
|
|
970
|
-
delete response.Message;
|
|
971
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
972
890
|
};
|
|
973
891
|
const deserializeAws_restJson1CancelFindingsReportCommand = async (output, context) => {
|
|
974
892
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -996,59 +914,28 @@ const deserializeAws_restJson1CancelFindingsReportCommandError = async (output,
|
|
|
996
914
|
switch (errorCode) {
|
|
997
915
|
case "AccessDeniedException":
|
|
998
916
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
999
|
-
|
|
1000
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1001
|
-
name: errorCode,
|
|
1002
|
-
$metadata: deserializeMetadata(output),
|
|
1003
|
-
};
|
|
1004
|
-
break;
|
|
917
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1005
918
|
case "InternalServerException":
|
|
1006
919
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1007
|
-
|
|
1008
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1009
|
-
name: errorCode,
|
|
1010
|
-
$metadata: deserializeMetadata(output),
|
|
1011
|
-
};
|
|
1012
|
-
break;
|
|
920
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1013
921
|
case "ResourceNotFoundException":
|
|
1014
922
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1015
|
-
|
|
1016
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1017
|
-
name: errorCode,
|
|
1018
|
-
$metadata: deserializeMetadata(output),
|
|
1019
|
-
};
|
|
1020
|
-
break;
|
|
923
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1021
924
|
case "ThrottlingException":
|
|
1022
925
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1023
|
-
|
|
1024
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1025
|
-
name: errorCode,
|
|
1026
|
-
$metadata: deserializeMetadata(output),
|
|
1027
|
-
};
|
|
1028
|
-
break;
|
|
926
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1029
927
|
case "ValidationException":
|
|
1030
928
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1031
|
-
|
|
1032
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1033
|
-
name: errorCode,
|
|
1034
|
-
$metadata: deserializeMetadata(output),
|
|
1035
|
-
};
|
|
1036
|
-
break;
|
|
929
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1037
930
|
default:
|
|
1038
931
|
const parsedBody = parsedOutput.body;
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
...parsedBody,
|
|
1042
|
-
name: `${errorCode}`,
|
|
1043
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
932
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
933
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1044
934
|
$fault: "client",
|
|
1045
935
|
$metadata: deserializeMetadata(output),
|
|
1046
|
-
};
|
|
936
|
+
});
|
|
937
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1047
938
|
}
|
|
1048
|
-
const message = response.message || response.Message || errorCode;
|
|
1049
|
-
response.message = message;
|
|
1050
|
-
delete response.Message;
|
|
1051
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1052
939
|
};
|
|
1053
940
|
const deserializeAws_restJson1CreateFilterCommand = async (output, context) => {
|
|
1054
941
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1076,67 +963,31 @@ const deserializeAws_restJson1CreateFilterCommandError = async (output, context)
|
|
|
1076
963
|
switch (errorCode) {
|
|
1077
964
|
case "AccessDeniedException":
|
|
1078
965
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1079
|
-
|
|
1080
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1081
|
-
name: errorCode,
|
|
1082
|
-
$metadata: deserializeMetadata(output),
|
|
1083
|
-
};
|
|
1084
|
-
break;
|
|
966
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1085
967
|
case "BadRequestException":
|
|
1086
968
|
case "com.amazonaws.inspector2#BadRequestException":
|
|
1087
|
-
|
|
1088
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
1089
|
-
name: errorCode,
|
|
1090
|
-
$metadata: deserializeMetadata(output),
|
|
1091
|
-
};
|
|
1092
|
-
break;
|
|
969
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1093
970
|
case "InternalServerException":
|
|
1094
971
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1095
|
-
|
|
1096
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1097
|
-
name: errorCode,
|
|
1098
|
-
$metadata: deserializeMetadata(output),
|
|
1099
|
-
};
|
|
1100
|
-
break;
|
|
972
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1101
973
|
case "ServiceQuotaExceededException":
|
|
1102
974
|
case "com.amazonaws.inspector2#ServiceQuotaExceededException":
|
|
1103
|
-
|
|
1104
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1105
|
-
name: errorCode,
|
|
1106
|
-
$metadata: deserializeMetadata(output),
|
|
1107
|
-
};
|
|
1108
|
-
break;
|
|
975
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1109
976
|
case "ThrottlingException":
|
|
1110
977
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1111
|
-
|
|
1112
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1113
|
-
name: errorCode,
|
|
1114
|
-
$metadata: deserializeMetadata(output),
|
|
1115
|
-
};
|
|
1116
|
-
break;
|
|
978
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1117
979
|
case "ValidationException":
|
|
1118
980
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1119
|
-
|
|
1120
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1121
|
-
name: errorCode,
|
|
1122
|
-
$metadata: deserializeMetadata(output),
|
|
1123
|
-
};
|
|
1124
|
-
break;
|
|
981
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1125
982
|
default:
|
|
1126
983
|
const parsedBody = parsedOutput.body;
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
...parsedBody,
|
|
1130
|
-
name: `${errorCode}`,
|
|
1131
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
984
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
985
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1132
986
|
$fault: "client",
|
|
1133
987
|
$metadata: deserializeMetadata(output),
|
|
1134
|
-
};
|
|
988
|
+
});
|
|
989
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1135
990
|
}
|
|
1136
|
-
const message = response.message || response.Message || errorCode;
|
|
1137
|
-
response.message = message;
|
|
1138
|
-
delete response.Message;
|
|
1139
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1140
991
|
};
|
|
1141
992
|
const deserializeAws_restJson1CreateFindingsReportCommand = async (output, context) => {
|
|
1142
993
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1164,59 +1015,28 @@ const deserializeAws_restJson1CreateFindingsReportCommandError = async (output,
|
|
|
1164
1015
|
switch (errorCode) {
|
|
1165
1016
|
case "AccessDeniedException":
|
|
1166
1017
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1167
|
-
|
|
1168
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1169
|
-
name: errorCode,
|
|
1170
|
-
$metadata: deserializeMetadata(output),
|
|
1171
|
-
};
|
|
1172
|
-
break;
|
|
1018
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1173
1019
|
case "InternalServerException":
|
|
1174
1020
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1175
|
-
|
|
1176
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1177
|
-
name: errorCode,
|
|
1178
|
-
$metadata: deserializeMetadata(output),
|
|
1179
|
-
};
|
|
1180
|
-
break;
|
|
1021
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1181
1022
|
case "ResourceNotFoundException":
|
|
1182
1023
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1183
|
-
|
|
1184
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1185
|
-
name: errorCode,
|
|
1186
|
-
$metadata: deserializeMetadata(output),
|
|
1187
|
-
};
|
|
1188
|
-
break;
|
|
1024
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1189
1025
|
case "ThrottlingException":
|
|
1190
1026
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1191
|
-
|
|
1192
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1193
|
-
name: errorCode,
|
|
1194
|
-
$metadata: deserializeMetadata(output),
|
|
1195
|
-
};
|
|
1196
|
-
break;
|
|
1027
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1197
1028
|
case "ValidationException":
|
|
1198
1029
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1199
|
-
|
|
1200
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1201
|
-
name: errorCode,
|
|
1202
|
-
$metadata: deserializeMetadata(output),
|
|
1203
|
-
};
|
|
1204
|
-
break;
|
|
1030
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1205
1031
|
default:
|
|
1206
1032
|
const parsedBody = parsedOutput.body;
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
...parsedBody,
|
|
1210
|
-
name: `${errorCode}`,
|
|
1211
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1033
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1034
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1212
1035
|
$fault: "client",
|
|
1213
1036
|
$metadata: deserializeMetadata(output),
|
|
1214
|
-
};
|
|
1037
|
+
});
|
|
1038
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1215
1039
|
}
|
|
1216
|
-
const message = response.message || response.Message || errorCode;
|
|
1217
|
-
response.message = message;
|
|
1218
|
-
delete response.Message;
|
|
1219
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1220
1040
|
};
|
|
1221
1041
|
const deserializeAws_restJson1DeleteFilterCommand = async (output, context) => {
|
|
1222
1042
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1244,59 +1064,28 @@ const deserializeAws_restJson1DeleteFilterCommandError = async (output, context)
|
|
|
1244
1064
|
switch (errorCode) {
|
|
1245
1065
|
case "AccessDeniedException":
|
|
1246
1066
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1247
|
-
|
|
1248
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1249
|
-
name: errorCode,
|
|
1250
|
-
$metadata: deserializeMetadata(output),
|
|
1251
|
-
};
|
|
1252
|
-
break;
|
|
1067
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1253
1068
|
case "InternalServerException":
|
|
1254
1069
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1255
|
-
|
|
1256
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1257
|
-
name: errorCode,
|
|
1258
|
-
$metadata: deserializeMetadata(output),
|
|
1259
|
-
};
|
|
1260
|
-
break;
|
|
1070
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1261
1071
|
case "ResourceNotFoundException":
|
|
1262
1072
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1263
|
-
|
|
1264
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1265
|
-
name: errorCode,
|
|
1266
|
-
$metadata: deserializeMetadata(output),
|
|
1267
|
-
};
|
|
1268
|
-
break;
|
|
1073
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1269
1074
|
case "ThrottlingException":
|
|
1270
1075
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1271
|
-
|
|
1272
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1273
|
-
name: errorCode,
|
|
1274
|
-
$metadata: deserializeMetadata(output),
|
|
1275
|
-
};
|
|
1276
|
-
break;
|
|
1076
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1277
1077
|
case "ValidationException":
|
|
1278
1078
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1279
|
-
|
|
1280
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1281
|
-
name: errorCode,
|
|
1282
|
-
$metadata: deserializeMetadata(output),
|
|
1283
|
-
};
|
|
1284
|
-
break;
|
|
1079
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1285
1080
|
default:
|
|
1286
1081
|
const parsedBody = parsedOutput.body;
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
...parsedBody,
|
|
1290
|
-
name: `${errorCode}`,
|
|
1291
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1082
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1083
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1292
1084
|
$fault: "client",
|
|
1293
1085
|
$metadata: deserializeMetadata(output),
|
|
1294
|
-
};
|
|
1086
|
+
});
|
|
1087
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1295
1088
|
}
|
|
1296
|
-
const message = response.message || response.Message || errorCode;
|
|
1297
|
-
response.message = message;
|
|
1298
|
-
delete response.Message;
|
|
1299
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1300
1089
|
};
|
|
1301
1090
|
const deserializeAws_restJson1DescribeOrganizationConfigurationCommand = async (output, context) => {
|
|
1302
1091
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1328,51 +1117,25 @@ const deserializeAws_restJson1DescribeOrganizationConfigurationCommandError = as
|
|
|
1328
1117
|
switch (errorCode) {
|
|
1329
1118
|
case "AccessDeniedException":
|
|
1330
1119
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1331
|
-
|
|
1332
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1333
|
-
name: errorCode,
|
|
1334
|
-
$metadata: deserializeMetadata(output),
|
|
1335
|
-
};
|
|
1336
|
-
break;
|
|
1120
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1337
1121
|
case "InternalServerException":
|
|
1338
1122
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1339
|
-
|
|
1340
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1341
|
-
name: errorCode,
|
|
1342
|
-
$metadata: deserializeMetadata(output),
|
|
1343
|
-
};
|
|
1344
|
-
break;
|
|
1123
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1345
1124
|
case "ThrottlingException":
|
|
1346
1125
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1347
|
-
|
|
1348
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1349
|
-
name: errorCode,
|
|
1350
|
-
$metadata: deserializeMetadata(output),
|
|
1351
|
-
};
|
|
1352
|
-
break;
|
|
1126
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1353
1127
|
case "ValidationException":
|
|
1354
1128
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1355
|
-
|
|
1356
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1357
|
-
name: errorCode,
|
|
1358
|
-
$metadata: deserializeMetadata(output),
|
|
1359
|
-
};
|
|
1360
|
-
break;
|
|
1129
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1361
1130
|
default:
|
|
1362
1131
|
const parsedBody = parsedOutput.body;
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
...parsedBody,
|
|
1366
|
-
name: `${errorCode}`,
|
|
1367
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1132
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1133
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1368
1134
|
$fault: "client",
|
|
1369
1135
|
$metadata: deserializeMetadata(output),
|
|
1370
|
-
};
|
|
1136
|
+
});
|
|
1137
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1371
1138
|
}
|
|
1372
|
-
const message = response.message || response.Message || errorCode;
|
|
1373
|
-
response.message = message;
|
|
1374
|
-
delete response.Message;
|
|
1375
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1376
1139
|
};
|
|
1377
1140
|
const deserializeAws_restJson1DisableCommand = async (output, context) => {
|
|
1378
1141
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1404,59 +1167,28 @@ const deserializeAws_restJson1DisableCommandError = async (output, context) => {
|
|
|
1404
1167
|
switch (errorCode) {
|
|
1405
1168
|
case "AccessDeniedException":
|
|
1406
1169
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1407
|
-
|
|
1408
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1409
|
-
name: errorCode,
|
|
1410
|
-
$metadata: deserializeMetadata(output),
|
|
1411
|
-
};
|
|
1412
|
-
break;
|
|
1170
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1413
1171
|
case "InternalServerException":
|
|
1414
1172
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1415
|
-
|
|
1416
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1417
|
-
name: errorCode,
|
|
1418
|
-
$metadata: deserializeMetadata(output),
|
|
1419
|
-
};
|
|
1420
|
-
break;
|
|
1173
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1421
1174
|
case "ResourceNotFoundException":
|
|
1422
1175
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1423
|
-
|
|
1424
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1425
|
-
name: errorCode,
|
|
1426
|
-
$metadata: deserializeMetadata(output),
|
|
1427
|
-
};
|
|
1428
|
-
break;
|
|
1176
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1429
1177
|
case "ThrottlingException":
|
|
1430
1178
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1431
|
-
|
|
1432
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1433
|
-
name: errorCode,
|
|
1434
|
-
$metadata: deserializeMetadata(output),
|
|
1435
|
-
};
|
|
1436
|
-
break;
|
|
1179
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1437
1180
|
case "ValidationException":
|
|
1438
1181
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1439
|
-
|
|
1440
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1441
|
-
name: errorCode,
|
|
1442
|
-
$metadata: deserializeMetadata(output),
|
|
1443
|
-
};
|
|
1444
|
-
break;
|
|
1182
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1445
1183
|
default:
|
|
1446
1184
|
const parsedBody = parsedOutput.body;
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
...parsedBody,
|
|
1450
|
-
name: `${errorCode}`,
|
|
1451
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1185
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1186
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1452
1187
|
$fault: "client",
|
|
1453
1188
|
$metadata: deserializeMetadata(output),
|
|
1454
|
-
};
|
|
1189
|
+
});
|
|
1190
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1455
1191
|
}
|
|
1456
|
-
const message = response.message || response.Message || errorCode;
|
|
1457
|
-
response.message = message;
|
|
1458
|
-
delete response.Message;
|
|
1459
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1460
1192
|
};
|
|
1461
1193
|
const deserializeAws_restJson1DisableDelegatedAdminAccountCommand = async (output, context) => {
|
|
1462
1194
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1484,67 +1216,31 @@ const deserializeAws_restJson1DisableDelegatedAdminAccountCommandError = async (
|
|
|
1484
1216
|
switch (errorCode) {
|
|
1485
1217
|
case "AccessDeniedException":
|
|
1486
1218
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1487
|
-
|
|
1488
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1489
|
-
name: errorCode,
|
|
1490
|
-
$metadata: deserializeMetadata(output),
|
|
1491
|
-
};
|
|
1492
|
-
break;
|
|
1219
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1493
1220
|
case "ConflictException":
|
|
1494
1221
|
case "com.amazonaws.inspector2#ConflictException":
|
|
1495
|
-
|
|
1496
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1497
|
-
name: errorCode,
|
|
1498
|
-
$metadata: deserializeMetadata(output),
|
|
1499
|
-
};
|
|
1500
|
-
break;
|
|
1222
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1501
1223
|
case "InternalServerException":
|
|
1502
1224
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1503
|
-
|
|
1504
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1505
|
-
name: errorCode,
|
|
1506
|
-
$metadata: deserializeMetadata(output),
|
|
1507
|
-
};
|
|
1508
|
-
break;
|
|
1225
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1509
1226
|
case "ResourceNotFoundException":
|
|
1510
1227
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1511
|
-
|
|
1512
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1513
|
-
name: errorCode,
|
|
1514
|
-
$metadata: deserializeMetadata(output),
|
|
1515
|
-
};
|
|
1516
|
-
break;
|
|
1228
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1517
1229
|
case "ThrottlingException":
|
|
1518
1230
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1519
|
-
|
|
1520
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1521
|
-
name: errorCode,
|
|
1522
|
-
$metadata: deserializeMetadata(output),
|
|
1523
|
-
};
|
|
1524
|
-
break;
|
|
1231
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1525
1232
|
case "ValidationException":
|
|
1526
1233
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1527
|
-
|
|
1528
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1529
|
-
name: errorCode,
|
|
1530
|
-
$metadata: deserializeMetadata(output),
|
|
1531
|
-
};
|
|
1532
|
-
break;
|
|
1234
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1533
1235
|
default:
|
|
1534
1236
|
const parsedBody = parsedOutput.body;
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
...parsedBody,
|
|
1538
|
-
name: `${errorCode}`,
|
|
1539
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1237
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1238
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1540
1239
|
$fault: "client",
|
|
1541
1240
|
$metadata: deserializeMetadata(output),
|
|
1542
|
-
};
|
|
1241
|
+
});
|
|
1242
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1543
1243
|
}
|
|
1544
|
-
const message = response.message || response.Message || errorCode;
|
|
1545
|
-
response.message = message;
|
|
1546
|
-
delete response.Message;
|
|
1547
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1548
1244
|
};
|
|
1549
1245
|
const deserializeAws_restJson1DisassociateMemberCommand = async (output, context) => {
|
|
1550
1246
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1572,51 +1268,25 @@ const deserializeAws_restJson1DisassociateMemberCommandError = async (output, co
|
|
|
1572
1268
|
switch (errorCode) {
|
|
1573
1269
|
case "AccessDeniedException":
|
|
1574
1270
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1575
|
-
|
|
1576
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1577
|
-
name: errorCode,
|
|
1578
|
-
$metadata: deserializeMetadata(output),
|
|
1579
|
-
};
|
|
1580
|
-
break;
|
|
1271
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1581
1272
|
case "InternalServerException":
|
|
1582
1273
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1583
|
-
|
|
1584
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1585
|
-
name: errorCode,
|
|
1586
|
-
$metadata: deserializeMetadata(output),
|
|
1587
|
-
};
|
|
1588
|
-
break;
|
|
1274
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1589
1275
|
case "ThrottlingException":
|
|
1590
1276
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1591
|
-
|
|
1592
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1593
|
-
name: errorCode,
|
|
1594
|
-
$metadata: deserializeMetadata(output),
|
|
1595
|
-
};
|
|
1596
|
-
break;
|
|
1277
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1597
1278
|
case "ValidationException":
|
|
1598
1279
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1599
|
-
|
|
1600
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1601
|
-
name: errorCode,
|
|
1602
|
-
$metadata: deserializeMetadata(output),
|
|
1603
|
-
};
|
|
1604
|
-
break;
|
|
1280
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1605
1281
|
default:
|
|
1606
1282
|
const parsedBody = parsedOutput.body;
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
...parsedBody,
|
|
1610
|
-
name: `${errorCode}`,
|
|
1611
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1283
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1284
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1612
1285
|
$fault: "client",
|
|
1613
1286
|
$metadata: deserializeMetadata(output),
|
|
1614
|
-
};
|
|
1287
|
+
});
|
|
1288
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1615
1289
|
}
|
|
1616
|
-
const message = response.message || response.Message || errorCode;
|
|
1617
|
-
response.message = message;
|
|
1618
|
-
delete response.Message;
|
|
1619
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1620
1290
|
};
|
|
1621
1291
|
const deserializeAws_restJson1EnableCommand = async (output, context) => {
|
|
1622
1292
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1648,59 +1318,28 @@ const deserializeAws_restJson1EnableCommandError = async (output, context) => {
|
|
|
1648
1318
|
switch (errorCode) {
|
|
1649
1319
|
case "AccessDeniedException":
|
|
1650
1320
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1651
|
-
|
|
1652
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1653
|
-
name: errorCode,
|
|
1654
|
-
$metadata: deserializeMetadata(output),
|
|
1655
|
-
};
|
|
1656
|
-
break;
|
|
1321
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1657
1322
|
case "InternalServerException":
|
|
1658
1323
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1659
|
-
|
|
1660
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1661
|
-
name: errorCode,
|
|
1662
|
-
$metadata: deserializeMetadata(output),
|
|
1663
|
-
};
|
|
1664
|
-
break;
|
|
1324
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1665
1325
|
case "ResourceNotFoundException":
|
|
1666
1326
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1667
|
-
|
|
1668
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1669
|
-
name: errorCode,
|
|
1670
|
-
$metadata: deserializeMetadata(output),
|
|
1671
|
-
};
|
|
1672
|
-
break;
|
|
1327
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1673
1328
|
case "ThrottlingException":
|
|
1674
1329
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1675
|
-
|
|
1676
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1677
|
-
name: errorCode,
|
|
1678
|
-
$metadata: deserializeMetadata(output),
|
|
1679
|
-
};
|
|
1680
|
-
break;
|
|
1330
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1681
1331
|
case "ValidationException":
|
|
1682
1332
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1683
|
-
|
|
1684
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1685
|
-
name: errorCode,
|
|
1686
|
-
$metadata: deserializeMetadata(output),
|
|
1687
|
-
};
|
|
1688
|
-
break;
|
|
1333
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1689
1334
|
default:
|
|
1690
1335
|
const parsedBody = parsedOutput.body;
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
...parsedBody,
|
|
1694
|
-
name: `${errorCode}`,
|
|
1695
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1336
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1337
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1696
1338
|
$fault: "client",
|
|
1697
1339
|
$metadata: deserializeMetadata(output),
|
|
1698
|
-
};
|
|
1340
|
+
});
|
|
1341
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1699
1342
|
}
|
|
1700
|
-
const message = response.message || response.Message || errorCode;
|
|
1701
|
-
response.message = message;
|
|
1702
|
-
delete response.Message;
|
|
1703
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1704
1343
|
};
|
|
1705
1344
|
const deserializeAws_restJson1EnableDelegatedAdminAccountCommand = async (output, context) => {
|
|
1706
1345
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1728,67 +1367,31 @@ const deserializeAws_restJson1EnableDelegatedAdminAccountCommandError = async (o
|
|
|
1728
1367
|
switch (errorCode) {
|
|
1729
1368
|
case "AccessDeniedException":
|
|
1730
1369
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1731
|
-
|
|
1732
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1733
|
-
name: errorCode,
|
|
1734
|
-
$metadata: deserializeMetadata(output),
|
|
1735
|
-
};
|
|
1736
|
-
break;
|
|
1370
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1737
1371
|
case "ConflictException":
|
|
1738
1372
|
case "com.amazonaws.inspector2#ConflictException":
|
|
1739
|
-
|
|
1740
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1741
|
-
name: errorCode,
|
|
1742
|
-
$metadata: deserializeMetadata(output),
|
|
1743
|
-
};
|
|
1744
|
-
break;
|
|
1373
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1745
1374
|
case "InternalServerException":
|
|
1746
1375
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1747
|
-
|
|
1748
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1749
|
-
name: errorCode,
|
|
1750
|
-
$metadata: deserializeMetadata(output),
|
|
1751
|
-
};
|
|
1752
|
-
break;
|
|
1376
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1753
1377
|
case "ResourceNotFoundException":
|
|
1754
1378
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1755
|
-
|
|
1756
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1757
|
-
name: errorCode,
|
|
1758
|
-
$metadata: deserializeMetadata(output),
|
|
1759
|
-
};
|
|
1760
|
-
break;
|
|
1379
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1761
1380
|
case "ThrottlingException":
|
|
1762
1381
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1763
|
-
|
|
1764
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1765
|
-
name: errorCode,
|
|
1766
|
-
$metadata: deserializeMetadata(output),
|
|
1767
|
-
};
|
|
1768
|
-
break;
|
|
1382
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1769
1383
|
case "ValidationException":
|
|
1770
1384
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1771
|
-
|
|
1772
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1773
|
-
name: errorCode,
|
|
1774
|
-
$metadata: deserializeMetadata(output),
|
|
1775
|
-
};
|
|
1776
|
-
break;
|
|
1385
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1777
1386
|
default:
|
|
1778
1387
|
const parsedBody = parsedOutput.body;
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
...parsedBody,
|
|
1782
|
-
name: `${errorCode}`,
|
|
1783
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1388
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1389
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1784
1390
|
$fault: "client",
|
|
1785
1391
|
$metadata: deserializeMetadata(output),
|
|
1786
|
-
};
|
|
1392
|
+
});
|
|
1393
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1787
1394
|
}
|
|
1788
|
-
const message = response.message || response.Message || errorCode;
|
|
1789
|
-
response.message = message;
|
|
1790
|
-
delete response.Message;
|
|
1791
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1792
1395
|
};
|
|
1793
1396
|
const deserializeAws_restJson1GetDelegatedAdminAccountCommand = async (output, context) => {
|
|
1794
1397
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1816,59 +1419,28 @@ const deserializeAws_restJson1GetDelegatedAdminAccountCommandError = async (outp
|
|
|
1816
1419
|
switch (errorCode) {
|
|
1817
1420
|
case "AccessDeniedException":
|
|
1818
1421
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1819
|
-
|
|
1820
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1821
|
-
name: errorCode,
|
|
1822
|
-
$metadata: deserializeMetadata(output),
|
|
1823
|
-
};
|
|
1824
|
-
break;
|
|
1422
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1825
1423
|
case "InternalServerException":
|
|
1826
1424
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1827
|
-
|
|
1828
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1829
|
-
name: errorCode,
|
|
1830
|
-
$metadata: deserializeMetadata(output),
|
|
1831
|
-
};
|
|
1832
|
-
break;
|
|
1425
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1833
1426
|
case "ResourceNotFoundException":
|
|
1834
1427
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1835
|
-
|
|
1836
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1837
|
-
name: errorCode,
|
|
1838
|
-
$metadata: deserializeMetadata(output),
|
|
1839
|
-
};
|
|
1840
|
-
break;
|
|
1428
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1841
1429
|
case "ThrottlingException":
|
|
1842
1430
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1843
|
-
|
|
1844
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1845
|
-
name: errorCode,
|
|
1846
|
-
$metadata: deserializeMetadata(output),
|
|
1847
|
-
};
|
|
1848
|
-
break;
|
|
1431
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1849
1432
|
case "ValidationException":
|
|
1850
1433
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1851
|
-
|
|
1852
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1853
|
-
name: errorCode,
|
|
1854
|
-
$metadata: deserializeMetadata(output),
|
|
1855
|
-
};
|
|
1856
|
-
break;
|
|
1434
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1857
1435
|
default:
|
|
1858
1436
|
const parsedBody = parsedOutput.body;
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
...parsedBody,
|
|
1862
|
-
name: `${errorCode}`,
|
|
1863
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1437
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1438
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1864
1439
|
$fault: "client",
|
|
1865
1440
|
$metadata: deserializeMetadata(output),
|
|
1866
|
-
};
|
|
1441
|
+
});
|
|
1442
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1867
1443
|
}
|
|
1868
|
-
const message = response.message || response.Message || errorCode;
|
|
1869
|
-
response.message = message;
|
|
1870
|
-
delete response.Message;
|
|
1871
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1872
1444
|
};
|
|
1873
1445
|
const deserializeAws_restJson1GetFindingsReportStatusCommand = async (output, context) => {
|
|
1874
1446
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1916,59 +1488,28 @@ const deserializeAws_restJson1GetFindingsReportStatusCommandError = async (outpu
|
|
|
1916
1488
|
switch (errorCode) {
|
|
1917
1489
|
case "AccessDeniedException":
|
|
1918
1490
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1919
|
-
|
|
1920
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1921
|
-
name: errorCode,
|
|
1922
|
-
$metadata: deserializeMetadata(output),
|
|
1923
|
-
};
|
|
1924
|
-
break;
|
|
1491
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1925
1492
|
case "InternalServerException":
|
|
1926
1493
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
1927
|
-
|
|
1928
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1929
|
-
name: errorCode,
|
|
1930
|
-
$metadata: deserializeMetadata(output),
|
|
1931
|
-
};
|
|
1932
|
-
break;
|
|
1494
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1933
1495
|
case "ResourceNotFoundException":
|
|
1934
1496
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
1935
|
-
|
|
1936
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1937
|
-
name: errorCode,
|
|
1938
|
-
$metadata: deserializeMetadata(output),
|
|
1939
|
-
};
|
|
1940
|
-
break;
|
|
1497
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1941
1498
|
case "ThrottlingException":
|
|
1942
1499
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
1943
|
-
|
|
1944
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1945
|
-
name: errorCode,
|
|
1946
|
-
$metadata: deserializeMetadata(output),
|
|
1947
|
-
};
|
|
1948
|
-
break;
|
|
1500
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1949
1501
|
case "ValidationException":
|
|
1950
1502
|
case "com.amazonaws.inspector2#ValidationException":
|
|
1951
|
-
|
|
1952
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1953
|
-
name: errorCode,
|
|
1954
|
-
$metadata: deserializeMetadata(output),
|
|
1955
|
-
};
|
|
1956
|
-
break;
|
|
1503
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1957
1504
|
default:
|
|
1958
1505
|
const parsedBody = parsedOutput.body;
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
...parsedBody,
|
|
1962
|
-
name: `${errorCode}`,
|
|
1963
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1506
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1507
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1964
1508
|
$fault: "client",
|
|
1965
1509
|
$metadata: deserializeMetadata(output),
|
|
1966
|
-
};
|
|
1510
|
+
});
|
|
1511
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1967
1512
|
}
|
|
1968
|
-
const message = response.message || response.Message || errorCode;
|
|
1969
|
-
response.message = message;
|
|
1970
|
-
delete response.Message;
|
|
1971
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1972
1513
|
};
|
|
1973
1514
|
const deserializeAws_restJson1GetMemberCommand = async (output, context) => {
|
|
1974
1515
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1996,59 +1537,28 @@ const deserializeAws_restJson1GetMemberCommandError = async (output, context) =>
|
|
|
1996
1537
|
switch (errorCode) {
|
|
1997
1538
|
case "AccessDeniedException":
|
|
1998
1539
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
1999
|
-
|
|
2000
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2001
|
-
name: errorCode,
|
|
2002
|
-
$metadata: deserializeMetadata(output),
|
|
2003
|
-
};
|
|
2004
|
-
break;
|
|
1540
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2005
1541
|
case "InternalServerException":
|
|
2006
1542
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2007
|
-
|
|
2008
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2009
|
-
name: errorCode,
|
|
2010
|
-
$metadata: deserializeMetadata(output),
|
|
2011
|
-
};
|
|
2012
|
-
break;
|
|
1543
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2013
1544
|
case "ResourceNotFoundException":
|
|
2014
1545
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
2015
|
-
|
|
2016
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2017
|
-
name: errorCode,
|
|
2018
|
-
$metadata: deserializeMetadata(output),
|
|
2019
|
-
};
|
|
2020
|
-
break;
|
|
1546
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2021
1547
|
case "ThrottlingException":
|
|
2022
1548
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2023
|
-
|
|
2024
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2025
|
-
name: errorCode,
|
|
2026
|
-
$metadata: deserializeMetadata(output),
|
|
2027
|
-
};
|
|
2028
|
-
break;
|
|
1549
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2029
1550
|
case "ValidationException":
|
|
2030
1551
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2031
|
-
|
|
2032
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2033
|
-
name: errorCode,
|
|
2034
|
-
$metadata: deserializeMetadata(output),
|
|
2035
|
-
};
|
|
2036
|
-
break;
|
|
1552
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2037
1553
|
default:
|
|
2038
1554
|
const parsedBody = parsedOutput.body;
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
...parsedBody,
|
|
2042
|
-
name: `${errorCode}`,
|
|
2043
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1555
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1556
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2044
1557
|
$fault: "client",
|
|
2045
1558
|
$metadata: deserializeMetadata(output),
|
|
2046
|
-
};
|
|
1559
|
+
});
|
|
1560
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2047
1561
|
}
|
|
2048
|
-
const message = response.message || response.Message || errorCode;
|
|
2049
|
-
response.message = message;
|
|
2050
|
-
delete response.Message;
|
|
2051
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2052
1562
|
};
|
|
2053
1563
|
const deserializeAws_restJson1ListAccountPermissionsCommand = async (output, context) => {
|
|
2054
1564
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2080,51 +1590,25 @@ const deserializeAws_restJson1ListAccountPermissionsCommandError = async (output
|
|
|
2080
1590
|
switch (errorCode) {
|
|
2081
1591
|
case "AccessDeniedException":
|
|
2082
1592
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2083
|
-
|
|
2084
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2085
|
-
name: errorCode,
|
|
2086
|
-
$metadata: deserializeMetadata(output),
|
|
2087
|
-
};
|
|
2088
|
-
break;
|
|
1593
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2089
1594
|
case "InternalServerException":
|
|
2090
1595
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2091
|
-
|
|
2092
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2093
|
-
name: errorCode,
|
|
2094
|
-
$metadata: deserializeMetadata(output),
|
|
2095
|
-
};
|
|
2096
|
-
break;
|
|
1596
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2097
1597
|
case "ThrottlingException":
|
|
2098
1598
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2099
|
-
|
|
2100
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2101
|
-
name: errorCode,
|
|
2102
|
-
$metadata: deserializeMetadata(output),
|
|
2103
|
-
};
|
|
2104
|
-
break;
|
|
1599
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2105
1600
|
case "ValidationException":
|
|
2106
1601
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2107
|
-
|
|
2108
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2109
|
-
name: errorCode,
|
|
2110
|
-
$metadata: deserializeMetadata(output),
|
|
2111
|
-
};
|
|
2112
|
-
break;
|
|
1602
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2113
1603
|
default:
|
|
2114
1604
|
const parsedBody = parsedOutput.body;
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
...parsedBody,
|
|
2118
|
-
name: `${errorCode}`,
|
|
2119
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1605
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1606
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2120
1607
|
$fault: "client",
|
|
2121
1608
|
$metadata: deserializeMetadata(output),
|
|
2122
|
-
};
|
|
1609
|
+
});
|
|
1610
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2123
1611
|
}
|
|
2124
|
-
const message = response.message || response.Message || errorCode;
|
|
2125
|
-
response.message = message;
|
|
2126
|
-
delete response.Message;
|
|
2127
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2128
1612
|
};
|
|
2129
1613
|
const deserializeAws_restJson1ListCoverageCommand = async (output, context) => {
|
|
2130
1614
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2156,43 +1640,22 @@ const deserializeAws_restJson1ListCoverageCommandError = async (output, context)
|
|
|
2156
1640
|
switch (errorCode) {
|
|
2157
1641
|
case "InternalServerException":
|
|
2158
1642
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2159
|
-
|
|
2160
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2161
|
-
name: errorCode,
|
|
2162
|
-
$metadata: deserializeMetadata(output),
|
|
2163
|
-
};
|
|
2164
|
-
break;
|
|
1643
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2165
1644
|
case "ThrottlingException":
|
|
2166
1645
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2167
|
-
|
|
2168
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2169
|
-
name: errorCode,
|
|
2170
|
-
$metadata: deserializeMetadata(output),
|
|
2171
|
-
};
|
|
2172
|
-
break;
|
|
1646
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2173
1647
|
case "ValidationException":
|
|
2174
1648
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2175
|
-
|
|
2176
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2177
|
-
name: errorCode,
|
|
2178
|
-
$metadata: deserializeMetadata(output),
|
|
2179
|
-
};
|
|
2180
|
-
break;
|
|
1649
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2181
1650
|
default:
|
|
2182
1651
|
const parsedBody = parsedOutput.body;
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
...parsedBody,
|
|
2186
|
-
name: `${errorCode}`,
|
|
2187
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1652
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1653
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2188
1654
|
$fault: "client",
|
|
2189
1655
|
$metadata: deserializeMetadata(output),
|
|
2190
|
-
};
|
|
1656
|
+
});
|
|
1657
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2191
1658
|
}
|
|
2192
|
-
const message = response.message || response.Message || errorCode;
|
|
2193
|
-
response.message = message;
|
|
2194
|
-
delete response.Message;
|
|
2195
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2196
1659
|
};
|
|
2197
1660
|
const deserializeAws_restJson1ListCoverageStatisticsCommand = async (output, context) => {
|
|
2198
1661
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2228,43 +1691,22 @@ const deserializeAws_restJson1ListCoverageStatisticsCommandError = async (output
|
|
|
2228
1691
|
switch (errorCode) {
|
|
2229
1692
|
case "InternalServerException":
|
|
2230
1693
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2231
|
-
|
|
2232
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2233
|
-
name: errorCode,
|
|
2234
|
-
$metadata: deserializeMetadata(output),
|
|
2235
|
-
};
|
|
2236
|
-
break;
|
|
1694
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2237
1695
|
case "ThrottlingException":
|
|
2238
1696
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2239
|
-
|
|
2240
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2241
|
-
name: errorCode,
|
|
2242
|
-
$metadata: deserializeMetadata(output),
|
|
2243
|
-
};
|
|
2244
|
-
break;
|
|
1697
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2245
1698
|
case "ValidationException":
|
|
2246
1699
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2247
|
-
|
|
2248
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2249
|
-
name: errorCode,
|
|
2250
|
-
$metadata: deserializeMetadata(output),
|
|
2251
|
-
};
|
|
2252
|
-
break;
|
|
1700
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2253
1701
|
default:
|
|
2254
1702
|
const parsedBody = parsedOutput.body;
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
...parsedBody,
|
|
2258
|
-
name: `${errorCode}`,
|
|
2259
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1703
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1704
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2260
1705
|
$fault: "client",
|
|
2261
1706
|
$metadata: deserializeMetadata(output),
|
|
2262
|
-
};
|
|
1707
|
+
});
|
|
1708
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2263
1709
|
}
|
|
2264
|
-
const message = response.message || response.Message || errorCode;
|
|
2265
|
-
response.message = message;
|
|
2266
|
-
delete response.Message;
|
|
2267
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2268
1710
|
};
|
|
2269
1711
|
const deserializeAws_restJson1ListDelegatedAdminAccountsCommand = async (output, context) => {
|
|
2270
1712
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2296,51 +1738,25 @@ const deserializeAws_restJson1ListDelegatedAdminAccountsCommandError = async (ou
|
|
|
2296
1738
|
switch (errorCode) {
|
|
2297
1739
|
case "AccessDeniedException":
|
|
2298
1740
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2299
|
-
|
|
2300
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2301
|
-
name: errorCode,
|
|
2302
|
-
$metadata: deserializeMetadata(output),
|
|
2303
|
-
};
|
|
2304
|
-
break;
|
|
1741
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2305
1742
|
case "InternalServerException":
|
|
2306
1743
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2307
|
-
|
|
2308
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2309
|
-
name: errorCode,
|
|
2310
|
-
$metadata: deserializeMetadata(output),
|
|
2311
|
-
};
|
|
2312
|
-
break;
|
|
1744
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2313
1745
|
case "ThrottlingException":
|
|
2314
1746
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2315
|
-
|
|
2316
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2317
|
-
name: errorCode,
|
|
2318
|
-
$metadata: deserializeMetadata(output),
|
|
2319
|
-
};
|
|
2320
|
-
break;
|
|
1747
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2321
1748
|
case "ValidationException":
|
|
2322
1749
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2323
|
-
|
|
2324
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2325
|
-
name: errorCode,
|
|
2326
|
-
$metadata: deserializeMetadata(output),
|
|
2327
|
-
};
|
|
2328
|
-
break;
|
|
1750
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2329
1751
|
default:
|
|
2330
1752
|
const parsedBody = parsedOutput.body;
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
...parsedBody,
|
|
2334
|
-
name: `${errorCode}`,
|
|
2335
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1753
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1754
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2336
1755
|
$fault: "client",
|
|
2337
1756
|
$metadata: deserializeMetadata(output),
|
|
2338
|
-
};
|
|
1757
|
+
});
|
|
1758
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2339
1759
|
}
|
|
2340
|
-
const message = response.message || response.Message || errorCode;
|
|
2341
|
-
response.message = message;
|
|
2342
|
-
delete response.Message;
|
|
2343
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2344
1760
|
};
|
|
2345
1761
|
const deserializeAws_restJson1ListFiltersCommand = async (output, context) => {
|
|
2346
1762
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2372,51 +1788,25 @@ const deserializeAws_restJson1ListFiltersCommandError = async (output, context)
|
|
|
2372
1788
|
switch (errorCode) {
|
|
2373
1789
|
case "AccessDeniedException":
|
|
2374
1790
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2375
|
-
|
|
2376
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2377
|
-
name: errorCode,
|
|
2378
|
-
$metadata: deserializeMetadata(output),
|
|
2379
|
-
};
|
|
2380
|
-
break;
|
|
1791
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2381
1792
|
case "InternalServerException":
|
|
2382
1793
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2383
|
-
|
|
2384
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2385
|
-
name: errorCode,
|
|
2386
|
-
$metadata: deserializeMetadata(output),
|
|
2387
|
-
};
|
|
2388
|
-
break;
|
|
1794
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2389
1795
|
case "ThrottlingException":
|
|
2390
1796
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2391
|
-
|
|
2392
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2393
|
-
name: errorCode,
|
|
2394
|
-
$metadata: deserializeMetadata(output),
|
|
2395
|
-
};
|
|
2396
|
-
break;
|
|
1797
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2397
1798
|
case "ValidationException":
|
|
2398
1799
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2399
|
-
|
|
2400
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2401
|
-
name: errorCode,
|
|
2402
|
-
$metadata: deserializeMetadata(output),
|
|
2403
|
-
};
|
|
2404
|
-
break;
|
|
1800
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2405
1801
|
default:
|
|
2406
1802
|
const parsedBody = parsedOutput.body;
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
...parsedBody,
|
|
2410
|
-
name: `${errorCode}`,
|
|
2411
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1803
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1804
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2412
1805
|
$fault: "client",
|
|
2413
1806
|
$metadata: deserializeMetadata(output),
|
|
2414
|
-
};
|
|
1807
|
+
});
|
|
1808
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2415
1809
|
}
|
|
2416
|
-
const message = response.message || response.Message || errorCode;
|
|
2417
|
-
response.message = message;
|
|
2418
|
-
delete response.Message;
|
|
2419
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2420
1810
|
};
|
|
2421
1811
|
const deserializeAws_restJson1ListFindingAggregationsCommand = async (output, context) => {
|
|
2422
1812
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2452,43 +1842,22 @@ const deserializeAws_restJson1ListFindingAggregationsCommandError = async (outpu
|
|
|
2452
1842
|
switch (errorCode) {
|
|
2453
1843
|
case "InternalServerException":
|
|
2454
1844
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2455
|
-
|
|
2456
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2457
|
-
name: errorCode,
|
|
2458
|
-
$metadata: deserializeMetadata(output),
|
|
2459
|
-
};
|
|
2460
|
-
break;
|
|
1845
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2461
1846
|
case "ThrottlingException":
|
|
2462
1847
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2463
|
-
|
|
2464
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2465
|
-
name: errorCode,
|
|
2466
|
-
$metadata: deserializeMetadata(output),
|
|
2467
|
-
};
|
|
2468
|
-
break;
|
|
1848
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2469
1849
|
case "ValidationException":
|
|
2470
1850
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2471
|
-
|
|
2472
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2473
|
-
name: errorCode,
|
|
2474
|
-
$metadata: deserializeMetadata(output),
|
|
2475
|
-
};
|
|
2476
|
-
break;
|
|
1851
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2477
1852
|
default:
|
|
2478
1853
|
const parsedBody = parsedOutput.body;
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
...parsedBody,
|
|
2482
|
-
name: `${errorCode}`,
|
|
2483
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1854
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1855
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2484
1856
|
$fault: "client",
|
|
2485
1857
|
$metadata: deserializeMetadata(output),
|
|
2486
|
-
};
|
|
1858
|
+
});
|
|
1859
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2487
1860
|
}
|
|
2488
|
-
const message = response.message || response.Message || errorCode;
|
|
2489
|
-
response.message = message;
|
|
2490
|
-
delete response.Message;
|
|
2491
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2492
1861
|
};
|
|
2493
1862
|
const deserializeAws_restJson1ListFindingsCommand = async (output, context) => {
|
|
2494
1863
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2520,43 +1889,22 @@ const deserializeAws_restJson1ListFindingsCommandError = async (output, context)
|
|
|
2520
1889
|
switch (errorCode) {
|
|
2521
1890
|
case "InternalServerException":
|
|
2522
1891
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2523
|
-
|
|
2524
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2525
|
-
name: errorCode,
|
|
2526
|
-
$metadata: deserializeMetadata(output),
|
|
2527
|
-
};
|
|
2528
|
-
break;
|
|
1892
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2529
1893
|
case "ThrottlingException":
|
|
2530
1894
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2531
|
-
|
|
2532
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2533
|
-
name: errorCode,
|
|
2534
|
-
$metadata: deserializeMetadata(output),
|
|
2535
|
-
};
|
|
2536
|
-
break;
|
|
1895
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2537
1896
|
case "ValidationException":
|
|
2538
1897
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2539
|
-
|
|
2540
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2541
|
-
name: errorCode,
|
|
2542
|
-
$metadata: deserializeMetadata(output),
|
|
2543
|
-
};
|
|
2544
|
-
break;
|
|
1898
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2545
1899
|
default:
|
|
2546
1900
|
const parsedBody = parsedOutput.body;
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
...parsedBody,
|
|
2550
|
-
name: `${errorCode}`,
|
|
2551
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1901
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1902
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2552
1903
|
$fault: "client",
|
|
2553
1904
|
$metadata: deserializeMetadata(output),
|
|
2554
|
-
};
|
|
1905
|
+
});
|
|
1906
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2555
1907
|
}
|
|
2556
|
-
const message = response.message || response.Message || errorCode;
|
|
2557
|
-
response.message = message;
|
|
2558
|
-
delete response.Message;
|
|
2559
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2560
1908
|
};
|
|
2561
1909
|
const deserializeAws_restJson1ListMembersCommand = async (output, context) => {
|
|
2562
1910
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2588,51 +1936,25 @@ const deserializeAws_restJson1ListMembersCommandError = async (output, context)
|
|
|
2588
1936
|
switch (errorCode) {
|
|
2589
1937
|
case "AccessDeniedException":
|
|
2590
1938
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2591
|
-
|
|
2592
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2593
|
-
name: errorCode,
|
|
2594
|
-
$metadata: deserializeMetadata(output),
|
|
2595
|
-
};
|
|
2596
|
-
break;
|
|
1939
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2597
1940
|
case "InternalServerException":
|
|
2598
1941
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2599
|
-
|
|
2600
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2601
|
-
name: errorCode,
|
|
2602
|
-
$metadata: deserializeMetadata(output),
|
|
2603
|
-
};
|
|
2604
|
-
break;
|
|
1942
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2605
1943
|
case "ThrottlingException":
|
|
2606
1944
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2607
|
-
|
|
2608
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2609
|
-
name: errorCode,
|
|
2610
|
-
$metadata: deserializeMetadata(output),
|
|
2611
|
-
};
|
|
2612
|
-
break;
|
|
1945
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2613
1946
|
case "ValidationException":
|
|
2614
1947
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2615
|
-
|
|
2616
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2617
|
-
name: errorCode,
|
|
2618
|
-
$metadata: deserializeMetadata(output),
|
|
2619
|
-
};
|
|
2620
|
-
break;
|
|
1948
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2621
1949
|
default:
|
|
2622
1950
|
const parsedBody = parsedOutput.body;
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
...parsedBody,
|
|
2626
|
-
name: `${errorCode}`,
|
|
2627
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1951
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1952
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2628
1953
|
$fault: "client",
|
|
2629
1954
|
$metadata: deserializeMetadata(output),
|
|
2630
|
-
};
|
|
1955
|
+
});
|
|
1956
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2631
1957
|
}
|
|
2632
|
-
const message = response.message || response.Message || errorCode;
|
|
2633
|
-
response.message = message;
|
|
2634
|
-
delete response.Message;
|
|
2635
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2636
1958
|
};
|
|
2637
1959
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
2638
1960
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2660,51 +1982,25 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
2660
1982
|
switch (errorCode) {
|
|
2661
1983
|
case "InternalServerException":
|
|
2662
1984
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2663
|
-
|
|
2664
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2665
|
-
name: errorCode,
|
|
2666
|
-
$metadata: deserializeMetadata(output),
|
|
2667
|
-
};
|
|
2668
|
-
break;
|
|
1985
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2669
1986
|
case "ResourceNotFoundException":
|
|
2670
1987
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
2671
|
-
|
|
2672
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2673
|
-
name: errorCode,
|
|
2674
|
-
$metadata: deserializeMetadata(output),
|
|
2675
|
-
};
|
|
2676
|
-
break;
|
|
1988
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2677
1989
|
case "ThrottlingException":
|
|
2678
1990
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2679
|
-
|
|
2680
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2681
|
-
name: errorCode,
|
|
2682
|
-
$metadata: deserializeMetadata(output),
|
|
2683
|
-
};
|
|
2684
|
-
break;
|
|
1991
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2685
1992
|
case "ValidationException":
|
|
2686
1993
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2687
|
-
|
|
2688
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2689
|
-
name: errorCode,
|
|
2690
|
-
$metadata: deserializeMetadata(output),
|
|
2691
|
-
};
|
|
2692
|
-
break;
|
|
1994
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2693
1995
|
default:
|
|
2694
1996
|
const parsedBody = parsedOutput.body;
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
...parsedBody,
|
|
2698
|
-
name: `${errorCode}`,
|
|
2699
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1997
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
1998
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2700
1999
|
$fault: "client",
|
|
2701
2000
|
$metadata: deserializeMetadata(output),
|
|
2702
|
-
};
|
|
2001
|
+
});
|
|
2002
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2703
2003
|
}
|
|
2704
|
-
const message = response.message || response.Message || errorCode;
|
|
2705
|
-
response.message = message;
|
|
2706
|
-
delete response.Message;
|
|
2707
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2708
2004
|
};
|
|
2709
2005
|
const deserializeAws_restJson1ListUsageTotalsCommand = async (output, context) => {
|
|
2710
2006
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2736,51 +2032,25 @@ const deserializeAws_restJson1ListUsageTotalsCommandError = async (output, conte
|
|
|
2736
2032
|
switch (errorCode) {
|
|
2737
2033
|
case "AccessDeniedException":
|
|
2738
2034
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2739
|
-
|
|
2740
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2741
|
-
name: errorCode,
|
|
2742
|
-
$metadata: deserializeMetadata(output),
|
|
2743
|
-
};
|
|
2744
|
-
break;
|
|
2035
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2745
2036
|
case "InternalServerException":
|
|
2746
2037
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2747
|
-
|
|
2748
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2749
|
-
name: errorCode,
|
|
2750
|
-
$metadata: deserializeMetadata(output),
|
|
2751
|
-
};
|
|
2752
|
-
break;
|
|
2038
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2753
2039
|
case "ThrottlingException":
|
|
2754
2040
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2755
|
-
|
|
2756
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2757
|
-
name: errorCode,
|
|
2758
|
-
$metadata: deserializeMetadata(output),
|
|
2759
|
-
};
|
|
2760
|
-
break;
|
|
2041
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2761
2042
|
case "ValidationException":
|
|
2762
2043
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2763
|
-
|
|
2764
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2765
|
-
name: errorCode,
|
|
2766
|
-
$metadata: deserializeMetadata(output),
|
|
2767
|
-
};
|
|
2768
|
-
break;
|
|
2044
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2769
2045
|
default:
|
|
2770
2046
|
const parsedBody = parsedOutput.body;
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
...parsedBody,
|
|
2774
|
-
name: `${errorCode}`,
|
|
2775
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2047
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2048
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2776
2049
|
$fault: "client",
|
|
2777
2050
|
$metadata: deserializeMetadata(output),
|
|
2778
|
-
};
|
|
2051
|
+
});
|
|
2052
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2779
2053
|
}
|
|
2780
|
-
const message = response.message || response.Message || errorCode;
|
|
2781
|
-
response.message = message;
|
|
2782
|
-
delete response.Message;
|
|
2783
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2784
2054
|
};
|
|
2785
2055
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
2786
2056
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2804,59 +2074,28 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
2804
2074
|
switch (errorCode) {
|
|
2805
2075
|
case "BadRequestException":
|
|
2806
2076
|
case "com.amazonaws.inspector2#BadRequestException":
|
|
2807
|
-
|
|
2808
|
-
...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
|
|
2809
|
-
name: errorCode,
|
|
2810
|
-
$metadata: deserializeMetadata(output),
|
|
2811
|
-
};
|
|
2812
|
-
break;
|
|
2077
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2813
2078
|
case "InternalServerException":
|
|
2814
2079
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2815
|
-
|
|
2816
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2817
|
-
name: errorCode,
|
|
2818
|
-
$metadata: deserializeMetadata(output),
|
|
2819
|
-
};
|
|
2820
|
-
break;
|
|
2080
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2821
2081
|
case "ResourceNotFoundException":
|
|
2822
2082
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
2823
|
-
|
|
2824
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2825
|
-
name: errorCode,
|
|
2826
|
-
$metadata: deserializeMetadata(output),
|
|
2827
|
-
};
|
|
2828
|
-
break;
|
|
2083
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2829
2084
|
case "ThrottlingException":
|
|
2830
2085
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2831
|
-
|
|
2832
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2833
|
-
name: errorCode,
|
|
2834
|
-
$metadata: deserializeMetadata(output),
|
|
2835
|
-
};
|
|
2836
|
-
break;
|
|
2086
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2837
2087
|
case "ValidationException":
|
|
2838
2088
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2839
|
-
|
|
2840
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2841
|
-
name: errorCode,
|
|
2842
|
-
$metadata: deserializeMetadata(output),
|
|
2843
|
-
};
|
|
2844
|
-
break;
|
|
2089
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2845
2090
|
default:
|
|
2846
2091
|
const parsedBody = parsedOutput.body;
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
...parsedBody,
|
|
2850
|
-
name: `${errorCode}`,
|
|
2851
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2092
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2093
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2852
2094
|
$fault: "client",
|
|
2853
2095
|
$metadata: deserializeMetadata(output),
|
|
2854
|
-
};
|
|
2096
|
+
});
|
|
2097
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2855
2098
|
}
|
|
2856
|
-
const message = response.message || response.Message || errorCode;
|
|
2857
|
-
response.message = message;
|
|
2858
|
-
delete response.Message;
|
|
2859
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2860
2099
|
};
|
|
2861
2100
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
2862
2101
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2880,51 +2119,25 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
2880
2119
|
switch (errorCode) {
|
|
2881
2120
|
case "InternalServerException":
|
|
2882
2121
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2883
|
-
|
|
2884
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2885
|
-
name: errorCode,
|
|
2886
|
-
$metadata: deserializeMetadata(output),
|
|
2887
|
-
};
|
|
2888
|
-
break;
|
|
2122
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2889
2123
|
case "ResourceNotFoundException":
|
|
2890
2124
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
2891
|
-
|
|
2892
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2893
|
-
name: errorCode,
|
|
2894
|
-
$metadata: deserializeMetadata(output),
|
|
2895
|
-
};
|
|
2896
|
-
break;
|
|
2125
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2897
2126
|
case "ThrottlingException":
|
|
2898
2127
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2899
|
-
|
|
2900
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2901
|
-
name: errorCode,
|
|
2902
|
-
$metadata: deserializeMetadata(output),
|
|
2903
|
-
};
|
|
2904
|
-
break;
|
|
2128
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2905
2129
|
case "ValidationException":
|
|
2906
2130
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2907
|
-
|
|
2908
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2909
|
-
name: errorCode,
|
|
2910
|
-
$metadata: deserializeMetadata(output),
|
|
2911
|
-
};
|
|
2912
|
-
break;
|
|
2131
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2913
2132
|
default:
|
|
2914
2133
|
const parsedBody = parsedOutput.body;
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
...parsedBody,
|
|
2918
|
-
name: `${errorCode}`,
|
|
2919
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2134
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2135
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2920
2136
|
$fault: "client",
|
|
2921
2137
|
$metadata: deserializeMetadata(output),
|
|
2922
|
-
};
|
|
2138
|
+
});
|
|
2139
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2923
2140
|
}
|
|
2924
|
-
const message = response.message || response.Message || errorCode;
|
|
2925
|
-
response.message = message;
|
|
2926
|
-
delete response.Message;
|
|
2927
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2928
2141
|
};
|
|
2929
2142
|
const deserializeAws_restJson1UpdateFilterCommand = async (output, context) => {
|
|
2930
2143
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -2952,59 +2165,28 @@ const deserializeAws_restJson1UpdateFilterCommandError = async (output, context)
|
|
|
2952
2165
|
switch (errorCode) {
|
|
2953
2166
|
case "AccessDeniedException":
|
|
2954
2167
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
2955
|
-
|
|
2956
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2957
|
-
name: errorCode,
|
|
2958
|
-
$metadata: deserializeMetadata(output),
|
|
2959
|
-
};
|
|
2960
|
-
break;
|
|
2168
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2961
2169
|
case "InternalServerException":
|
|
2962
2170
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
2963
|
-
|
|
2964
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2965
|
-
name: errorCode,
|
|
2966
|
-
$metadata: deserializeMetadata(output),
|
|
2967
|
-
};
|
|
2968
|
-
break;
|
|
2171
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2969
2172
|
case "ResourceNotFoundException":
|
|
2970
2173
|
case "com.amazonaws.inspector2#ResourceNotFoundException":
|
|
2971
|
-
|
|
2972
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2973
|
-
name: errorCode,
|
|
2974
|
-
$metadata: deserializeMetadata(output),
|
|
2975
|
-
};
|
|
2976
|
-
break;
|
|
2174
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2977
2175
|
case "ThrottlingException":
|
|
2978
2176
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
2979
|
-
|
|
2980
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2981
|
-
name: errorCode,
|
|
2982
|
-
$metadata: deserializeMetadata(output),
|
|
2983
|
-
};
|
|
2984
|
-
break;
|
|
2177
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2985
2178
|
case "ValidationException":
|
|
2986
2179
|
case "com.amazonaws.inspector2#ValidationException":
|
|
2987
|
-
|
|
2988
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2989
|
-
name: errorCode,
|
|
2990
|
-
$metadata: deserializeMetadata(output),
|
|
2991
|
-
};
|
|
2992
|
-
break;
|
|
2180
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2993
2181
|
default:
|
|
2994
2182
|
const parsedBody = parsedOutput.body;
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
...parsedBody,
|
|
2998
|
-
name: `${errorCode}`,
|
|
2999
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2183
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2184
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3000
2185
|
$fault: "client",
|
|
3001
2186
|
$metadata: deserializeMetadata(output),
|
|
3002
|
-
};
|
|
2187
|
+
});
|
|
2188
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3003
2189
|
}
|
|
3004
|
-
const message = response.message || response.Message || errorCode;
|
|
3005
|
-
response.message = message;
|
|
3006
|
-
delete response.Message;
|
|
3007
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3008
2190
|
};
|
|
3009
2191
|
const deserializeAws_restJson1UpdateOrganizationConfigurationCommand = async (output, context) => {
|
|
3010
2192
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -3032,87 +2214,52 @@ const deserializeAws_restJson1UpdateOrganizationConfigurationCommandError = asyn
|
|
|
3032
2214
|
switch (errorCode) {
|
|
3033
2215
|
case "AccessDeniedException":
|
|
3034
2216
|
case "com.amazonaws.inspector2#AccessDeniedException":
|
|
3035
|
-
|
|
3036
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
3037
|
-
name: errorCode,
|
|
3038
|
-
$metadata: deserializeMetadata(output),
|
|
3039
|
-
};
|
|
3040
|
-
break;
|
|
2217
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
3041
2218
|
case "InternalServerException":
|
|
3042
2219
|
case "com.amazonaws.inspector2#InternalServerException":
|
|
3043
|
-
|
|
3044
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
3045
|
-
name: errorCode,
|
|
3046
|
-
$metadata: deserializeMetadata(output),
|
|
3047
|
-
};
|
|
3048
|
-
break;
|
|
2220
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
3049
2221
|
case "ThrottlingException":
|
|
3050
2222
|
case "com.amazonaws.inspector2#ThrottlingException":
|
|
3051
|
-
|
|
3052
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3053
|
-
name: errorCode,
|
|
3054
|
-
$metadata: deserializeMetadata(output),
|
|
3055
|
-
};
|
|
3056
|
-
break;
|
|
2223
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
3057
2224
|
case "ValidationException":
|
|
3058
2225
|
case "com.amazonaws.inspector2#ValidationException":
|
|
3059
|
-
|
|
3060
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
3061
|
-
name: errorCode,
|
|
3062
|
-
$metadata: deserializeMetadata(output),
|
|
3063
|
-
};
|
|
3064
|
-
break;
|
|
2226
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
3065
2227
|
default:
|
|
3066
2228
|
const parsedBody = parsedOutput.body;
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
...parsedBody,
|
|
3070
|
-
name: `${errorCode}`,
|
|
3071
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2229
|
+
response = new Inspector2ServiceException_1.Inspector2ServiceException({
|
|
2230
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
3072
2231
|
$fault: "client",
|
|
3073
2232
|
$metadata: deserializeMetadata(output),
|
|
3074
|
-
};
|
|
2233
|
+
});
|
|
2234
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
3075
2235
|
}
|
|
3076
|
-
const message = response.message || response.Message || errorCode;
|
|
3077
|
-
response.message = message;
|
|
3078
|
-
delete response.Message;
|
|
3079
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3080
2236
|
};
|
|
3081
2237
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
3082
|
-
const contents = {
|
|
3083
|
-
name: "AccessDeniedException",
|
|
3084
|
-
$fault: "client",
|
|
3085
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3086
|
-
message: undefined,
|
|
3087
|
-
};
|
|
2238
|
+
const contents = {};
|
|
3088
2239
|
const data = parsedOutput.body;
|
|
3089
2240
|
if (data.message !== undefined && data.message !== null) {
|
|
3090
2241
|
contents.message = smithy_client_1.expectString(data.message);
|
|
3091
2242
|
}
|
|
3092
|
-
|
|
2243
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
2244
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2245
|
+
...contents,
|
|
2246
|
+
});
|
|
2247
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
3093
2248
|
};
|
|
3094
2249
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
3095
|
-
const contents = {
|
|
3096
|
-
name: "BadRequestException",
|
|
3097
|
-
$fault: "client",
|
|
3098
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3099
|
-
message: undefined,
|
|
3100
|
-
};
|
|
2250
|
+
const contents = {};
|
|
3101
2251
|
const data = parsedOutput.body;
|
|
3102
2252
|
if (data.message !== undefined && data.message !== null) {
|
|
3103
2253
|
contents.message = smithy_client_1.expectString(data.message);
|
|
3104
2254
|
}
|
|
3105
|
-
|
|
2255
|
+
const exception = new models_0_1.BadRequestException({
|
|
2256
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2257
|
+
...contents,
|
|
2258
|
+
});
|
|
2259
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
3106
2260
|
};
|
|
3107
2261
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
3108
|
-
const contents = {
|
|
3109
|
-
name: "ConflictException",
|
|
3110
|
-
$fault: "client",
|
|
3111
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3112
|
-
message: undefined,
|
|
3113
|
-
resourceId: undefined,
|
|
3114
|
-
resourceType: undefined,
|
|
3115
|
-
};
|
|
2262
|
+
const contents = {};
|
|
3116
2263
|
const data = parsedOutput.body;
|
|
3117
2264
|
if (data.message !== undefined && data.message !== null) {
|
|
3118
2265
|
contents.message = smithy_client_1.expectString(data.message);
|
|
@@ -3123,17 +2270,14 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
3123
2270
|
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
3124
2271
|
contents.resourceType = smithy_client_1.expectString(data.resourceType);
|
|
3125
2272
|
}
|
|
3126
|
-
|
|
2273
|
+
const exception = new models_0_1.ConflictException({
|
|
2274
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2275
|
+
...contents,
|
|
2276
|
+
});
|
|
2277
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
3127
2278
|
};
|
|
3128
2279
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
3129
|
-
const contents = {
|
|
3130
|
-
name: "InternalServerException",
|
|
3131
|
-
$fault: "server",
|
|
3132
|
-
$retryable: {},
|
|
3133
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3134
|
-
message: undefined,
|
|
3135
|
-
retryAfterSeconds: undefined,
|
|
3136
|
-
};
|
|
2280
|
+
const contents = {};
|
|
3137
2281
|
if (parsedOutput.headers["retry-after"] !== undefined) {
|
|
3138
2282
|
contents.retryAfterSeconds = smithy_client_1.strictParseInt32(parsedOutput.headers["retry-after"]);
|
|
3139
2283
|
}
|
|
@@ -3141,29 +2285,26 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
3141
2285
|
if (data.message !== undefined && data.message !== null) {
|
|
3142
2286
|
contents.message = smithy_client_1.expectString(data.message);
|
|
3143
2287
|
}
|
|
3144
|
-
|
|
2288
|
+
const exception = new models_0_1.InternalServerException({
|
|
2289
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2290
|
+
...contents,
|
|
2291
|
+
});
|
|
2292
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
3145
2293
|
};
|
|
3146
2294
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
3147
|
-
const contents = {
|
|
3148
|
-
name: "ResourceNotFoundException",
|
|
3149
|
-
$fault: "client",
|
|
3150
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3151
|
-
message: undefined,
|
|
3152
|
-
};
|
|
2295
|
+
const contents = {};
|
|
3153
2296
|
const data = parsedOutput.body;
|
|
3154
2297
|
if (data.message !== undefined && data.message !== null) {
|
|
3155
2298
|
contents.message = smithy_client_1.expectString(data.message);
|
|
3156
2299
|
}
|
|
3157
|
-
|
|
2300
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
2301
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2302
|
+
...contents,
|
|
2303
|
+
});
|
|
2304
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
3158
2305
|
};
|
|
3159
2306
|
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
3160
|
-
const contents = {
|
|
3161
|
-
name: "ServiceQuotaExceededException",
|
|
3162
|
-
$fault: "client",
|
|
3163
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3164
|
-
message: undefined,
|
|
3165
|
-
resourceId: undefined,
|
|
3166
|
-
};
|
|
2307
|
+
const contents = {};
|
|
3167
2308
|
const data = parsedOutput.body;
|
|
3168
2309
|
if (data.message !== undefined && data.message !== null) {
|
|
3169
2310
|
contents.message = smithy_client_1.expectString(data.message);
|
|
@@ -3171,30 +2312,26 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
3171
2312
|
if (data.resourceId !== undefined && data.resourceId !== null) {
|
|
3172
2313
|
contents.resourceId = smithy_client_1.expectString(data.resourceId);
|
|
3173
2314
|
}
|
|
3174
|
-
|
|
2315
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
2316
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2317
|
+
...contents,
|
|
2318
|
+
});
|
|
2319
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
3175
2320
|
};
|
|
3176
2321
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
3177
|
-
const contents = {
|
|
3178
|
-
name: "ThrottlingException",
|
|
3179
|
-
$fault: "client",
|
|
3180
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3181
|
-
message: undefined,
|
|
3182
|
-
};
|
|
2322
|
+
const contents = {};
|
|
3183
2323
|
const data = parsedOutput.body;
|
|
3184
2324
|
if (data.message !== undefined && data.message !== null) {
|
|
3185
2325
|
contents.message = smithy_client_1.expectString(data.message);
|
|
3186
2326
|
}
|
|
3187
|
-
|
|
2327
|
+
const exception = new models_0_1.ThrottlingException({
|
|
2328
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2329
|
+
...contents,
|
|
2330
|
+
});
|
|
2331
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
3188
2332
|
};
|
|
3189
2333
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
3190
|
-
const contents = {
|
|
3191
|
-
name: "ValidationException",
|
|
3192
|
-
$fault: "client",
|
|
3193
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3194
|
-
fields: undefined,
|
|
3195
|
-
message: undefined,
|
|
3196
|
-
reason: undefined,
|
|
3197
|
-
};
|
|
2334
|
+
const contents = {};
|
|
3198
2335
|
const data = parsedOutput.body;
|
|
3199
2336
|
if (data.fields !== undefined && data.fields !== null) {
|
|
3200
2337
|
contents.fields = deserializeAws_restJson1ValidationExceptionFields(data.fields, context);
|
|
@@ -3205,7 +2342,11 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
3205
2342
|
if (data.reason !== undefined && data.reason !== null) {
|
|
3206
2343
|
contents.reason = smithy_client_1.expectString(data.reason);
|
|
3207
2344
|
}
|
|
3208
|
-
|
|
2345
|
+
const exception = new models_0_1.ValidationException({
|
|
2346
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2347
|
+
...contents,
|
|
2348
|
+
});
|
|
2349
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
3209
2350
|
};
|
|
3210
2351
|
const serializeAws_restJson1AccountAggregation = (input, context) => {
|
|
3211
2352
|
return {
|
|
@@ -3757,7 +2898,7 @@ const deserializeAws_restJson1AccountAggregationResponse = (output, context) =>
|
|
|
3757
2898
|
};
|
|
3758
2899
|
};
|
|
3759
2900
|
const deserializeAws_restJson1AccountList = (output, context) => {
|
|
3760
|
-
|
|
2901
|
+
const retVal = (output || [])
|
|
3761
2902
|
.filter((e) => e != null)
|
|
3762
2903
|
.map((entry) => {
|
|
3763
2904
|
if (entry === null) {
|
|
@@ -3765,6 +2906,7 @@ const deserializeAws_restJson1AccountList = (output, context) => {
|
|
|
3765
2906
|
}
|
|
3766
2907
|
return deserializeAws_restJson1Account(entry, context);
|
|
3767
2908
|
});
|
|
2909
|
+
return retVal;
|
|
3768
2910
|
};
|
|
3769
2911
|
const deserializeAws_restJson1AccountState = (output, context) => {
|
|
3770
2912
|
return {
|
|
@@ -3778,7 +2920,7 @@ const deserializeAws_restJson1AccountState = (output, context) => {
|
|
|
3778
2920
|
};
|
|
3779
2921
|
};
|
|
3780
2922
|
const deserializeAws_restJson1AccountStateList = (output, context) => {
|
|
3781
|
-
|
|
2923
|
+
const retVal = (output || [])
|
|
3782
2924
|
.filter((e) => e != null)
|
|
3783
2925
|
.map((entry) => {
|
|
3784
2926
|
if (entry === null) {
|
|
@@ -3786,6 +2928,7 @@ const deserializeAws_restJson1AccountStateList = (output, context) => {
|
|
|
3786
2928
|
}
|
|
3787
2929
|
return deserializeAws_restJson1AccountState(entry, context);
|
|
3788
2930
|
});
|
|
2931
|
+
return retVal;
|
|
3789
2932
|
};
|
|
3790
2933
|
const deserializeAws_restJson1AggregationResponse = (output, context) => {
|
|
3791
2934
|
if (output.accountAggregation !== undefined && output.accountAggregation !== null) {
|
|
@@ -3836,7 +2979,7 @@ const deserializeAws_restJson1AggregationResponse = (output, context) => {
|
|
|
3836
2979
|
return { $unknown: Object.entries(output)[0] };
|
|
3837
2980
|
};
|
|
3838
2981
|
const deserializeAws_restJson1AggregationResponseList = (output, context) => {
|
|
3839
|
-
|
|
2982
|
+
const retVal = (output || [])
|
|
3840
2983
|
.filter((e) => e != null)
|
|
3841
2984
|
.map((entry) => {
|
|
3842
2985
|
if (entry === null) {
|
|
@@ -3844,6 +2987,7 @@ const deserializeAws_restJson1AggregationResponseList = (output, context) => {
|
|
|
3844
2987
|
}
|
|
3845
2988
|
return deserializeAws_restJson1AggregationResponse(smithy_client_1.expectUnion(entry), context);
|
|
3846
2989
|
});
|
|
2990
|
+
return retVal;
|
|
3847
2991
|
};
|
|
3848
2992
|
const deserializeAws_restJson1AmiAggregationResponse = (output, context) => {
|
|
3849
2993
|
return {
|
|
@@ -3919,7 +3063,7 @@ const deserializeAws_restJson1Counts = (output, context) => {
|
|
|
3919
3063
|
};
|
|
3920
3064
|
};
|
|
3921
3065
|
const deserializeAws_restJson1CountsList = (output, context) => {
|
|
3922
|
-
|
|
3066
|
+
const retVal = (output || [])
|
|
3923
3067
|
.filter((e) => e != null)
|
|
3924
3068
|
.map((entry) => {
|
|
3925
3069
|
if (entry === null) {
|
|
@@ -3927,6 +3071,7 @@ const deserializeAws_restJson1CountsList = (output, context) => {
|
|
|
3927
3071
|
}
|
|
3928
3072
|
return deserializeAws_restJson1Counts(entry, context);
|
|
3929
3073
|
});
|
|
3074
|
+
return retVal;
|
|
3930
3075
|
};
|
|
3931
3076
|
const deserializeAws_restJson1CoveredResource = (output, context) => {
|
|
3932
3077
|
return {
|
|
@@ -3943,7 +3088,7 @@ const deserializeAws_restJson1CoveredResource = (output, context) => {
|
|
|
3943
3088
|
};
|
|
3944
3089
|
};
|
|
3945
3090
|
const deserializeAws_restJson1CoveredResources = (output, context) => {
|
|
3946
|
-
|
|
3091
|
+
const retVal = (output || [])
|
|
3947
3092
|
.filter((e) => e != null)
|
|
3948
3093
|
.map((entry) => {
|
|
3949
3094
|
if (entry === null) {
|
|
@@ -3951,6 +3096,7 @@ const deserializeAws_restJson1CoveredResources = (output, context) => {
|
|
|
3951
3096
|
}
|
|
3952
3097
|
return deserializeAws_restJson1CoveredResource(entry, context);
|
|
3953
3098
|
});
|
|
3099
|
+
return retVal;
|
|
3954
3100
|
};
|
|
3955
3101
|
const deserializeAws_restJson1CvssScore = (output, context) => {
|
|
3956
3102
|
return {
|
|
@@ -3967,7 +3113,7 @@ const deserializeAws_restJson1CvssScoreAdjustment = (output, context) => {
|
|
|
3967
3113
|
};
|
|
3968
3114
|
};
|
|
3969
3115
|
const deserializeAws_restJson1CvssScoreAdjustmentList = (output, context) => {
|
|
3970
|
-
|
|
3116
|
+
const retVal = (output || [])
|
|
3971
3117
|
.filter((e) => e != null)
|
|
3972
3118
|
.map((entry) => {
|
|
3973
3119
|
if (entry === null) {
|
|
@@ -3975,6 +3121,7 @@ const deserializeAws_restJson1CvssScoreAdjustmentList = (output, context) => {
|
|
|
3975
3121
|
}
|
|
3976
3122
|
return deserializeAws_restJson1CvssScoreAdjustment(entry, context);
|
|
3977
3123
|
});
|
|
3124
|
+
return retVal;
|
|
3978
3125
|
};
|
|
3979
3126
|
const deserializeAws_restJson1CvssScoreDetails = (output, context) => {
|
|
3980
3127
|
return {
|
|
@@ -3989,7 +3136,7 @@ const deserializeAws_restJson1CvssScoreDetails = (output, context) => {
|
|
|
3989
3136
|
};
|
|
3990
3137
|
};
|
|
3991
3138
|
const deserializeAws_restJson1CvssScoreList = (output, context) => {
|
|
3992
|
-
|
|
3139
|
+
const retVal = (output || [])
|
|
3993
3140
|
.filter((e) => e != null)
|
|
3994
3141
|
.map((entry) => {
|
|
3995
3142
|
if (entry === null) {
|
|
@@ -3997,6 +3144,7 @@ const deserializeAws_restJson1CvssScoreList = (output, context) => {
|
|
|
3997
3144
|
}
|
|
3998
3145
|
return deserializeAws_restJson1CvssScore(entry, context);
|
|
3999
3146
|
});
|
|
3147
|
+
return retVal;
|
|
4000
3148
|
};
|
|
4001
3149
|
const deserializeAws_restJson1DateFilter = (output, context) => {
|
|
4002
3150
|
return {
|
|
@@ -4009,7 +3157,7 @@ const deserializeAws_restJson1DateFilter = (output, context) => {
|
|
|
4009
3157
|
};
|
|
4010
3158
|
};
|
|
4011
3159
|
const deserializeAws_restJson1DateFilterList = (output, context) => {
|
|
4012
|
-
|
|
3160
|
+
const retVal = (output || [])
|
|
4013
3161
|
.filter((e) => e != null)
|
|
4014
3162
|
.map((entry) => {
|
|
4015
3163
|
if (entry === null) {
|
|
@@ -4017,6 +3165,7 @@ const deserializeAws_restJson1DateFilterList = (output, context) => {
|
|
|
4017
3165
|
}
|
|
4018
3166
|
return deserializeAws_restJson1DateFilter(entry, context);
|
|
4019
3167
|
});
|
|
3168
|
+
return retVal;
|
|
4020
3169
|
};
|
|
4021
3170
|
const deserializeAws_restJson1DelegatedAdmin = (output, context) => {
|
|
4022
3171
|
return {
|
|
@@ -4031,7 +3180,7 @@ const deserializeAws_restJson1DelegatedAdminAccount = (output, context) => {
|
|
|
4031
3180
|
};
|
|
4032
3181
|
};
|
|
4033
3182
|
const deserializeAws_restJson1DelegatedAdminAccountList = (output, context) => {
|
|
4034
|
-
|
|
3183
|
+
const retVal = (output || [])
|
|
4035
3184
|
.filter((e) => e != null)
|
|
4036
3185
|
.map((entry) => {
|
|
4037
3186
|
if (entry === null) {
|
|
@@ -4039,6 +3188,7 @@ const deserializeAws_restJson1DelegatedAdminAccountList = (output, context) => {
|
|
|
4039
3188
|
}
|
|
4040
3189
|
return deserializeAws_restJson1DelegatedAdminAccount(entry, context);
|
|
4041
3190
|
});
|
|
3191
|
+
return retVal;
|
|
4042
3192
|
};
|
|
4043
3193
|
const deserializeAws_restJson1Destination = (output, context) => {
|
|
4044
3194
|
return {
|
|
@@ -4096,7 +3246,7 @@ const deserializeAws_restJson1FailedAccount = (output, context) => {
|
|
|
4096
3246
|
};
|
|
4097
3247
|
};
|
|
4098
3248
|
const deserializeAws_restJson1FailedAccountList = (output, context) => {
|
|
4099
|
-
|
|
3249
|
+
const retVal = (output || [])
|
|
4100
3250
|
.filter((e) => e != null)
|
|
4101
3251
|
.map((entry) => {
|
|
4102
3252
|
if (entry === null) {
|
|
@@ -4104,6 +3254,7 @@ const deserializeAws_restJson1FailedAccountList = (output, context) => {
|
|
|
4104
3254
|
}
|
|
4105
3255
|
return deserializeAws_restJson1FailedAccount(entry, context);
|
|
4106
3256
|
});
|
|
3257
|
+
return retVal;
|
|
4107
3258
|
};
|
|
4108
3259
|
const deserializeAws_restJson1Filter = (output, context) => {
|
|
4109
3260
|
return {
|
|
@@ -4225,7 +3376,7 @@ const deserializeAws_restJson1FilterCriteria = (output, context) => {
|
|
|
4225
3376
|
};
|
|
4226
3377
|
};
|
|
4227
3378
|
const deserializeAws_restJson1FilterList = (output, context) => {
|
|
4228
|
-
|
|
3379
|
+
const retVal = (output || [])
|
|
4229
3380
|
.filter((e) => e != null)
|
|
4230
3381
|
.map((entry) => {
|
|
4231
3382
|
if (entry === null) {
|
|
@@ -4233,6 +3384,7 @@ const deserializeAws_restJson1FilterList = (output, context) => {
|
|
|
4233
3384
|
}
|
|
4234
3385
|
return deserializeAws_restJson1Filter(entry, context);
|
|
4235
3386
|
});
|
|
3387
|
+
return retVal;
|
|
4236
3388
|
};
|
|
4237
3389
|
const deserializeAws_restJson1Finding = (output, context) => {
|
|
4238
3390
|
return {
|
|
@@ -4271,7 +3423,7 @@ const deserializeAws_restJson1Finding = (output, context) => {
|
|
|
4271
3423
|
};
|
|
4272
3424
|
};
|
|
4273
3425
|
const deserializeAws_restJson1FindingList = (output, context) => {
|
|
4274
|
-
|
|
3426
|
+
const retVal = (output || [])
|
|
4275
3427
|
.filter((e) => e != null)
|
|
4276
3428
|
.map((entry) => {
|
|
4277
3429
|
if (entry === null) {
|
|
@@ -4279,6 +3431,7 @@ const deserializeAws_restJson1FindingList = (output, context) => {
|
|
|
4279
3431
|
}
|
|
4280
3432
|
return deserializeAws_restJson1Finding(entry, context);
|
|
4281
3433
|
});
|
|
3434
|
+
return retVal;
|
|
4282
3435
|
};
|
|
4283
3436
|
const deserializeAws_restJson1FindingTypeAggregationResponse = (output, context) => {
|
|
4284
3437
|
return {
|
|
@@ -4297,7 +3450,7 @@ const deserializeAws_restJson1FreeTrialAccountInfo = (output, context) => {
|
|
|
4297
3450
|
};
|
|
4298
3451
|
};
|
|
4299
3452
|
const deserializeAws_restJson1FreeTrialAccountInfoList = (output, context) => {
|
|
4300
|
-
|
|
3453
|
+
const retVal = (output || [])
|
|
4301
3454
|
.filter((e) => e != null)
|
|
4302
3455
|
.map((entry) => {
|
|
4303
3456
|
if (entry === null) {
|
|
@@ -4305,6 +3458,7 @@ const deserializeAws_restJson1FreeTrialAccountInfoList = (output, context) => {
|
|
|
4305
3458
|
}
|
|
4306
3459
|
return deserializeAws_restJson1FreeTrialAccountInfo(entry, context);
|
|
4307
3460
|
});
|
|
3461
|
+
return retVal;
|
|
4308
3462
|
};
|
|
4309
3463
|
const deserializeAws_restJson1FreeTrialInfo = (output, context) => {
|
|
4310
3464
|
return {
|
|
@@ -4326,7 +3480,7 @@ const deserializeAws_restJson1FreeTrialInfoError = (output, context) => {
|
|
|
4326
3480
|
};
|
|
4327
3481
|
};
|
|
4328
3482
|
const deserializeAws_restJson1FreeTrialInfoErrorList = (output, context) => {
|
|
4329
|
-
|
|
3483
|
+
const retVal = (output || [])
|
|
4330
3484
|
.filter((e) => e != null)
|
|
4331
3485
|
.map((entry) => {
|
|
4332
3486
|
if (entry === null) {
|
|
@@ -4334,9 +3488,10 @@ const deserializeAws_restJson1FreeTrialInfoErrorList = (output, context) => {
|
|
|
4334
3488
|
}
|
|
4335
3489
|
return deserializeAws_restJson1FreeTrialInfoError(entry, context);
|
|
4336
3490
|
});
|
|
3491
|
+
return retVal;
|
|
4337
3492
|
};
|
|
4338
3493
|
const deserializeAws_restJson1FreeTrialInfoList = (output, context) => {
|
|
4339
|
-
|
|
3494
|
+
const retVal = (output || [])
|
|
4340
3495
|
.filter((e) => e != null)
|
|
4341
3496
|
.map((entry) => {
|
|
4342
3497
|
if (entry === null) {
|
|
@@ -4344,6 +3499,7 @@ const deserializeAws_restJson1FreeTrialInfoList = (output, context) => {
|
|
|
4344
3499
|
}
|
|
4345
3500
|
return deserializeAws_restJson1FreeTrialInfo(entry, context);
|
|
4346
3501
|
});
|
|
3502
|
+
return retVal;
|
|
4347
3503
|
};
|
|
4348
3504
|
const deserializeAws_restJson1ImageLayerAggregationResponse = (output, context) => {
|
|
4349
3505
|
return {
|
|
@@ -4357,7 +3513,7 @@ const deserializeAws_restJson1ImageLayerAggregationResponse = (output, context)
|
|
|
4357
3513
|
};
|
|
4358
3514
|
};
|
|
4359
3515
|
const deserializeAws_restJson1ImageTagList = (output, context) => {
|
|
4360
|
-
|
|
3516
|
+
const retVal = (output || [])
|
|
4361
3517
|
.filter((e) => e != null)
|
|
4362
3518
|
.map((entry) => {
|
|
4363
3519
|
if (entry === null) {
|
|
@@ -4365,6 +3521,7 @@ const deserializeAws_restJson1ImageTagList = (output, context) => {
|
|
|
4365
3521
|
}
|
|
4366
3522
|
return smithy_client_1.expectString(entry);
|
|
4367
3523
|
});
|
|
3524
|
+
return retVal;
|
|
4368
3525
|
};
|
|
4369
3526
|
const deserializeAws_restJson1InspectorScoreDetails = (output, context) => {
|
|
4370
3527
|
return {
|
|
@@ -4374,7 +3531,7 @@ const deserializeAws_restJson1InspectorScoreDetails = (output, context) => {
|
|
|
4374
3531
|
};
|
|
4375
3532
|
};
|
|
4376
3533
|
const deserializeAws_restJson1IpV4AddressList = (output, context) => {
|
|
4377
|
-
|
|
3534
|
+
const retVal = (output || [])
|
|
4378
3535
|
.filter((e) => e != null)
|
|
4379
3536
|
.map((entry) => {
|
|
4380
3537
|
if (entry === null) {
|
|
@@ -4382,9 +3539,10 @@ const deserializeAws_restJson1IpV4AddressList = (output, context) => {
|
|
|
4382
3539
|
}
|
|
4383
3540
|
return smithy_client_1.expectString(entry);
|
|
4384
3541
|
});
|
|
3542
|
+
return retVal;
|
|
4385
3543
|
};
|
|
4386
3544
|
const deserializeAws_restJson1IpV6AddressList = (output, context) => {
|
|
4387
|
-
|
|
3545
|
+
const retVal = (output || [])
|
|
4388
3546
|
.filter((e) => e != null)
|
|
4389
3547
|
.map((entry) => {
|
|
4390
3548
|
if (entry === null) {
|
|
@@ -4392,6 +3550,7 @@ const deserializeAws_restJson1IpV6AddressList = (output, context) => {
|
|
|
4392
3550
|
}
|
|
4393
3551
|
return smithy_client_1.expectString(entry);
|
|
4394
3552
|
});
|
|
3553
|
+
return retVal;
|
|
4395
3554
|
};
|
|
4396
3555
|
const deserializeAws_restJson1MapFilter = (output, context) => {
|
|
4397
3556
|
return {
|
|
@@ -4401,7 +3560,7 @@ const deserializeAws_restJson1MapFilter = (output, context) => {
|
|
|
4401
3560
|
};
|
|
4402
3561
|
};
|
|
4403
3562
|
const deserializeAws_restJson1MapFilterList = (output, context) => {
|
|
4404
|
-
|
|
3563
|
+
const retVal = (output || [])
|
|
4405
3564
|
.filter((e) => e != null)
|
|
4406
3565
|
.map((entry) => {
|
|
4407
3566
|
if (entry === null) {
|
|
@@ -4409,6 +3568,7 @@ const deserializeAws_restJson1MapFilterList = (output, context) => {
|
|
|
4409
3568
|
}
|
|
4410
3569
|
return deserializeAws_restJson1MapFilter(entry, context);
|
|
4411
3570
|
});
|
|
3571
|
+
return retVal;
|
|
4412
3572
|
};
|
|
4413
3573
|
const deserializeAws_restJson1Member = (output, context) => {
|
|
4414
3574
|
return {
|
|
@@ -4421,7 +3581,7 @@ const deserializeAws_restJson1Member = (output, context) => {
|
|
|
4421
3581
|
};
|
|
4422
3582
|
};
|
|
4423
3583
|
const deserializeAws_restJson1MemberList = (output, context) => {
|
|
4424
|
-
|
|
3584
|
+
const retVal = (output || [])
|
|
4425
3585
|
.filter((e) => e != null)
|
|
4426
3586
|
.map((entry) => {
|
|
4427
3587
|
if (entry === null) {
|
|
@@ -4429,6 +3589,7 @@ const deserializeAws_restJson1MemberList = (output, context) => {
|
|
|
4429
3589
|
}
|
|
4430
3590
|
return deserializeAws_restJson1Member(entry, context);
|
|
4431
3591
|
});
|
|
3592
|
+
return retVal;
|
|
4432
3593
|
};
|
|
4433
3594
|
const deserializeAws_restJson1NetworkPath = (output, context) => {
|
|
4434
3595
|
return {
|
|
@@ -4449,7 +3610,7 @@ const deserializeAws_restJson1NetworkReachabilityDetails = (output, context) =>
|
|
|
4449
3610
|
};
|
|
4450
3611
|
};
|
|
4451
3612
|
const deserializeAws_restJson1NonEmptyStringList = (output, context) => {
|
|
4452
|
-
|
|
3613
|
+
const retVal = (output || [])
|
|
4453
3614
|
.filter((e) => e != null)
|
|
4454
3615
|
.map((entry) => {
|
|
4455
3616
|
if (entry === null) {
|
|
@@ -4457,6 +3618,7 @@ const deserializeAws_restJson1NonEmptyStringList = (output, context) => {
|
|
|
4457
3618
|
}
|
|
4458
3619
|
return smithy_client_1.expectString(entry);
|
|
4459
3620
|
});
|
|
3621
|
+
return retVal;
|
|
4460
3622
|
};
|
|
4461
3623
|
const deserializeAws_restJson1NumberFilter = (output, context) => {
|
|
4462
3624
|
return {
|
|
@@ -4465,7 +3627,7 @@ const deserializeAws_restJson1NumberFilter = (output, context) => {
|
|
|
4465
3627
|
};
|
|
4466
3628
|
};
|
|
4467
3629
|
const deserializeAws_restJson1NumberFilterList = (output, context) => {
|
|
4468
|
-
|
|
3630
|
+
const retVal = (output || [])
|
|
4469
3631
|
.filter((e) => e != null)
|
|
4470
3632
|
.map((entry) => {
|
|
4471
3633
|
if (entry === null) {
|
|
@@ -4473,6 +3635,7 @@ const deserializeAws_restJson1NumberFilterList = (output, context) => {
|
|
|
4473
3635
|
}
|
|
4474
3636
|
return deserializeAws_restJson1NumberFilter(entry, context);
|
|
4475
3637
|
});
|
|
3638
|
+
return retVal;
|
|
4476
3639
|
};
|
|
4477
3640
|
const deserializeAws_restJson1PackageAggregationResponse = (output, context) => {
|
|
4478
3641
|
return {
|
|
@@ -4506,7 +3669,7 @@ const deserializeAws_restJson1PackageFilter = (output, context) => {
|
|
|
4506
3669
|
};
|
|
4507
3670
|
};
|
|
4508
3671
|
const deserializeAws_restJson1PackageFilterList = (output, context) => {
|
|
4509
|
-
|
|
3672
|
+
const retVal = (output || [])
|
|
4510
3673
|
.filter((e) => e != null)
|
|
4511
3674
|
.map((entry) => {
|
|
4512
3675
|
if (entry === null) {
|
|
@@ -4514,6 +3677,7 @@ const deserializeAws_restJson1PackageFilterList = (output, context) => {
|
|
|
4514
3677
|
}
|
|
4515
3678
|
return deserializeAws_restJson1PackageFilter(entry, context);
|
|
4516
3679
|
});
|
|
3680
|
+
return retVal;
|
|
4517
3681
|
};
|
|
4518
3682
|
const deserializeAws_restJson1PackageVulnerabilityDetails = (output, context) => {
|
|
4519
3683
|
return {
|
|
@@ -4548,7 +3712,7 @@ const deserializeAws_restJson1Permission = (output, context) => {
|
|
|
4548
3712
|
};
|
|
4549
3713
|
};
|
|
4550
3714
|
const deserializeAws_restJson1Permissions = (output, context) => {
|
|
4551
|
-
|
|
3715
|
+
const retVal = (output || [])
|
|
4552
3716
|
.filter((e) => e != null)
|
|
4553
3717
|
.map((entry) => {
|
|
4554
3718
|
if (entry === null) {
|
|
@@ -4556,6 +3720,7 @@ const deserializeAws_restJson1Permissions = (output, context) => {
|
|
|
4556
3720
|
}
|
|
4557
3721
|
return deserializeAws_restJson1Permission(entry, context);
|
|
4558
3722
|
});
|
|
3723
|
+
return retVal;
|
|
4559
3724
|
};
|
|
4560
3725
|
const deserializeAws_restJson1PortRange = (output, context) => {
|
|
4561
3726
|
return {
|
|
@@ -4570,7 +3735,7 @@ const deserializeAws_restJson1PortRangeFilter = (output, context) => {
|
|
|
4570
3735
|
};
|
|
4571
3736
|
};
|
|
4572
3737
|
const deserializeAws_restJson1PortRangeFilterList = (output, context) => {
|
|
4573
|
-
|
|
3738
|
+
const retVal = (output || [])
|
|
4574
3739
|
.filter((e) => e != null)
|
|
4575
3740
|
.map((entry) => {
|
|
4576
3741
|
if (entry === null) {
|
|
@@ -4578,6 +3743,7 @@ const deserializeAws_restJson1PortRangeFilterList = (output, context) => {
|
|
|
4578
3743
|
}
|
|
4579
3744
|
return deserializeAws_restJson1PortRangeFilter(entry, context);
|
|
4580
3745
|
});
|
|
3746
|
+
return retVal;
|
|
4581
3747
|
};
|
|
4582
3748
|
const deserializeAws_restJson1Recommendation = (output, context) => {
|
|
4583
3749
|
return {
|
|
@@ -4627,7 +3793,7 @@ const deserializeAws_restJson1ResourceDetails = (output, context) => {
|
|
|
4627
3793
|
};
|
|
4628
3794
|
};
|
|
4629
3795
|
const deserializeAws_restJson1ResourceList = (output, context) => {
|
|
4630
|
-
|
|
3796
|
+
const retVal = (output || [])
|
|
4631
3797
|
.filter((e) => e != null)
|
|
4632
3798
|
.map((entry) => {
|
|
4633
3799
|
if (entry === null) {
|
|
@@ -4635,6 +3801,7 @@ const deserializeAws_restJson1ResourceList = (output, context) => {
|
|
|
4635
3801
|
}
|
|
4636
3802
|
return deserializeAws_restJson1Resource(entry, context);
|
|
4637
3803
|
});
|
|
3804
|
+
return retVal;
|
|
4638
3805
|
};
|
|
4639
3806
|
const deserializeAws_restJson1ResourceScanMetadata = (output, context) => {
|
|
4640
3807
|
return {
|
|
@@ -4689,7 +3856,7 @@ const deserializeAws_restJson1Step = (output, context) => {
|
|
|
4689
3856
|
};
|
|
4690
3857
|
};
|
|
4691
3858
|
const deserializeAws_restJson1StepList = (output, context) => {
|
|
4692
|
-
|
|
3859
|
+
const retVal = (output || [])
|
|
4693
3860
|
.filter((e) => e != null)
|
|
4694
3861
|
.map((entry) => {
|
|
4695
3862
|
if (entry === null) {
|
|
@@ -4697,6 +3864,7 @@ const deserializeAws_restJson1StepList = (output, context) => {
|
|
|
4697
3864
|
}
|
|
4698
3865
|
return deserializeAws_restJson1Step(entry, context);
|
|
4699
3866
|
});
|
|
3867
|
+
return retVal;
|
|
4700
3868
|
};
|
|
4701
3869
|
const deserializeAws_restJson1StringFilter = (output, context) => {
|
|
4702
3870
|
return {
|
|
@@ -4705,7 +3873,7 @@ const deserializeAws_restJson1StringFilter = (output, context) => {
|
|
|
4705
3873
|
};
|
|
4706
3874
|
};
|
|
4707
3875
|
const deserializeAws_restJson1StringFilterList = (output, context) => {
|
|
4708
|
-
|
|
3876
|
+
const retVal = (output || [])
|
|
4709
3877
|
.filter((e) => e != null)
|
|
4710
3878
|
.map((entry) => {
|
|
4711
3879
|
if (entry === null) {
|
|
@@ -4713,9 +3881,10 @@ const deserializeAws_restJson1StringFilterList = (output, context) => {
|
|
|
4713
3881
|
}
|
|
4714
3882
|
return deserializeAws_restJson1StringFilter(entry, context);
|
|
4715
3883
|
});
|
|
3884
|
+
return retVal;
|
|
4716
3885
|
};
|
|
4717
3886
|
const deserializeAws_restJson1StringList = (output, context) => {
|
|
4718
|
-
|
|
3887
|
+
const retVal = (output || [])
|
|
4719
3888
|
.filter((e) => e != null)
|
|
4720
3889
|
.map((entry) => {
|
|
4721
3890
|
if (entry === null) {
|
|
@@ -4723,9 +3892,10 @@ const deserializeAws_restJson1StringList = (output, context) => {
|
|
|
4723
3892
|
}
|
|
4724
3893
|
return smithy_client_1.expectString(entry);
|
|
4725
3894
|
});
|
|
3895
|
+
return retVal;
|
|
4726
3896
|
};
|
|
4727
3897
|
const deserializeAws_restJson1TagList = (output, context) => {
|
|
4728
|
-
|
|
3898
|
+
const retVal = (output || [])
|
|
4729
3899
|
.filter((e) => e != null)
|
|
4730
3900
|
.map((entry) => {
|
|
4731
3901
|
if (entry === null) {
|
|
@@ -4733,6 +3903,7 @@ const deserializeAws_restJson1TagList = (output, context) => {
|
|
|
4733
3903
|
}
|
|
4734
3904
|
return smithy_client_1.expectString(entry);
|
|
4735
3905
|
});
|
|
3906
|
+
return retVal;
|
|
4736
3907
|
};
|
|
4737
3908
|
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
4738
3909
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
@@ -4764,7 +3935,7 @@ const deserializeAws_restJson1Usage = (output, context) => {
|
|
|
4764
3935
|
};
|
|
4765
3936
|
};
|
|
4766
3937
|
const deserializeAws_restJson1UsageList = (output, context) => {
|
|
4767
|
-
|
|
3938
|
+
const retVal = (output || [])
|
|
4768
3939
|
.filter((e) => e != null)
|
|
4769
3940
|
.map((entry) => {
|
|
4770
3941
|
if (entry === null) {
|
|
@@ -4772,6 +3943,7 @@ const deserializeAws_restJson1UsageList = (output, context) => {
|
|
|
4772
3943
|
}
|
|
4773
3944
|
return deserializeAws_restJson1Usage(entry, context);
|
|
4774
3945
|
});
|
|
3946
|
+
return retVal;
|
|
4775
3947
|
};
|
|
4776
3948
|
const deserializeAws_restJson1UsageTotal = (output, context) => {
|
|
4777
3949
|
return {
|
|
@@ -4782,7 +3954,7 @@ const deserializeAws_restJson1UsageTotal = (output, context) => {
|
|
|
4782
3954
|
};
|
|
4783
3955
|
};
|
|
4784
3956
|
const deserializeAws_restJson1UsageTotalList = (output, context) => {
|
|
4785
|
-
|
|
3957
|
+
const retVal = (output || [])
|
|
4786
3958
|
.filter((e) => e != null)
|
|
4787
3959
|
.map((entry) => {
|
|
4788
3960
|
if (entry === null) {
|
|
@@ -4790,6 +3962,7 @@ const deserializeAws_restJson1UsageTotalList = (output, context) => {
|
|
|
4790
3962
|
}
|
|
4791
3963
|
return deserializeAws_restJson1UsageTotal(entry, context);
|
|
4792
3964
|
});
|
|
3965
|
+
return retVal;
|
|
4793
3966
|
};
|
|
4794
3967
|
const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
|
|
4795
3968
|
return {
|
|
@@ -4798,7 +3971,7 @@ const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
|
|
|
4798
3971
|
};
|
|
4799
3972
|
};
|
|
4800
3973
|
const deserializeAws_restJson1ValidationExceptionFields = (output, context) => {
|
|
4801
|
-
|
|
3974
|
+
const retVal = (output || [])
|
|
4802
3975
|
.filter((e) => e != null)
|
|
4803
3976
|
.map((entry) => {
|
|
4804
3977
|
if (entry === null) {
|
|
@@ -4806,9 +3979,10 @@ const deserializeAws_restJson1ValidationExceptionFields = (output, context) => {
|
|
|
4806
3979
|
}
|
|
4807
3980
|
return deserializeAws_restJson1ValidationExceptionField(entry, context);
|
|
4808
3981
|
});
|
|
3982
|
+
return retVal;
|
|
4809
3983
|
};
|
|
4810
3984
|
const deserializeAws_restJson1VulnerabilityIdList = (output, context) => {
|
|
4811
|
-
|
|
3985
|
+
const retVal = (output || [])
|
|
4812
3986
|
.filter((e) => e != null)
|
|
4813
3987
|
.map((entry) => {
|
|
4814
3988
|
if (entry === null) {
|
|
@@ -4816,6 +3990,7 @@ const deserializeAws_restJson1VulnerabilityIdList = (output, context) => {
|
|
|
4816
3990
|
}
|
|
4817
3991
|
return smithy_client_1.expectString(entry);
|
|
4818
3992
|
});
|
|
3993
|
+
return retVal;
|
|
4819
3994
|
};
|
|
4820
3995
|
const deserializeAws_restJson1VulnerablePackage = (output, context) => {
|
|
4821
3996
|
return {
|
|
@@ -4831,7 +4006,7 @@ const deserializeAws_restJson1VulnerablePackage = (output, context) => {
|
|
|
4831
4006
|
};
|
|
4832
4007
|
};
|
|
4833
4008
|
const deserializeAws_restJson1VulnerablePackageList = (output, context) => {
|
|
4834
|
-
|
|
4009
|
+
const retVal = (output || [])
|
|
4835
4010
|
.filter((e) => e != null)
|
|
4836
4011
|
.map((entry) => {
|
|
4837
4012
|
if (entry === null) {
|
|
@@ -4839,6 +4014,7 @@ const deserializeAws_restJson1VulnerablePackageList = (output, context) => {
|
|
|
4839
4014
|
}
|
|
4840
4015
|
return deserializeAws_restJson1VulnerablePackage(entry, context);
|
|
4841
4016
|
});
|
|
4017
|
+
return retVal;
|
|
4842
4018
|
};
|
|
4843
4019
|
const deserializeMetadata = (output) => {
|
|
4844
4020
|
var _a;
|