@aws-sdk/client-appsync 3.503.1 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -872,7 +872,7 @@ export const se_UpdateTypeCommand = async (input, context) => {
872
872
  };
873
873
  export const de_AssociateApiCommand = async (output, context) => {
874
874
  if (output.statusCode !== 200 && output.statusCode >= 300) {
875
- return de_AssociateApiCommandError(output, context);
875
+ return de_CommandError(output, context);
876
876
  }
877
877
  const contents = map({
878
878
  $metadata: deserializeMetadata(output),
@@ -884,37 +884,9 @@ export const de_AssociateApiCommand = async (output, context) => {
884
884
  Object.assign(contents, doc);
885
885
  return contents;
886
886
  };
887
- const de_AssociateApiCommandError = async (output, context) => {
888
- const parsedOutput = {
889
- ...output,
890
- body: await parseErrorBody(output.body, context),
891
- };
892
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
893
- switch (errorCode) {
894
- case "AccessDeniedException":
895
- case "com.amazonaws.appsync#AccessDeniedException":
896
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
897
- case "BadRequestException":
898
- case "com.amazonaws.appsync#BadRequestException":
899
- throw await de_BadRequestExceptionRes(parsedOutput, context);
900
- case "InternalFailureException":
901
- case "com.amazonaws.appsync#InternalFailureException":
902
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
903
- case "NotFoundException":
904
- case "com.amazonaws.appsync#NotFoundException":
905
- throw await de_NotFoundExceptionRes(parsedOutput, context);
906
- default:
907
- const parsedBody = parsedOutput.body;
908
- return throwDefaultError({
909
- output,
910
- parsedBody,
911
- errorCode,
912
- });
913
- }
914
- };
915
887
  export const de_AssociateMergedGraphqlApiCommand = async (output, context) => {
916
888
  if (output.statusCode !== 200 && output.statusCode >= 300) {
917
- return de_AssociateMergedGraphqlApiCommandError(output, context);
889
+ return de_CommandError(output, context);
918
890
  }
919
891
  const contents = map({
920
892
  $metadata: deserializeMetadata(output),
@@ -926,43 +898,9 @@ export const de_AssociateMergedGraphqlApiCommand = async (output, context) => {
926
898
  Object.assign(contents, doc);
927
899
  return contents;
928
900
  };
929
- const de_AssociateMergedGraphqlApiCommandError = async (output, context) => {
930
- const parsedOutput = {
931
- ...output,
932
- body: await parseErrorBody(output.body, context),
933
- };
934
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
935
- switch (errorCode) {
936
- case "BadRequestException":
937
- case "com.amazonaws.appsync#BadRequestException":
938
- throw await de_BadRequestExceptionRes(parsedOutput, context);
939
- case "ConcurrentModificationException":
940
- case "com.amazonaws.appsync#ConcurrentModificationException":
941
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
942
- case "InternalFailureException":
943
- case "com.amazonaws.appsync#InternalFailureException":
944
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
945
- case "LimitExceededException":
946
- case "com.amazonaws.appsync#LimitExceededException":
947
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
948
- case "NotFoundException":
949
- case "com.amazonaws.appsync#NotFoundException":
950
- throw await de_NotFoundExceptionRes(parsedOutput, context);
951
- case "UnauthorizedException":
952
- case "com.amazonaws.appsync#UnauthorizedException":
953
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
954
- default:
955
- const parsedBody = parsedOutput.body;
956
- return throwDefaultError({
957
- output,
958
- parsedBody,
959
- errorCode,
960
- });
961
- }
962
- };
963
901
  export const de_AssociateSourceGraphqlApiCommand = async (output, context) => {
964
902
  if (output.statusCode !== 200 && output.statusCode >= 300) {
965
- return de_AssociateSourceGraphqlApiCommandError(output, context);
903
+ return de_CommandError(output, context);
966
904
  }
967
905
  const contents = map({
968
906
  $metadata: deserializeMetadata(output),
@@ -974,43 +912,9 @@ export const de_AssociateSourceGraphqlApiCommand = async (output, context) => {
974
912
  Object.assign(contents, doc);
975
913
  return contents;
976
914
  };
977
- const de_AssociateSourceGraphqlApiCommandError = async (output, context) => {
978
- const parsedOutput = {
979
- ...output,
980
- body: await parseErrorBody(output.body, context),
981
- };
982
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
983
- switch (errorCode) {
984
- case "BadRequestException":
985
- case "com.amazonaws.appsync#BadRequestException":
986
- throw await de_BadRequestExceptionRes(parsedOutput, context);
987
- case "ConcurrentModificationException":
988
- case "com.amazonaws.appsync#ConcurrentModificationException":
989
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
990
- case "InternalFailureException":
991
- case "com.amazonaws.appsync#InternalFailureException":
992
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
993
- case "LimitExceededException":
994
- case "com.amazonaws.appsync#LimitExceededException":
995
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
996
- case "NotFoundException":
997
- case "com.amazonaws.appsync#NotFoundException":
998
- throw await de_NotFoundExceptionRes(parsedOutput, context);
999
- case "UnauthorizedException":
1000
- case "com.amazonaws.appsync#UnauthorizedException":
1001
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1002
- default:
1003
- const parsedBody = parsedOutput.body;
1004
- return throwDefaultError({
1005
- output,
1006
- parsedBody,
1007
- errorCode,
1008
- });
1009
- }
1010
- };
1011
915
  export const de_CreateApiCacheCommand = async (output, context) => {
1012
916
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1013
- return de_CreateApiCacheCommandError(output, context);
917
+ return de_CommandError(output, context);
1014
918
  }
1015
919
  const contents = map({
1016
920
  $metadata: deserializeMetadata(output),
@@ -1022,40 +926,9 @@ export const de_CreateApiCacheCommand = async (output, context) => {
1022
926
  Object.assign(contents, doc);
1023
927
  return contents;
1024
928
  };
1025
- const de_CreateApiCacheCommandError = async (output, context) => {
1026
- const parsedOutput = {
1027
- ...output,
1028
- body: await parseErrorBody(output.body, context),
1029
- };
1030
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1031
- switch (errorCode) {
1032
- case "BadRequestException":
1033
- case "com.amazonaws.appsync#BadRequestException":
1034
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1035
- case "ConcurrentModificationException":
1036
- case "com.amazonaws.appsync#ConcurrentModificationException":
1037
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1038
- case "InternalFailureException":
1039
- case "com.amazonaws.appsync#InternalFailureException":
1040
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1041
- case "NotFoundException":
1042
- case "com.amazonaws.appsync#NotFoundException":
1043
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1044
- case "UnauthorizedException":
1045
- case "com.amazonaws.appsync#UnauthorizedException":
1046
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1047
- default:
1048
- const parsedBody = parsedOutput.body;
1049
- return throwDefaultError({
1050
- output,
1051
- parsedBody,
1052
- errorCode,
1053
- });
1054
- }
1055
- };
1056
929
  export const de_CreateApiKeyCommand = async (output, context) => {
1057
930
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1058
- return de_CreateApiKeyCommandError(output, context);
931
+ return de_CommandError(output, context);
1059
932
  }
1060
933
  const contents = map({
1061
934
  $metadata: deserializeMetadata(output),
@@ -1067,46 +940,9 @@ export const de_CreateApiKeyCommand = async (output, context) => {
1067
940
  Object.assign(contents, doc);
1068
941
  return contents;
1069
942
  };
1070
- const de_CreateApiKeyCommandError = async (output, context) => {
1071
- const parsedOutput = {
1072
- ...output,
1073
- body: await parseErrorBody(output.body, context),
1074
- };
1075
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1076
- switch (errorCode) {
1077
- case "ApiKeyLimitExceededException":
1078
- case "com.amazonaws.appsync#ApiKeyLimitExceededException":
1079
- throw await de_ApiKeyLimitExceededExceptionRes(parsedOutput, context);
1080
- case "ApiKeyValidityOutOfBoundsException":
1081
- case "com.amazonaws.appsync#ApiKeyValidityOutOfBoundsException":
1082
- throw await de_ApiKeyValidityOutOfBoundsExceptionRes(parsedOutput, context);
1083
- case "BadRequestException":
1084
- case "com.amazonaws.appsync#BadRequestException":
1085
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1086
- case "InternalFailureException":
1087
- case "com.amazonaws.appsync#InternalFailureException":
1088
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1089
- case "LimitExceededException":
1090
- case "com.amazonaws.appsync#LimitExceededException":
1091
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1092
- case "NotFoundException":
1093
- case "com.amazonaws.appsync#NotFoundException":
1094
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1095
- case "UnauthorizedException":
1096
- case "com.amazonaws.appsync#UnauthorizedException":
1097
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1098
- default:
1099
- const parsedBody = parsedOutput.body;
1100
- return throwDefaultError({
1101
- output,
1102
- parsedBody,
1103
- errorCode,
1104
- });
1105
- }
1106
- };
1107
943
  export const de_CreateDataSourceCommand = async (output, context) => {
1108
944
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1109
- return de_CreateDataSourceCommandError(output, context);
945
+ return de_CommandError(output, context);
1110
946
  }
1111
947
  const contents = map({
1112
948
  $metadata: deserializeMetadata(output),
@@ -1118,40 +954,9 @@ export const de_CreateDataSourceCommand = async (output, context) => {
1118
954
  Object.assign(contents, doc);
1119
955
  return contents;
1120
956
  };
1121
- const de_CreateDataSourceCommandError = async (output, context) => {
1122
- const parsedOutput = {
1123
- ...output,
1124
- body: await parseErrorBody(output.body, context),
1125
- };
1126
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1127
- switch (errorCode) {
1128
- case "BadRequestException":
1129
- case "com.amazonaws.appsync#BadRequestException":
1130
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1131
- case "ConcurrentModificationException":
1132
- case "com.amazonaws.appsync#ConcurrentModificationException":
1133
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1134
- case "InternalFailureException":
1135
- case "com.amazonaws.appsync#InternalFailureException":
1136
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1137
- case "NotFoundException":
1138
- case "com.amazonaws.appsync#NotFoundException":
1139
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1140
- case "UnauthorizedException":
1141
- case "com.amazonaws.appsync#UnauthorizedException":
1142
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1143
- default:
1144
- const parsedBody = parsedOutput.body;
1145
- return throwDefaultError({
1146
- output,
1147
- parsedBody,
1148
- errorCode,
1149
- });
1150
- }
1151
- };
1152
957
  export const de_CreateDomainNameCommand = async (output, context) => {
1153
958
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1154
- return de_CreateDomainNameCommandError(output, context);
959
+ return de_CommandError(output, context);
1155
960
  }
1156
961
  const contents = map({
1157
962
  $metadata: deserializeMetadata(output),
@@ -1163,34 +968,9 @@ export const de_CreateDomainNameCommand = async (output, context) => {
1163
968
  Object.assign(contents, doc);
1164
969
  return contents;
1165
970
  };
1166
- const de_CreateDomainNameCommandError = async (output, context) => {
1167
- const parsedOutput = {
1168
- ...output,
1169
- body: await parseErrorBody(output.body, context),
1170
- };
1171
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1172
- switch (errorCode) {
1173
- case "AccessDeniedException":
1174
- case "com.amazonaws.appsync#AccessDeniedException":
1175
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1176
- case "BadRequestException":
1177
- case "com.amazonaws.appsync#BadRequestException":
1178
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1179
- case "InternalFailureException":
1180
- case "com.amazonaws.appsync#InternalFailureException":
1181
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1182
- default:
1183
- const parsedBody = parsedOutput.body;
1184
- return throwDefaultError({
1185
- output,
1186
- parsedBody,
1187
- errorCode,
1188
- });
1189
- }
1190
- };
1191
971
  export const de_CreateFunctionCommand = async (output, context) => {
1192
972
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1193
- return de_CreateFunctionCommandError(output, context);
973
+ return de_CommandError(output, context);
1194
974
  }
1195
975
  const contents = map({
1196
976
  $metadata: deserializeMetadata(output),
@@ -1202,37 +982,9 @@ export const de_CreateFunctionCommand = async (output, context) => {
1202
982
  Object.assign(contents, doc);
1203
983
  return contents;
1204
984
  };
1205
- const de_CreateFunctionCommandError = async (output, context) => {
1206
- const parsedOutput = {
1207
- ...output,
1208
- body: await parseErrorBody(output.body, context),
1209
- };
1210
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1211
- switch (errorCode) {
1212
- case "ConcurrentModificationException":
1213
- case "com.amazonaws.appsync#ConcurrentModificationException":
1214
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1215
- case "InternalFailureException":
1216
- case "com.amazonaws.appsync#InternalFailureException":
1217
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1218
- case "NotFoundException":
1219
- case "com.amazonaws.appsync#NotFoundException":
1220
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1221
- case "UnauthorizedException":
1222
- case "com.amazonaws.appsync#UnauthorizedException":
1223
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1224
- default:
1225
- const parsedBody = parsedOutput.body;
1226
- return throwDefaultError({
1227
- output,
1228
- parsedBody,
1229
- errorCode,
1230
- });
1231
- }
1232
- };
1233
985
  export const de_CreateGraphqlApiCommand = async (output, context) => {
1234
986
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1235
- return de_CreateGraphqlApiCommandError(output, context);
987
+ return de_CommandError(output, context);
1236
988
  }
1237
989
  const contents = map({
1238
990
  $metadata: deserializeMetadata(output),
@@ -1244,43 +996,9 @@ export const de_CreateGraphqlApiCommand = async (output, context) => {
1244
996
  Object.assign(contents, doc);
1245
997
  return contents;
1246
998
  };
1247
- const de_CreateGraphqlApiCommandError = async (output, context) => {
1248
- const parsedOutput = {
1249
- ...output,
1250
- body: await parseErrorBody(output.body, context),
1251
- };
1252
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1253
- switch (errorCode) {
1254
- case "ApiLimitExceededException":
1255
- case "com.amazonaws.appsync#ApiLimitExceededException":
1256
- throw await de_ApiLimitExceededExceptionRes(parsedOutput, context);
1257
- case "BadRequestException":
1258
- case "com.amazonaws.appsync#BadRequestException":
1259
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1260
- case "ConcurrentModificationException":
1261
- case "com.amazonaws.appsync#ConcurrentModificationException":
1262
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1263
- case "InternalFailureException":
1264
- case "com.amazonaws.appsync#InternalFailureException":
1265
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1266
- case "LimitExceededException":
1267
- case "com.amazonaws.appsync#LimitExceededException":
1268
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1269
- case "UnauthorizedException":
1270
- case "com.amazonaws.appsync#UnauthorizedException":
1271
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1272
- default:
1273
- const parsedBody = parsedOutput.body;
1274
- return throwDefaultError({
1275
- output,
1276
- parsedBody,
1277
- errorCode,
1278
- });
1279
- }
1280
- };
1281
999
  export const de_CreateResolverCommand = async (output, context) => {
1282
1000
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1283
- return de_CreateResolverCommandError(output, context);
1001
+ return de_CommandError(output, context);
1284
1002
  }
1285
1003
  const contents = map({
1286
1004
  $metadata: deserializeMetadata(output),
@@ -1292,40 +1010,9 @@ export const de_CreateResolverCommand = async (output, context) => {
1292
1010
  Object.assign(contents, doc);
1293
1011
  return contents;
1294
1012
  };
1295
- const de_CreateResolverCommandError = async (output, context) => {
1296
- const parsedOutput = {
1297
- ...output,
1298
- body: await parseErrorBody(output.body, context),
1299
- };
1300
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1301
- switch (errorCode) {
1302
- case "BadRequestException":
1303
- case "com.amazonaws.appsync#BadRequestException":
1304
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1305
- case "ConcurrentModificationException":
1306
- case "com.amazonaws.appsync#ConcurrentModificationException":
1307
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1308
- case "InternalFailureException":
1309
- case "com.amazonaws.appsync#InternalFailureException":
1310
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1311
- case "NotFoundException":
1312
- case "com.amazonaws.appsync#NotFoundException":
1313
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1314
- case "UnauthorizedException":
1315
- case "com.amazonaws.appsync#UnauthorizedException":
1316
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1317
- default:
1318
- const parsedBody = parsedOutput.body;
1319
- return throwDefaultError({
1320
- output,
1321
- parsedBody,
1322
- errorCode,
1323
- });
1324
- }
1325
- };
1326
1013
  export const de_CreateTypeCommand = async (output, context) => {
1327
1014
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1328
- return de_CreateTypeCommandError(output, context);
1015
+ return de_CommandError(output, context);
1329
1016
  }
1330
1017
  const contents = map({
1331
1018
  $metadata: deserializeMetadata(output),
@@ -1337,40 +1024,9 @@ export const de_CreateTypeCommand = async (output, context) => {
1337
1024
  Object.assign(contents, doc);
1338
1025
  return contents;
1339
1026
  };
1340
- const de_CreateTypeCommandError = async (output, context) => {
1341
- const parsedOutput = {
1342
- ...output,
1343
- body: await parseErrorBody(output.body, context),
1344
- };
1345
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1346
- switch (errorCode) {
1347
- case "BadRequestException":
1348
- case "com.amazonaws.appsync#BadRequestException":
1349
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1350
- case "ConcurrentModificationException":
1351
- case "com.amazonaws.appsync#ConcurrentModificationException":
1352
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1353
- case "InternalFailureException":
1354
- case "com.amazonaws.appsync#InternalFailureException":
1355
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1356
- case "NotFoundException":
1357
- case "com.amazonaws.appsync#NotFoundException":
1358
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1359
- case "UnauthorizedException":
1360
- case "com.amazonaws.appsync#UnauthorizedException":
1361
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1362
- default:
1363
- const parsedBody = parsedOutput.body;
1364
- return throwDefaultError({
1365
- output,
1366
- parsedBody,
1367
- errorCode,
1368
- });
1369
- }
1370
- };
1371
1027
  export const de_DeleteApiCacheCommand = async (output, context) => {
1372
1028
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1373
- return de_DeleteApiCacheCommandError(output, context);
1029
+ return de_CommandError(output, context);
1374
1030
  }
1375
1031
  const contents = map({
1376
1032
  $metadata: deserializeMetadata(output),
@@ -1378,40 +1034,9 @@ export const de_DeleteApiCacheCommand = async (output, context) => {
1378
1034
  await collectBody(output.body, context);
1379
1035
  return contents;
1380
1036
  };
1381
- const de_DeleteApiCacheCommandError = async (output, context) => {
1382
- const parsedOutput = {
1383
- ...output,
1384
- body: await parseErrorBody(output.body, context),
1385
- };
1386
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1387
- switch (errorCode) {
1388
- case "BadRequestException":
1389
- case "com.amazonaws.appsync#BadRequestException":
1390
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1391
- case "ConcurrentModificationException":
1392
- case "com.amazonaws.appsync#ConcurrentModificationException":
1393
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1394
- case "InternalFailureException":
1395
- case "com.amazonaws.appsync#InternalFailureException":
1396
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1397
- case "NotFoundException":
1398
- case "com.amazonaws.appsync#NotFoundException":
1399
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1400
- case "UnauthorizedException":
1401
- case "com.amazonaws.appsync#UnauthorizedException":
1402
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1403
- default:
1404
- const parsedBody = parsedOutput.body;
1405
- return throwDefaultError({
1406
- output,
1407
- parsedBody,
1408
- errorCode,
1409
- });
1410
- }
1411
- };
1412
1037
  export const de_DeleteApiKeyCommand = async (output, context) => {
1413
1038
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1414
- return de_DeleteApiKeyCommandError(output, context);
1039
+ return de_CommandError(output, context);
1415
1040
  }
1416
1041
  const contents = map({
1417
1042
  $metadata: deserializeMetadata(output),
@@ -1419,37 +1044,9 @@ export const de_DeleteApiKeyCommand = async (output, context) => {
1419
1044
  await collectBody(output.body, context);
1420
1045
  return contents;
1421
1046
  };
1422
- const de_DeleteApiKeyCommandError = async (output, context) => {
1423
- const parsedOutput = {
1424
- ...output,
1425
- body: await parseErrorBody(output.body, context),
1426
- };
1427
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1428
- switch (errorCode) {
1429
- case "BadRequestException":
1430
- case "com.amazonaws.appsync#BadRequestException":
1431
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1432
- case "InternalFailureException":
1433
- case "com.amazonaws.appsync#InternalFailureException":
1434
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1435
- case "NotFoundException":
1436
- case "com.amazonaws.appsync#NotFoundException":
1437
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1438
- case "UnauthorizedException":
1439
- case "com.amazonaws.appsync#UnauthorizedException":
1440
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1441
- default:
1442
- const parsedBody = parsedOutput.body;
1443
- return throwDefaultError({
1444
- output,
1445
- parsedBody,
1446
- errorCode,
1447
- });
1448
- }
1449
- };
1450
1047
  export const de_DeleteDataSourceCommand = async (output, context) => {
1451
1048
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1452
- return de_DeleteDataSourceCommandError(output, context);
1049
+ return de_CommandError(output, context);
1453
1050
  }
1454
1051
  const contents = map({
1455
1052
  $metadata: deserializeMetadata(output),
@@ -1457,40 +1054,9 @@ export const de_DeleteDataSourceCommand = async (output, context) => {
1457
1054
  await collectBody(output.body, context);
1458
1055
  return contents;
1459
1056
  };
1460
- const de_DeleteDataSourceCommandError = async (output, context) => {
1461
- const parsedOutput = {
1462
- ...output,
1463
- body: await parseErrorBody(output.body, context),
1464
- };
1465
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1466
- switch (errorCode) {
1467
- case "BadRequestException":
1468
- case "com.amazonaws.appsync#BadRequestException":
1469
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1470
- case "ConcurrentModificationException":
1471
- case "com.amazonaws.appsync#ConcurrentModificationException":
1472
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1473
- case "InternalFailureException":
1474
- case "com.amazonaws.appsync#InternalFailureException":
1475
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1476
- case "NotFoundException":
1477
- case "com.amazonaws.appsync#NotFoundException":
1478
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1479
- case "UnauthorizedException":
1480
- case "com.amazonaws.appsync#UnauthorizedException":
1481
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1482
- default:
1483
- const parsedBody = parsedOutput.body;
1484
- return throwDefaultError({
1485
- output,
1486
- parsedBody,
1487
- errorCode,
1488
- });
1489
- }
1490
- };
1491
1057
  export const de_DeleteDomainNameCommand = async (output, context) => {
1492
1058
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1493
- return de_DeleteDomainNameCommandError(output, context);
1059
+ return de_CommandError(output, context);
1494
1060
  }
1495
1061
  const contents = map({
1496
1062
  $metadata: deserializeMetadata(output),
@@ -1498,40 +1064,9 @@ export const de_DeleteDomainNameCommand = async (output, context) => {
1498
1064
  await collectBody(output.body, context);
1499
1065
  return contents;
1500
1066
  };
1501
- const de_DeleteDomainNameCommandError = async (output, context) => {
1502
- const parsedOutput = {
1503
- ...output,
1504
- body: await parseErrorBody(output.body, context),
1505
- };
1506
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1507
- switch (errorCode) {
1508
- case "AccessDeniedException":
1509
- case "com.amazonaws.appsync#AccessDeniedException":
1510
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1511
- case "BadRequestException":
1512
- case "com.amazonaws.appsync#BadRequestException":
1513
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1514
- case "ConcurrentModificationException":
1515
- case "com.amazonaws.appsync#ConcurrentModificationException":
1516
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1517
- case "InternalFailureException":
1518
- case "com.amazonaws.appsync#InternalFailureException":
1519
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1520
- case "NotFoundException":
1521
- case "com.amazonaws.appsync#NotFoundException":
1522
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1523
- default:
1524
- const parsedBody = parsedOutput.body;
1525
- return throwDefaultError({
1526
- output,
1527
- parsedBody,
1528
- errorCode,
1529
- });
1530
- }
1531
- };
1532
1067
  export const de_DeleteFunctionCommand = async (output, context) => {
1533
1068
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1534
- return de_DeleteFunctionCommandError(output, context);
1069
+ return de_CommandError(output, context);
1535
1070
  }
1536
1071
  const contents = map({
1537
1072
  $metadata: deserializeMetadata(output),
@@ -1539,37 +1074,9 @@ export const de_DeleteFunctionCommand = async (output, context) => {
1539
1074
  await collectBody(output.body, context);
1540
1075
  return contents;
1541
1076
  };
1542
- const de_DeleteFunctionCommandError = async (output, context) => {
1543
- const parsedOutput = {
1544
- ...output,
1545
- body: await parseErrorBody(output.body, context),
1546
- };
1547
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1548
- switch (errorCode) {
1549
- case "ConcurrentModificationException":
1550
- case "com.amazonaws.appsync#ConcurrentModificationException":
1551
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1552
- case "InternalFailureException":
1553
- case "com.amazonaws.appsync#InternalFailureException":
1554
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1555
- case "NotFoundException":
1556
- case "com.amazonaws.appsync#NotFoundException":
1557
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1558
- case "UnauthorizedException":
1559
- case "com.amazonaws.appsync#UnauthorizedException":
1560
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1561
- default:
1562
- const parsedBody = parsedOutput.body;
1563
- return throwDefaultError({
1564
- output,
1565
- parsedBody,
1566
- errorCode,
1567
- });
1568
- }
1569
- };
1570
1077
  export const de_DeleteGraphqlApiCommand = async (output, context) => {
1571
1078
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1572
- return de_DeleteGraphqlApiCommandError(output, context);
1079
+ return de_CommandError(output, context);
1573
1080
  }
1574
1081
  const contents = map({
1575
1082
  $metadata: deserializeMetadata(output),
@@ -1577,43 +1084,9 @@ export const de_DeleteGraphqlApiCommand = async (output, context) => {
1577
1084
  await collectBody(output.body, context);
1578
1085
  return contents;
1579
1086
  };
1580
- const de_DeleteGraphqlApiCommandError = async (output, context) => {
1581
- const parsedOutput = {
1582
- ...output,
1583
- body: await parseErrorBody(output.body, context),
1584
- };
1585
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1586
- switch (errorCode) {
1587
- case "AccessDeniedException":
1588
- case "com.amazonaws.appsync#AccessDeniedException":
1589
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1590
- case "BadRequestException":
1591
- case "com.amazonaws.appsync#BadRequestException":
1592
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1593
- case "ConcurrentModificationException":
1594
- case "com.amazonaws.appsync#ConcurrentModificationException":
1595
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1596
- case "InternalFailureException":
1597
- case "com.amazonaws.appsync#InternalFailureException":
1598
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1599
- case "NotFoundException":
1600
- case "com.amazonaws.appsync#NotFoundException":
1601
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1602
- case "UnauthorizedException":
1603
- case "com.amazonaws.appsync#UnauthorizedException":
1604
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1605
- default:
1606
- const parsedBody = parsedOutput.body;
1607
- return throwDefaultError({
1608
- output,
1609
- parsedBody,
1610
- errorCode,
1611
- });
1612
- }
1613
- };
1614
1087
  export const de_DeleteResolverCommand = async (output, context) => {
1615
1088
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1616
- return de_DeleteResolverCommandError(output, context);
1089
+ return de_CommandError(output, context);
1617
1090
  }
1618
1091
  const contents = map({
1619
1092
  $metadata: deserializeMetadata(output),
@@ -1621,40 +1094,9 @@ export const de_DeleteResolverCommand = async (output, context) => {
1621
1094
  await collectBody(output.body, context);
1622
1095
  return contents;
1623
1096
  };
1624
- const de_DeleteResolverCommandError = async (output, context) => {
1625
- const parsedOutput = {
1626
- ...output,
1627
- body: await parseErrorBody(output.body, context),
1628
- };
1629
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1630
- switch (errorCode) {
1631
- case "BadRequestException":
1632
- case "com.amazonaws.appsync#BadRequestException":
1633
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1634
- case "ConcurrentModificationException":
1635
- case "com.amazonaws.appsync#ConcurrentModificationException":
1636
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1637
- case "InternalFailureException":
1638
- case "com.amazonaws.appsync#InternalFailureException":
1639
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1640
- case "NotFoundException":
1641
- case "com.amazonaws.appsync#NotFoundException":
1642
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1643
- case "UnauthorizedException":
1644
- case "com.amazonaws.appsync#UnauthorizedException":
1645
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1646
- default:
1647
- const parsedBody = parsedOutput.body;
1648
- return throwDefaultError({
1649
- output,
1650
- parsedBody,
1651
- errorCode,
1652
- });
1653
- }
1654
- };
1655
1097
  export const de_DeleteTypeCommand = async (output, context) => {
1656
1098
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1657
- return de_DeleteTypeCommandError(output, context);
1099
+ return de_CommandError(output, context);
1658
1100
  }
1659
1101
  const contents = map({
1660
1102
  $metadata: deserializeMetadata(output),
@@ -1662,40 +1104,9 @@ export const de_DeleteTypeCommand = async (output, context) => {
1662
1104
  await collectBody(output.body, context);
1663
1105
  return contents;
1664
1106
  };
1665
- const de_DeleteTypeCommandError = async (output, context) => {
1666
- const parsedOutput = {
1667
- ...output,
1668
- body: await parseErrorBody(output.body, context),
1669
- };
1670
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1671
- switch (errorCode) {
1672
- case "BadRequestException":
1673
- case "com.amazonaws.appsync#BadRequestException":
1674
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1675
- case "ConcurrentModificationException":
1676
- case "com.amazonaws.appsync#ConcurrentModificationException":
1677
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1678
- case "InternalFailureException":
1679
- case "com.amazonaws.appsync#InternalFailureException":
1680
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1681
- case "NotFoundException":
1682
- case "com.amazonaws.appsync#NotFoundException":
1683
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1684
- case "UnauthorizedException":
1685
- case "com.amazonaws.appsync#UnauthorizedException":
1686
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1687
- default:
1688
- const parsedBody = parsedOutput.body;
1689
- return throwDefaultError({
1690
- output,
1691
- parsedBody,
1692
- errorCode,
1693
- });
1694
- }
1695
- };
1696
1107
  export const de_DisassociateApiCommand = async (output, context) => {
1697
1108
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1698
- return de_DisassociateApiCommandError(output, context);
1109
+ return de_CommandError(output, context);
1699
1110
  }
1700
1111
  const contents = map({
1701
1112
  $metadata: deserializeMetadata(output),
@@ -1703,40 +1114,9 @@ export const de_DisassociateApiCommand = async (output, context) => {
1703
1114
  await collectBody(output.body, context);
1704
1115
  return contents;
1705
1116
  };
1706
- const de_DisassociateApiCommandError = async (output, context) => {
1707
- const parsedOutput = {
1708
- ...output,
1709
- body: await parseErrorBody(output.body, context),
1710
- };
1711
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1712
- switch (errorCode) {
1713
- case "AccessDeniedException":
1714
- case "com.amazonaws.appsync#AccessDeniedException":
1715
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1716
- case "BadRequestException":
1717
- case "com.amazonaws.appsync#BadRequestException":
1718
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1719
- case "ConcurrentModificationException":
1720
- case "com.amazonaws.appsync#ConcurrentModificationException":
1721
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1722
- case "InternalFailureException":
1723
- case "com.amazonaws.appsync#InternalFailureException":
1724
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1725
- case "NotFoundException":
1726
- case "com.amazonaws.appsync#NotFoundException":
1727
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1728
- default:
1729
- const parsedBody = parsedOutput.body;
1730
- return throwDefaultError({
1731
- output,
1732
- parsedBody,
1733
- errorCode,
1734
- });
1735
- }
1736
- };
1737
1117
  export const de_DisassociateMergedGraphqlApiCommand = async (output, context) => {
1738
1118
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1739
- return de_DisassociateMergedGraphqlApiCommandError(output, context);
1119
+ return de_CommandError(output, context);
1740
1120
  }
1741
1121
  const contents = map({
1742
1122
  $metadata: deserializeMetadata(output),
@@ -1748,40 +1128,9 @@ export const de_DisassociateMergedGraphqlApiCommand = async (output, context) =>
1748
1128
  Object.assign(contents, doc);
1749
1129
  return contents;
1750
1130
  };
1751
- const de_DisassociateMergedGraphqlApiCommandError = async (output, context) => {
1752
- const parsedOutput = {
1753
- ...output,
1754
- body: await parseErrorBody(output.body, context),
1755
- };
1756
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1757
- switch (errorCode) {
1758
- case "BadRequestException":
1759
- case "com.amazonaws.appsync#BadRequestException":
1760
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1761
- case "ConcurrentModificationException":
1762
- case "com.amazonaws.appsync#ConcurrentModificationException":
1763
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1764
- case "InternalFailureException":
1765
- case "com.amazonaws.appsync#InternalFailureException":
1766
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1767
- case "NotFoundException":
1768
- case "com.amazonaws.appsync#NotFoundException":
1769
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1770
- case "UnauthorizedException":
1771
- case "com.amazonaws.appsync#UnauthorizedException":
1772
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1773
- default:
1774
- const parsedBody = parsedOutput.body;
1775
- return throwDefaultError({
1776
- output,
1777
- parsedBody,
1778
- errorCode,
1779
- });
1780
- }
1781
- };
1782
1131
  export const de_DisassociateSourceGraphqlApiCommand = async (output, context) => {
1783
1132
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1784
- return de_DisassociateSourceGraphqlApiCommandError(output, context);
1133
+ return de_CommandError(output, context);
1785
1134
  }
1786
1135
  const contents = map({
1787
1136
  $metadata: deserializeMetadata(output),
@@ -1793,40 +1142,9 @@ export const de_DisassociateSourceGraphqlApiCommand = async (output, context) =>
1793
1142
  Object.assign(contents, doc);
1794
1143
  return contents;
1795
1144
  };
1796
- const de_DisassociateSourceGraphqlApiCommandError = async (output, context) => {
1797
- const parsedOutput = {
1798
- ...output,
1799
- body: await parseErrorBody(output.body, context),
1800
- };
1801
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1802
- switch (errorCode) {
1803
- case "BadRequestException":
1804
- case "com.amazonaws.appsync#BadRequestException":
1805
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1806
- case "ConcurrentModificationException":
1807
- case "com.amazonaws.appsync#ConcurrentModificationException":
1808
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1809
- case "InternalFailureException":
1810
- case "com.amazonaws.appsync#InternalFailureException":
1811
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1812
- case "NotFoundException":
1813
- case "com.amazonaws.appsync#NotFoundException":
1814
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1815
- case "UnauthorizedException":
1816
- case "com.amazonaws.appsync#UnauthorizedException":
1817
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1818
- default:
1819
- const parsedBody = parsedOutput.body;
1820
- return throwDefaultError({
1821
- output,
1822
- parsedBody,
1823
- errorCode,
1824
- });
1825
- }
1826
- };
1827
1145
  export const de_EvaluateCodeCommand = async (output, context) => {
1828
1146
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1829
- return de_EvaluateCodeCommandError(output, context);
1147
+ return de_CommandError(output, context);
1830
1148
  }
1831
1149
  const contents = map({
1832
1150
  $metadata: deserializeMetadata(output),
@@ -1840,34 +1158,9 @@ export const de_EvaluateCodeCommand = async (output, context) => {
1840
1158
  Object.assign(contents, doc);
1841
1159
  return contents;
1842
1160
  };
1843
- const de_EvaluateCodeCommandError = async (output, context) => {
1844
- const parsedOutput = {
1845
- ...output,
1846
- body: await parseErrorBody(output.body, context),
1847
- };
1848
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1849
- switch (errorCode) {
1850
- case "AccessDeniedException":
1851
- case "com.amazonaws.appsync#AccessDeniedException":
1852
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1853
- case "BadRequestException":
1854
- case "com.amazonaws.appsync#BadRequestException":
1855
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1856
- case "InternalFailureException":
1857
- case "com.amazonaws.appsync#InternalFailureException":
1858
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1859
- default:
1860
- const parsedBody = parsedOutput.body;
1861
- return throwDefaultError({
1862
- output,
1863
- parsedBody,
1864
- errorCode,
1865
- });
1866
- }
1867
- };
1868
1161
  export const de_EvaluateMappingTemplateCommand = async (output, context) => {
1869
1162
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1870
- return de_EvaluateMappingTemplateCommandError(output, context);
1163
+ return de_CommandError(output, context);
1871
1164
  }
1872
1165
  const contents = map({
1873
1166
  $metadata: deserializeMetadata(output),
@@ -1881,34 +1174,9 @@ export const de_EvaluateMappingTemplateCommand = async (output, context) => {
1881
1174
  Object.assign(contents, doc);
1882
1175
  return contents;
1883
1176
  };
1884
- const de_EvaluateMappingTemplateCommandError = async (output, context) => {
1885
- const parsedOutput = {
1886
- ...output,
1887
- body: await parseErrorBody(output.body, context),
1888
- };
1889
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1890
- switch (errorCode) {
1891
- case "AccessDeniedException":
1892
- case "com.amazonaws.appsync#AccessDeniedException":
1893
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1894
- case "BadRequestException":
1895
- case "com.amazonaws.appsync#BadRequestException":
1896
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1897
- case "InternalFailureException":
1898
- case "com.amazonaws.appsync#InternalFailureException":
1899
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1900
- default:
1901
- const parsedBody = parsedOutput.body;
1902
- return throwDefaultError({
1903
- output,
1904
- parsedBody,
1905
- errorCode,
1906
- });
1907
- }
1908
- };
1909
1177
  export const de_FlushApiCacheCommand = async (output, context) => {
1910
1178
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1911
- return de_FlushApiCacheCommandError(output, context);
1179
+ return de_CommandError(output, context);
1912
1180
  }
1913
1181
  const contents = map({
1914
1182
  $metadata: deserializeMetadata(output),
@@ -1916,40 +1184,9 @@ export const de_FlushApiCacheCommand = async (output, context) => {
1916
1184
  await collectBody(output.body, context);
1917
1185
  return contents;
1918
1186
  };
1919
- const de_FlushApiCacheCommandError = async (output, context) => {
1920
- const parsedOutput = {
1921
- ...output,
1922
- body: await parseErrorBody(output.body, context),
1923
- };
1924
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1925
- switch (errorCode) {
1926
- case "BadRequestException":
1927
- case "com.amazonaws.appsync#BadRequestException":
1928
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1929
- case "ConcurrentModificationException":
1930
- case "com.amazonaws.appsync#ConcurrentModificationException":
1931
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1932
- case "InternalFailureException":
1933
- case "com.amazonaws.appsync#InternalFailureException":
1934
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1935
- case "NotFoundException":
1936
- case "com.amazonaws.appsync#NotFoundException":
1937
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1938
- case "UnauthorizedException":
1939
- case "com.amazonaws.appsync#UnauthorizedException":
1940
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1941
- default:
1942
- const parsedBody = parsedOutput.body;
1943
- return throwDefaultError({
1944
- output,
1945
- parsedBody,
1946
- errorCode,
1947
- });
1948
- }
1949
- };
1950
1187
  export const de_GetApiAssociationCommand = async (output, context) => {
1951
1188
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1952
- return de_GetApiAssociationCommandError(output, context);
1189
+ return de_CommandError(output, context);
1953
1190
  }
1954
1191
  const contents = map({
1955
1192
  $metadata: deserializeMetadata(output),
@@ -1961,37 +1198,9 @@ export const de_GetApiAssociationCommand = async (output, context) => {
1961
1198
  Object.assign(contents, doc);
1962
1199
  return contents;
1963
1200
  };
1964
- const de_GetApiAssociationCommandError = async (output, context) => {
1965
- const parsedOutput = {
1966
- ...output,
1967
- body: await parseErrorBody(output.body, context),
1968
- };
1969
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1970
- switch (errorCode) {
1971
- case "AccessDeniedException":
1972
- case "com.amazonaws.appsync#AccessDeniedException":
1973
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1974
- case "BadRequestException":
1975
- case "com.amazonaws.appsync#BadRequestException":
1976
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1977
- case "InternalFailureException":
1978
- case "com.amazonaws.appsync#InternalFailureException":
1979
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
1980
- case "NotFoundException":
1981
- case "com.amazonaws.appsync#NotFoundException":
1982
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1983
- default:
1984
- const parsedBody = parsedOutput.body;
1985
- return throwDefaultError({
1986
- output,
1987
- parsedBody,
1988
- errorCode,
1989
- });
1990
- }
1991
- };
1992
1201
  export const de_GetApiCacheCommand = async (output, context) => {
1993
1202
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1994
- return de_GetApiCacheCommandError(output, context);
1203
+ return de_CommandError(output, context);
1995
1204
  }
1996
1205
  const contents = map({
1997
1206
  $metadata: deserializeMetadata(output),
@@ -2003,40 +1212,9 @@ export const de_GetApiCacheCommand = async (output, context) => {
2003
1212
  Object.assign(contents, doc);
2004
1213
  return contents;
2005
1214
  };
2006
- const de_GetApiCacheCommandError = async (output, context) => {
2007
- const parsedOutput = {
2008
- ...output,
2009
- body: await parseErrorBody(output.body, context),
2010
- };
2011
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2012
- switch (errorCode) {
2013
- case "BadRequestException":
2014
- case "com.amazonaws.appsync#BadRequestException":
2015
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2016
- case "ConcurrentModificationException":
2017
- case "com.amazonaws.appsync#ConcurrentModificationException":
2018
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2019
- case "InternalFailureException":
2020
- case "com.amazonaws.appsync#InternalFailureException":
2021
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2022
- case "NotFoundException":
2023
- case "com.amazonaws.appsync#NotFoundException":
2024
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2025
- case "UnauthorizedException":
2026
- case "com.amazonaws.appsync#UnauthorizedException":
2027
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2028
- default:
2029
- const parsedBody = parsedOutput.body;
2030
- return throwDefaultError({
2031
- output,
2032
- parsedBody,
2033
- errorCode,
2034
- });
2035
- }
2036
- };
2037
1215
  export const de_GetDataSourceCommand = async (output, context) => {
2038
1216
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2039
- return de_GetDataSourceCommandError(output, context);
1217
+ return de_CommandError(output, context);
2040
1218
  }
2041
1219
  const contents = map({
2042
1220
  $metadata: deserializeMetadata(output),
@@ -2048,40 +1226,9 @@ export const de_GetDataSourceCommand = async (output, context) => {
2048
1226
  Object.assign(contents, doc);
2049
1227
  return contents;
2050
1228
  };
2051
- const de_GetDataSourceCommandError = async (output, context) => {
2052
- const parsedOutput = {
2053
- ...output,
2054
- body: await parseErrorBody(output.body, context),
2055
- };
2056
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2057
- switch (errorCode) {
2058
- case "BadRequestException":
2059
- case "com.amazonaws.appsync#BadRequestException":
2060
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2061
- case "ConcurrentModificationException":
2062
- case "com.amazonaws.appsync#ConcurrentModificationException":
2063
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2064
- case "InternalFailureException":
2065
- case "com.amazonaws.appsync#InternalFailureException":
2066
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2067
- case "NotFoundException":
2068
- case "com.amazonaws.appsync#NotFoundException":
2069
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2070
- case "UnauthorizedException":
2071
- case "com.amazonaws.appsync#UnauthorizedException":
2072
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2073
- default:
2074
- const parsedBody = parsedOutput.body;
2075
- return throwDefaultError({
2076
- output,
2077
- parsedBody,
2078
- errorCode,
2079
- });
2080
- }
2081
- };
2082
1229
  export const de_GetDataSourceIntrospectionCommand = async (output, context) => {
2083
1230
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2084
- return de_GetDataSourceIntrospectionCommandError(output, context);
1231
+ return de_CommandError(output, context);
2085
1232
  }
2086
1233
  const contents = map({
2087
1234
  $metadata: deserializeMetadata(output),
@@ -2096,34 +1243,9 @@ export const de_GetDataSourceIntrospectionCommand = async (output, context) => {
2096
1243
  Object.assign(contents, doc);
2097
1244
  return contents;
2098
1245
  };
2099
- const de_GetDataSourceIntrospectionCommandError = async (output, context) => {
2100
- const parsedOutput = {
2101
- ...output,
2102
- body: await parseErrorBody(output.body, context),
2103
- };
2104
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2105
- switch (errorCode) {
2106
- case "BadRequestException":
2107
- case "com.amazonaws.appsync#BadRequestException":
2108
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2109
- case "InternalFailureException":
2110
- case "com.amazonaws.appsync#InternalFailureException":
2111
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2112
- case "NotFoundException":
2113
- case "com.amazonaws.appsync#NotFoundException":
2114
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2115
- default:
2116
- const parsedBody = parsedOutput.body;
2117
- return throwDefaultError({
2118
- output,
2119
- parsedBody,
2120
- errorCode,
2121
- });
2122
- }
2123
- };
2124
1246
  export const de_GetDomainNameCommand = async (output, context) => {
2125
1247
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2126
- return de_GetDomainNameCommandError(output, context);
1248
+ return de_CommandError(output, context);
2127
1249
  }
2128
1250
  const contents = map({
2129
1251
  $metadata: deserializeMetadata(output),
@@ -2135,37 +1257,9 @@ export const de_GetDomainNameCommand = async (output, context) => {
2135
1257
  Object.assign(contents, doc);
2136
1258
  return contents;
2137
1259
  };
2138
- const de_GetDomainNameCommandError = async (output, context) => {
2139
- const parsedOutput = {
2140
- ...output,
2141
- body: await parseErrorBody(output.body, context),
2142
- };
2143
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2144
- switch (errorCode) {
2145
- case "AccessDeniedException":
2146
- case "com.amazonaws.appsync#AccessDeniedException":
2147
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2148
- case "BadRequestException":
2149
- case "com.amazonaws.appsync#BadRequestException":
2150
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2151
- case "InternalFailureException":
2152
- case "com.amazonaws.appsync#InternalFailureException":
2153
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2154
- case "NotFoundException":
2155
- case "com.amazonaws.appsync#NotFoundException":
2156
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2157
- default:
2158
- const parsedBody = parsedOutput.body;
2159
- return throwDefaultError({
2160
- output,
2161
- parsedBody,
2162
- errorCode,
2163
- });
2164
- }
2165
- };
2166
1260
  export const de_GetFunctionCommand = async (output, context) => {
2167
1261
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2168
- return de_GetFunctionCommandError(output, context);
1262
+ return de_CommandError(output, context);
2169
1263
  }
2170
1264
  const contents = map({
2171
1265
  $metadata: deserializeMetadata(output),
@@ -2177,34 +1271,9 @@ export const de_GetFunctionCommand = async (output, context) => {
2177
1271
  Object.assign(contents, doc);
2178
1272
  return contents;
2179
1273
  };
2180
- const de_GetFunctionCommandError = async (output, context) => {
2181
- const parsedOutput = {
2182
- ...output,
2183
- body: await parseErrorBody(output.body, context),
2184
- };
2185
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2186
- switch (errorCode) {
2187
- case "ConcurrentModificationException":
2188
- case "com.amazonaws.appsync#ConcurrentModificationException":
2189
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2190
- case "NotFoundException":
2191
- case "com.amazonaws.appsync#NotFoundException":
2192
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2193
- case "UnauthorizedException":
2194
- case "com.amazonaws.appsync#UnauthorizedException":
2195
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2196
- default:
2197
- const parsedBody = parsedOutput.body;
2198
- return throwDefaultError({
2199
- output,
2200
- parsedBody,
2201
- errorCode,
2202
- });
2203
- }
2204
- };
2205
1274
  export const de_GetGraphqlApiCommand = async (output, context) => {
2206
1275
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2207
- return de_GetGraphqlApiCommandError(output, context);
1276
+ return de_CommandError(output, context);
2208
1277
  }
2209
1278
  const contents = map({
2210
1279
  $metadata: deserializeMetadata(output),
@@ -2216,40 +1285,9 @@ export const de_GetGraphqlApiCommand = async (output, context) => {
2216
1285
  Object.assign(contents, doc);
2217
1286
  return contents;
2218
1287
  };
2219
- const de_GetGraphqlApiCommandError = async (output, context) => {
2220
- const parsedOutput = {
2221
- ...output,
2222
- body: await parseErrorBody(output.body, context),
2223
- };
2224
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2225
- switch (errorCode) {
2226
- case "AccessDeniedException":
2227
- case "com.amazonaws.appsync#AccessDeniedException":
2228
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2229
- case "BadRequestException":
2230
- case "com.amazonaws.appsync#BadRequestException":
2231
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2232
- case "InternalFailureException":
2233
- case "com.amazonaws.appsync#InternalFailureException":
2234
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2235
- case "NotFoundException":
2236
- case "com.amazonaws.appsync#NotFoundException":
2237
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2238
- case "UnauthorizedException":
2239
- case "com.amazonaws.appsync#UnauthorizedException":
2240
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2241
- default:
2242
- const parsedBody = parsedOutput.body;
2243
- return throwDefaultError({
2244
- output,
2245
- parsedBody,
2246
- errorCode,
2247
- });
2248
- }
2249
- };
2250
1288
  export const de_GetIntrospectionSchemaCommand = async (output, context) => {
2251
1289
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2252
- return de_GetIntrospectionSchemaCommandError(output, context);
1290
+ return de_CommandError(output, context);
2253
1291
  }
2254
1292
  const contents = map({
2255
1293
  $metadata: deserializeMetadata(output),
@@ -2258,37 +1296,9 @@ export const de_GetIntrospectionSchemaCommand = async (output, context) => {
2258
1296
  contents.schema = data;
2259
1297
  return contents;
2260
1298
  };
2261
- const de_GetIntrospectionSchemaCommandError = async (output, context) => {
2262
- const parsedOutput = {
2263
- ...output,
2264
- body: await parseErrorBody(output.body, context),
2265
- };
2266
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2267
- switch (errorCode) {
2268
- case "GraphQLSchemaException":
2269
- case "com.amazonaws.appsync#GraphQLSchemaException":
2270
- throw await de_GraphQLSchemaExceptionRes(parsedOutput, context);
2271
- case "InternalFailureException":
2272
- case "com.amazonaws.appsync#InternalFailureException":
2273
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2274
- case "NotFoundException":
2275
- case "com.amazonaws.appsync#NotFoundException":
2276
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2277
- case "UnauthorizedException":
2278
- case "com.amazonaws.appsync#UnauthorizedException":
2279
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2280
- default:
2281
- const parsedBody = parsedOutput.body;
2282
- return throwDefaultError({
2283
- output,
2284
- parsedBody,
2285
- errorCode,
2286
- });
2287
- }
2288
- };
2289
1299
  export const de_GetResolverCommand = async (output, context) => {
2290
1300
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2291
- return de_GetResolverCommandError(output, context);
1301
+ return de_CommandError(output, context);
2292
1302
  }
2293
1303
  const contents = map({
2294
1304
  $metadata: deserializeMetadata(output),
@@ -2300,34 +1310,9 @@ export const de_GetResolverCommand = async (output, context) => {
2300
1310
  Object.assign(contents, doc);
2301
1311
  return contents;
2302
1312
  };
2303
- const de_GetResolverCommandError = async (output, context) => {
2304
- const parsedOutput = {
2305
- ...output,
2306
- body: await parseErrorBody(output.body, context),
2307
- };
2308
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2309
- switch (errorCode) {
2310
- case "ConcurrentModificationException":
2311
- case "com.amazonaws.appsync#ConcurrentModificationException":
2312
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2313
- case "NotFoundException":
2314
- case "com.amazonaws.appsync#NotFoundException":
2315
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2316
- case "UnauthorizedException":
2317
- case "com.amazonaws.appsync#UnauthorizedException":
2318
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2319
- default:
2320
- const parsedBody = parsedOutput.body;
2321
- return throwDefaultError({
2322
- output,
2323
- parsedBody,
2324
- errorCode,
2325
- });
2326
- }
2327
- };
2328
1313
  export const de_GetSchemaCreationStatusCommand = async (output, context) => {
2329
1314
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2330
- return de_GetSchemaCreationStatusCommandError(output, context);
1315
+ return de_CommandError(output, context);
2331
1316
  }
2332
1317
  const contents = map({
2333
1318
  $metadata: deserializeMetadata(output),
@@ -2340,37 +1325,9 @@ export const de_GetSchemaCreationStatusCommand = async (output, context) => {
2340
1325
  Object.assign(contents, doc);
2341
1326
  return contents;
2342
1327
  };
2343
- const de_GetSchemaCreationStatusCommandError = async (output, context) => {
2344
- const parsedOutput = {
2345
- ...output,
2346
- body: await parseErrorBody(output.body, context),
2347
- };
2348
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2349
- switch (errorCode) {
2350
- case "BadRequestException":
2351
- case "com.amazonaws.appsync#BadRequestException":
2352
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2353
- case "InternalFailureException":
2354
- case "com.amazonaws.appsync#InternalFailureException":
2355
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2356
- case "NotFoundException":
2357
- case "com.amazonaws.appsync#NotFoundException":
2358
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2359
- case "UnauthorizedException":
2360
- case "com.amazonaws.appsync#UnauthorizedException":
2361
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2362
- default:
2363
- const parsedBody = parsedOutput.body;
2364
- return throwDefaultError({
2365
- output,
2366
- parsedBody,
2367
- errorCode,
2368
- });
2369
- }
2370
- };
2371
1328
  export const de_GetSourceApiAssociationCommand = async (output, context) => {
2372
1329
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2373
- return de_GetSourceApiAssociationCommandError(output, context);
1330
+ return de_CommandError(output, context);
2374
1331
  }
2375
1332
  const contents = map({
2376
1333
  $metadata: deserializeMetadata(output),
@@ -2382,37 +1339,9 @@ export const de_GetSourceApiAssociationCommand = async (output, context) => {
2382
1339
  Object.assign(contents, doc);
2383
1340
  return contents;
2384
1341
  };
2385
- const de_GetSourceApiAssociationCommandError = async (output, context) => {
2386
- const parsedOutput = {
2387
- ...output,
2388
- body: await parseErrorBody(output.body, context),
2389
- };
2390
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2391
- switch (errorCode) {
2392
- case "BadRequestException":
2393
- case "com.amazonaws.appsync#BadRequestException":
2394
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2395
- case "InternalFailureException":
2396
- case "com.amazonaws.appsync#InternalFailureException":
2397
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2398
- case "NotFoundException":
2399
- case "com.amazonaws.appsync#NotFoundException":
2400
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2401
- case "UnauthorizedException":
2402
- case "com.amazonaws.appsync#UnauthorizedException":
2403
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2404
- default:
2405
- const parsedBody = parsedOutput.body;
2406
- return throwDefaultError({
2407
- output,
2408
- parsedBody,
2409
- errorCode,
2410
- });
2411
- }
2412
- };
2413
1342
  export const de_GetTypeCommand = async (output, context) => {
2414
1343
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2415
- return de_GetTypeCommandError(output, context);
1344
+ return de_CommandError(output, context);
2416
1345
  }
2417
1346
  const contents = map({
2418
1347
  $metadata: deserializeMetadata(output),
@@ -2424,40 +1353,9 @@ export const de_GetTypeCommand = async (output, context) => {
2424
1353
  Object.assign(contents, doc);
2425
1354
  return contents;
2426
1355
  };
2427
- const de_GetTypeCommandError = async (output, context) => {
2428
- const parsedOutput = {
2429
- ...output,
2430
- body: await parseErrorBody(output.body, context),
2431
- };
2432
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2433
- switch (errorCode) {
2434
- case "BadRequestException":
2435
- case "com.amazonaws.appsync#BadRequestException":
2436
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2437
- case "ConcurrentModificationException":
2438
- case "com.amazonaws.appsync#ConcurrentModificationException":
2439
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2440
- case "InternalFailureException":
2441
- case "com.amazonaws.appsync#InternalFailureException":
2442
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2443
- case "NotFoundException":
2444
- case "com.amazonaws.appsync#NotFoundException":
2445
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2446
- case "UnauthorizedException":
2447
- case "com.amazonaws.appsync#UnauthorizedException":
2448
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2449
- default:
2450
- const parsedBody = parsedOutput.body;
2451
- return throwDefaultError({
2452
- output,
2453
- parsedBody,
2454
- errorCode,
2455
- });
2456
- }
2457
- };
2458
1356
  export const de_ListApiKeysCommand = async (output, context) => {
2459
1357
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2460
- return de_ListApiKeysCommandError(output, context);
1358
+ return de_CommandError(output, context);
2461
1359
  }
2462
1360
  const contents = map({
2463
1361
  $metadata: deserializeMetadata(output),
@@ -2470,37 +1368,9 @@ export const de_ListApiKeysCommand = async (output, context) => {
2470
1368
  Object.assign(contents, doc);
2471
1369
  return contents;
2472
1370
  };
2473
- const de_ListApiKeysCommandError = async (output, context) => {
2474
- const parsedOutput = {
2475
- ...output,
2476
- body: await parseErrorBody(output.body, context),
2477
- };
2478
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2479
- switch (errorCode) {
2480
- case "BadRequestException":
2481
- case "com.amazonaws.appsync#BadRequestException":
2482
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2483
- case "InternalFailureException":
2484
- case "com.amazonaws.appsync#InternalFailureException":
2485
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2486
- case "NotFoundException":
2487
- case "com.amazonaws.appsync#NotFoundException":
2488
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2489
- case "UnauthorizedException":
2490
- case "com.amazonaws.appsync#UnauthorizedException":
2491
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2492
- default:
2493
- const parsedBody = parsedOutput.body;
2494
- return throwDefaultError({
2495
- output,
2496
- parsedBody,
2497
- errorCode,
2498
- });
2499
- }
2500
- };
2501
1371
  export const de_ListDataSourcesCommand = async (output, context) => {
2502
1372
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2503
- return de_ListDataSourcesCommandError(output, context);
1373
+ return de_CommandError(output, context);
2504
1374
  }
2505
1375
  const contents = map({
2506
1376
  $metadata: deserializeMetadata(output),
@@ -2513,37 +1383,9 @@ export const de_ListDataSourcesCommand = async (output, context) => {
2513
1383
  Object.assign(contents, doc);
2514
1384
  return contents;
2515
1385
  };
2516
- const de_ListDataSourcesCommandError = async (output, context) => {
2517
- const parsedOutput = {
2518
- ...output,
2519
- body: await parseErrorBody(output.body, context),
2520
- };
2521
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2522
- switch (errorCode) {
2523
- case "BadRequestException":
2524
- case "com.amazonaws.appsync#BadRequestException":
2525
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2526
- case "InternalFailureException":
2527
- case "com.amazonaws.appsync#InternalFailureException":
2528
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2529
- case "NotFoundException":
2530
- case "com.amazonaws.appsync#NotFoundException":
2531
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2532
- case "UnauthorizedException":
2533
- case "com.amazonaws.appsync#UnauthorizedException":
2534
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2535
- default:
2536
- const parsedBody = parsedOutput.body;
2537
- return throwDefaultError({
2538
- output,
2539
- parsedBody,
2540
- errorCode,
2541
- });
2542
- }
2543
- };
2544
1386
  export const de_ListDomainNamesCommand = async (output, context) => {
2545
1387
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2546
- return de_ListDomainNamesCommandError(output, context);
1388
+ return de_CommandError(output, context);
2547
1389
  }
2548
1390
  const contents = map({
2549
1391
  $metadata: deserializeMetadata(output),
@@ -2556,34 +1398,9 @@ export const de_ListDomainNamesCommand = async (output, context) => {
2556
1398
  Object.assign(contents, doc);
2557
1399
  return contents;
2558
1400
  };
2559
- const de_ListDomainNamesCommandError = async (output, context) => {
2560
- const parsedOutput = {
2561
- ...output,
2562
- body: await parseErrorBody(output.body, context),
2563
- };
2564
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2565
- switch (errorCode) {
2566
- case "AccessDeniedException":
2567
- case "com.amazonaws.appsync#AccessDeniedException":
2568
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2569
- case "BadRequestException":
2570
- case "com.amazonaws.appsync#BadRequestException":
2571
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2572
- case "InternalFailureException":
2573
- case "com.amazonaws.appsync#InternalFailureException":
2574
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2575
- default:
2576
- const parsedBody = parsedOutput.body;
2577
- return throwDefaultError({
2578
- output,
2579
- parsedBody,
2580
- errorCode,
2581
- });
2582
- }
2583
- };
2584
1401
  export const de_ListFunctionsCommand = async (output, context) => {
2585
1402
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2586
- return de_ListFunctionsCommandError(output, context);
1403
+ return de_CommandError(output, context);
2587
1404
  }
2588
1405
  const contents = map({
2589
1406
  $metadata: deserializeMetadata(output),
@@ -2596,37 +1413,9 @@ export const de_ListFunctionsCommand = async (output, context) => {
2596
1413
  Object.assign(contents, doc);
2597
1414
  return contents;
2598
1415
  };
2599
- const de_ListFunctionsCommandError = async (output, context) => {
2600
- const parsedOutput = {
2601
- ...output,
2602
- body: await parseErrorBody(output.body, context),
2603
- };
2604
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2605
- switch (errorCode) {
2606
- case "BadRequestException":
2607
- case "com.amazonaws.appsync#BadRequestException":
2608
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2609
- case "InternalFailureException":
2610
- case "com.amazonaws.appsync#InternalFailureException":
2611
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2612
- case "NotFoundException":
2613
- case "com.amazonaws.appsync#NotFoundException":
2614
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2615
- case "UnauthorizedException":
2616
- case "com.amazonaws.appsync#UnauthorizedException":
2617
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2618
- default:
2619
- const parsedBody = parsedOutput.body;
2620
- return throwDefaultError({
2621
- output,
2622
- parsedBody,
2623
- errorCode,
2624
- });
2625
- }
2626
- };
2627
1416
  export const de_ListGraphqlApisCommand = async (output, context) => {
2628
1417
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2629
- return de_ListGraphqlApisCommandError(output, context);
1418
+ return de_CommandError(output, context);
2630
1419
  }
2631
1420
  const contents = map({
2632
1421
  $metadata: deserializeMetadata(output),
@@ -2639,34 +1428,9 @@ export const de_ListGraphqlApisCommand = async (output, context) => {
2639
1428
  Object.assign(contents, doc);
2640
1429
  return contents;
2641
1430
  };
2642
- const de_ListGraphqlApisCommandError = async (output, context) => {
2643
- const parsedOutput = {
2644
- ...output,
2645
- body: await parseErrorBody(output.body, context),
2646
- };
2647
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2648
- switch (errorCode) {
2649
- case "BadRequestException":
2650
- case "com.amazonaws.appsync#BadRequestException":
2651
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2652
- case "InternalFailureException":
2653
- case "com.amazonaws.appsync#InternalFailureException":
2654
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2655
- case "UnauthorizedException":
2656
- case "com.amazonaws.appsync#UnauthorizedException":
2657
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2658
- default:
2659
- const parsedBody = parsedOutput.body;
2660
- return throwDefaultError({
2661
- output,
2662
- parsedBody,
2663
- errorCode,
2664
- });
2665
- }
2666
- };
2667
1431
  export const de_ListResolversCommand = async (output, context) => {
2668
1432
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2669
- return de_ListResolversCommandError(output, context);
1433
+ return de_CommandError(output, context);
2670
1434
  }
2671
1435
  const contents = map({
2672
1436
  $metadata: deserializeMetadata(output),
@@ -2679,37 +1443,9 @@ export const de_ListResolversCommand = async (output, context) => {
2679
1443
  Object.assign(contents, doc);
2680
1444
  return contents;
2681
1445
  };
2682
- const de_ListResolversCommandError = async (output, context) => {
2683
- const parsedOutput = {
2684
- ...output,
2685
- body: await parseErrorBody(output.body, context),
2686
- };
2687
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2688
- switch (errorCode) {
2689
- case "BadRequestException":
2690
- case "com.amazonaws.appsync#BadRequestException":
2691
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2692
- case "InternalFailureException":
2693
- case "com.amazonaws.appsync#InternalFailureException":
2694
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2695
- case "NotFoundException":
2696
- case "com.amazonaws.appsync#NotFoundException":
2697
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2698
- case "UnauthorizedException":
2699
- case "com.amazonaws.appsync#UnauthorizedException":
2700
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2701
- default:
2702
- const parsedBody = parsedOutput.body;
2703
- return throwDefaultError({
2704
- output,
2705
- parsedBody,
2706
- errorCode,
2707
- });
2708
- }
2709
- };
2710
1446
  export const de_ListResolversByFunctionCommand = async (output, context) => {
2711
1447
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2712
- return de_ListResolversByFunctionCommandError(output, context);
1448
+ return de_CommandError(output, context);
2713
1449
  }
2714
1450
  const contents = map({
2715
1451
  $metadata: deserializeMetadata(output),
@@ -2722,37 +1458,9 @@ export const de_ListResolversByFunctionCommand = async (output, context) => {
2722
1458
  Object.assign(contents, doc);
2723
1459
  return contents;
2724
1460
  };
2725
- const de_ListResolversByFunctionCommandError = async (output, context) => {
2726
- const parsedOutput = {
2727
- ...output,
2728
- body: await parseErrorBody(output.body, context),
2729
- };
2730
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2731
- switch (errorCode) {
2732
- case "BadRequestException":
2733
- case "com.amazonaws.appsync#BadRequestException":
2734
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2735
- case "InternalFailureException":
2736
- case "com.amazonaws.appsync#InternalFailureException":
2737
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2738
- case "NotFoundException":
2739
- case "com.amazonaws.appsync#NotFoundException":
2740
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2741
- case "UnauthorizedException":
2742
- case "com.amazonaws.appsync#UnauthorizedException":
2743
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2744
- default:
2745
- const parsedBody = parsedOutput.body;
2746
- return throwDefaultError({
2747
- output,
2748
- parsedBody,
2749
- errorCode,
2750
- });
2751
- }
2752
- };
2753
1461
  export const de_ListSourceApiAssociationsCommand = async (output, context) => {
2754
1462
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2755
- return de_ListSourceApiAssociationsCommandError(output, context);
1463
+ return de_CommandError(output, context);
2756
1464
  }
2757
1465
  const contents = map({
2758
1466
  $metadata: deserializeMetadata(output),
@@ -2765,37 +1473,9 @@ export const de_ListSourceApiAssociationsCommand = async (output, context) => {
2765
1473
  Object.assign(contents, doc);
2766
1474
  return contents;
2767
1475
  };
2768
- const de_ListSourceApiAssociationsCommandError = async (output, context) => {
2769
- const parsedOutput = {
2770
- ...output,
2771
- body: await parseErrorBody(output.body, context),
2772
- };
2773
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2774
- switch (errorCode) {
2775
- case "BadRequestException":
2776
- case "com.amazonaws.appsync#BadRequestException":
2777
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2778
- case "InternalFailureException":
2779
- case "com.amazonaws.appsync#InternalFailureException":
2780
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2781
- case "NotFoundException":
2782
- case "com.amazonaws.appsync#NotFoundException":
2783
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2784
- case "UnauthorizedException":
2785
- case "com.amazonaws.appsync#UnauthorizedException":
2786
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2787
- default:
2788
- const parsedBody = parsedOutput.body;
2789
- return throwDefaultError({
2790
- output,
2791
- parsedBody,
2792
- errorCode,
2793
- });
2794
- }
2795
- };
2796
1476
  export const de_ListTagsForResourceCommand = async (output, context) => {
2797
1477
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2798
- return de_ListTagsForResourceCommandError(output, context);
1478
+ return de_CommandError(output, context);
2799
1479
  }
2800
1480
  const contents = map({
2801
1481
  $metadata: deserializeMetadata(output),
@@ -2807,43 +1487,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2807
1487
  Object.assign(contents, doc);
2808
1488
  return contents;
2809
1489
  };
2810
- const de_ListTagsForResourceCommandError = async (output, context) => {
2811
- const parsedOutput = {
2812
- ...output,
2813
- body: await parseErrorBody(output.body, context),
2814
- };
2815
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2816
- switch (errorCode) {
2817
- case "AccessDeniedException":
2818
- case "com.amazonaws.appsync#AccessDeniedException":
2819
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2820
- case "BadRequestException":
2821
- case "com.amazonaws.appsync#BadRequestException":
2822
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2823
- case "InternalFailureException":
2824
- case "com.amazonaws.appsync#InternalFailureException":
2825
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2826
- case "LimitExceededException":
2827
- case "com.amazonaws.appsync#LimitExceededException":
2828
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2829
- case "NotFoundException":
2830
- case "com.amazonaws.appsync#NotFoundException":
2831
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2832
- case "UnauthorizedException":
2833
- case "com.amazonaws.appsync#UnauthorizedException":
2834
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2835
- default:
2836
- const parsedBody = parsedOutput.body;
2837
- return throwDefaultError({
2838
- output,
2839
- parsedBody,
2840
- errorCode,
2841
- });
2842
- }
2843
- };
2844
1490
  export const de_ListTypesCommand = async (output, context) => {
2845
1491
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2846
- return de_ListTypesCommandError(output, context);
1492
+ return de_CommandError(output, context);
2847
1493
  }
2848
1494
  const contents = map({
2849
1495
  $metadata: deserializeMetadata(output),
@@ -2856,40 +1502,9 @@ export const de_ListTypesCommand = async (output, context) => {
2856
1502
  Object.assign(contents, doc);
2857
1503
  return contents;
2858
1504
  };
2859
- const de_ListTypesCommandError = async (output, context) => {
2860
- const parsedOutput = {
2861
- ...output,
2862
- body: await parseErrorBody(output.body, context),
2863
- };
2864
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2865
- switch (errorCode) {
2866
- case "BadRequestException":
2867
- case "com.amazonaws.appsync#BadRequestException":
2868
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2869
- case "ConcurrentModificationException":
2870
- case "com.amazonaws.appsync#ConcurrentModificationException":
2871
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2872
- case "InternalFailureException":
2873
- case "com.amazonaws.appsync#InternalFailureException":
2874
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2875
- case "NotFoundException":
2876
- case "com.amazonaws.appsync#NotFoundException":
2877
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2878
- case "UnauthorizedException":
2879
- case "com.amazonaws.appsync#UnauthorizedException":
2880
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2881
- default:
2882
- const parsedBody = parsedOutput.body;
2883
- return throwDefaultError({
2884
- output,
2885
- parsedBody,
2886
- errorCode,
2887
- });
2888
- }
2889
- };
2890
1505
  export const de_ListTypesByAssociationCommand = async (output, context) => {
2891
1506
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2892
- return de_ListTypesByAssociationCommandError(output, context);
1507
+ return de_CommandError(output, context);
2893
1508
  }
2894
1509
  const contents = map({
2895
1510
  $metadata: deserializeMetadata(output),
@@ -2902,40 +1517,9 @@ export const de_ListTypesByAssociationCommand = async (output, context) => {
2902
1517
  Object.assign(contents, doc);
2903
1518
  return contents;
2904
1519
  };
2905
- const de_ListTypesByAssociationCommandError = async (output, context) => {
2906
- const parsedOutput = {
2907
- ...output,
2908
- body: await parseErrorBody(output.body, context),
2909
- };
2910
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2911
- switch (errorCode) {
2912
- case "BadRequestException":
2913
- case "com.amazonaws.appsync#BadRequestException":
2914
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2915
- case "ConcurrentModificationException":
2916
- case "com.amazonaws.appsync#ConcurrentModificationException":
2917
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
2918
- case "InternalFailureException":
2919
- case "com.amazonaws.appsync#InternalFailureException":
2920
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2921
- case "NotFoundException":
2922
- case "com.amazonaws.appsync#NotFoundException":
2923
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2924
- case "UnauthorizedException":
2925
- case "com.amazonaws.appsync#UnauthorizedException":
2926
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2927
- default:
2928
- const parsedBody = parsedOutput.body;
2929
- return throwDefaultError({
2930
- output,
2931
- parsedBody,
2932
- errorCode,
2933
- });
2934
- }
2935
- };
2936
1520
  export const de_StartDataSourceIntrospectionCommand = async (output, context) => {
2937
1521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2938
- return de_StartDataSourceIntrospectionCommandError(output, context);
1522
+ return de_CommandError(output, context);
2939
1523
  }
2940
1524
  const contents = map({
2941
1525
  $metadata: deserializeMetadata(output),
@@ -2949,37 +1533,9 @@ export const de_StartDataSourceIntrospectionCommand = async (output, context) =>
2949
1533
  Object.assign(contents, doc);
2950
1534
  return contents;
2951
1535
  };
2952
- const de_StartDataSourceIntrospectionCommandError = async (output, context) => {
2953
- const parsedOutput = {
2954
- ...output,
2955
- body: await parseErrorBody(output.body, context),
2956
- };
2957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2958
- switch (errorCode) {
2959
- case "BadRequestException":
2960
- case "com.amazonaws.appsync#BadRequestException":
2961
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2962
- case "InternalFailureException":
2963
- case "com.amazonaws.appsync#InternalFailureException":
2964
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
2965
- case "NotFoundException":
2966
- case "com.amazonaws.appsync#NotFoundException":
2967
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2968
- case "UnauthorizedException":
2969
- case "com.amazonaws.appsync#UnauthorizedException":
2970
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
2971
- default:
2972
- const parsedBody = parsedOutput.body;
2973
- return throwDefaultError({
2974
- output,
2975
- parsedBody,
2976
- errorCode,
2977
- });
2978
- }
2979
- };
2980
1536
  export const de_StartSchemaCreationCommand = async (output, context) => {
2981
1537
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2982
- return de_StartSchemaCreationCommandError(output, context);
1538
+ return de_CommandError(output, context);
2983
1539
  }
2984
1540
  const contents = map({
2985
1541
  $metadata: deserializeMetadata(output),
@@ -2991,40 +1547,9 @@ export const de_StartSchemaCreationCommand = async (output, context) => {
2991
1547
  Object.assign(contents, doc);
2992
1548
  return contents;
2993
1549
  };
2994
- const de_StartSchemaCreationCommandError = async (output, context) => {
2995
- const parsedOutput = {
2996
- ...output,
2997
- body: await parseErrorBody(output.body, context),
2998
- };
2999
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3000
- switch (errorCode) {
3001
- case "BadRequestException":
3002
- case "com.amazonaws.appsync#BadRequestException":
3003
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3004
- case "ConcurrentModificationException":
3005
- case "com.amazonaws.appsync#ConcurrentModificationException":
3006
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3007
- case "InternalFailureException":
3008
- case "com.amazonaws.appsync#InternalFailureException":
3009
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3010
- case "NotFoundException":
3011
- case "com.amazonaws.appsync#NotFoundException":
3012
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3013
- case "UnauthorizedException":
3014
- case "com.amazonaws.appsync#UnauthorizedException":
3015
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3016
- default:
3017
- const parsedBody = parsedOutput.body;
3018
- return throwDefaultError({
3019
- output,
3020
- parsedBody,
3021
- errorCode,
3022
- });
3023
- }
3024
- };
3025
1550
  export const de_StartSchemaMergeCommand = async (output, context) => {
3026
1551
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3027
- return de_StartSchemaMergeCommandError(output, context);
1552
+ return de_CommandError(output, context);
3028
1553
  }
3029
1554
  const contents = map({
3030
1555
  $metadata: deserializeMetadata(output),
@@ -3036,40 +1561,9 @@ export const de_StartSchemaMergeCommand = async (output, context) => {
3036
1561
  Object.assign(contents, doc);
3037
1562
  return contents;
3038
1563
  };
3039
- const de_StartSchemaMergeCommandError = async (output, context) => {
3040
- const parsedOutput = {
3041
- ...output,
3042
- body: await parseErrorBody(output.body, context),
3043
- };
3044
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3045
- switch (errorCode) {
3046
- case "BadRequestException":
3047
- case "com.amazonaws.appsync#BadRequestException":
3048
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3049
- case "ConcurrentModificationException":
3050
- case "com.amazonaws.appsync#ConcurrentModificationException":
3051
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3052
- case "InternalFailureException":
3053
- case "com.amazonaws.appsync#InternalFailureException":
3054
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3055
- case "NotFoundException":
3056
- case "com.amazonaws.appsync#NotFoundException":
3057
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3058
- case "UnauthorizedException":
3059
- case "com.amazonaws.appsync#UnauthorizedException":
3060
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3061
- default:
3062
- const parsedBody = parsedOutput.body;
3063
- return throwDefaultError({
3064
- output,
3065
- parsedBody,
3066
- errorCode,
3067
- });
3068
- }
3069
- };
3070
1564
  export const de_TagResourceCommand = async (output, context) => {
3071
1565
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3072
- return de_TagResourceCommandError(output, context);
1566
+ return de_CommandError(output, context);
3073
1567
  }
3074
1568
  const contents = map({
3075
1569
  $metadata: deserializeMetadata(output),
@@ -3077,180 +1571,47 @@ export const de_TagResourceCommand = async (output, context) => {
3077
1571
  await collectBody(output.body, context);
3078
1572
  return contents;
3079
1573
  };
3080
- const de_TagResourceCommandError = async (output, context) => {
3081
- const parsedOutput = {
3082
- ...output,
3083
- body: await parseErrorBody(output.body, context),
3084
- };
3085
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3086
- switch (errorCode) {
3087
- case "AccessDeniedException":
3088
- case "com.amazonaws.appsync#AccessDeniedException":
3089
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3090
- case "BadRequestException":
3091
- case "com.amazonaws.appsync#BadRequestException":
3092
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3093
- case "InternalFailureException":
3094
- case "com.amazonaws.appsync#InternalFailureException":
3095
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3096
- case "LimitExceededException":
3097
- case "com.amazonaws.appsync#LimitExceededException":
3098
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3099
- case "NotFoundException":
3100
- case "com.amazonaws.appsync#NotFoundException":
3101
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3102
- case "UnauthorizedException":
3103
- case "com.amazonaws.appsync#UnauthorizedException":
3104
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3105
- default:
3106
- const parsedBody = parsedOutput.body;
3107
- return throwDefaultError({
3108
- output,
3109
- parsedBody,
3110
- errorCode,
3111
- });
3112
- }
3113
- };
3114
1574
  export const de_UntagResourceCommand = async (output, context) => {
3115
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3116
- return de_UntagResourceCommandError(output, context);
3117
- }
3118
- const contents = map({
3119
- $metadata: deserializeMetadata(output),
3120
- });
3121
- await collectBody(output.body, context);
3122
- return contents;
3123
- };
3124
- const de_UntagResourceCommandError = async (output, context) => {
3125
- const parsedOutput = {
3126
- ...output,
3127
- body: await parseErrorBody(output.body, context),
3128
- };
3129
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3130
- switch (errorCode) {
3131
- case "AccessDeniedException":
3132
- case "com.amazonaws.appsync#AccessDeniedException":
3133
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3134
- case "BadRequestException":
3135
- case "com.amazonaws.appsync#BadRequestException":
3136
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3137
- case "InternalFailureException":
3138
- case "com.amazonaws.appsync#InternalFailureException":
3139
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3140
- case "LimitExceededException":
3141
- case "com.amazonaws.appsync#LimitExceededException":
3142
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3143
- case "NotFoundException":
3144
- case "com.amazonaws.appsync#NotFoundException":
3145
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3146
- case "UnauthorizedException":
3147
- case "com.amazonaws.appsync#UnauthorizedException":
3148
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3149
- default:
3150
- const parsedBody = parsedOutput.body;
3151
- return throwDefaultError({
3152
- output,
3153
- parsedBody,
3154
- errorCode,
3155
- });
3156
- }
3157
- };
3158
- export const de_UpdateApiCacheCommand = async (output, context) => {
3159
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3160
- return de_UpdateApiCacheCommandError(output, context);
3161
- }
3162
- const contents = map({
3163
- $metadata: deserializeMetadata(output),
3164
- });
3165
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3166
- const doc = take(data, {
3167
- apiCache: _json,
3168
- });
3169
- Object.assign(contents, doc);
3170
- return contents;
3171
- };
3172
- const de_UpdateApiCacheCommandError = async (output, context) => {
3173
- const parsedOutput = {
3174
- ...output,
3175
- body: await parseErrorBody(output.body, context),
3176
- };
3177
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3178
- switch (errorCode) {
3179
- case "BadRequestException":
3180
- case "com.amazonaws.appsync#BadRequestException":
3181
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3182
- case "ConcurrentModificationException":
3183
- case "com.amazonaws.appsync#ConcurrentModificationException":
3184
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3185
- case "InternalFailureException":
3186
- case "com.amazonaws.appsync#InternalFailureException":
3187
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3188
- case "NotFoundException":
3189
- case "com.amazonaws.appsync#NotFoundException":
3190
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3191
- case "UnauthorizedException":
3192
- case "com.amazonaws.appsync#UnauthorizedException":
3193
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3194
- default:
3195
- const parsedBody = parsedOutput.body;
3196
- return throwDefaultError({
3197
- output,
3198
- parsedBody,
3199
- errorCode,
3200
- });
1575
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1576
+ return de_CommandError(output, context);
3201
1577
  }
1578
+ const contents = map({
1579
+ $metadata: deserializeMetadata(output),
1580
+ });
1581
+ await collectBody(output.body, context);
1582
+ return contents;
3202
1583
  };
3203
- export const de_UpdateApiKeyCommand = async (output, context) => {
1584
+ export const de_UpdateApiCacheCommand = async (output, context) => {
3204
1585
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3205
- return de_UpdateApiKeyCommandError(output, context);
1586
+ return de_CommandError(output, context);
3206
1587
  }
3207
1588
  const contents = map({
3208
1589
  $metadata: deserializeMetadata(output),
3209
1590
  });
3210
1591
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3211
1592
  const doc = take(data, {
3212
- apiKey: _json,
1593
+ apiCache: _json,
3213
1594
  });
3214
1595
  Object.assign(contents, doc);
3215
1596
  return contents;
3216
1597
  };
3217
- const de_UpdateApiKeyCommandError = async (output, context) => {
3218
- const parsedOutput = {
3219
- ...output,
3220
- body: await parseErrorBody(output.body, context),
3221
- };
3222
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3223
- switch (errorCode) {
3224
- case "ApiKeyValidityOutOfBoundsException":
3225
- case "com.amazonaws.appsync#ApiKeyValidityOutOfBoundsException":
3226
- throw await de_ApiKeyValidityOutOfBoundsExceptionRes(parsedOutput, context);
3227
- case "BadRequestException":
3228
- case "com.amazonaws.appsync#BadRequestException":
3229
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3230
- case "InternalFailureException":
3231
- case "com.amazonaws.appsync#InternalFailureException":
3232
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3233
- case "LimitExceededException":
3234
- case "com.amazonaws.appsync#LimitExceededException":
3235
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
3236
- case "NotFoundException":
3237
- case "com.amazonaws.appsync#NotFoundException":
3238
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3239
- case "UnauthorizedException":
3240
- case "com.amazonaws.appsync#UnauthorizedException":
3241
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3242
- default:
3243
- const parsedBody = parsedOutput.body;
3244
- return throwDefaultError({
3245
- output,
3246
- parsedBody,
3247
- errorCode,
3248
- });
1598
+ export const de_UpdateApiKeyCommand = async (output, context) => {
1599
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1600
+ return de_CommandError(output, context);
3249
1601
  }
1602
+ const contents = map({
1603
+ $metadata: deserializeMetadata(output),
1604
+ });
1605
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1606
+ const doc = take(data, {
1607
+ apiKey: _json,
1608
+ });
1609
+ Object.assign(contents, doc);
1610
+ return contents;
3250
1611
  };
3251
1612
  export const de_UpdateDataSourceCommand = async (output, context) => {
3252
1613
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3253
- return de_UpdateDataSourceCommandError(output, context);
1614
+ return de_CommandError(output, context);
3254
1615
  }
3255
1616
  const contents = map({
3256
1617
  $metadata: deserializeMetadata(output),
@@ -3262,40 +1623,9 @@ export const de_UpdateDataSourceCommand = async (output, context) => {
3262
1623
  Object.assign(contents, doc);
3263
1624
  return contents;
3264
1625
  };
3265
- const de_UpdateDataSourceCommandError = async (output, context) => {
3266
- const parsedOutput = {
3267
- ...output,
3268
- body: await parseErrorBody(output.body, context),
3269
- };
3270
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3271
- switch (errorCode) {
3272
- case "BadRequestException":
3273
- case "com.amazonaws.appsync#BadRequestException":
3274
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3275
- case "ConcurrentModificationException":
3276
- case "com.amazonaws.appsync#ConcurrentModificationException":
3277
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3278
- case "InternalFailureException":
3279
- case "com.amazonaws.appsync#InternalFailureException":
3280
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3281
- case "NotFoundException":
3282
- case "com.amazonaws.appsync#NotFoundException":
3283
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3284
- case "UnauthorizedException":
3285
- case "com.amazonaws.appsync#UnauthorizedException":
3286
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3287
- default:
3288
- const parsedBody = parsedOutput.body;
3289
- return throwDefaultError({
3290
- output,
3291
- parsedBody,
3292
- errorCode,
3293
- });
3294
- }
3295
- };
3296
1626
  export const de_UpdateDomainNameCommand = async (output, context) => {
3297
1627
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3298
- return de_UpdateDomainNameCommandError(output, context);
1628
+ return de_CommandError(output, context);
3299
1629
  }
3300
1630
  const contents = map({
3301
1631
  $metadata: deserializeMetadata(output),
@@ -3307,40 +1637,9 @@ export const de_UpdateDomainNameCommand = async (output, context) => {
3307
1637
  Object.assign(contents, doc);
3308
1638
  return contents;
3309
1639
  };
3310
- const de_UpdateDomainNameCommandError = async (output, context) => {
3311
- const parsedOutput = {
3312
- ...output,
3313
- body: await parseErrorBody(output.body, context),
3314
- };
3315
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3316
- switch (errorCode) {
3317
- case "AccessDeniedException":
3318
- case "com.amazonaws.appsync#AccessDeniedException":
3319
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3320
- case "BadRequestException":
3321
- case "com.amazonaws.appsync#BadRequestException":
3322
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3323
- case "ConcurrentModificationException":
3324
- case "com.amazonaws.appsync#ConcurrentModificationException":
3325
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3326
- case "InternalFailureException":
3327
- case "com.amazonaws.appsync#InternalFailureException":
3328
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3329
- case "NotFoundException":
3330
- case "com.amazonaws.appsync#NotFoundException":
3331
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3332
- default:
3333
- const parsedBody = parsedOutput.body;
3334
- return throwDefaultError({
3335
- output,
3336
- parsedBody,
3337
- errorCode,
3338
- });
3339
- }
3340
- };
3341
1640
  export const de_UpdateFunctionCommand = async (output, context) => {
3342
1641
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3343
- return de_UpdateFunctionCommandError(output, context);
1642
+ return de_CommandError(output, context);
3344
1643
  }
3345
1644
  const contents = map({
3346
1645
  $metadata: deserializeMetadata(output),
@@ -3352,37 +1651,9 @@ export const de_UpdateFunctionCommand = async (output, context) => {
3352
1651
  Object.assign(contents, doc);
3353
1652
  return contents;
3354
1653
  };
3355
- const de_UpdateFunctionCommandError = async (output, context) => {
3356
- const parsedOutput = {
3357
- ...output,
3358
- body: await parseErrorBody(output.body, context),
3359
- };
3360
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3361
- switch (errorCode) {
3362
- case "ConcurrentModificationException":
3363
- case "com.amazonaws.appsync#ConcurrentModificationException":
3364
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3365
- case "InternalFailureException":
3366
- case "com.amazonaws.appsync#InternalFailureException":
3367
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3368
- case "NotFoundException":
3369
- case "com.amazonaws.appsync#NotFoundException":
3370
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3371
- case "UnauthorizedException":
3372
- case "com.amazonaws.appsync#UnauthorizedException":
3373
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3374
- default:
3375
- const parsedBody = parsedOutput.body;
3376
- return throwDefaultError({
3377
- output,
3378
- parsedBody,
3379
- errorCode,
3380
- });
3381
- }
3382
- };
3383
1654
  export const de_UpdateGraphqlApiCommand = async (output, context) => {
3384
1655
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3385
- return de_UpdateGraphqlApiCommandError(output, context);
1656
+ return de_CommandError(output, context);
3386
1657
  }
3387
1658
  const contents = map({
3388
1659
  $metadata: deserializeMetadata(output),
@@ -3394,43 +1665,9 @@ export const de_UpdateGraphqlApiCommand = async (output, context) => {
3394
1665
  Object.assign(contents, doc);
3395
1666
  return contents;
3396
1667
  };
3397
- const de_UpdateGraphqlApiCommandError = async (output, context) => {
3398
- const parsedOutput = {
3399
- ...output,
3400
- body: await parseErrorBody(output.body, context),
3401
- };
3402
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3403
- switch (errorCode) {
3404
- case "AccessDeniedException":
3405
- case "com.amazonaws.appsync#AccessDeniedException":
3406
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3407
- case "BadRequestException":
3408
- case "com.amazonaws.appsync#BadRequestException":
3409
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3410
- case "ConcurrentModificationException":
3411
- case "com.amazonaws.appsync#ConcurrentModificationException":
3412
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3413
- case "InternalFailureException":
3414
- case "com.amazonaws.appsync#InternalFailureException":
3415
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3416
- case "NotFoundException":
3417
- case "com.amazonaws.appsync#NotFoundException":
3418
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3419
- case "UnauthorizedException":
3420
- case "com.amazonaws.appsync#UnauthorizedException":
3421
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3422
- default:
3423
- const parsedBody = parsedOutput.body;
3424
- return throwDefaultError({
3425
- output,
3426
- parsedBody,
3427
- errorCode,
3428
- });
3429
- }
3430
- };
3431
1668
  export const de_UpdateResolverCommand = async (output, context) => {
3432
1669
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3433
- return de_UpdateResolverCommandError(output, context);
1670
+ return de_CommandError(output, context);
3434
1671
  }
3435
1672
  const contents = map({
3436
1673
  $metadata: deserializeMetadata(output),
@@ -3442,40 +1679,9 @@ export const de_UpdateResolverCommand = async (output, context) => {
3442
1679
  Object.assign(contents, doc);
3443
1680
  return contents;
3444
1681
  };
3445
- const de_UpdateResolverCommandError = async (output, context) => {
3446
- const parsedOutput = {
3447
- ...output,
3448
- body: await parseErrorBody(output.body, context),
3449
- };
3450
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3451
- switch (errorCode) {
3452
- case "BadRequestException":
3453
- case "com.amazonaws.appsync#BadRequestException":
3454
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3455
- case "ConcurrentModificationException":
3456
- case "com.amazonaws.appsync#ConcurrentModificationException":
3457
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3458
- case "InternalFailureException":
3459
- case "com.amazonaws.appsync#InternalFailureException":
3460
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3461
- case "NotFoundException":
3462
- case "com.amazonaws.appsync#NotFoundException":
3463
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3464
- case "UnauthorizedException":
3465
- case "com.amazonaws.appsync#UnauthorizedException":
3466
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3467
- default:
3468
- const parsedBody = parsedOutput.body;
3469
- return throwDefaultError({
3470
- output,
3471
- parsedBody,
3472
- errorCode,
3473
- });
3474
- }
3475
- };
3476
1682
  export const de_UpdateSourceApiAssociationCommand = async (output, context) => {
3477
1683
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3478
- return de_UpdateSourceApiAssociationCommandError(output, context);
1684
+ return de_CommandError(output, context);
3479
1685
  }
3480
1686
  const contents = map({
3481
1687
  $metadata: deserializeMetadata(output),
@@ -3487,40 +1693,9 @@ export const de_UpdateSourceApiAssociationCommand = async (output, context) => {
3487
1693
  Object.assign(contents, doc);
3488
1694
  return contents;
3489
1695
  };
3490
- const de_UpdateSourceApiAssociationCommandError = async (output, context) => {
3491
- const parsedOutput = {
3492
- ...output,
3493
- body: await parseErrorBody(output.body, context),
3494
- };
3495
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3496
- switch (errorCode) {
3497
- case "BadRequestException":
3498
- case "com.amazonaws.appsync#BadRequestException":
3499
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3500
- case "ConcurrentModificationException":
3501
- case "com.amazonaws.appsync#ConcurrentModificationException":
3502
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3503
- case "InternalFailureException":
3504
- case "com.amazonaws.appsync#InternalFailureException":
3505
- throw await de_InternalFailureExceptionRes(parsedOutput, context);
3506
- case "NotFoundException":
3507
- case "com.amazonaws.appsync#NotFoundException":
3508
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3509
- case "UnauthorizedException":
3510
- case "com.amazonaws.appsync#UnauthorizedException":
3511
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
3512
- default:
3513
- const parsedBody = parsedOutput.body;
3514
- return throwDefaultError({
3515
- output,
3516
- parsedBody,
3517
- errorCode,
3518
- });
3519
- }
3520
- };
3521
1696
  export const de_UpdateTypeCommand = async (output, context) => {
3522
1697
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3523
- return de_UpdateTypeCommandError(output, context);
1698
+ return de_CommandError(output, context);
3524
1699
  }
3525
1700
  const contents = map({
3526
1701
  $metadata: deserializeMetadata(output),
@@ -3532,28 +1707,46 @@ export const de_UpdateTypeCommand = async (output, context) => {
3532
1707
  Object.assign(contents, doc);
3533
1708
  return contents;
3534
1709
  };
3535
- const de_UpdateTypeCommandError = async (output, context) => {
1710
+ const de_CommandError = async (output, context) => {
3536
1711
  const parsedOutput = {
3537
1712
  ...output,
3538
1713
  body: await parseErrorBody(output.body, context),
3539
1714
  };
3540
1715
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3541
1716
  switch (errorCode) {
1717
+ case "AccessDeniedException":
1718
+ case "com.amazonaws.appsync#AccessDeniedException":
1719
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3542
1720
  case "BadRequestException":
3543
1721
  case "com.amazonaws.appsync#BadRequestException":
3544
1722
  throw await de_BadRequestExceptionRes(parsedOutput, context);
3545
- case "ConcurrentModificationException":
3546
- case "com.amazonaws.appsync#ConcurrentModificationException":
3547
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
3548
1723
  case "InternalFailureException":
3549
1724
  case "com.amazonaws.appsync#InternalFailureException":
3550
1725
  throw await de_InternalFailureExceptionRes(parsedOutput, context);
3551
1726
  case "NotFoundException":
3552
1727
  case "com.amazonaws.appsync#NotFoundException":
3553
1728
  throw await de_NotFoundExceptionRes(parsedOutput, context);
1729
+ case "ConcurrentModificationException":
1730
+ case "com.amazonaws.appsync#ConcurrentModificationException":
1731
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1732
+ case "LimitExceededException":
1733
+ case "com.amazonaws.appsync#LimitExceededException":
1734
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
3554
1735
  case "UnauthorizedException":
3555
1736
  case "com.amazonaws.appsync#UnauthorizedException":
3556
1737
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
1738
+ case "ApiKeyLimitExceededException":
1739
+ case "com.amazonaws.appsync#ApiKeyLimitExceededException":
1740
+ throw await de_ApiKeyLimitExceededExceptionRes(parsedOutput, context);
1741
+ case "ApiKeyValidityOutOfBoundsException":
1742
+ case "com.amazonaws.appsync#ApiKeyValidityOutOfBoundsException":
1743
+ throw await de_ApiKeyValidityOutOfBoundsExceptionRes(parsedOutput, context);
1744
+ case "ApiLimitExceededException":
1745
+ case "com.amazonaws.appsync#ApiLimitExceededException":
1746
+ throw await de_ApiLimitExceededExceptionRes(parsedOutput, context);
1747
+ case "GraphQLSchemaException":
1748
+ case "com.amazonaws.appsync#GraphQLSchemaException":
1749
+ throw await de_GraphQLSchemaExceptionRes(parsedOutput, context);
3557
1750
  default:
3558
1751
  const parsedBody = parsedOutput.body;
3559
1752
  return throwDefaultError({