@aws-sdk/client-medialive 3.504.0 → 3.509.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -825,7 +825,7 @@ export const se_UpdateReservationCommand = async (input, context) => {
825
825
  };
826
826
  export const de_AcceptInputDeviceTransferCommand = async (output, context) => {
827
827
  if (output.statusCode !== 200 && output.statusCode >= 300) {
828
- return de_AcceptInputDeviceTransferCommandError(output, context);
828
+ return de_CommandError(output, context);
829
829
  }
830
830
  const contents = map({
831
831
  $metadata: deserializeMetadata(output),
@@ -833,52 +833,9 @@ export const de_AcceptInputDeviceTransferCommand = async (output, context) => {
833
833
  await collectBody(output.body, context);
834
834
  return contents;
835
835
  };
836
- const de_AcceptInputDeviceTransferCommandError = async (output, context) => {
837
- const parsedOutput = {
838
- ...output,
839
- body: await parseErrorBody(output.body, context),
840
- };
841
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
842
- switch (errorCode) {
843
- case "BadGatewayException":
844
- case "com.amazonaws.medialive#BadGatewayException":
845
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
846
- case "BadRequestException":
847
- case "com.amazonaws.medialive#BadRequestException":
848
- throw await de_BadRequestExceptionRes(parsedOutput, context);
849
- case "ConflictException":
850
- case "com.amazonaws.medialive#ConflictException":
851
- throw await de_ConflictExceptionRes(parsedOutput, context);
852
- case "ForbiddenException":
853
- case "com.amazonaws.medialive#ForbiddenException":
854
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
855
- case "GatewayTimeoutException":
856
- case "com.amazonaws.medialive#GatewayTimeoutException":
857
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
858
- case "InternalServerErrorException":
859
- case "com.amazonaws.medialive#InternalServerErrorException":
860
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
861
- case "NotFoundException":
862
- case "com.amazonaws.medialive#NotFoundException":
863
- throw await de_NotFoundExceptionRes(parsedOutput, context);
864
- case "TooManyRequestsException":
865
- case "com.amazonaws.medialive#TooManyRequestsException":
866
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
867
- case "UnprocessableEntityException":
868
- case "com.amazonaws.medialive#UnprocessableEntityException":
869
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
870
- default:
871
- const parsedBody = parsedOutput.body;
872
- return throwDefaultError({
873
- output,
874
- parsedBody,
875
- errorCode,
876
- });
877
- }
878
- };
879
836
  export const de_BatchDeleteCommand = async (output, context) => {
880
837
  if (output.statusCode !== 200 && output.statusCode >= 300) {
881
- return de_BatchDeleteCommandError(output, context);
838
+ return de_CommandError(output, context);
882
839
  }
883
840
  const contents = map({
884
841
  $metadata: deserializeMetadata(output),
@@ -891,49 +848,9 @@ export const de_BatchDeleteCommand = async (output, context) => {
891
848
  Object.assign(contents, doc);
892
849
  return contents;
893
850
  };
894
- const de_BatchDeleteCommandError = async (output, context) => {
895
- const parsedOutput = {
896
- ...output,
897
- body: await parseErrorBody(output.body, context),
898
- };
899
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
900
- switch (errorCode) {
901
- case "BadGatewayException":
902
- case "com.amazonaws.medialive#BadGatewayException":
903
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
904
- case "BadRequestException":
905
- case "com.amazonaws.medialive#BadRequestException":
906
- throw await de_BadRequestExceptionRes(parsedOutput, context);
907
- case "ConflictException":
908
- case "com.amazonaws.medialive#ConflictException":
909
- throw await de_ConflictExceptionRes(parsedOutput, context);
910
- case "ForbiddenException":
911
- case "com.amazonaws.medialive#ForbiddenException":
912
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
913
- case "GatewayTimeoutException":
914
- case "com.amazonaws.medialive#GatewayTimeoutException":
915
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
916
- case "InternalServerErrorException":
917
- case "com.amazonaws.medialive#InternalServerErrorException":
918
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
919
- case "NotFoundException":
920
- case "com.amazonaws.medialive#NotFoundException":
921
- throw await de_NotFoundExceptionRes(parsedOutput, context);
922
- case "TooManyRequestsException":
923
- case "com.amazonaws.medialive#TooManyRequestsException":
924
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
925
- default:
926
- const parsedBody = parsedOutput.body;
927
- return throwDefaultError({
928
- output,
929
- parsedBody,
930
- errorCode,
931
- });
932
- }
933
- };
934
851
  export const de_BatchStartCommand = async (output, context) => {
935
852
  if (output.statusCode !== 200 && output.statusCode >= 300) {
936
- return de_BatchStartCommandError(output, context);
853
+ return de_CommandError(output, context);
937
854
  }
938
855
  const contents = map({
939
856
  $metadata: deserializeMetadata(output),
@@ -946,49 +863,9 @@ export const de_BatchStartCommand = async (output, context) => {
946
863
  Object.assign(contents, doc);
947
864
  return contents;
948
865
  };
949
- const de_BatchStartCommandError = async (output, context) => {
950
- const parsedOutput = {
951
- ...output,
952
- body: await parseErrorBody(output.body, context),
953
- };
954
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
955
- switch (errorCode) {
956
- case "BadGatewayException":
957
- case "com.amazonaws.medialive#BadGatewayException":
958
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
959
- case "BadRequestException":
960
- case "com.amazonaws.medialive#BadRequestException":
961
- throw await de_BadRequestExceptionRes(parsedOutput, context);
962
- case "ConflictException":
963
- case "com.amazonaws.medialive#ConflictException":
964
- throw await de_ConflictExceptionRes(parsedOutput, context);
965
- case "ForbiddenException":
966
- case "com.amazonaws.medialive#ForbiddenException":
967
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
968
- case "GatewayTimeoutException":
969
- case "com.amazonaws.medialive#GatewayTimeoutException":
970
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
971
- case "InternalServerErrorException":
972
- case "com.amazonaws.medialive#InternalServerErrorException":
973
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
974
- case "NotFoundException":
975
- case "com.amazonaws.medialive#NotFoundException":
976
- throw await de_NotFoundExceptionRes(parsedOutput, context);
977
- case "TooManyRequestsException":
978
- case "com.amazonaws.medialive#TooManyRequestsException":
979
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
980
- default:
981
- const parsedBody = parsedOutput.body;
982
- return throwDefaultError({
983
- output,
984
- parsedBody,
985
- errorCode,
986
- });
987
- }
988
- };
989
866
  export const de_BatchStopCommand = async (output, context) => {
990
867
  if (output.statusCode !== 200 && output.statusCode >= 300) {
991
- return de_BatchStopCommandError(output, context);
868
+ return de_CommandError(output, context);
992
869
  }
993
870
  const contents = map({
994
871
  $metadata: deserializeMetadata(output),
@@ -1001,49 +878,9 @@ export const de_BatchStopCommand = async (output, context) => {
1001
878
  Object.assign(contents, doc);
1002
879
  return contents;
1003
880
  };
1004
- const de_BatchStopCommandError = async (output, context) => {
1005
- const parsedOutput = {
1006
- ...output,
1007
- body: await parseErrorBody(output.body, context),
1008
- };
1009
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1010
- switch (errorCode) {
1011
- case "BadGatewayException":
1012
- case "com.amazonaws.medialive#BadGatewayException":
1013
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1014
- case "BadRequestException":
1015
- case "com.amazonaws.medialive#BadRequestException":
1016
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1017
- case "ConflictException":
1018
- case "com.amazonaws.medialive#ConflictException":
1019
- throw await de_ConflictExceptionRes(parsedOutput, context);
1020
- case "ForbiddenException":
1021
- case "com.amazonaws.medialive#ForbiddenException":
1022
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1023
- case "GatewayTimeoutException":
1024
- case "com.amazonaws.medialive#GatewayTimeoutException":
1025
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1026
- case "InternalServerErrorException":
1027
- case "com.amazonaws.medialive#InternalServerErrorException":
1028
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1029
- case "NotFoundException":
1030
- case "com.amazonaws.medialive#NotFoundException":
1031
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1032
- case "TooManyRequestsException":
1033
- case "com.amazonaws.medialive#TooManyRequestsException":
1034
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1035
- default:
1036
- const parsedBody = parsedOutput.body;
1037
- return throwDefaultError({
1038
- output,
1039
- parsedBody,
1040
- errorCode,
1041
- });
1042
- }
1043
- };
1044
881
  export const de_BatchUpdateScheduleCommand = async (output, context) => {
1045
882
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1046
- return de_BatchUpdateScheduleCommandError(output, context);
883
+ return de_CommandError(output, context);
1047
884
  }
1048
885
  const contents = map({
1049
886
  $metadata: deserializeMetadata(output),
@@ -1056,49 +893,9 @@ export const de_BatchUpdateScheduleCommand = async (output, context) => {
1056
893
  Object.assign(contents, doc);
1057
894
  return contents;
1058
895
  };
1059
- const de_BatchUpdateScheduleCommandError = async (output, context) => {
1060
- const parsedOutput = {
1061
- ...output,
1062
- body: await parseErrorBody(output.body, context),
1063
- };
1064
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1065
- switch (errorCode) {
1066
- case "BadGatewayException":
1067
- case "com.amazonaws.medialive#BadGatewayException":
1068
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1069
- case "BadRequestException":
1070
- case "com.amazonaws.medialive#BadRequestException":
1071
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1072
- case "ForbiddenException":
1073
- case "com.amazonaws.medialive#ForbiddenException":
1074
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1075
- case "GatewayTimeoutException":
1076
- case "com.amazonaws.medialive#GatewayTimeoutException":
1077
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1078
- case "InternalServerErrorException":
1079
- case "com.amazonaws.medialive#InternalServerErrorException":
1080
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1081
- case "NotFoundException":
1082
- case "com.amazonaws.medialive#NotFoundException":
1083
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1084
- case "TooManyRequestsException":
1085
- case "com.amazonaws.medialive#TooManyRequestsException":
1086
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1087
- case "UnprocessableEntityException":
1088
- case "com.amazonaws.medialive#UnprocessableEntityException":
1089
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1090
- default:
1091
- const parsedBody = parsedOutput.body;
1092
- return throwDefaultError({
1093
- output,
1094
- parsedBody,
1095
- errorCode,
1096
- });
1097
- }
1098
- };
1099
896
  export const de_CancelInputDeviceTransferCommand = async (output, context) => {
1100
897
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1101
- return de_CancelInputDeviceTransferCommandError(output, context);
898
+ return de_CommandError(output, context);
1102
899
  }
1103
900
  const contents = map({
1104
901
  $metadata: deserializeMetadata(output),
@@ -1106,52 +903,9 @@ export const de_CancelInputDeviceTransferCommand = async (output, context) => {
1106
903
  await collectBody(output.body, context);
1107
904
  return contents;
1108
905
  };
1109
- const de_CancelInputDeviceTransferCommandError = async (output, context) => {
1110
- const parsedOutput = {
1111
- ...output,
1112
- body: await parseErrorBody(output.body, context),
1113
- };
1114
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1115
- switch (errorCode) {
1116
- case "BadGatewayException":
1117
- case "com.amazonaws.medialive#BadGatewayException":
1118
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1119
- case "BadRequestException":
1120
- case "com.amazonaws.medialive#BadRequestException":
1121
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1122
- case "ConflictException":
1123
- case "com.amazonaws.medialive#ConflictException":
1124
- throw await de_ConflictExceptionRes(parsedOutput, context);
1125
- case "ForbiddenException":
1126
- case "com.amazonaws.medialive#ForbiddenException":
1127
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1128
- case "GatewayTimeoutException":
1129
- case "com.amazonaws.medialive#GatewayTimeoutException":
1130
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1131
- case "InternalServerErrorException":
1132
- case "com.amazonaws.medialive#InternalServerErrorException":
1133
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1134
- case "NotFoundException":
1135
- case "com.amazonaws.medialive#NotFoundException":
1136
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1137
- case "TooManyRequestsException":
1138
- case "com.amazonaws.medialive#TooManyRequestsException":
1139
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1140
- case "UnprocessableEntityException":
1141
- case "com.amazonaws.medialive#UnprocessableEntityException":
1142
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1143
- default:
1144
- const parsedBody = parsedOutput.body;
1145
- return throwDefaultError({
1146
- output,
1147
- parsedBody,
1148
- errorCode,
1149
- });
1150
- }
1151
- };
1152
906
  export const de_ClaimDeviceCommand = async (output, context) => {
1153
907
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1154
- return de_ClaimDeviceCommandError(output, context);
908
+ return de_CommandError(output, context);
1155
909
  }
1156
910
  const contents = map({
1157
911
  $metadata: deserializeMetadata(output),
@@ -1159,49 +913,9 @@ export const de_ClaimDeviceCommand = async (output, context) => {
1159
913
  await collectBody(output.body, context);
1160
914
  return contents;
1161
915
  };
1162
- const de_ClaimDeviceCommandError = async (output, context) => {
1163
- const parsedOutput = {
1164
- ...output,
1165
- body: await parseErrorBody(output.body, context),
1166
- };
1167
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1168
- switch (errorCode) {
1169
- case "BadGatewayException":
1170
- case "com.amazonaws.medialive#BadGatewayException":
1171
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1172
- case "BadRequestException":
1173
- case "com.amazonaws.medialive#BadRequestException":
1174
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1175
- case "ForbiddenException":
1176
- case "com.amazonaws.medialive#ForbiddenException":
1177
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1178
- case "GatewayTimeoutException":
1179
- case "com.amazonaws.medialive#GatewayTimeoutException":
1180
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1181
- case "InternalServerErrorException":
1182
- case "com.amazonaws.medialive#InternalServerErrorException":
1183
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1184
- case "NotFoundException":
1185
- case "com.amazonaws.medialive#NotFoundException":
1186
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1187
- case "TooManyRequestsException":
1188
- case "com.amazonaws.medialive#TooManyRequestsException":
1189
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1190
- case "UnprocessableEntityException":
1191
- case "com.amazonaws.medialive#UnprocessableEntityException":
1192
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1193
- default:
1194
- const parsedBody = parsedOutput.body;
1195
- return throwDefaultError({
1196
- output,
1197
- parsedBody,
1198
- errorCode,
1199
- });
1200
- }
1201
- };
1202
916
  export const de_CreateChannelCommand = async (output, context) => {
1203
917
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1204
- return de_CreateChannelCommandError(output, context);
918
+ return de_CommandError(output, context);
1205
919
  }
1206
920
  const contents = map({
1207
921
  $metadata: deserializeMetadata(output),
@@ -1213,49 +927,9 @@ export const de_CreateChannelCommand = async (output, context) => {
1213
927
  Object.assign(contents, doc);
1214
928
  return contents;
1215
929
  };
1216
- const de_CreateChannelCommandError = async (output, context) => {
1217
- const parsedOutput = {
1218
- ...output,
1219
- body: await parseErrorBody(output.body, context),
1220
- };
1221
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1222
- switch (errorCode) {
1223
- case "BadGatewayException":
1224
- case "com.amazonaws.medialive#BadGatewayException":
1225
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1226
- case "BadRequestException":
1227
- case "com.amazonaws.medialive#BadRequestException":
1228
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1229
- case "ConflictException":
1230
- case "com.amazonaws.medialive#ConflictException":
1231
- throw await de_ConflictExceptionRes(parsedOutput, context);
1232
- case "ForbiddenException":
1233
- case "com.amazonaws.medialive#ForbiddenException":
1234
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1235
- case "GatewayTimeoutException":
1236
- case "com.amazonaws.medialive#GatewayTimeoutException":
1237
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1238
- case "InternalServerErrorException":
1239
- case "com.amazonaws.medialive#InternalServerErrorException":
1240
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1241
- case "TooManyRequestsException":
1242
- case "com.amazonaws.medialive#TooManyRequestsException":
1243
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1244
- case "UnprocessableEntityException":
1245
- case "com.amazonaws.medialive#UnprocessableEntityException":
1246
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1247
- default:
1248
- const parsedBody = parsedOutput.body;
1249
- return throwDefaultError({
1250
- output,
1251
- parsedBody,
1252
- errorCode,
1253
- });
1254
- }
1255
- };
1256
930
  export const de_CreateInputCommand = async (output, context) => {
1257
931
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1258
- return de_CreateInputCommandError(output, context);
932
+ return de_CommandError(output, context);
1259
933
  }
1260
934
  const contents = map({
1261
935
  $metadata: deserializeMetadata(output),
@@ -1267,43 +941,9 @@ export const de_CreateInputCommand = async (output, context) => {
1267
941
  Object.assign(contents, doc);
1268
942
  return contents;
1269
943
  };
1270
- const de_CreateInputCommandError = async (output, context) => {
1271
- const parsedOutput = {
1272
- ...output,
1273
- body: await parseErrorBody(output.body, context),
1274
- };
1275
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1276
- switch (errorCode) {
1277
- case "BadGatewayException":
1278
- case "com.amazonaws.medialive#BadGatewayException":
1279
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1280
- case "BadRequestException":
1281
- case "com.amazonaws.medialive#BadRequestException":
1282
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1283
- case "ForbiddenException":
1284
- case "com.amazonaws.medialive#ForbiddenException":
1285
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1286
- case "GatewayTimeoutException":
1287
- case "com.amazonaws.medialive#GatewayTimeoutException":
1288
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1289
- case "InternalServerErrorException":
1290
- case "com.amazonaws.medialive#InternalServerErrorException":
1291
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1292
- case "TooManyRequestsException":
1293
- case "com.amazonaws.medialive#TooManyRequestsException":
1294
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1295
- default:
1296
- const parsedBody = parsedOutput.body;
1297
- return throwDefaultError({
1298
- output,
1299
- parsedBody,
1300
- errorCode,
1301
- });
1302
- }
1303
- };
1304
944
  export const de_CreateInputSecurityGroupCommand = async (output, context) => {
1305
945
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1306
- return de_CreateInputSecurityGroupCommandError(output, context);
946
+ return de_CommandError(output, context);
1307
947
  }
1308
948
  const contents = map({
1309
949
  $metadata: deserializeMetadata(output),
@@ -1315,43 +955,9 @@ export const de_CreateInputSecurityGroupCommand = async (output, context) => {
1315
955
  Object.assign(contents, doc);
1316
956
  return contents;
1317
957
  };
1318
- const de_CreateInputSecurityGroupCommandError = async (output, context) => {
1319
- const parsedOutput = {
1320
- ...output,
1321
- body: await parseErrorBody(output.body, context),
1322
- };
1323
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1324
- switch (errorCode) {
1325
- case "BadGatewayException":
1326
- case "com.amazonaws.medialive#BadGatewayException":
1327
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1328
- case "BadRequestException":
1329
- case "com.amazonaws.medialive#BadRequestException":
1330
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1331
- case "ForbiddenException":
1332
- case "com.amazonaws.medialive#ForbiddenException":
1333
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1334
- case "GatewayTimeoutException":
1335
- case "com.amazonaws.medialive#GatewayTimeoutException":
1336
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1337
- case "InternalServerErrorException":
1338
- case "com.amazonaws.medialive#InternalServerErrorException":
1339
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1340
- case "TooManyRequestsException":
1341
- case "com.amazonaws.medialive#TooManyRequestsException":
1342
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1343
- default:
1344
- const parsedBody = parsedOutput.body;
1345
- return throwDefaultError({
1346
- output,
1347
- parsedBody,
1348
- errorCode,
1349
- });
1350
- }
1351
- };
1352
958
  export const de_CreateMultiplexCommand = async (output, context) => {
1353
959
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1354
- return de_CreateMultiplexCommandError(output, context);
960
+ return de_CommandError(output, context);
1355
961
  }
1356
962
  const contents = map({
1357
963
  $metadata: deserializeMetadata(output),
@@ -1363,49 +969,9 @@ export const de_CreateMultiplexCommand = async (output, context) => {
1363
969
  Object.assign(contents, doc);
1364
970
  return contents;
1365
971
  };
1366
- const de_CreateMultiplexCommandError = async (output, context) => {
1367
- const parsedOutput = {
1368
- ...output,
1369
- body: await parseErrorBody(output.body, context),
1370
- };
1371
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1372
- switch (errorCode) {
1373
- case "BadGatewayException":
1374
- case "com.amazonaws.medialive#BadGatewayException":
1375
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1376
- case "BadRequestException":
1377
- case "com.amazonaws.medialive#BadRequestException":
1378
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1379
- case "ConflictException":
1380
- case "com.amazonaws.medialive#ConflictException":
1381
- throw await de_ConflictExceptionRes(parsedOutput, context);
1382
- case "ForbiddenException":
1383
- case "com.amazonaws.medialive#ForbiddenException":
1384
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1385
- case "GatewayTimeoutException":
1386
- case "com.amazonaws.medialive#GatewayTimeoutException":
1387
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1388
- case "InternalServerErrorException":
1389
- case "com.amazonaws.medialive#InternalServerErrorException":
1390
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1391
- case "TooManyRequestsException":
1392
- case "com.amazonaws.medialive#TooManyRequestsException":
1393
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1394
- case "UnprocessableEntityException":
1395
- case "com.amazonaws.medialive#UnprocessableEntityException":
1396
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1397
- default:
1398
- const parsedBody = parsedOutput.body;
1399
- return throwDefaultError({
1400
- output,
1401
- parsedBody,
1402
- errorCode,
1403
- });
1404
- }
1405
- };
1406
972
  export const de_CreateMultiplexProgramCommand = async (output, context) => {
1407
973
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1408
- return de_CreateMultiplexProgramCommandError(output, context);
974
+ return de_CommandError(output, context);
1409
975
  }
1410
976
  const contents = map({
1411
977
  $metadata: deserializeMetadata(output),
@@ -1417,49 +983,9 @@ export const de_CreateMultiplexProgramCommand = async (output, context) => {
1417
983
  Object.assign(contents, doc);
1418
984
  return contents;
1419
985
  };
1420
- const de_CreateMultiplexProgramCommandError = async (output, context) => {
1421
- const parsedOutput = {
1422
- ...output,
1423
- body: await parseErrorBody(output.body, context),
1424
- };
1425
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1426
- switch (errorCode) {
1427
- case "BadGatewayException":
1428
- case "com.amazonaws.medialive#BadGatewayException":
1429
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1430
- case "BadRequestException":
1431
- case "com.amazonaws.medialive#BadRequestException":
1432
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1433
- case "ConflictException":
1434
- case "com.amazonaws.medialive#ConflictException":
1435
- throw await de_ConflictExceptionRes(parsedOutput, context);
1436
- case "ForbiddenException":
1437
- case "com.amazonaws.medialive#ForbiddenException":
1438
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1439
- case "GatewayTimeoutException":
1440
- case "com.amazonaws.medialive#GatewayTimeoutException":
1441
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1442
- case "InternalServerErrorException":
1443
- case "com.amazonaws.medialive#InternalServerErrorException":
1444
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1445
- case "TooManyRequestsException":
1446
- case "com.amazonaws.medialive#TooManyRequestsException":
1447
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1448
- case "UnprocessableEntityException":
1449
- case "com.amazonaws.medialive#UnprocessableEntityException":
1450
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
1451
- default:
1452
- const parsedBody = parsedOutput.body;
1453
- return throwDefaultError({
1454
- output,
1455
- parsedBody,
1456
- errorCode,
1457
- });
1458
- }
1459
- };
1460
986
  export const de_CreatePartnerInputCommand = async (output, context) => {
1461
987
  if (output.statusCode !== 201 && output.statusCode >= 300) {
1462
- return de_CreatePartnerInputCommandError(output, context);
988
+ return de_CommandError(output, context);
1463
989
  }
1464
990
  const contents = map({
1465
991
  $metadata: deserializeMetadata(output),
@@ -1471,43 +997,9 @@ export const de_CreatePartnerInputCommand = async (output, context) => {
1471
997
  Object.assign(contents, doc);
1472
998
  return contents;
1473
999
  };
1474
- const de_CreatePartnerInputCommandError = async (output, context) => {
1475
- const parsedOutput = {
1476
- ...output,
1477
- body: await parseErrorBody(output.body, context),
1478
- };
1479
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1480
- switch (errorCode) {
1481
- case "BadGatewayException":
1482
- case "com.amazonaws.medialive#BadGatewayException":
1483
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1484
- case "BadRequestException":
1485
- case "com.amazonaws.medialive#BadRequestException":
1486
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1487
- case "ForbiddenException":
1488
- case "com.amazonaws.medialive#ForbiddenException":
1489
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1490
- case "GatewayTimeoutException":
1491
- case "com.amazonaws.medialive#GatewayTimeoutException":
1492
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1493
- case "InternalServerErrorException":
1494
- case "com.amazonaws.medialive#InternalServerErrorException":
1495
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1496
- case "TooManyRequestsException":
1497
- case "com.amazonaws.medialive#TooManyRequestsException":
1498
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1499
- default:
1500
- const parsedBody = parsedOutput.body;
1501
- return throwDefaultError({
1502
- output,
1503
- parsedBody,
1504
- errorCode,
1505
- });
1506
- }
1507
- };
1508
1000
  export const de_CreateTagsCommand = async (output, context) => {
1509
1001
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1510
- return de_CreateTagsCommandError(output, context);
1002
+ return de_CommandError(output, context);
1511
1003
  }
1512
1004
  const contents = map({
1513
1005
  $metadata: deserializeMetadata(output),
@@ -1515,37 +1007,9 @@ export const de_CreateTagsCommand = async (output, context) => {
1515
1007
  await collectBody(output.body, context);
1516
1008
  return contents;
1517
1009
  };
1518
- const de_CreateTagsCommandError = async (output, context) => {
1519
- const parsedOutput = {
1520
- ...output,
1521
- body: await parseErrorBody(output.body, context),
1522
- };
1523
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1524
- switch (errorCode) {
1525
- case "BadRequestException":
1526
- case "com.amazonaws.medialive#BadRequestException":
1527
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1528
- case "ForbiddenException":
1529
- case "com.amazonaws.medialive#ForbiddenException":
1530
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1531
- case "InternalServerErrorException":
1532
- case "com.amazonaws.medialive#InternalServerErrorException":
1533
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1534
- case "NotFoundException":
1535
- case "com.amazonaws.medialive#NotFoundException":
1536
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1537
- default:
1538
- const parsedBody = parsedOutput.body;
1539
- return throwDefaultError({
1540
- output,
1541
- parsedBody,
1542
- errorCode,
1543
- });
1544
- }
1545
- };
1546
1010
  export const de_DeleteChannelCommand = async (output, context) => {
1547
1011
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1548
- return de_DeleteChannelCommandError(output, context);
1012
+ return de_CommandError(output, context);
1549
1013
  }
1550
1014
  const contents = map({
1551
1015
  $metadata: deserializeMetadata(output),
@@ -1574,49 +1038,9 @@ export const de_DeleteChannelCommand = async (output, context) => {
1574
1038
  Object.assign(contents, doc);
1575
1039
  return contents;
1576
1040
  };
1577
- const de_DeleteChannelCommandError = async (output, context) => {
1578
- const parsedOutput = {
1579
- ...output,
1580
- body: await parseErrorBody(output.body, context),
1581
- };
1582
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1583
- switch (errorCode) {
1584
- case "BadGatewayException":
1585
- case "com.amazonaws.medialive#BadGatewayException":
1586
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1587
- case "BadRequestException":
1588
- case "com.amazonaws.medialive#BadRequestException":
1589
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1590
- case "ConflictException":
1591
- case "com.amazonaws.medialive#ConflictException":
1592
- throw await de_ConflictExceptionRes(parsedOutput, context);
1593
- case "ForbiddenException":
1594
- case "com.amazonaws.medialive#ForbiddenException":
1595
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1596
- case "GatewayTimeoutException":
1597
- case "com.amazonaws.medialive#GatewayTimeoutException":
1598
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1599
- case "InternalServerErrorException":
1600
- case "com.amazonaws.medialive#InternalServerErrorException":
1601
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1602
- case "NotFoundException":
1603
- case "com.amazonaws.medialive#NotFoundException":
1604
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1605
- case "TooManyRequestsException":
1606
- case "com.amazonaws.medialive#TooManyRequestsException":
1607
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1608
- default:
1609
- const parsedBody = parsedOutput.body;
1610
- return throwDefaultError({
1611
- output,
1612
- parsedBody,
1613
- errorCode,
1614
- });
1615
- }
1616
- };
1617
1041
  export const de_DeleteInputCommand = async (output, context) => {
1618
1042
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1619
- return de_DeleteInputCommandError(output, context);
1043
+ return de_CommandError(output, context);
1620
1044
  }
1621
1045
  const contents = map({
1622
1046
  $metadata: deserializeMetadata(output),
@@ -1624,49 +1048,9 @@ export const de_DeleteInputCommand = async (output, context) => {
1624
1048
  await collectBody(output.body, context);
1625
1049
  return contents;
1626
1050
  };
1627
- const de_DeleteInputCommandError = async (output, context) => {
1628
- const parsedOutput = {
1629
- ...output,
1630
- body: await parseErrorBody(output.body, context),
1631
- };
1632
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1633
- switch (errorCode) {
1634
- case "BadGatewayException":
1635
- case "com.amazonaws.medialive#BadGatewayException":
1636
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1637
- case "BadRequestException":
1638
- case "com.amazonaws.medialive#BadRequestException":
1639
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1640
- case "ConflictException":
1641
- case "com.amazonaws.medialive#ConflictException":
1642
- throw await de_ConflictExceptionRes(parsedOutput, context);
1643
- case "ForbiddenException":
1644
- case "com.amazonaws.medialive#ForbiddenException":
1645
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1646
- case "GatewayTimeoutException":
1647
- case "com.amazonaws.medialive#GatewayTimeoutException":
1648
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1649
- case "InternalServerErrorException":
1650
- case "com.amazonaws.medialive#InternalServerErrorException":
1651
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1652
- case "NotFoundException":
1653
- case "com.amazonaws.medialive#NotFoundException":
1654
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1655
- case "TooManyRequestsException":
1656
- case "com.amazonaws.medialive#TooManyRequestsException":
1657
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1658
- default:
1659
- const parsedBody = parsedOutput.body;
1660
- return throwDefaultError({
1661
- output,
1662
- parsedBody,
1663
- errorCode,
1664
- });
1665
- }
1666
- };
1667
1051
  export const de_DeleteInputSecurityGroupCommand = async (output, context) => {
1668
1052
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1669
- return de_DeleteInputSecurityGroupCommandError(output, context);
1053
+ return de_CommandError(output, context);
1670
1054
  }
1671
1055
  const contents = map({
1672
1056
  $metadata: deserializeMetadata(output),
@@ -1674,46 +1058,9 @@ export const de_DeleteInputSecurityGroupCommand = async (output, context) => {
1674
1058
  await collectBody(output.body, context);
1675
1059
  return contents;
1676
1060
  };
1677
- const de_DeleteInputSecurityGroupCommandError = async (output, context) => {
1678
- const parsedOutput = {
1679
- ...output,
1680
- body: await parseErrorBody(output.body, context),
1681
- };
1682
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1683
- switch (errorCode) {
1684
- case "BadGatewayException":
1685
- case "com.amazonaws.medialive#BadGatewayException":
1686
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1687
- case "BadRequestException":
1688
- case "com.amazonaws.medialive#BadRequestException":
1689
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1690
- case "ForbiddenException":
1691
- case "com.amazonaws.medialive#ForbiddenException":
1692
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1693
- case "GatewayTimeoutException":
1694
- case "com.amazonaws.medialive#GatewayTimeoutException":
1695
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1696
- case "InternalServerErrorException":
1697
- case "com.amazonaws.medialive#InternalServerErrorException":
1698
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1699
- case "NotFoundException":
1700
- case "com.amazonaws.medialive#NotFoundException":
1701
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1702
- case "TooManyRequestsException":
1703
- case "com.amazonaws.medialive#TooManyRequestsException":
1704
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1705
- default:
1706
- const parsedBody = parsedOutput.body;
1707
- return throwDefaultError({
1708
- output,
1709
- parsedBody,
1710
- errorCode,
1711
- });
1712
- }
1713
- };
1714
1061
  export const de_DeleteMultiplexCommand = async (output, context) => {
1715
1062
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1716
- return de_DeleteMultiplexCommandError(output, context);
1063
+ return de_CommandError(output, context);
1717
1064
  }
1718
1065
  const contents = map({
1719
1066
  $metadata: deserializeMetadata(output),
@@ -1734,49 +1081,9 @@ export const de_DeleteMultiplexCommand = async (output, context) => {
1734
1081
  Object.assign(contents, doc);
1735
1082
  return contents;
1736
1083
  };
1737
- const de_DeleteMultiplexCommandError = async (output, context) => {
1738
- const parsedOutput = {
1739
- ...output,
1740
- body: await parseErrorBody(output.body, context),
1741
- };
1742
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1743
- switch (errorCode) {
1744
- case "BadGatewayException":
1745
- case "com.amazonaws.medialive#BadGatewayException":
1746
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1747
- case "BadRequestException":
1748
- case "com.amazonaws.medialive#BadRequestException":
1749
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1750
- case "ConflictException":
1751
- case "com.amazonaws.medialive#ConflictException":
1752
- throw await de_ConflictExceptionRes(parsedOutput, context);
1753
- case "ForbiddenException":
1754
- case "com.amazonaws.medialive#ForbiddenException":
1755
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1756
- case "GatewayTimeoutException":
1757
- case "com.amazonaws.medialive#GatewayTimeoutException":
1758
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1759
- case "InternalServerErrorException":
1760
- case "com.amazonaws.medialive#InternalServerErrorException":
1761
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1762
- case "NotFoundException":
1763
- case "com.amazonaws.medialive#NotFoundException":
1764
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1765
- case "TooManyRequestsException":
1766
- case "com.amazonaws.medialive#TooManyRequestsException":
1767
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1768
- default:
1769
- const parsedBody = parsedOutput.body;
1770
- return throwDefaultError({
1771
- output,
1772
- parsedBody,
1773
- errorCode,
1774
- });
1775
- }
1776
- };
1777
1084
  export const de_DeleteMultiplexProgramCommand = async (output, context) => {
1778
1085
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1779
- return de_DeleteMultiplexProgramCommandError(output, context);
1086
+ return de_CommandError(output, context);
1780
1087
  }
1781
1088
  const contents = map({
1782
1089
  $metadata: deserializeMetadata(output),
@@ -1792,49 +1099,9 @@ export const de_DeleteMultiplexProgramCommand = async (output, context) => {
1792
1099
  Object.assign(contents, doc);
1793
1100
  return contents;
1794
1101
  };
1795
- const de_DeleteMultiplexProgramCommandError = async (output, context) => {
1796
- const parsedOutput = {
1797
- ...output,
1798
- body: await parseErrorBody(output.body, context),
1799
- };
1800
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1801
- switch (errorCode) {
1802
- case "BadGatewayException":
1803
- case "com.amazonaws.medialive#BadGatewayException":
1804
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1805
- case "BadRequestException":
1806
- case "com.amazonaws.medialive#BadRequestException":
1807
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1808
- case "ConflictException":
1809
- case "com.amazonaws.medialive#ConflictException":
1810
- throw await de_ConflictExceptionRes(parsedOutput, context);
1811
- case "ForbiddenException":
1812
- case "com.amazonaws.medialive#ForbiddenException":
1813
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1814
- case "GatewayTimeoutException":
1815
- case "com.amazonaws.medialive#GatewayTimeoutException":
1816
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1817
- case "InternalServerErrorException":
1818
- case "com.amazonaws.medialive#InternalServerErrorException":
1819
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1820
- case "NotFoundException":
1821
- case "com.amazonaws.medialive#NotFoundException":
1822
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1823
- case "TooManyRequestsException":
1824
- case "com.amazonaws.medialive#TooManyRequestsException":
1825
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1826
- default:
1827
- const parsedBody = parsedOutput.body;
1828
- return throwDefaultError({
1829
- output,
1830
- parsedBody,
1831
- errorCode,
1832
- });
1833
- }
1834
- };
1835
1102
  export const de_DeleteReservationCommand = async (output, context) => {
1836
1103
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1837
- return de_DeleteReservationCommandError(output, context);
1104
+ return de_CommandError(output, context);
1838
1105
  }
1839
1106
  const contents = map({
1840
1107
  $metadata: deserializeMetadata(output),
@@ -1864,49 +1131,9 @@ export const de_DeleteReservationCommand = async (output, context) => {
1864
1131
  Object.assign(contents, doc);
1865
1132
  return contents;
1866
1133
  };
1867
- const de_DeleteReservationCommandError = async (output, context) => {
1868
- const parsedOutput = {
1869
- ...output,
1870
- body: await parseErrorBody(output.body, context),
1871
- };
1872
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1873
- switch (errorCode) {
1874
- case "BadGatewayException":
1875
- case "com.amazonaws.medialive#BadGatewayException":
1876
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1877
- case "BadRequestException":
1878
- case "com.amazonaws.medialive#BadRequestException":
1879
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1880
- case "ConflictException":
1881
- case "com.amazonaws.medialive#ConflictException":
1882
- throw await de_ConflictExceptionRes(parsedOutput, context);
1883
- case "ForbiddenException":
1884
- case "com.amazonaws.medialive#ForbiddenException":
1885
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1886
- case "GatewayTimeoutException":
1887
- case "com.amazonaws.medialive#GatewayTimeoutException":
1888
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1889
- case "InternalServerErrorException":
1890
- case "com.amazonaws.medialive#InternalServerErrorException":
1891
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1892
- case "NotFoundException":
1893
- case "com.amazonaws.medialive#NotFoundException":
1894
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1895
- case "TooManyRequestsException":
1896
- case "com.amazonaws.medialive#TooManyRequestsException":
1897
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1898
- default:
1899
- const parsedBody = parsedOutput.body;
1900
- return throwDefaultError({
1901
- output,
1902
- parsedBody,
1903
- errorCode,
1904
- });
1905
- }
1906
- };
1907
1134
  export const de_DeleteScheduleCommand = async (output, context) => {
1908
1135
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1909
- return de_DeleteScheduleCommandError(output, context);
1136
+ return de_CommandError(output, context);
1910
1137
  }
1911
1138
  const contents = map({
1912
1139
  $metadata: deserializeMetadata(output),
@@ -1914,46 +1141,9 @@ export const de_DeleteScheduleCommand = async (output, context) => {
1914
1141
  await collectBody(output.body, context);
1915
1142
  return contents;
1916
1143
  };
1917
- const de_DeleteScheduleCommandError = async (output, context) => {
1918
- const parsedOutput = {
1919
- ...output,
1920
- body: await parseErrorBody(output.body, context),
1921
- };
1922
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1923
- switch (errorCode) {
1924
- case "BadGatewayException":
1925
- case "com.amazonaws.medialive#BadGatewayException":
1926
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
1927
- case "BadRequestException":
1928
- case "com.amazonaws.medialive#BadRequestException":
1929
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1930
- case "ForbiddenException":
1931
- case "com.amazonaws.medialive#ForbiddenException":
1932
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1933
- case "GatewayTimeoutException":
1934
- case "com.amazonaws.medialive#GatewayTimeoutException":
1935
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
1936
- case "InternalServerErrorException":
1937
- case "com.amazonaws.medialive#InternalServerErrorException":
1938
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1939
- case "NotFoundException":
1940
- case "com.amazonaws.medialive#NotFoundException":
1941
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1942
- case "TooManyRequestsException":
1943
- case "com.amazonaws.medialive#TooManyRequestsException":
1944
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1945
- default:
1946
- const parsedBody = parsedOutput.body;
1947
- return throwDefaultError({
1948
- output,
1949
- parsedBody,
1950
- errorCode,
1951
- });
1952
- }
1953
- };
1954
1144
  export const de_DeleteTagsCommand = async (output, context) => {
1955
1145
  if (output.statusCode !== 204 && output.statusCode >= 300) {
1956
- return de_DeleteTagsCommandError(output, context);
1146
+ return de_CommandError(output, context);
1957
1147
  }
1958
1148
  const contents = map({
1959
1149
  $metadata: deserializeMetadata(output),
@@ -1961,37 +1151,9 @@ export const de_DeleteTagsCommand = async (output, context) => {
1961
1151
  await collectBody(output.body, context);
1962
1152
  return contents;
1963
1153
  };
1964
- const de_DeleteTagsCommandError = 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 "BadRequestException":
1972
- case "com.amazonaws.medialive#BadRequestException":
1973
- throw await de_BadRequestExceptionRes(parsedOutput, context);
1974
- case "ForbiddenException":
1975
- case "com.amazonaws.medialive#ForbiddenException":
1976
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1977
- case "InternalServerErrorException":
1978
- case "com.amazonaws.medialive#InternalServerErrorException":
1979
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
1980
- case "NotFoundException":
1981
- case "com.amazonaws.medialive#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
1154
  export const de_DescribeAccountConfigurationCommand = async (output, context) => {
1993
1155
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1994
- return de_DescribeAccountConfigurationCommandError(output, context);
1156
+ return de_CommandError(output, context);
1995
1157
  }
1996
1158
  const contents = map({
1997
1159
  $metadata: deserializeMetadata(output),
@@ -2003,43 +1165,9 @@ export const de_DescribeAccountConfigurationCommand = async (output, context) =>
2003
1165
  Object.assign(contents, doc);
2004
1166
  return contents;
2005
1167
  };
2006
- const de_DescribeAccountConfigurationCommandError = 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 "BadGatewayException":
2014
- case "com.amazonaws.medialive#BadGatewayException":
2015
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2016
- case "BadRequestException":
2017
- case "com.amazonaws.medialive#BadRequestException":
2018
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2019
- case "ForbiddenException":
2020
- case "com.amazonaws.medialive#ForbiddenException":
2021
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2022
- case "GatewayTimeoutException":
2023
- case "com.amazonaws.medialive#GatewayTimeoutException":
2024
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2025
- case "InternalServerErrorException":
2026
- case "com.amazonaws.medialive#InternalServerErrorException":
2027
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2028
- case "TooManyRequestsException":
2029
- case "com.amazonaws.medialive#TooManyRequestsException":
2030
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2031
- default:
2032
- const parsedBody = parsedOutput.body;
2033
- return throwDefaultError({
2034
- output,
2035
- parsedBody,
2036
- errorCode,
2037
- });
2038
- }
2039
- };
2040
1168
  export const de_DescribeChannelCommand = async (output, context) => {
2041
1169
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2042
- return de_DescribeChannelCommandError(output, context);
1170
+ return de_CommandError(output, context);
2043
1171
  }
2044
1172
  const contents = map({
2045
1173
  $metadata: deserializeMetadata(output),
@@ -2068,46 +1196,9 @@ export const de_DescribeChannelCommand = async (output, context) => {
2068
1196
  Object.assign(contents, doc);
2069
1197
  return contents;
2070
1198
  };
2071
- const de_DescribeChannelCommandError = async (output, context) => {
2072
- const parsedOutput = {
2073
- ...output,
2074
- body: await parseErrorBody(output.body, context),
2075
- };
2076
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2077
- switch (errorCode) {
2078
- case "BadGatewayException":
2079
- case "com.amazonaws.medialive#BadGatewayException":
2080
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2081
- case "BadRequestException":
2082
- case "com.amazonaws.medialive#BadRequestException":
2083
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2084
- case "ForbiddenException":
2085
- case "com.amazonaws.medialive#ForbiddenException":
2086
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2087
- case "GatewayTimeoutException":
2088
- case "com.amazonaws.medialive#GatewayTimeoutException":
2089
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2090
- case "InternalServerErrorException":
2091
- case "com.amazonaws.medialive#InternalServerErrorException":
2092
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2093
- case "NotFoundException":
2094
- case "com.amazonaws.medialive#NotFoundException":
2095
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2096
- case "TooManyRequestsException":
2097
- case "com.amazonaws.medialive#TooManyRequestsException":
2098
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2099
- default:
2100
- const parsedBody = parsedOutput.body;
2101
- return throwDefaultError({
2102
- output,
2103
- parsedBody,
2104
- errorCode,
2105
- });
2106
- }
2107
- };
2108
1199
  export const de_DescribeInputCommand = async (output, context) => {
2109
1200
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2110
- return de_DescribeInputCommandError(output, context);
1201
+ return de_CommandError(output, context);
2111
1202
  }
2112
1203
  const contents = map({
2113
1204
  $metadata: deserializeMetadata(output),
@@ -2134,46 +1225,9 @@ export const de_DescribeInputCommand = async (output, context) => {
2134
1225
  Object.assign(contents, doc);
2135
1226
  return contents;
2136
1227
  };
2137
- const de_DescribeInputCommandError = async (output, context) => {
2138
- const parsedOutput = {
2139
- ...output,
2140
- body: await parseErrorBody(output.body, context),
2141
- };
2142
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2143
- switch (errorCode) {
2144
- case "BadGatewayException":
2145
- case "com.amazonaws.medialive#BadGatewayException":
2146
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2147
- case "BadRequestException":
2148
- case "com.amazonaws.medialive#BadRequestException":
2149
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2150
- case "ForbiddenException":
2151
- case "com.amazonaws.medialive#ForbiddenException":
2152
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2153
- case "GatewayTimeoutException":
2154
- case "com.amazonaws.medialive#GatewayTimeoutException":
2155
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2156
- case "InternalServerErrorException":
2157
- case "com.amazonaws.medialive#InternalServerErrorException":
2158
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2159
- case "NotFoundException":
2160
- case "com.amazonaws.medialive#NotFoundException":
2161
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2162
- case "TooManyRequestsException":
2163
- case "com.amazonaws.medialive#TooManyRequestsException":
2164
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2165
- default:
2166
- const parsedBody = parsedOutput.body;
2167
- return throwDefaultError({
2168
- output,
2169
- parsedBody,
2170
- errorCode,
2171
- });
2172
- }
2173
- };
2174
1228
  export const de_DescribeInputDeviceCommand = async (output, context) => {
2175
1229
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2176
- return de_DescribeInputDeviceCommandError(output, context);
1230
+ return de_CommandError(output, context);
2177
1231
  }
2178
1232
  const contents = map({
2179
1233
  $metadata: deserializeMetadata(output),
@@ -2200,46 +1254,9 @@ export const de_DescribeInputDeviceCommand = async (output, context) => {
2200
1254
  Object.assign(contents, doc);
2201
1255
  return contents;
2202
1256
  };
2203
- const de_DescribeInputDeviceCommandError = async (output, context) => {
2204
- const parsedOutput = {
2205
- ...output,
2206
- body: await parseErrorBody(output.body, context),
2207
- };
2208
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2209
- switch (errorCode) {
2210
- case "BadGatewayException":
2211
- case "com.amazonaws.medialive#BadGatewayException":
2212
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2213
- case "BadRequestException":
2214
- case "com.amazonaws.medialive#BadRequestException":
2215
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2216
- case "ForbiddenException":
2217
- case "com.amazonaws.medialive#ForbiddenException":
2218
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2219
- case "GatewayTimeoutException":
2220
- case "com.amazonaws.medialive#GatewayTimeoutException":
2221
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2222
- case "InternalServerErrorException":
2223
- case "com.amazonaws.medialive#InternalServerErrorException":
2224
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2225
- case "NotFoundException":
2226
- case "com.amazonaws.medialive#NotFoundException":
2227
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2228
- case "TooManyRequestsException":
2229
- case "com.amazonaws.medialive#TooManyRequestsException":
2230
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2231
- default:
2232
- const parsedBody = parsedOutput.body;
2233
- return throwDefaultError({
2234
- output,
2235
- parsedBody,
2236
- errorCode,
2237
- });
2238
- }
2239
- };
2240
1257
  export const de_DescribeInputDeviceThumbnailCommand = async (output, context) => {
2241
1258
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2242
- return de_DescribeInputDeviceThumbnailCommandError(output, context);
1259
+ return de_CommandError(output, context);
2243
1260
  }
2244
1261
  const contents = map({
2245
1262
  $metadata: deserializeMetadata(output),
@@ -2253,46 +1270,9 @@ export const de_DescribeInputDeviceThumbnailCommand = async (output, context) =>
2253
1270
  contents.Body = data;
2254
1271
  return contents;
2255
1272
  };
2256
- const de_DescribeInputDeviceThumbnailCommandError = async (output, context) => {
2257
- const parsedOutput = {
2258
- ...output,
2259
- body: await parseErrorBody(output.body, context),
2260
- };
2261
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2262
- switch (errorCode) {
2263
- case "BadGatewayException":
2264
- case "com.amazonaws.medialive#BadGatewayException":
2265
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2266
- case "BadRequestException":
2267
- case "com.amazonaws.medialive#BadRequestException":
2268
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2269
- case "ForbiddenException":
2270
- case "com.amazonaws.medialive#ForbiddenException":
2271
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2272
- case "GatewayTimeoutException":
2273
- case "com.amazonaws.medialive#GatewayTimeoutException":
2274
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2275
- case "InternalServerErrorException":
2276
- case "com.amazonaws.medialive#InternalServerErrorException":
2277
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2278
- case "NotFoundException":
2279
- case "com.amazonaws.medialive#NotFoundException":
2280
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2281
- case "TooManyRequestsException":
2282
- case "com.amazonaws.medialive#TooManyRequestsException":
2283
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2284
- default:
2285
- const parsedBody = parsedOutput.body;
2286
- return throwDefaultError({
2287
- output,
2288
- parsedBody,
2289
- errorCode,
2290
- });
2291
- }
2292
- };
2293
1273
  export const de_DescribeInputSecurityGroupCommand = async (output, context) => {
2294
1274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2295
- return de_DescribeInputSecurityGroupCommandError(output, context);
1275
+ return de_CommandError(output, context);
2296
1276
  }
2297
1277
  const contents = map({
2298
1278
  $metadata: deserializeMetadata(output),
@@ -2309,46 +1289,9 @@ export const de_DescribeInputSecurityGroupCommand = async (output, context) => {
2309
1289
  Object.assign(contents, doc);
2310
1290
  return contents;
2311
1291
  };
2312
- const de_DescribeInputSecurityGroupCommandError = async (output, context) => {
2313
- const parsedOutput = {
2314
- ...output,
2315
- body: await parseErrorBody(output.body, context),
2316
- };
2317
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2318
- switch (errorCode) {
2319
- case "BadGatewayException":
2320
- case "com.amazonaws.medialive#BadGatewayException":
2321
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2322
- case "BadRequestException":
2323
- case "com.amazonaws.medialive#BadRequestException":
2324
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2325
- case "ForbiddenException":
2326
- case "com.amazonaws.medialive#ForbiddenException":
2327
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2328
- case "GatewayTimeoutException":
2329
- case "com.amazonaws.medialive#GatewayTimeoutException":
2330
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2331
- case "InternalServerErrorException":
2332
- case "com.amazonaws.medialive#InternalServerErrorException":
2333
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2334
- case "NotFoundException":
2335
- case "com.amazonaws.medialive#NotFoundException":
2336
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2337
- case "TooManyRequestsException":
2338
- case "com.amazonaws.medialive#TooManyRequestsException":
2339
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2340
- default:
2341
- const parsedBody = parsedOutput.body;
2342
- return throwDefaultError({
2343
- output,
2344
- parsedBody,
2345
- errorCode,
2346
- });
2347
- }
2348
- };
2349
1292
  export const de_DescribeMultiplexCommand = async (output, context) => {
2350
1293
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2351
- return de_DescribeMultiplexCommandError(output, context);
1294
+ return de_CommandError(output, context);
2352
1295
  }
2353
1296
  const contents = map({
2354
1297
  $metadata: deserializeMetadata(output),
@@ -2369,46 +1312,9 @@ export const de_DescribeMultiplexCommand = async (output, context) => {
2369
1312
  Object.assign(contents, doc);
2370
1313
  return contents;
2371
1314
  };
2372
- const de_DescribeMultiplexCommandError = async (output, context) => {
2373
- const parsedOutput = {
2374
- ...output,
2375
- body: await parseErrorBody(output.body, context),
2376
- };
2377
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2378
- switch (errorCode) {
2379
- case "BadGatewayException":
2380
- case "com.amazonaws.medialive#BadGatewayException":
2381
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2382
- case "BadRequestException":
2383
- case "com.amazonaws.medialive#BadRequestException":
2384
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2385
- case "ForbiddenException":
2386
- case "com.amazonaws.medialive#ForbiddenException":
2387
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2388
- case "GatewayTimeoutException":
2389
- case "com.amazonaws.medialive#GatewayTimeoutException":
2390
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2391
- case "InternalServerErrorException":
2392
- case "com.amazonaws.medialive#InternalServerErrorException":
2393
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2394
- case "NotFoundException":
2395
- case "com.amazonaws.medialive#NotFoundException":
2396
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2397
- case "TooManyRequestsException":
2398
- case "com.amazonaws.medialive#TooManyRequestsException":
2399
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2400
- default:
2401
- const parsedBody = parsedOutput.body;
2402
- return throwDefaultError({
2403
- output,
2404
- parsedBody,
2405
- errorCode,
2406
- });
2407
- }
2408
- };
2409
1315
  export const de_DescribeMultiplexProgramCommand = async (output, context) => {
2410
1316
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2411
- return de_DescribeMultiplexProgramCommandError(output, context);
1317
+ return de_CommandError(output, context);
2412
1318
  }
2413
1319
  const contents = map({
2414
1320
  $metadata: deserializeMetadata(output),
@@ -2424,46 +1330,9 @@ export const de_DescribeMultiplexProgramCommand = async (output, context) => {
2424
1330
  Object.assign(contents, doc);
2425
1331
  return contents;
2426
1332
  };
2427
- const de_DescribeMultiplexProgramCommandError = 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 "BadGatewayException":
2435
- case "com.amazonaws.medialive#BadGatewayException":
2436
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2437
- case "BadRequestException":
2438
- case "com.amazonaws.medialive#BadRequestException":
2439
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2440
- case "ForbiddenException":
2441
- case "com.amazonaws.medialive#ForbiddenException":
2442
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2443
- case "GatewayTimeoutException":
2444
- case "com.amazonaws.medialive#GatewayTimeoutException":
2445
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2446
- case "InternalServerErrorException":
2447
- case "com.amazonaws.medialive#InternalServerErrorException":
2448
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2449
- case "NotFoundException":
2450
- case "com.amazonaws.medialive#NotFoundException":
2451
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2452
- case "TooManyRequestsException":
2453
- case "com.amazonaws.medialive#TooManyRequestsException":
2454
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2455
- default:
2456
- const parsedBody = parsedOutput.body;
2457
- return throwDefaultError({
2458
- output,
2459
- parsedBody,
2460
- errorCode,
2461
- });
2462
- }
2463
- };
2464
1333
  export const de_DescribeOfferingCommand = async (output, context) => {
2465
1334
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2466
- return de_DescribeOfferingCommandError(output, context);
1335
+ return de_CommandError(output, context);
2467
1336
  }
2468
1337
  const contents = map({
2469
1338
  $metadata: deserializeMetadata(output),
@@ -2485,46 +1354,9 @@ export const de_DescribeOfferingCommand = async (output, context) => {
2485
1354
  Object.assign(contents, doc);
2486
1355
  return contents;
2487
1356
  };
2488
- const de_DescribeOfferingCommandError = async (output, context) => {
2489
- const parsedOutput = {
2490
- ...output,
2491
- body: await parseErrorBody(output.body, context),
2492
- };
2493
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2494
- switch (errorCode) {
2495
- case "BadGatewayException":
2496
- case "com.amazonaws.medialive#BadGatewayException":
2497
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2498
- case "BadRequestException":
2499
- case "com.amazonaws.medialive#BadRequestException":
2500
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2501
- case "ForbiddenException":
2502
- case "com.amazonaws.medialive#ForbiddenException":
2503
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2504
- case "GatewayTimeoutException":
2505
- case "com.amazonaws.medialive#GatewayTimeoutException":
2506
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2507
- case "InternalServerErrorException":
2508
- case "com.amazonaws.medialive#InternalServerErrorException":
2509
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2510
- case "NotFoundException":
2511
- case "com.amazonaws.medialive#NotFoundException":
2512
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2513
- case "TooManyRequestsException":
2514
- case "com.amazonaws.medialive#TooManyRequestsException":
2515
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2516
- default:
2517
- const parsedBody = parsedOutput.body;
2518
- return throwDefaultError({
2519
- output,
2520
- parsedBody,
2521
- errorCode,
2522
- });
2523
- }
2524
- };
2525
1357
  export const de_DescribeReservationCommand = async (output, context) => {
2526
1358
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2527
- return de_DescribeReservationCommandError(output, context);
1359
+ return de_CommandError(output, context);
2528
1360
  }
2529
1361
  const contents = map({
2530
1362
  $metadata: deserializeMetadata(output),
@@ -2554,46 +1386,9 @@ export const de_DescribeReservationCommand = async (output, context) => {
2554
1386
  Object.assign(contents, doc);
2555
1387
  return contents;
2556
1388
  };
2557
- const de_DescribeReservationCommandError = async (output, context) => {
2558
- const parsedOutput = {
2559
- ...output,
2560
- body: await parseErrorBody(output.body, context),
2561
- };
2562
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2563
- switch (errorCode) {
2564
- case "BadGatewayException":
2565
- case "com.amazonaws.medialive#BadGatewayException":
2566
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2567
- case "BadRequestException":
2568
- case "com.amazonaws.medialive#BadRequestException":
2569
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2570
- case "ForbiddenException":
2571
- case "com.amazonaws.medialive#ForbiddenException":
2572
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2573
- case "GatewayTimeoutException":
2574
- case "com.amazonaws.medialive#GatewayTimeoutException":
2575
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2576
- case "InternalServerErrorException":
2577
- case "com.amazonaws.medialive#InternalServerErrorException":
2578
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2579
- case "NotFoundException":
2580
- case "com.amazonaws.medialive#NotFoundException":
2581
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2582
- case "TooManyRequestsException":
2583
- case "com.amazonaws.medialive#TooManyRequestsException":
2584
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2585
- default:
2586
- const parsedBody = parsedOutput.body;
2587
- return throwDefaultError({
2588
- output,
2589
- parsedBody,
2590
- errorCode,
2591
- });
2592
- }
2593
- };
2594
1389
  export const de_DescribeScheduleCommand = async (output, context) => {
2595
1390
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2596
- return de_DescribeScheduleCommandError(output, context);
1391
+ return de_CommandError(output, context);
2597
1392
  }
2598
1393
  const contents = map({
2599
1394
  $metadata: deserializeMetadata(output),
@@ -2606,46 +1401,9 @@ export const de_DescribeScheduleCommand = async (output, context) => {
2606
1401
  Object.assign(contents, doc);
2607
1402
  return contents;
2608
1403
  };
2609
- const de_DescribeScheduleCommandError = async (output, context) => {
2610
- const parsedOutput = {
2611
- ...output,
2612
- body: await parseErrorBody(output.body, context),
2613
- };
2614
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2615
- switch (errorCode) {
2616
- case "BadGatewayException":
2617
- case "com.amazonaws.medialive#BadGatewayException":
2618
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2619
- case "BadRequestException":
2620
- case "com.amazonaws.medialive#BadRequestException":
2621
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2622
- case "ForbiddenException":
2623
- case "com.amazonaws.medialive#ForbiddenException":
2624
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2625
- case "GatewayTimeoutException":
2626
- case "com.amazonaws.medialive#GatewayTimeoutException":
2627
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2628
- case "InternalServerErrorException":
2629
- case "com.amazonaws.medialive#InternalServerErrorException":
2630
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2631
- case "NotFoundException":
2632
- case "com.amazonaws.medialive#NotFoundException":
2633
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2634
- case "TooManyRequestsException":
2635
- case "com.amazonaws.medialive#TooManyRequestsException":
2636
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2637
- default:
2638
- const parsedBody = parsedOutput.body;
2639
- return throwDefaultError({
2640
- output,
2641
- parsedBody,
2642
- errorCode,
2643
- });
2644
- }
2645
- };
2646
1404
  export const de_DescribeThumbnailsCommand = async (output, context) => {
2647
1405
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2648
- return de_DescribeThumbnailsCommandError(output, context);
1406
+ return de_CommandError(output, context);
2649
1407
  }
2650
1408
  const contents = map({
2651
1409
  $metadata: deserializeMetadata(output),
@@ -2657,49 +1415,9 @@ export const de_DescribeThumbnailsCommand = async (output, context) => {
2657
1415
  Object.assign(contents, doc);
2658
1416
  return contents;
2659
1417
  };
2660
- const de_DescribeThumbnailsCommandError = async (output, context) => {
2661
- const parsedOutput = {
2662
- ...output,
2663
- body: await parseErrorBody(output.body, context),
2664
- };
2665
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2666
- switch (errorCode) {
2667
- case "BadGatewayException":
2668
- case "com.amazonaws.medialive#BadGatewayException":
2669
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2670
- case "BadRequestException":
2671
- case "com.amazonaws.medialive#BadRequestException":
2672
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2673
- case "ConflictException":
2674
- case "com.amazonaws.medialive#ConflictException":
2675
- throw await de_ConflictExceptionRes(parsedOutput, context);
2676
- case "ForbiddenException":
2677
- case "com.amazonaws.medialive#ForbiddenException":
2678
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2679
- case "GatewayTimeoutException":
2680
- case "com.amazonaws.medialive#GatewayTimeoutException":
2681
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2682
- case "InternalServerErrorException":
2683
- case "com.amazonaws.medialive#InternalServerErrorException":
2684
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2685
- case "NotFoundException":
2686
- case "com.amazonaws.medialive#NotFoundException":
2687
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2688
- case "TooManyRequestsException":
2689
- case "com.amazonaws.medialive#TooManyRequestsException":
2690
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2691
- default:
2692
- const parsedBody = parsedOutput.body;
2693
- return throwDefaultError({
2694
- output,
2695
- parsedBody,
2696
- errorCode,
2697
- });
2698
- }
2699
- };
2700
1418
  export const de_ListChannelsCommand = async (output, context) => {
2701
1419
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2702
- return de_ListChannelsCommandError(output, context);
1420
+ return de_CommandError(output, context);
2703
1421
  }
2704
1422
  const contents = map({
2705
1423
  $metadata: deserializeMetadata(output),
@@ -2712,43 +1430,9 @@ export const de_ListChannelsCommand = async (output, context) => {
2712
1430
  Object.assign(contents, doc);
2713
1431
  return contents;
2714
1432
  };
2715
- const de_ListChannelsCommandError = async (output, context) => {
2716
- const parsedOutput = {
2717
- ...output,
2718
- body: await parseErrorBody(output.body, context),
2719
- };
2720
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2721
- switch (errorCode) {
2722
- case "BadGatewayException":
2723
- case "com.amazonaws.medialive#BadGatewayException":
2724
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2725
- case "BadRequestException":
2726
- case "com.amazonaws.medialive#BadRequestException":
2727
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2728
- case "ForbiddenException":
2729
- case "com.amazonaws.medialive#ForbiddenException":
2730
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2731
- case "GatewayTimeoutException":
2732
- case "com.amazonaws.medialive#GatewayTimeoutException":
2733
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2734
- case "InternalServerErrorException":
2735
- case "com.amazonaws.medialive#InternalServerErrorException":
2736
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2737
- case "TooManyRequestsException":
2738
- case "com.amazonaws.medialive#TooManyRequestsException":
2739
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2740
- default:
2741
- const parsedBody = parsedOutput.body;
2742
- return throwDefaultError({
2743
- output,
2744
- parsedBody,
2745
- errorCode,
2746
- });
2747
- }
2748
- };
2749
1433
  export const de_ListInputDevicesCommand = async (output, context) => {
2750
1434
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2751
- return de_ListInputDevicesCommandError(output, context);
1435
+ return de_CommandError(output, context);
2752
1436
  }
2753
1437
  const contents = map({
2754
1438
  $metadata: deserializeMetadata(output),
@@ -2761,43 +1445,9 @@ export const de_ListInputDevicesCommand = async (output, context) => {
2761
1445
  Object.assign(contents, doc);
2762
1446
  return contents;
2763
1447
  };
2764
- const de_ListInputDevicesCommandError = async (output, context) => {
2765
- const parsedOutput = {
2766
- ...output,
2767
- body: await parseErrorBody(output.body, context),
2768
- };
2769
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2770
- switch (errorCode) {
2771
- case "BadGatewayException":
2772
- case "com.amazonaws.medialive#BadGatewayException":
2773
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2774
- case "BadRequestException":
2775
- case "com.amazonaws.medialive#BadRequestException":
2776
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2777
- case "ForbiddenException":
2778
- case "com.amazonaws.medialive#ForbiddenException":
2779
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2780
- case "GatewayTimeoutException":
2781
- case "com.amazonaws.medialive#GatewayTimeoutException":
2782
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2783
- case "InternalServerErrorException":
2784
- case "com.amazonaws.medialive#InternalServerErrorException":
2785
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2786
- case "TooManyRequestsException":
2787
- case "com.amazonaws.medialive#TooManyRequestsException":
2788
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2789
- default:
2790
- const parsedBody = parsedOutput.body;
2791
- return throwDefaultError({
2792
- output,
2793
- parsedBody,
2794
- errorCode,
2795
- });
2796
- }
2797
- };
2798
1448
  export const de_ListInputDeviceTransfersCommand = async (output, context) => {
2799
1449
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2800
- return de_ListInputDeviceTransfersCommandError(output, context);
1450
+ return de_CommandError(output, context);
2801
1451
  }
2802
1452
  const contents = map({
2803
1453
  $metadata: deserializeMetadata(output),
@@ -2810,46 +1460,9 @@ export const de_ListInputDeviceTransfersCommand = async (output, context) => {
2810
1460
  Object.assign(contents, doc);
2811
1461
  return contents;
2812
1462
  };
2813
- const de_ListInputDeviceTransfersCommandError = async (output, context) => {
2814
- const parsedOutput = {
2815
- ...output,
2816
- body: await parseErrorBody(output.body, context),
2817
- };
2818
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2819
- switch (errorCode) {
2820
- case "BadGatewayException":
2821
- case "com.amazonaws.medialive#BadGatewayException":
2822
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2823
- case "BadRequestException":
2824
- case "com.amazonaws.medialive#BadRequestException":
2825
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2826
- case "ForbiddenException":
2827
- case "com.amazonaws.medialive#ForbiddenException":
2828
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2829
- case "GatewayTimeoutException":
2830
- case "com.amazonaws.medialive#GatewayTimeoutException":
2831
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2832
- case "InternalServerErrorException":
2833
- case "com.amazonaws.medialive#InternalServerErrorException":
2834
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2835
- case "TooManyRequestsException":
2836
- case "com.amazonaws.medialive#TooManyRequestsException":
2837
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2838
- case "UnprocessableEntityException":
2839
- case "com.amazonaws.medialive#UnprocessableEntityException":
2840
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
2841
- default:
2842
- const parsedBody = parsedOutput.body;
2843
- return throwDefaultError({
2844
- output,
2845
- parsedBody,
2846
- errorCode,
2847
- });
2848
- }
2849
- };
2850
1463
  export const de_ListInputsCommand = async (output, context) => {
2851
1464
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2852
- return de_ListInputsCommandError(output, context);
1465
+ return de_CommandError(output, context);
2853
1466
  }
2854
1467
  const contents = map({
2855
1468
  $metadata: deserializeMetadata(output),
@@ -2862,43 +1475,9 @@ export const de_ListInputsCommand = async (output, context) => {
2862
1475
  Object.assign(contents, doc);
2863
1476
  return contents;
2864
1477
  };
2865
- const de_ListInputsCommandError = async (output, context) => {
2866
- const parsedOutput = {
2867
- ...output,
2868
- body: await parseErrorBody(output.body, context),
2869
- };
2870
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2871
- switch (errorCode) {
2872
- case "BadGatewayException":
2873
- case "com.amazonaws.medialive#BadGatewayException":
2874
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2875
- case "BadRequestException":
2876
- case "com.amazonaws.medialive#BadRequestException":
2877
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2878
- case "ForbiddenException":
2879
- case "com.amazonaws.medialive#ForbiddenException":
2880
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2881
- case "GatewayTimeoutException":
2882
- case "com.amazonaws.medialive#GatewayTimeoutException":
2883
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2884
- case "InternalServerErrorException":
2885
- case "com.amazonaws.medialive#InternalServerErrorException":
2886
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2887
- case "TooManyRequestsException":
2888
- case "com.amazonaws.medialive#TooManyRequestsException":
2889
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2890
- default:
2891
- const parsedBody = parsedOutput.body;
2892
- return throwDefaultError({
2893
- output,
2894
- parsedBody,
2895
- errorCode,
2896
- });
2897
- }
2898
- };
2899
1478
  export const de_ListInputSecurityGroupsCommand = async (output, context) => {
2900
1479
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2901
- return de_ListInputSecurityGroupsCommandError(output, context);
1480
+ return de_CommandError(output, context);
2902
1481
  }
2903
1482
  const contents = map({
2904
1483
  $metadata: deserializeMetadata(output),
@@ -2911,43 +1490,9 @@ export const de_ListInputSecurityGroupsCommand = async (output, context) => {
2911
1490
  Object.assign(contents, doc);
2912
1491
  return contents;
2913
1492
  };
2914
- const de_ListInputSecurityGroupsCommandError = async (output, context) => {
2915
- const parsedOutput = {
2916
- ...output,
2917
- body: await parseErrorBody(output.body, context),
2918
- };
2919
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2920
- switch (errorCode) {
2921
- case "BadGatewayException":
2922
- case "com.amazonaws.medialive#BadGatewayException":
2923
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2924
- case "BadRequestException":
2925
- case "com.amazonaws.medialive#BadRequestException":
2926
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2927
- case "ForbiddenException":
2928
- case "com.amazonaws.medialive#ForbiddenException":
2929
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2930
- case "GatewayTimeoutException":
2931
- case "com.amazonaws.medialive#GatewayTimeoutException":
2932
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2933
- case "InternalServerErrorException":
2934
- case "com.amazonaws.medialive#InternalServerErrorException":
2935
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2936
- case "TooManyRequestsException":
2937
- case "com.amazonaws.medialive#TooManyRequestsException":
2938
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2939
- default:
2940
- const parsedBody = parsedOutput.body;
2941
- return throwDefaultError({
2942
- output,
2943
- parsedBody,
2944
- errorCode,
2945
- });
2946
- }
2947
- };
2948
1493
  export const de_ListMultiplexesCommand = async (output, context) => {
2949
1494
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2950
- return de_ListMultiplexesCommandError(output, context);
1495
+ return de_CommandError(output, context);
2951
1496
  }
2952
1497
  const contents = map({
2953
1498
  $metadata: deserializeMetadata(output),
@@ -2960,43 +1505,9 @@ export const de_ListMultiplexesCommand = async (output, context) => {
2960
1505
  Object.assign(contents, doc);
2961
1506
  return contents;
2962
1507
  };
2963
- const de_ListMultiplexesCommandError = async (output, context) => {
2964
- const parsedOutput = {
2965
- ...output,
2966
- body: await parseErrorBody(output.body, context),
2967
- };
2968
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2969
- switch (errorCode) {
2970
- case "BadGatewayException":
2971
- case "com.amazonaws.medialive#BadGatewayException":
2972
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
2973
- case "BadRequestException":
2974
- case "com.amazonaws.medialive#BadRequestException":
2975
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2976
- case "ForbiddenException":
2977
- case "com.amazonaws.medialive#ForbiddenException":
2978
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2979
- case "GatewayTimeoutException":
2980
- case "com.amazonaws.medialive#GatewayTimeoutException":
2981
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
2982
- case "InternalServerErrorException":
2983
- case "com.amazonaws.medialive#InternalServerErrorException":
2984
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
2985
- case "TooManyRequestsException":
2986
- case "com.amazonaws.medialive#TooManyRequestsException":
2987
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
2988
- default:
2989
- const parsedBody = parsedOutput.body;
2990
- return throwDefaultError({
2991
- output,
2992
- parsedBody,
2993
- errorCode,
2994
- });
2995
- }
2996
- };
2997
1508
  export const de_ListMultiplexProgramsCommand = async (output, context) => {
2998
1509
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2999
- return de_ListMultiplexProgramsCommandError(output, context);
1510
+ return de_CommandError(output, context);
3000
1511
  }
3001
1512
  const contents = map({
3002
1513
  $metadata: deserializeMetadata(output),
@@ -3009,46 +1520,9 @@ export const de_ListMultiplexProgramsCommand = async (output, context) => {
3009
1520
  Object.assign(contents, doc);
3010
1521
  return contents;
3011
1522
  };
3012
- const de_ListMultiplexProgramsCommandError = async (output, context) => {
3013
- const parsedOutput = {
3014
- ...output,
3015
- body: await parseErrorBody(output.body, context),
3016
- };
3017
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3018
- switch (errorCode) {
3019
- case "BadGatewayException":
3020
- case "com.amazonaws.medialive#BadGatewayException":
3021
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3022
- case "BadRequestException":
3023
- case "com.amazonaws.medialive#BadRequestException":
3024
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3025
- case "ForbiddenException":
3026
- case "com.amazonaws.medialive#ForbiddenException":
3027
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3028
- case "GatewayTimeoutException":
3029
- case "com.amazonaws.medialive#GatewayTimeoutException":
3030
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3031
- case "InternalServerErrorException":
3032
- case "com.amazonaws.medialive#InternalServerErrorException":
3033
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3034
- case "NotFoundException":
3035
- case "com.amazonaws.medialive#NotFoundException":
3036
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3037
- case "TooManyRequestsException":
3038
- case "com.amazonaws.medialive#TooManyRequestsException":
3039
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3040
- default:
3041
- const parsedBody = parsedOutput.body;
3042
- return throwDefaultError({
3043
- output,
3044
- parsedBody,
3045
- errorCode,
3046
- });
3047
- }
3048
- };
3049
1523
  export const de_ListOfferingsCommand = async (output, context) => {
3050
1524
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3051
- return de_ListOfferingsCommandError(output, context);
1525
+ return de_CommandError(output, context);
3052
1526
  }
3053
1527
  const contents = map({
3054
1528
  $metadata: deserializeMetadata(output),
@@ -3061,43 +1535,9 @@ export const de_ListOfferingsCommand = async (output, context) => {
3061
1535
  Object.assign(contents, doc);
3062
1536
  return contents;
3063
1537
  };
3064
- const de_ListOfferingsCommandError = async (output, context) => {
3065
- const parsedOutput = {
3066
- ...output,
3067
- body: await parseErrorBody(output.body, context),
3068
- };
3069
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3070
- switch (errorCode) {
3071
- case "BadGatewayException":
3072
- case "com.amazonaws.medialive#BadGatewayException":
3073
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3074
- case "BadRequestException":
3075
- case "com.amazonaws.medialive#BadRequestException":
3076
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3077
- case "ForbiddenException":
3078
- case "com.amazonaws.medialive#ForbiddenException":
3079
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3080
- case "GatewayTimeoutException":
3081
- case "com.amazonaws.medialive#GatewayTimeoutException":
3082
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3083
- case "InternalServerErrorException":
3084
- case "com.amazonaws.medialive#InternalServerErrorException":
3085
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3086
- case "TooManyRequestsException":
3087
- case "com.amazonaws.medialive#TooManyRequestsException":
3088
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3089
- default:
3090
- const parsedBody = parsedOutput.body;
3091
- return throwDefaultError({
3092
- output,
3093
- parsedBody,
3094
- errorCode,
3095
- });
3096
- }
3097
- };
3098
1538
  export const de_ListReservationsCommand = async (output, context) => {
3099
1539
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3100
- return de_ListReservationsCommandError(output, context);
1540
+ return de_CommandError(output, context);
3101
1541
  }
3102
1542
  const contents = map({
3103
1543
  $metadata: deserializeMetadata(output),
@@ -3110,43 +1550,9 @@ export const de_ListReservationsCommand = async (output, context) => {
3110
1550
  Object.assign(contents, doc);
3111
1551
  return contents;
3112
1552
  };
3113
- const de_ListReservationsCommandError = async (output, context) => {
3114
- const parsedOutput = {
3115
- ...output,
3116
- body: await parseErrorBody(output.body, context),
3117
- };
3118
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3119
- switch (errorCode) {
3120
- case "BadGatewayException":
3121
- case "com.amazonaws.medialive#BadGatewayException":
3122
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3123
- case "BadRequestException":
3124
- case "com.amazonaws.medialive#BadRequestException":
3125
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3126
- case "ForbiddenException":
3127
- case "com.amazonaws.medialive#ForbiddenException":
3128
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3129
- case "GatewayTimeoutException":
3130
- case "com.amazonaws.medialive#GatewayTimeoutException":
3131
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3132
- case "InternalServerErrorException":
3133
- case "com.amazonaws.medialive#InternalServerErrorException":
3134
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3135
- case "TooManyRequestsException":
3136
- case "com.amazonaws.medialive#TooManyRequestsException":
3137
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3138
- default:
3139
- const parsedBody = parsedOutput.body;
3140
- return throwDefaultError({
3141
- output,
3142
- parsedBody,
3143
- errorCode,
3144
- });
3145
- }
3146
- };
3147
1553
  export const de_ListTagsForResourceCommand = async (output, context) => {
3148
1554
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3149
- return de_ListTagsForResourceCommandError(output, context);
1555
+ return de_CommandError(output, context);
3150
1556
  }
3151
1557
  const contents = map({
3152
1558
  $metadata: deserializeMetadata(output),
@@ -3158,37 +1564,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
3158
1564
  Object.assign(contents, doc);
3159
1565
  return contents;
3160
1566
  };
3161
- const de_ListTagsForResourceCommandError = async (output, context) => {
3162
- const parsedOutput = {
3163
- ...output,
3164
- body: await parseErrorBody(output.body, context),
3165
- };
3166
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3167
- switch (errorCode) {
3168
- case "BadRequestException":
3169
- case "com.amazonaws.medialive#BadRequestException":
3170
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3171
- case "ForbiddenException":
3172
- case "com.amazonaws.medialive#ForbiddenException":
3173
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3174
- case "InternalServerErrorException":
3175
- case "com.amazonaws.medialive#InternalServerErrorException":
3176
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3177
- case "NotFoundException":
3178
- case "com.amazonaws.medialive#NotFoundException":
3179
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3180
- default:
3181
- const parsedBody = parsedOutput.body;
3182
- return throwDefaultError({
3183
- output,
3184
- parsedBody,
3185
- errorCode,
3186
- });
3187
- }
3188
- };
3189
1567
  export const de_PurchaseOfferingCommand = async (output, context) => {
3190
1568
  if (output.statusCode !== 201 && output.statusCode >= 300) {
3191
- return de_PurchaseOfferingCommandError(output, context);
1569
+ return de_CommandError(output, context);
3192
1570
  }
3193
1571
  const contents = map({
3194
1572
  $metadata: deserializeMetadata(output),
@@ -3200,49 +1578,9 @@ export const de_PurchaseOfferingCommand = async (output, context) => {
3200
1578
  Object.assign(contents, doc);
3201
1579
  return contents;
3202
1580
  };
3203
- const de_PurchaseOfferingCommandError = async (output, context) => {
3204
- const parsedOutput = {
3205
- ...output,
3206
- body: await parseErrorBody(output.body, context),
3207
- };
3208
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3209
- switch (errorCode) {
3210
- case "BadGatewayException":
3211
- case "com.amazonaws.medialive#BadGatewayException":
3212
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3213
- case "BadRequestException":
3214
- case "com.amazonaws.medialive#BadRequestException":
3215
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3216
- case "ConflictException":
3217
- case "com.amazonaws.medialive#ConflictException":
3218
- throw await de_ConflictExceptionRes(parsedOutput, context);
3219
- case "ForbiddenException":
3220
- case "com.amazonaws.medialive#ForbiddenException":
3221
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3222
- case "GatewayTimeoutException":
3223
- case "com.amazonaws.medialive#GatewayTimeoutException":
3224
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3225
- case "InternalServerErrorException":
3226
- case "com.amazonaws.medialive#InternalServerErrorException":
3227
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3228
- case "NotFoundException":
3229
- case "com.amazonaws.medialive#NotFoundException":
3230
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3231
- case "TooManyRequestsException":
3232
- case "com.amazonaws.medialive#TooManyRequestsException":
3233
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3234
- default:
3235
- const parsedBody = parsedOutput.body;
3236
- return throwDefaultError({
3237
- output,
3238
- parsedBody,
3239
- errorCode,
3240
- });
3241
- }
3242
- };
3243
1581
  export const de_RebootInputDeviceCommand = async (output, context) => {
3244
1582
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3245
- return de_RebootInputDeviceCommandError(output, context);
1583
+ return de_CommandError(output, context);
3246
1584
  }
3247
1585
  const contents = map({
3248
1586
  $metadata: deserializeMetadata(output),
@@ -3250,49 +1588,9 @@ export const de_RebootInputDeviceCommand = async (output, context) => {
3250
1588
  await collectBody(output.body, context);
3251
1589
  return contents;
3252
1590
  };
3253
- const de_RebootInputDeviceCommandError = async (output, context) => {
3254
- const parsedOutput = {
3255
- ...output,
3256
- body: await parseErrorBody(output.body, context),
3257
- };
3258
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3259
- switch (errorCode) {
3260
- case "BadGatewayException":
3261
- case "com.amazonaws.medialive#BadGatewayException":
3262
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3263
- case "BadRequestException":
3264
- case "com.amazonaws.medialive#BadRequestException":
3265
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3266
- case "ForbiddenException":
3267
- case "com.amazonaws.medialive#ForbiddenException":
3268
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3269
- case "GatewayTimeoutException":
3270
- case "com.amazonaws.medialive#GatewayTimeoutException":
3271
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3272
- case "InternalServerErrorException":
3273
- case "com.amazonaws.medialive#InternalServerErrorException":
3274
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3275
- case "NotFoundException":
3276
- case "com.amazonaws.medialive#NotFoundException":
3277
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3278
- case "TooManyRequestsException":
3279
- case "com.amazonaws.medialive#TooManyRequestsException":
3280
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3281
- case "UnprocessableEntityException":
3282
- case "com.amazonaws.medialive#UnprocessableEntityException":
3283
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3284
- default:
3285
- const parsedBody = parsedOutput.body;
3286
- return throwDefaultError({
3287
- output,
3288
- parsedBody,
3289
- errorCode,
3290
- });
3291
- }
3292
- };
3293
1591
  export const de_RejectInputDeviceTransferCommand = async (output, context) => {
3294
1592
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3295
- return de_RejectInputDeviceTransferCommandError(output, context);
1593
+ return de_CommandError(output, context);
3296
1594
  }
3297
1595
  const contents = map({
3298
1596
  $metadata: deserializeMetadata(output),
@@ -3300,52 +1598,9 @@ export const de_RejectInputDeviceTransferCommand = async (output, context) => {
3300
1598
  await collectBody(output.body, context);
3301
1599
  return contents;
3302
1600
  };
3303
- const de_RejectInputDeviceTransferCommandError = async (output, context) => {
3304
- const parsedOutput = {
3305
- ...output,
3306
- body: await parseErrorBody(output.body, context),
3307
- };
3308
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3309
- switch (errorCode) {
3310
- case "BadGatewayException":
3311
- case "com.amazonaws.medialive#BadGatewayException":
3312
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3313
- case "BadRequestException":
3314
- case "com.amazonaws.medialive#BadRequestException":
3315
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3316
- case "ConflictException":
3317
- case "com.amazonaws.medialive#ConflictException":
3318
- throw await de_ConflictExceptionRes(parsedOutput, context);
3319
- case "ForbiddenException":
3320
- case "com.amazonaws.medialive#ForbiddenException":
3321
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3322
- case "GatewayTimeoutException":
3323
- case "com.amazonaws.medialive#GatewayTimeoutException":
3324
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3325
- case "InternalServerErrorException":
3326
- case "com.amazonaws.medialive#InternalServerErrorException":
3327
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3328
- case "NotFoundException":
3329
- case "com.amazonaws.medialive#NotFoundException":
3330
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3331
- case "TooManyRequestsException":
3332
- case "com.amazonaws.medialive#TooManyRequestsException":
3333
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3334
- case "UnprocessableEntityException":
3335
- case "com.amazonaws.medialive#UnprocessableEntityException":
3336
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3337
- default:
3338
- const parsedBody = parsedOutput.body;
3339
- return throwDefaultError({
3340
- output,
3341
- parsedBody,
3342
- errorCode,
3343
- });
3344
- }
3345
- };
3346
1601
  export const de_StartChannelCommand = async (output, context) => {
3347
1602
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3348
- return de_StartChannelCommandError(output, context);
1603
+ return de_CommandError(output, context);
3349
1604
  }
3350
1605
  const contents = map({
3351
1606
  $metadata: deserializeMetadata(output),
@@ -3374,49 +1629,9 @@ export const de_StartChannelCommand = async (output, context) => {
3374
1629
  Object.assign(contents, doc);
3375
1630
  return contents;
3376
1631
  };
3377
- const de_StartChannelCommandError = async (output, context) => {
3378
- const parsedOutput = {
3379
- ...output,
3380
- body: await parseErrorBody(output.body, context),
3381
- };
3382
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3383
- switch (errorCode) {
3384
- case "BadGatewayException":
3385
- case "com.amazonaws.medialive#BadGatewayException":
3386
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3387
- case "BadRequestException":
3388
- case "com.amazonaws.medialive#BadRequestException":
3389
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3390
- case "ConflictException":
3391
- case "com.amazonaws.medialive#ConflictException":
3392
- throw await de_ConflictExceptionRes(parsedOutput, context);
3393
- case "ForbiddenException":
3394
- case "com.amazonaws.medialive#ForbiddenException":
3395
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3396
- case "GatewayTimeoutException":
3397
- case "com.amazonaws.medialive#GatewayTimeoutException":
3398
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3399
- case "InternalServerErrorException":
3400
- case "com.amazonaws.medialive#InternalServerErrorException":
3401
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3402
- case "NotFoundException":
3403
- case "com.amazonaws.medialive#NotFoundException":
3404
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3405
- case "TooManyRequestsException":
3406
- case "com.amazonaws.medialive#TooManyRequestsException":
3407
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3408
- default:
3409
- const parsedBody = parsedOutput.body;
3410
- return throwDefaultError({
3411
- output,
3412
- parsedBody,
3413
- errorCode,
3414
- });
3415
- }
3416
- };
3417
1632
  export const de_StartInputDeviceCommand = async (output, context) => {
3418
1633
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3419
- return de_StartInputDeviceCommandError(output, context);
1634
+ return de_CommandError(output, context);
3420
1635
  }
3421
1636
  const contents = map({
3422
1637
  $metadata: deserializeMetadata(output),
@@ -3424,49 +1639,9 @@ export const de_StartInputDeviceCommand = async (output, context) => {
3424
1639
  await collectBody(output.body, context);
3425
1640
  return contents;
3426
1641
  };
3427
- const de_StartInputDeviceCommandError = async (output, context) => {
3428
- const parsedOutput = {
3429
- ...output,
3430
- body: await parseErrorBody(output.body, context),
3431
- };
3432
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3433
- switch (errorCode) {
3434
- case "BadGatewayException":
3435
- case "com.amazonaws.medialive#BadGatewayException":
3436
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3437
- case "BadRequestException":
3438
- case "com.amazonaws.medialive#BadRequestException":
3439
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3440
- case "ForbiddenException":
3441
- case "com.amazonaws.medialive#ForbiddenException":
3442
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3443
- case "GatewayTimeoutException":
3444
- case "com.amazonaws.medialive#GatewayTimeoutException":
3445
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3446
- case "InternalServerErrorException":
3447
- case "com.amazonaws.medialive#InternalServerErrorException":
3448
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3449
- case "NotFoundException":
3450
- case "com.amazonaws.medialive#NotFoundException":
3451
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3452
- case "TooManyRequestsException":
3453
- case "com.amazonaws.medialive#TooManyRequestsException":
3454
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3455
- case "UnprocessableEntityException":
3456
- case "com.amazonaws.medialive#UnprocessableEntityException":
3457
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3458
- default:
3459
- const parsedBody = parsedOutput.body;
3460
- return throwDefaultError({
3461
- output,
3462
- parsedBody,
3463
- errorCode,
3464
- });
3465
- }
3466
- };
3467
1642
  export const de_StartInputDeviceMaintenanceWindowCommand = async (output, context) => {
3468
1643
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3469
- return de_StartInputDeviceMaintenanceWindowCommandError(output, context);
1644
+ return de_CommandError(output, context);
3470
1645
  }
3471
1646
  const contents = map({
3472
1647
  $metadata: deserializeMetadata(output),
@@ -3474,49 +1649,9 @@ export const de_StartInputDeviceMaintenanceWindowCommand = async (output, contex
3474
1649
  await collectBody(output.body, context);
3475
1650
  return contents;
3476
1651
  };
3477
- const de_StartInputDeviceMaintenanceWindowCommandError = async (output, context) => {
3478
- const parsedOutput = {
3479
- ...output,
3480
- body: await parseErrorBody(output.body, context),
3481
- };
3482
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3483
- switch (errorCode) {
3484
- case "BadGatewayException":
3485
- case "com.amazonaws.medialive#BadGatewayException":
3486
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3487
- case "BadRequestException":
3488
- case "com.amazonaws.medialive#BadRequestException":
3489
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3490
- case "ForbiddenException":
3491
- case "com.amazonaws.medialive#ForbiddenException":
3492
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3493
- case "GatewayTimeoutException":
3494
- case "com.amazonaws.medialive#GatewayTimeoutException":
3495
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3496
- case "InternalServerErrorException":
3497
- case "com.amazonaws.medialive#InternalServerErrorException":
3498
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3499
- case "NotFoundException":
3500
- case "com.amazonaws.medialive#NotFoundException":
3501
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3502
- case "TooManyRequestsException":
3503
- case "com.amazonaws.medialive#TooManyRequestsException":
3504
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3505
- case "UnprocessableEntityException":
3506
- case "com.amazonaws.medialive#UnprocessableEntityException":
3507
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3508
- default:
3509
- const parsedBody = parsedOutput.body;
3510
- return throwDefaultError({
3511
- output,
3512
- parsedBody,
3513
- errorCode,
3514
- });
3515
- }
3516
- };
3517
1652
  export const de_StartMultiplexCommand = async (output, context) => {
3518
1653
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3519
- return de_StartMultiplexCommandError(output, context);
1654
+ return de_CommandError(output, context);
3520
1655
  }
3521
1656
  const contents = map({
3522
1657
  $metadata: deserializeMetadata(output),
@@ -3537,49 +1672,9 @@ export const de_StartMultiplexCommand = async (output, context) => {
3537
1672
  Object.assign(contents, doc);
3538
1673
  return contents;
3539
1674
  };
3540
- const de_StartMultiplexCommandError = async (output, context) => {
3541
- const parsedOutput = {
3542
- ...output,
3543
- body: await parseErrorBody(output.body, context),
3544
- };
3545
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3546
- switch (errorCode) {
3547
- case "BadGatewayException":
3548
- case "com.amazonaws.medialive#BadGatewayException":
3549
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3550
- case "BadRequestException":
3551
- case "com.amazonaws.medialive#BadRequestException":
3552
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3553
- case "ConflictException":
3554
- case "com.amazonaws.medialive#ConflictException":
3555
- throw await de_ConflictExceptionRes(parsedOutput, context);
3556
- case "ForbiddenException":
3557
- case "com.amazonaws.medialive#ForbiddenException":
3558
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3559
- case "GatewayTimeoutException":
3560
- case "com.amazonaws.medialive#GatewayTimeoutException":
3561
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3562
- case "InternalServerErrorException":
3563
- case "com.amazonaws.medialive#InternalServerErrorException":
3564
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3565
- case "NotFoundException":
3566
- case "com.amazonaws.medialive#NotFoundException":
3567
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3568
- case "TooManyRequestsException":
3569
- case "com.amazonaws.medialive#TooManyRequestsException":
3570
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3571
- default:
3572
- const parsedBody = parsedOutput.body;
3573
- return throwDefaultError({
3574
- output,
3575
- parsedBody,
3576
- errorCode,
3577
- });
3578
- }
3579
- };
3580
1675
  export const de_StopChannelCommand = async (output, context) => {
3581
1676
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3582
- return de_StopChannelCommandError(output, context);
1677
+ return de_CommandError(output, context);
3583
1678
  }
3584
1679
  const contents = map({
3585
1680
  $metadata: deserializeMetadata(output),
@@ -3608,49 +1703,9 @@ export const de_StopChannelCommand = async (output, context) => {
3608
1703
  Object.assign(contents, doc);
3609
1704
  return contents;
3610
1705
  };
3611
- const de_StopChannelCommandError = async (output, context) => {
3612
- const parsedOutput = {
3613
- ...output,
3614
- body: await parseErrorBody(output.body, context),
3615
- };
3616
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3617
- switch (errorCode) {
3618
- case "BadGatewayException":
3619
- case "com.amazonaws.medialive#BadGatewayException":
3620
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3621
- case "BadRequestException":
3622
- case "com.amazonaws.medialive#BadRequestException":
3623
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3624
- case "ConflictException":
3625
- case "com.amazonaws.medialive#ConflictException":
3626
- throw await de_ConflictExceptionRes(parsedOutput, context);
3627
- case "ForbiddenException":
3628
- case "com.amazonaws.medialive#ForbiddenException":
3629
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3630
- case "GatewayTimeoutException":
3631
- case "com.amazonaws.medialive#GatewayTimeoutException":
3632
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3633
- case "InternalServerErrorException":
3634
- case "com.amazonaws.medialive#InternalServerErrorException":
3635
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3636
- case "NotFoundException":
3637
- case "com.amazonaws.medialive#NotFoundException":
3638
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3639
- case "TooManyRequestsException":
3640
- case "com.amazonaws.medialive#TooManyRequestsException":
3641
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3642
- default:
3643
- const parsedBody = parsedOutput.body;
3644
- return throwDefaultError({
3645
- output,
3646
- parsedBody,
3647
- errorCode,
3648
- });
3649
- }
3650
- };
3651
1706
  export const de_StopInputDeviceCommand = async (output, context) => {
3652
1707
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3653
- return de_StopInputDeviceCommandError(output, context);
1708
+ return de_CommandError(output, context);
3654
1709
  }
3655
1710
  const contents = map({
3656
1711
  $metadata: deserializeMetadata(output),
@@ -3658,49 +1713,9 @@ export const de_StopInputDeviceCommand = async (output, context) => {
3658
1713
  await collectBody(output.body, context);
3659
1714
  return contents;
3660
1715
  };
3661
- const de_StopInputDeviceCommandError = async (output, context) => {
3662
- const parsedOutput = {
3663
- ...output,
3664
- body: await parseErrorBody(output.body, context),
3665
- };
3666
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3667
- switch (errorCode) {
3668
- case "BadGatewayException":
3669
- case "com.amazonaws.medialive#BadGatewayException":
3670
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3671
- case "BadRequestException":
3672
- case "com.amazonaws.medialive#BadRequestException":
3673
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3674
- case "ForbiddenException":
3675
- case "com.amazonaws.medialive#ForbiddenException":
3676
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3677
- case "GatewayTimeoutException":
3678
- case "com.amazonaws.medialive#GatewayTimeoutException":
3679
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3680
- case "InternalServerErrorException":
3681
- case "com.amazonaws.medialive#InternalServerErrorException":
3682
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3683
- case "NotFoundException":
3684
- case "com.amazonaws.medialive#NotFoundException":
3685
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3686
- case "TooManyRequestsException":
3687
- case "com.amazonaws.medialive#TooManyRequestsException":
3688
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3689
- case "UnprocessableEntityException":
3690
- case "com.amazonaws.medialive#UnprocessableEntityException":
3691
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3692
- default:
3693
- const parsedBody = parsedOutput.body;
3694
- return throwDefaultError({
3695
- output,
3696
- parsedBody,
3697
- errorCode,
3698
- });
3699
- }
3700
- };
3701
1716
  export const de_StopMultiplexCommand = async (output, context) => {
3702
1717
  if (output.statusCode !== 202 && output.statusCode >= 300) {
3703
- return de_StopMultiplexCommandError(output, context);
1718
+ return de_CommandError(output, context);
3704
1719
  }
3705
1720
  const contents = map({
3706
1721
  $metadata: deserializeMetadata(output),
@@ -3721,49 +1736,9 @@ export const de_StopMultiplexCommand = async (output, context) => {
3721
1736
  Object.assign(contents, doc);
3722
1737
  return contents;
3723
1738
  };
3724
- const de_StopMultiplexCommandError = async (output, context) => {
3725
- const parsedOutput = {
3726
- ...output,
3727
- body: await parseErrorBody(output.body, context),
3728
- };
3729
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3730
- switch (errorCode) {
3731
- case "BadGatewayException":
3732
- case "com.amazonaws.medialive#BadGatewayException":
3733
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3734
- case "BadRequestException":
3735
- case "com.amazonaws.medialive#BadRequestException":
3736
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3737
- case "ConflictException":
3738
- case "com.amazonaws.medialive#ConflictException":
3739
- throw await de_ConflictExceptionRes(parsedOutput, context);
3740
- case "ForbiddenException":
3741
- case "com.amazonaws.medialive#ForbiddenException":
3742
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3743
- case "GatewayTimeoutException":
3744
- case "com.amazonaws.medialive#GatewayTimeoutException":
3745
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3746
- case "InternalServerErrorException":
3747
- case "com.amazonaws.medialive#InternalServerErrorException":
3748
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3749
- case "NotFoundException":
3750
- case "com.amazonaws.medialive#NotFoundException":
3751
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3752
- case "TooManyRequestsException":
3753
- case "com.amazonaws.medialive#TooManyRequestsException":
3754
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3755
- default:
3756
- const parsedBody = parsedOutput.body;
3757
- return throwDefaultError({
3758
- output,
3759
- parsedBody,
3760
- errorCode,
3761
- });
3762
- }
3763
- };
3764
1739
  export const de_TransferInputDeviceCommand = async (output, context) => {
3765
1740
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3766
- return de_TransferInputDeviceCommandError(output, context);
1741
+ return de_CommandError(output, context);
3767
1742
  }
3768
1743
  const contents = map({
3769
1744
  $metadata: deserializeMetadata(output),
@@ -3771,154 +1746,23 @@ export const de_TransferInputDeviceCommand = async (output, context) => {
3771
1746
  await collectBody(output.body, context);
3772
1747
  return contents;
3773
1748
  };
3774
- const de_TransferInputDeviceCommandError = async (output, context) => {
3775
- const parsedOutput = {
3776
- ...output,
3777
- body: await parseErrorBody(output.body, context),
3778
- };
3779
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3780
- switch (errorCode) {
3781
- case "BadGatewayException":
3782
- case "com.amazonaws.medialive#BadGatewayException":
3783
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3784
- case "BadRequestException":
3785
- case "com.amazonaws.medialive#BadRequestException":
3786
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3787
- case "ConflictException":
3788
- case "com.amazonaws.medialive#ConflictException":
3789
- throw await de_ConflictExceptionRes(parsedOutput, context);
3790
- case "ForbiddenException":
3791
- case "com.amazonaws.medialive#ForbiddenException":
3792
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3793
- case "GatewayTimeoutException":
3794
- case "com.amazonaws.medialive#GatewayTimeoutException":
3795
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3796
- case "InternalServerErrorException":
3797
- case "com.amazonaws.medialive#InternalServerErrorException":
3798
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3799
- case "NotFoundException":
3800
- case "com.amazonaws.medialive#NotFoundException":
3801
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3802
- case "TooManyRequestsException":
3803
- case "com.amazonaws.medialive#TooManyRequestsException":
3804
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3805
- case "UnprocessableEntityException":
3806
- case "com.amazonaws.medialive#UnprocessableEntityException":
3807
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3808
- default:
3809
- const parsedBody = parsedOutput.body;
3810
- return throwDefaultError({
3811
- output,
3812
- parsedBody,
3813
- errorCode,
3814
- });
3815
- }
3816
- };
3817
- export const de_UpdateAccountConfigurationCommand = async (output, context) => {
3818
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3819
- return de_UpdateAccountConfigurationCommandError(output, context);
3820
- }
3821
- const contents = map({
3822
- $metadata: deserializeMetadata(output),
3823
- });
3824
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3825
- const doc = take(data, {
3826
- AccountConfiguration: [, (_) => de_AccountConfiguration(_, context), `accountConfiguration`],
3827
- });
3828
- Object.assign(contents, doc);
3829
- return contents;
3830
- };
3831
- const de_UpdateAccountConfigurationCommandError = async (output, context) => {
3832
- const parsedOutput = {
3833
- ...output,
3834
- body: await parseErrorBody(output.body, context),
3835
- };
3836
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3837
- switch (errorCode) {
3838
- case "BadGatewayException":
3839
- case "com.amazonaws.medialive#BadGatewayException":
3840
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3841
- case "BadRequestException":
3842
- case "com.amazonaws.medialive#BadRequestException":
3843
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3844
- case "ForbiddenException":
3845
- case "com.amazonaws.medialive#ForbiddenException":
3846
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3847
- case "GatewayTimeoutException":
3848
- case "com.amazonaws.medialive#GatewayTimeoutException":
3849
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3850
- case "InternalServerErrorException":
3851
- case "com.amazonaws.medialive#InternalServerErrorException":
3852
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3853
- case "TooManyRequestsException":
3854
- case "com.amazonaws.medialive#TooManyRequestsException":
3855
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3856
- case "UnprocessableEntityException":
3857
- case "com.amazonaws.medialive#UnprocessableEntityException":
3858
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3859
- default:
3860
- const parsedBody = parsedOutput.body;
3861
- return throwDefaultError({
3862
- output,
3863
- parsedBody,
3864
- errorCode,
3865
- });
3866
- }
3867
- };
3868
- export const de_UpdateChannelCommand = async (output, context) => {
3869
- if (output.statusCode !== 200 && output.statusCode >= 300) {
3870
- return de_UpdateChannelCommandError(output, context);
3871
- }
3872
- const contents = map({
3873
- $metadata: deserializeMetadata(output),
3874
- });
3875
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3876
- const doc = take(data, {
3877
- Channel: [, (_) => de_Channel(_, context), `channel`],
3878
- });
3879
- Object.assign(contents, doc);
3880
- return contents;
3881
- };
3882
- const de_UpdateChannelCommandError = async (output, context) => {
3883
- const parsedOutput = {
3884
- ...output,
3885
- body: await parseErrorBody(output.body, context),
3886
- };
3887
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3888
- switch (errorCode) {
3889
- case "BadGatewayException":
3890
- case "com.amazonaws.medialive#BadGatewayException":
3891
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3892
- case "BadRequestException":
3893
- case "com.amazonaws.medialive#BadRequestException":
3894
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3895
- case "ConflictException":
3896
- case "com.amazonaws.medialive#ConflictException":
3897
- throw await de_ConflictExceptionRes(parsedOutput, context);
3898
- case "ForbiddenException":
3899
- case "com.amazonaws.medialive#ForbiddenException":
3900
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3901
- case "GatewayTimeoutException":
3902
- case "com.amazonaws.medialive#GatewayTimeoutException":
3903
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3904
- case "InternalServerErrorException":
3905
- case "com.amazonaws.medialive#InternalServerErrorException":
3906
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3907
- case "UnprocessableEntityException":
3908
- case "com.amazonaws.medialive#UnprocessableEntityException":
3909
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3910
- default:
3911
- const parsedBody = parsedOutput.body;
3912
- return throwDefaultError({
3913
- output,
3914
- parsedBody,
3915
- errorCode,
3916
- });
1749
+ export const de_UpdateAccountConfigurationCommand = async (output, context) => {
1750
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1751
+ return de_CommandError(output, context);
3917
1752
  }
1753
+ const contents = map({
1754
+ $metadata: deserializeMetadata(output),
1755
+ });
1756
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1757
+ const doc = take(data, {
1758
+ AccountConfiguration: [, (_) => de_AccountConfiguration(_, context), `accountConfiguration`],
1759
+ });
1760
+ Object.assign(contents, doc);
1761
+ return contents;
3918
1762
  };
3919
- export const de_UpdateChannelClassCommand = async (output, context) => {
1763
+ export const de_UpdateChannelCommand = async (output, context) => {
3920
1764
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3921
- return de_UpdateChannelClassCommandError(output, context);
1765
+ return de_CommandError(output, context);
3922
1766
  }
3923
1767
  const contents = map({
3924
1768
  $metadata: deserializeMetadata(output),
@@ -3930,52 +1774,23 @@ export const de_UpdateChannelClassCommand = async (output, context) => {
3930
1774
  Object.assign(contents, doc);
3931
1775
  return contents;
3932
1776
  };
3933
- const de_UpdateChannelClassCommandError = async (output, context) => {
3934
- const parsedOutput = {
3935
- ...output,
3936
- body: await parseErrorBody(output.body, context),
3937
- };
3938
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3939
- switch (errorCode) {
3940
- case "BadGatewayException":
3941
- case "com.amazonaws.medialive#BadGatewayException":
3942
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
3943
- case "BadRequestException":
3944
- case "com.amazonaws.medialive#BadRequestException":
3945
- throw await de_BadRequestExceptionRes(parsedOutput, context);
3946
- case "ConflictException":
3947
- case "com.amazonaws.medialive#ConflictException":
3948
- throw await de_ConflictExceptionRes(parsedOutput, context);
3949
- case "ForbiddenException":
3950
- case "com.amazonaws.medialive#ForbiddenException":
3951
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
3952
- case "GatewayTimeoutException":
3953
- case "com.amazonaws.medialive#GatewayTimeoutException":
3954
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
3955
- case "InternalServerErrorException":
3956
- case "com.amazonaws.medialive#InternalServerErrorException":
3957
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
3958
- case "NotFoundException":
3959
- case "com.amazonaws.medialive#NotFoundException":
3960
- throw await de_NotFoundExceptionRes(parsedOutput, context);
3961
- case "TooManyRequestsException":
3962
- case "com.amazonaws.medialive#TooManyRequestsException":
3963
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
3964
- case "UnprocessableEntityException":
3965
- case "com.amazonaws.medialive#UnprocessableEntityException":
3966
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
3967
- default:
3968
- const parsedBody = parsedOutput.body;
3969
- return throwDefaultError({
3970
- output,
3971
- parsedBody,
3972
- errorCode,
3973
- });
1777
+ export const de_UpdateChannelClassCommand = async (output, context) => {
1778
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1779
+ return de_CommandError(output, context);
3974
1780
  }
1781
+ const contents = map({
1782
+ $metadata: deserializeMetadata(output),
1783
+ });
1784
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1785
+ const doc = take(data, {
1786
+ Channel: [, (_) => de_Channel(_, context), `channel`],
1787
+ });
1788
+ Object.assign(contents, doc);
1789
+ return contents;
3975
1790
  };
3976
1791
  export const de_UpdateInputCommand = async (output, context) => {
3977
1792
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3978
- return de_UpdateInputCommandError(output, context);
1793
+ return de_CommandError(output, context);
3979
1794
  }
3980
1795
  const contents = map({
3981
1796
  $metadata: deserializeMetadata(output),
@@ -3987,46 +1802,9 @@ export const de_UpdateInputCommand = async (output, context) => {
3987
1802
  Object.assign(contents, doc);
3988
1803
  return contents;
3989
1804
  };
3990
- const de_UpdateInputCommandError = async (output, context) => {
3991
- const parsedOutput = {
3992
- ...output,
3993
- body: await parseErrorBody(output.body, context),
3994
- };
3995
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3996
- switch (errorCode) {
3997
- case "BadGatewayException":
3998
- case "com.amazonaws.medialive#BadGatewayException":
3999
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
4000
- case "BadRequestException":
4001
- case "com.amazonaws.medialive#BadRequestException":
4002
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4003
- case "ConflictException":
4004
- case "com.amazonaws.medialive#ConflictException":
4005
- throw await de_ConflictExceptionRes(parsedOutput, context);
4006
- case "ForbiddenException":
4007
- case "com.amazonaws.medialive#ForbiddenException":
4008
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
4009
- case "GatewayTimeoutException":
4010
- case "com.amazonaws.medialive#GatewayTimeoutException":
4011
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
4012
- case "InternalServerErrorException":
4013
- case "com.amazonaws.medialive#InternalServerErrorException":
4014
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4015
- case "NotFoundException":
4016
- case "com.amazonaws.medialive#NotFoundException":
4017
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4018
- default:
4019
- const parsedBody = parsedOutput.body;
4020
- return throwDefaultError({
4021
- output,
4022
- parsedBody,
4023
- errorCode,
4024
- });
4025
- }
4026
- };
4027
1805
  export const de_UpdateInputDeviceCommand = async (output, context) => {
4028
1806
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4029
- return de_UpdateInputDeviceCommandError(output, context);
1807
+ return de_CommandError(output, context);
4030
1808
  }
4031
1809
  const contents = map({
4032
1810
  $metadata: deserializeMetadata(output),
@@ -4053,49 +1831,9 @@ export const de_UpdateInputDeviceCommand = async (output, context) => {
4053
1831
  Object.assign(contents, doc);
4054
1832
  return contents;
4055
1833
  };
4056
- const de_UpdateInputDeviceCommandError = async (output, context) => {
4057
- const parsedOutput = {
4058
- ...output,
4059
- body: await parseErrorBody(output.body, context),
4060
- };
4061
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4062
- switch (errorCode) {
4063
- case "BadGatewayException":
4064
- case "com.amazonaws.medialive#BadGatewayException":
4065
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
4066
- case "BadRequestException":
4067
- case "com.amazonaws.medialive#BadRequestException":
4068
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4069
- case "ForbiddenException":
4070
- case "com.amazonaws.medialive#ForbiddenException":
4071
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
4072
- case "GatewayTimeoutException":
4073
- case "com.amazonaws.medialive#GatewayTimeoutException":
4074
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
4075
- case "InternalServerErrorException":
4076
- case "com.amazonaws.medialive#InternalServerErrorException":
4077
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4078
- case "NotFoundException":
4079
- case "com.amazonaws.medialive#NotFoundException":
4080
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4081
- case "TooManyRequestsException":
4082
- case "com.amazonaws.medialive#TooManyRequestsException":
4083
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
4084
- case "UnprocessableEntityException":
4085
- case "com.amazonaws.medialive#UnprocessableEntityException":
4086
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
4087
- default:
4088
- const parsedBody = parsedOutput.body;
4089
- return throwDefaultError({
4090
- output,
4091
- parsedBody,
4092
- errorCode,
4093
- });
4094
- }
4095
- };
4096
1834
  export const de_UpdateInputSecurityGroupCommand = async (output, context) => {
4097
1835
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4098
- return de_UpdateInputSecurityGroupCommandError(output, context);
1836
+ return de_CommandError(output, context);
4099
1837
  }
4100
1838
  const contents = map({
4101
1839
  $metadata: deserializeMetadata(output),
@@ -4107,46 +1845,9 @@ export const de_UpdateInputSecurityGroupCommand = async (output, context) => {
4107
1845
  Object.assign(contents, doc);
4108
1846
  return contents;
4109
1847
  };
4110
- const de_UpdateInputSecurityGroupCommandError = async (output, context) => {
4111
- const parsedOutput = {
4112
- ...output,
4113
- body: await parseErrorBody(output.body, context),
4114
- };
4115
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4116
- switch (errorCode) {
4117
- case "BadGatewayException":
4118
- case "com.amazonaws.medialive#BadGatewayException":
4119
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
4120
- case "BadRequestException":
4121
- case "com.amazonaws.medialive#BadRequestException":
4122
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4123
- case "ConflictException":
4124
- case "com.amazonaws.medialive#ConflictException":
4125
- throw await de_ConflictExceptionRes(parsedOutput, context);
4126
- case "ForbiddenException":
4127
- case "com.amazonaws.medialive#ForbiddenException":
4128
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
4129
- case "GatewayTimeoutException":
4130
- case "com.amazonaws.medialive#GatewayTimeoutException":
4131
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
4132
- case "InternalServerErrorException":
4133
- case "com.amazonaws.medialive#InternalServerErrorException":
4134
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4135
- case "NotFoundException":
4136
- case "com.amazonaws.medialive#NotFoundException":
4137
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4138
- default:
4139
- const parsedBody = parsedOutput.body;
4140
- return throwDefaultError({
4141
- output,
4142
- parsedBody,
4143
- errorCode,
4144
- });
4145
- }
4146
- };
4147
1848
  export const de_UpdateMultiplexCommand = async (output, context) => {
4148
1849
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4149
- return de_UpdateMultiplexCommandError(output, context);
1850
+ return de_CommandError(output, context);
4150
1851
  }
4151
1852
  const contents = map({
4152
1853
  $metadata: deserializeMetadata(output),
@@ -4158,49 +1859,9 @@ export const de_UpdateMultiplexCommand = async (output, context) => {
4158
1859
  Object.assign(contents, doc);
4159
1860
  return contents;
4160
1861
  };
4161
- const de_UpdateMultiplexCommandError = async (output, context) => {
4162
- const parsedOutput = {
4163
- ...output,
4164
- body: await parseErrorBody(output.body, context),
4165
- };
4166
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4167
- switch (errorCode) {
4168
- case "BadGatewayException":
4169
- case "com.amazonaws.medialive#BadGatewayException":
4170
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
4171
- case "BadRequestException":
4172
- case "com.amazonaws.medialive#BadRequestException":
4173
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4174
- case "ConflictException":
4175
- case "com.amazonaws.medialive#ConflictException":
4176
- throw await de_ConflictExceptionRes(parsedOutput, context);
4177
- case "ForbiddenException":
4178
- case "com.amazonaws.medialive#ForbiddenException":
4179
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
4180
- case "GatewayTimeoutException":
4181
- case "com.amazonaws.medialive#GatewayTimeoutException":
4182
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
4183
- case "InternalServerErrorException":
4184
- case "com.amazonaws.medialive#InternalServerErrorException":
4185
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4186
- case "NotFoundException":
4187
- case "com.amazonaws.medialive#NotFoundException":
4188
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4189
- case "UnprocessableEntityException":
4190
- case "com.amazonaws.medialive#UnprocessableEntityException":
4191
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
4192
- default:
4193
- const parsedBody = parsedOutput.body;
4194
- return throwDefaultError({
4195
- output,
4196
- parsedBody,
4197
- errorCode,
4198
- });
4199
- }
4200
- };
4201
1862
  export const de_UpdateMultiplexProgramCommand = async (output, context) => {
4202
1863
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4203
- return de_UpdateMultiplexProgramCommandError(output, context);
1864
+ return de_CommandError(output, context);
4204
1865
  }
4205
1866
  const contents = map({
4206
1867
  $metadata: deserializeMetadata(output),
@@ -4212,49 +1873,9 @@ export const de_UpdateMultiplexProgramCommand = async (output, context) => {
4212
1873
  Object.assign(contents, doc);
4213
1874
  return contents;
4214
1875
  };
4215
- const de_UpdateMultiplexProgramCommandError = async (output, context) => {
4216
- const parsedOutput = {
4217
- ...output,
4218
- body: await parseErrorBody(output.body, context),
4219
- };
4220
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4221
- switch (errorCode) {
4222
- case "BadGatewayException":
4223
- case "com.amazonaws.medialive#BadGatewayException":
4224
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
4225
- case "BadRequestException":
4226
- case "com.amazonaws.medialive#BadRequestException":
4227
- throw await de_BadRequestExceptionRes(parsedOutput, context);
4228
- case "ConflictException":
4229
- case "com.amazonaws.medialive#ConflictException":
4230
- throw await de_ConflictExceptionRes(parsedOutput, context);
4231
- case "ForbiddenException":
4232
- case "com.amazonaws.medialive#ForbiddenException":
4233
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
4234
- case "GatewayTimeoutException":
4235
- case "com.amazonaws.medialive#GatewayTimeoutException":
4236
- throw await de_GatewayTimeoutExceptionRes(parsedOutput, context);
4237
- case "InternalServerErrorException":
4238
- case "com.amazonaws.medialive#InternalServerErrorException":
4239
- throw await de_InternalServerErrorExceptionRes(parsedOutput, context);
4240
- case "NotFoundException":
4241
- case "com.amazonaws.medialive#NotFoundException":
4242
- throw await de_NotFoundExceptionRes(parsedOutput, context);
4243
- case "UnprocessableEntityException":
4244
- case "com.amazonaws.medialive#UnprocessableEntityException":
4245
- throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
4246
- default:
4247
- const parsedBody = parsedOutput.body;
4248
- return throwDefaultError({
4249
- output,
4250
- parsedBody,
4251
- errorCode,
4252
- });
4253
- }
4254
- };
4255
1876
  export const de_UpdateReservationCommand = async (output, context) => {
4256
1877
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4257
- return de_UpdateReservationCommandError(output, context);
1878
+ return de_CommandError(output, context);
4258
1879
  }
4259
1880
  const contents = map({
4260
1881
  $metadata: deserializeMetadata(output),
@@ -4266,7 +1887,7 @@ export const de_UpdateReservationCommand = async (output, context) => {
4266
1887
  Object.assign(contents, doc);
4267
1888
  return contents;
4268
1889
  };
4269
- const de_UpdateReservationCommandError = async (output, context) => {
1890
+ const de_CommandError = async (output, context) => {
4270
1891
  const parsedOutput = {
4271
1892
  ...output,
4272
1893
  body: await parseErrorBody(output.body, context),
@@ -4297,6 +1918,9 @@ const de_UpdateReservationCommandError = async (output, context) => {
4297
1918
  case "TooManyRequestsException":
4298
1919
  case "com.amazonaws.medialive#TooManyRequestsException":
4299
1920
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1921
+ case "UnprocessableEntityException":
1922
+ case "com.amazonaws.medialive#UnprocessableEntityException":
1923
+ throw await de_UnprocessableEntityExceptionRes(parsedOutput, context);
4300
1924
  default:
4301
1925
  const parsedBody = parsedOutput.body;
4302
1926
  return throwDefaultError({