@aws-sdk/client-mediaconvert 3.52.0 → 3.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/commands/TagResourceCommand.js +3 -3
  3. package/dist-cjs/index.js +3 -0
  4. package/dist-cjs/models/MediaConvertServiceException.js +11 -0
  5. package/dist-cjs/models/models_0.js +13 -13
  6. package/dist-cjs/models/models_1.js +101 -18
  7. package/dist-cjs/models/models_2.js +13 -1
  8. package/dist-cjs/protocols/Aws_restJson1.js +396 -1366
  9. package/dist-es/commands/TagResourceCommand.js +1 -1
  10. package/dist-es/index.js +1 -0
  11. package/dist-es/models/MediaConvertServiceException.js +12 -0
  12. package/dist-es/models/models_0.js +10 -10
  13. package/dist-es/models/models_1.js +90 -9
  14. package/dist-es/models/models_2.js +8 -0
  15. package/dist-es/protocols/Aws_restJson1.js +779 -1489
  16. package/dist-types/MediaConvertClient.d.ts +2 -2
  17. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  18. package/dist-types/index.d.ts +1 -0
  19. package/dist-types/models/MediaConvertServiceException.d.ts +10 -0
  20. package/dist-types/models/models_0.d.ts +22 -14
  21. package/dist-types/models/models_1.d.ts +61 -54
  22. package/dist-types/models/models_2.d.ts +26 -0
  23. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  24. package/dist-types/runtimeConfig.d.ts +1 -1
  25. package/dist-types/runtimeConfig.native.d.ts +1 -1
  26. package/dist-types/ts3.4/MediaConvertClient.d.ts +2 -2
  27. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
  28. package/dist-types/ts3.4/index.d.ts +1 -0
  29. package/dist-types/ts3.4/models/MediaConvertServiceException.d.ts +6 -0
  30. package/dist-types/ts3.4/models/models_0.d.ts +12 -8
  31. package/dist-types/ts3.4/models/models_1.d.ts +41 -38
  32. package/dist-types/ts3.4/models/models_2.d.ts +18 -0
  33. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  34. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  35. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  36. package/package.json +27 -27
@@ -5,6 +5,8 @@ exports.deserializeAws_restJson1UpdateQueueCommand = exports.deserializeAws_rest
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const uuid_1 = require("uuid");
8
+ const MediaConvertServiceException_1 = require("../models/MediaConvertServiceException");
9
+ const models_1_1 = require("../models/models_1");
8
10
  const serializeAws_restJson1AssociateCertificateCommand = async (input, context) => {
9
11
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
12
  const headers = {
@@ -801,67 +803,31 @@ const deserializeAws_restJson1AssociateCertificateCommandError = async (output,
801
803
  switch (errorCode) {
802
804
  case "BadRequestException":
803
805
  case "com.amazonaws.mediaconvert#BadRequestException":
804
- response = {
805
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
806
- name: errorCode,
807
- $metadata: deserializeMetadata(output),
808
- };
809
- break;
806
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
810
807
  case "ConflictException":
811
808
  case "com.amazonaws.mediaconvert#ConflictException":
812
- response = {
813
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
814
- name: errorCode,
815
- $metadata: deserializeMetadata(output),
816
- };
817
- break;
809
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
818
810
  case "ForbiddenException":
819
811
  case "com.amazonaws.mediaconvert#ForbiddenException":
820
- response = {
821
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
822
- name: errorCode,
823
- $metadata: deserializeMetadata(output),
824
- };
825
- break;
812
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
826
813
  case "InternalServerErrorException":
827
814
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
828
- response = {
829
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
830
- name: errorCode,
831
- $metadata: deserializeMetadata(output),
832
- };
833
- break;
815
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
834
816
  case "NotFoundException":
835
817
  case "com.amazonaws.mediaconvert#NotFoundException":
836
- response = {
837
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
838
- name: errorCode,
839
- $metadata: deserializeMetadata(output),
840
- };
841
- break;
818
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
842
819
  case "TooManyRequestsException":
843
820
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
844
- response = {
845
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
846
- name: errorCode,
847
- $metadata: deserializeMetadata(output),
848
- };
849
- break;
821
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
850
822
  default:
851
823
  const parsedBody = parsedOutput.body;
852
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
853
- response = {
854
- ...parsedBody,
855
- name: `${errorCode}`,
856
- message: parsedBody.message || parsedBody.Message || errorCode,
824
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
825
+ name: parsedBody.code || parsedBody.Code || errorCode,
857
826
  $fault: "client",
858
827
  $metadata: deserializeMetadata(output),
859
- };
828
+ });
829
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
860
830
  }
861
- const message = response.message || response.Message || errorCode;
862
- response.message = message;
863
- delete response.Message;
864
- return Promise.reject(Object.assign(new Error(message), response));
865
831
  };
866
832
  const deserializeAws_restJson1CancelJobCommand = async (output, context) => {
867
833
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -885,67 +851,31 @@ const deserializeAws_restJson1CancelJobCommandError = async (output, context) =>
885
851
  switch (errorCode) {
886
852
  case "BadRequestException":
887
853
  case "com.amazonaws.mediaconvert#BadRequestException":
888
- response = {
889
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
890
- name: errorCode,
891
- $metadata: deserializeMetadata(output),
892
- };
893
- break;
854
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
894
855
  case "ConflictException":
895
856
  case "com.amazonaws.mediaconvert#ConflictException":
896
- response = {
897
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
898
- name: errorCode,
899
- $metadata: deserializeMetadata(output),
900
- };
901
- break;
857
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
902
858
  case "ForbiddenException":
903
859
  case "com.amazonaws.mediaconvert#ForbiddenException":
904
- response = {
905
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
906
- name: errorCode,
907
- $metadata: deserializeMetadata(output),
908
- };
909
- break;
860
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
910
861
  case "InternalServerErrorException":
911
862
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
912
- response = {
913
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
914
- name: errorCode,
915
- $metadata: deserializeMetadata(output),
916
- };
917
- break;
863
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
918
864
  case "NotFoundException":
919
865
  case "com.amazonaws.mediaconvert#NotFoundException":
920
- response = {
921
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
922
- name: errorCode,
923
- $metadata: deserializeMetadata(output),
924
- };
925
- break;
866
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
926
867
  case "TooManyRequestsException":
927
868
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
928
- response = {
929
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
930
- name: errorCode,
931
- $metadata: deserializeMetadata(output),
932
- };
933
- break;
869
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
934
870
  default:
935
871
  const parsedBody = parsedOutput.body;
936
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
937
- response = {
938
- ...parsedBody,
939
- name: `${errorCode}`,
940
- message: parsedBody.message || parsedBody.Message || errorCode,
872
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
873
+ name: parsedBody.code || parsedBody.Code || errorCode,
941
874
  $fault: "client",
942
875
  $metadata: deserializeMetadata(output),
943
- };
876
+ });
877
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
944
878
  }
945
- const message = response.message || response.Message || errorCode;
946
- response.message = message;
947
- delete response.Message;
948
- return Promise.reject(Object.assign(new Error(message), response));
949
879
  };
950
880
  const deserializeAws_restJson1CreateJobCommand = async (output, context) => {
951
881
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -973,67 +903,31 @@ const deserializeAws_restJson1CreateJobCommandError = async (output, context) =>
973
903
  switch (errorCode) {
974
904
  case "BadRequestException":
975
905
  case "com.amazonaws.mediaconvert#BadRequestException":
976
- response = {
977
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
978
- name: errorCode,
979
- $metadata: deserializeMetadata(output),
980
- };
981
- break;
906
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
982
907
  case "ConflictException":
983
908
  case "com.amazonaws.mediaconvert#ConflictException":
984
- response = {
985
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
986
- name: errorCode,
987
- $metadata: deserializeMetadata(output),
988
- };
989
- break;
909
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
990
910
  case "ForbiddenException":
991
911
  case "com.amazonaws.mediaconvert#ForbiddenException":
992
- response = {
993
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
994
- name: errorCode,
995
- $metadata: deserializeMetadata(output),
996
- };
997
- break;
912
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
998
913
  case "InternalServerErrorException":
999
914
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1000
- response = {
1001
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1002
- name: errorCode,
1003
- $metadata: deserializeMetadata(output),
1004
- };
1005
- break;
915
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1006
916
  case "NotFoundException":
1007
917
  case "com.amazonaws.mediaconvert#NotFoundException":
1008
- response = {
1009
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1010
- name: errorCode,
1011
- $metadata: deserializeMetadata(output),
1012
- };
1013
- break;
918
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1014
919
  case "TooManyRequestsException":
1015
920
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1016
- response = {
1017
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1018
- name: errorCode,
1019
- $metadata: deserializeMetadata(output),
1020
- };
1021
- break;
921
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1022
922
  default:
1023
923
  const parsedBody = parsedOutput.body;
1024
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1025
- response = {
1026
- ...parsedBody,
1027
- name: `${errorCode}`,
1028
- message: parsedBody.message || parsedBody.Message || errorCode,
924
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
925
+ name: parsedBody.code || parsedBody.Code || errorCode,
1029
926
  $fault: "client",
1030
927
  $metadata: deserializeMetadata(output),
1031
- };
928
+ });
929
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1032
930
  }
1033
- const message = response.message || response.Message || errorCode;
1034
- response.message = message;
1035
- delete response.Message;
1036
- return Promise.reject(Object.assign(new Error(message), response));
1037
931
  };
1038
932
  const deserializeAws_restJson1CreateJobTemplateCommand = async (output, context) => {
1039
933
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -1061,67 +955,31 @@ const deserializeAws_restJson1CreateJobTemplateCommandError = async (output, con
1061
955
  switch (errorCode) {
1062
956
  case "BadRequestException":
1063
957
  case "com.amazonaws.mediaconvert#BadRequestException":
1064
- response = {
1065
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1066
- name: errorCode,
1067
- $metadata: deserializeMetadata(output),
1068
- };
1069
- break;
958
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1070
959
  case "ConflictException":
1071
960
  case "com.amazonaws.mediaconvert#ConflictException":
1072
- response = {
1073
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1074
- name: errorCode,
1075
- $metadata: deserializeMetadata(output),
1076
- };
1077
- break;
961
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1078
962
  case "ForbiddenException":
1079
963
  case "com.amazonaws.mediaconvert#ForbiddenException":
1080
- response = {
1081
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1082
- name: errorCode,
1083
- $metadata: deserializeMetadata(output),
1084
- };
1085
- break;
964
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1086
965
  case "InternalServerErrorException":
1087
966
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1088
- response = {
1089
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1090
- name: errorCode,
1091
- $metadata: deserializeMetadata(output),
1092
- };
1093
- break;
967
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1094
968
  case "NotFoundException":
1095
969
  case "com.amazonaws.mediaconvert#NotFoundException":
1096
- response = {
1097
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1098
- name: errorCode,
1099
- $metadata: deserializeMetadata(output),
1100
- };
1101
- break;
970
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1102
971
  case "TooManyRequestsException":
1103
972
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1104
- response = {
1105
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1106
- name: errorCode,
1107
- $metadata: deserializeMetadata(output),
1108
- };
1109
- break;
973
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1110
974
  default:
1111
975
  const parsedBody = parsedOutput.body;
1112
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1113
- response = {
1114
- ...parsedBody,
1115
- name: `${errorCode}`,
1116
- message: parsedBody.message || parsedBody.Message || errorCode,
976
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
977
+ name: parsedBody.code || parsedBody.Code || errorCode,
1117
978
  $fault: "client",
1118
979
  $metadata: deserializeMetadata(output),
1119
- };
980
+ });
981
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1120
982
  }
1121
- const message = response.message || response.Message || errorCode;
1122
- response.message = message;
1123
- delete response.Message;
1124
- return Promise.reject(Object.assign(new Error(message), response));
1125
983
  };
1126
984
  const deserializeAws_restJson1CreatePresetCommand = async (output, context) => {
1127
985
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -1149,67 +1007,31 @@ const deserializeAws_restJson1CreatePresetCommandError = async (output, context)
1149
1007
  switch (errorCode) {
1150
1008
  case "BadRequestException":
1151
1009
  case "com.amazonaws.mediaconvert#BadRequestException":
1152
- response = {
1153
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1154
- name: errorCode,
1155
- $metadata: deserializeMetadata(output),
1156
- };
1157
- break;
1010
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1158
1011
  case "ConflictException":
1159
1012
  case "com.amazonaws.mediaconvert#ConflictException":
1160
- response = {
1161
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1162
- name: errorCode,
1163
- $metadata: deserializeMetadata(output),
1164
- };
1165
- break;
1013
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1166
1014
  case "ForbiddenException":
1167
1015
  case "com.amazonaws.mediaconvert#ForbiddenException":
1168
- response = {
1169
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1170
- name: errorCode,
1171
- $metadata: deserializeMetadata(output),
1172
- };
1173
- break;
1016
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1174
1017
  case "InternalServerErrorException":
1175
1018
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1176
- response = {
1177
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1178
- name: errorCode,
1179
- $metadata: deserializeMetadata(output),
1180
- };
1181
- break;
1019
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1182
1020
  case "NotFoundException":
1183
1021
  case "com.amazonaws.mediaconvert#NotFoundException":
1184
- response = {
1185
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1186
- name: errorCode,
1187
- $metadata: deserializeMetadata(output),
1188
- };
1189
- break;
1022
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1190
1023
  case "TooManyRequestsException":
1191
1024
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1192
- response = {
1193
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1194
- name: errorCode,
1195
- $metadata: deserializeMetadata(output),
1196
- };
1197
- break;
1025
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1198
1026
  default:
1199
1027
  const parsedBody = parsedOutput.body;
1200
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1201
- response = {
1202
- ...parsedBody,
1203
- name: `${errorCode}`,
1204
- message: parsedBody.message || parsedBody.Message || errorCode,
1028
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1029
+ name: parsedBody.code || parsedBody.Code || errorCode,
1205
1030
  $fault: "client",
1206
1031
  $metadata: deserializeMetadata(output),
1207
- };
1032
+ });
1033
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1208
1034
  }
1209
- const message = response.message || response.Message || errorCode;
1210
- response.message = message;
1211
- delete response.Message;
1212
- return Promise.reject(Object.assign(new Error(message), response));
1213
1035
  };
1214
1036
  const deserializeAws_restJson1CreateQueueCommand = async (output, context) => {
1215
1037
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -1237,67 +1059,31 @@ const deserializeAws_restJson1CreateQueueCommandError = async (output, context)
1237
1059
  switch (errorCode) {
1238
1060
  case "BadRequestException":
1239
1061
  case "com.amazonaws.mediaconvert#BadRequestException":
1240
- response = {
1241
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1242
- name: errorCode,
1243
- $metadata: deserializeMetadata(output),
1244
- };
1245
- break;
1062
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1246
1063
  case "ConflictException":
1247
1064
  case "com.amazonaws.mediaconvert#ConflictException":
1248
- response = {
1249
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1250
- name: errorCode,
1251
- $metadata: deserializeMetadata(output),
1252
- };
1253
- break;
1065
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1254
1066
  case "ForbiddenException":
1255
1067
  case "com.amazonaws.mediaconvert#ForbiddenException":
1256
- response = {
1257
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1258
- name: errorCode,
1259
- $metadata: deserializeMetadata(output),
1260
- };
1261
- break;
1068
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1262
1069
  case "InternalServerErrorException":
1263
1070
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1264
- response = {
1265
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1266
- name: errorCode,
1267
- $metadata: deserializeMetadata(output),
1268
- };
1269
- break;
1071
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1270
1072
  case "NotFoundException":
1271
1073
  case "com.amazonaws.mediaconvert#NotFoundException":
1272
- response = {
1273
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1274
- name: errorCode,
1275
- $metadata: deserializeMetadata(output),
1276
- };
1277
- break;
1074
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1278
1075
  case "TooManyRequestsException":
1279
1076
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1280
- response = {
1281
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1282
- name: errorCode,
1283
- $metadata: deserializeMetadata(output),
1284
- };
1285
- break;
1077
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1286
1078
  default:
1287
1079
  const parsedBody = parsedOutput.body;
1288
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1289
- response = {
1290
- ...parsedBody,
1291
- name: `${errorCode}`,
1292
- message: parsedBody.message || parsedBody.Message || errorCode,
1080
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1081
+ name: parsedBody.code || parsedBody.Code || errorCode,
1293
1082
  $fault: "client",
1294
1083
  $metadata: deserializeMetadata(output),
1295
- };
1084
+ });
1085
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1296
1086
  }
1297
- const message = response.message || response.Message || errorCode;
1298
- response.message = message;
1299
- delete response.Message;
1300
- return Promise.reject(Object.assign(new Error(message), response));
1301
1087
  };
1302
1088
  const deserializeAws_restJson1DeleteJobTemplateCommand = async (output, context) => {
1303
1089
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -1321,67 +1107,31 @@ const deserializeAws_restJson1DeleteJobTemplateCommandError = async (output, con
1321
1107
  switch (errorCode) {
1322
1108
  case "BadRequestException":
1323
1109
  case "com.amazonaws.mediaconvert#BadRequestException":
1324
- response = {
1325
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1326
- name: errorCode,
1327
- $metadata: deserializeMetadata(output),
1328
- };
1329
- break;
1110
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1330
1111
  case "ConflictException":
1331
1112
  case "com.amazonaws.mediaconvert#ConflictException":
1332
- response = {
1333
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1334
- name: errorCode,
1335
- $metadata: deserializeMetadata(output),
1336
- };
1337
- break;
1113
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1338
1114
  case "ForbiddenException":
1339
1115
  case "com.amazonaws.mediaconvert#ForbiddenException":
1340
- response = {
1341
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1342
- name: errorCode,
1343
- $metadata: deserializeMetadata(output),
1344
- };
1345
- break;
1116
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1346
1117
  case "InternalServerErrorException":
1347
1118
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1348
- response = {
1349
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1350
- name: errorCode,
1351
- $metadata: deserializeMetadata(output),
1352
- };
1353
- break;
1119
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1354
1120
  case "NotFoundException":
1355
1121
  case "com.amazonaws.mediaconvert#NotFoundException":
1356
- response = {
1357
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1358
- name: errorCode,
1359
- $metadata: deserializeMetadata(output),
1360
- };
1361
- break;
1122
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1362
1123
  case "TooManyRequestsException":
1363
1124
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1364
- response = {
1365
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1366
- name: errorCode,
1367
- $metadata: deserializeMetadata(output),
1368
- };
1369
- break;
1125
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1370
1126
  default:
1371
1127
  const parsedBody = parsedOutput.body;
1372
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1373
- response = {
1374
- ...parsedBody,
1375
- name: `${errorCode}`,
1376
- message: parsedBody.message || parsedBody.Message || errorCode,
1128
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1129
+ name: parsedBody.code || parsedBody.Code || errorCode,
1377
1130
  $fault: "client",
1378
1131
  $metadata: deserializeMetadata(output),
1379
- };
1132
+ });
1133
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1380
1134
  }
1381
- const message = response.message || response.Message || errorCode;
1382
- response.message = message;
1383
- delete response.Message;
1384
- return Promise.reject(Object.assign(new Error(message), response));
1385
1135
  };
1386
1136
  const deserializeAws_restJson1DeletePolicyCommand = async (output, context) => {
1387
1137
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1405,67 +1155,31 @@ const deserializeAws_restJson1DeletePolicyCommandError = async (output, context)
1405
1155
  switch (errorCode) {
1406
1156
  case "BadRequestException":
1407
1157
  case "com.amazonaws.mediaconvert#BadRequestException":
1408
- response = {
1409
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1410
- name: errorCode,
1411
- $metadata: deserializeMetadata(output),
1412
- };
1413
- break;
1158
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1414
1159
  case "ConflictException":
1415
1160
  case "com.amazonaws.mediaconvert#ConflictException":
1416
- response = {
1417
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1418
- name: errorCode,
1419
- $metadata: deserializeMetadata(output),
1420
- };
1421
- break;
1161
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1422
1162
  case "ForbiddenException":
1423
1163
  case "com.amazonaws.mediaconvert#ForbiddenException":
1424
- response = {
1425
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1426
- name: errorCode,
1427
- $metadata: deserializeMetadata(output),
1428
- };
1429
- break;
1164
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1430
1165
  case "InternalServerErrorException":
1431
1166
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1432
- response = {
1433
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1434
- name: errorCode,
1435
- $metadata: deserializeMetadata(output),
1436
- };
1437
- break;
1167
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1438
1168
  case "NotFoundException":
1439
1169
  case "com.amazonaws.mediaconvert#NotFoundException":
1440
- response = {
1441
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1442
- name: errorCode,
1443
- $metadata: deserializeMetadata(output),
1444
- };
1445
- break;
1170
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1446
1171
  case "TooManyRequestsException":
1447
1172
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1448
- response = {
1449
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1450
- name: errorCode,
1451
- $metadata: deserializeMetadata(output),
1452
- };
1453
- break;
1173
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1454
1174
  default:
1455
1175
  const parsedBody = parsedOutput.body;
1456
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1457
- response = {
1458
- ...parsedBody,
1459
- name: `${errorCode}`,
1460
- message: parsedBody.message || parsedBody.Message || errorCode,
1176
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1177
+ name: parsedBody.code || parsedBody.Code || errorCode,
1461
1178
  $fault: "client",
1462
1179
  $metadata: deserializeMetadata(output),
1463
- };
1180
+ });
1181
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1464
1182
  }
1465
- const message = response.message || response.Message || errorCode;
1466
- response.message = message;
1467
- delete response.Message;
1468
- return Promise.reject(Object.assign(new Error(message), response));
1469
1183
  };
1470
1184
  const deserializeAws_restJson1DeletePresetCommand = async (output, context) => {
1471
1185
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -1489,67 +1203,31 @@ const deserializeAws_restJson1DeletePresetCommandError = async (output, context)
1489
1203
  switch (errorCode) {
1490
1204
  case "BadRequestException":
1491
1205
  case "com.amazonaws.mediaconvert#BadRequestException":
1492
- response = {
1493
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1494
- name: errorCode,
1495
- $metadata: deserializeMetadata(output),
1496
- };
1497
- break;
1206
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1498
1207
  case "ConflictException":
1499
1208
  case "com.amazonaws.mediaconvert#ConflictException":
1500
- response = {
1501
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1502
- name: errorCode,
1503
- $metadata: deserializeMetadata(output),
1504
- };
1505
- break;
1209
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1506
1210
  case "ForbiddenException":
1507
1211
  case "com.amazonaws.mediaconvert#ForbiddenException":
1508
- response = {
1509
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1510
- name: errorCode,
1511
- $metadata: deserializeMetadata(output),
1512
- };
1513
- break;
1212
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1514
1213
  case "InternalServerErrorException":
1515
1214
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1516
- response = {
1517
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1518
- name: errorCode,
1519
- $metadata: deserializeMetadata(output),
1520
- };
1521
- break;
1215
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1522
1216
  case "NotFoundException":
1523
1217
  case "com.amazonaws.mediaconvert#NotFoundException":
1524
- response = {
1525
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1526
- name: errorCode,
1527
- $metadata: deserializeMetadata(output),
1528
- };
1529
- break;
1218
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1530
1219
  case "TooManyRequestsException":
1531
1220
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1532
- response = {
1533
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1534
- name: errorCode,
1535
- $metadata: deserializeMetadata(output),
1536
- };
1537
- break;
1221
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1538
1222
  default:
1539
1223
  const parsedBody = parsedOutput.body;
1540
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1541
- response = {
1542
- ...parsedBody,
1543
- name: `${errorCode}`,
1544
- message: parsedBody.message || parsedBody.Message || errorCode,
1224
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1225
+ name: parsedBody.code || parsedBody.Code || errorCode,
1545
1226
  $fault: "client",
1546
1227
  $metadata: deserializeMetadata(output),
1547
- };
1228
+ });
1229
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1548
1230
  }
1549
- const message = response.message || response.Message || errorCode;
1550
- response.message = message;
1551
- delete response.Message;
1552
- return Promise.reject(Object.assign(new Error(message), response));
1553
1231
  };
1554
1232
  const deserializeAws_restJson1DeleteQueueCommand = async (output, context) => {
1555
1233
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -1573,67 +1251,31 @@ const deserializeAws_restJson1DeleteQueueCommandError = async (output, context)
1573
1251
  switch (errorCode) {
1574
1252
  case "BadRequestException":
1575
1253
  case "com.amazonaws.mediaconvert#BadRequestException":
1576
- response = {
1577
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1578
- name: errorCode,
1579
- $metadata: deserializeMetadata(output),
1580
- };
1581
- break;
1254
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1582
1255
  case "ConflictException":
1583
1256
  case "com.amazonaws.mediaconvert#ConflictException":
1584
- response = {
1585
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1586
- name: errorCode,
1587
- $metadata: deserializeMetadata(output),
1588
- };
1589
- break;
1257
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1590
1258
  case "ForbiddenException":
1591
1259
  case "com.amazonaws.mediaconvert#ForbiddenException":
1592
- response = {
1593
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1594
- name: errorCode,
1595
- $metadata: deserializeMetadata(output),
1596
- };
1597
- break;
1260
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1598
1261
  case "InternalServerErrorException":
1599
1262
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1600
- response = {
1601
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1602
- name: errorCode,
1603
- $metadata: deserializeMetadata(output),
1604
- };
1605
- break;
1263
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1606
1264
  case "NotFoundException":
1607
1265
  case "com.amazonaws.mediaconvert#NotFoundException":
1608
- response = {
1609
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1610
- name: errorCode,
1611
- $metadata: deserializeMetadata(output),
1612
- };
1613
- break;
1266
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1614
1267
  case "TooManyRequestsException":
1615
1268
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1616
- response = {
1617
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1618
- name: errorCode,
1619
- $metadata: deserializeMetadata(output),
1620
- };
1621
- break;
1269
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1622
1270
  default:
1623
1271
  const parsedBody = parsedOutput.body;
1624
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1625
- response = {
1626
- ...parsedBody,
1627
- name: `${errorCode}`,
1628
- message: parsedBody.message || parsedBody.Message || errorCode,
1272
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1273
+ name: parsedBody.code || parsedBody.Code || errorCode,
1629
1274
  $fault: "client",
1630
1275
  $metadata: deserializeMetadata(output),
1631
- };
1276
+ });
1277
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1632
1278
  }
1633
- const message = response.message || response.Message || errorCode;
1634
- response.message = message;
1635
- delete response.Message;
1636
- return Promise.reject(Object.assign(new Error(message), response));
1637
1279
  };
1638
1280
  const deserializeAws_restJson1DescribeEndpointsCommand = async (output, context) => {
1639
1281
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1665,67 +1307,31 @@ const deserializeAws_restJson1DescribeEndpointsCommandError = async (output, con
1665
1307
  switch (errorCode) {
1666
1308
  case "BadRequestException":
1667
1309
  case "com.amazonaws.mediaconvert#BadRequestException":
1668
- response = {
1669
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1670
- name: errorCode,
1671
- $metadata: deserializeMetadata(output),
1672
- };
1673
- break;
1310
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1674
1311
  case "ConflictException":
1675
1312
  case "com.amazonaws.mediaconvert#ConflictException":
1676
- response = {
1677
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1678
- name: errorCode,
1679
- $metadata: deserializeMetadata(output),
1680
- };
1681
- break;
1313
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1682
1314
  case "ForbiddenException":
1683
1315
  case "com.amazonaws.mediaconvert#ForbiddenException":
1684
- response = {
1685
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1686
- name: errorCode,
1687
- $metadata: deserializeMetadata(output),
1688
- };
1689
- break;
1316
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1690
1317
  case "InternalServerErrorException":
1691
1318
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1692
- response = {
1693
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1694
- name: errorCode,
1695
- $metadata: deserializeMetadata(output),
1696
- };
1697
- break;
1319
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1698
1320
  case "NotFoundException":
1699
1321
  case "com.amazonaws.mediaconvert#NotFoundException":
1700
- response = {
1701
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1702
- name: errorCode,
1703
- $metadata: deserializeMetadata(output),
1704
- };
1705
- break;
1322
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1706
1323
  case "TooManyRequestsException":
1707
1324
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1708
- response = {
1709
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1710
- name: errorCode,
1711
- $metadata: deserializeMetadata(output),
1712
- };
1713
- break;
1325
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1714
1326
  default:
1715
1327
  const parsedBody = parsedOutput.body;
1716
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1717
- response = {
1718
- ...parsedBody,
1719
- name: `${errorCode}`,
1720
- message: parsedBody.message || parsedBody.Message || errorCode,
1328
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1329
+ name: parsedBody.code || parsedBody.Code || errorCode,
1721
1330
  $fault: "client",
1722
1331
  $metadata: deserializeMetadata(output),
1723
- };
1332
+ });
1333
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1724
1334
  }
1725
- const message = response.message || response.Message || errorCode;
1726
- response.message = message;
1727
- delete response.Message;
1728
- return Promise.reject(Object.assign(new Error(message), response));
1729
1335
  };
1730
1336
  const deserializeAws_restJson1DisassociateCertificateCommand = async (output, context) => {
1731
1337
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -1749,67 +1355,31 @@ const deserializeAws_restJson1DisassociateCertificateCommandError = async (outpu
1749
1355
  switch (errorCode) {
1750
1356
  case "BadRequestException":
1751
1357
  case "com.amazonaws.mediaconvert#BadRequestException":
1752
- response = {
1753
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1754
- name: errorCode,
1755
- $metadata: deserializeMetadata(output),
1756
- };
1757
- break;
1358
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1758
1359
  case "ConflictException":
1759
1360
  case "com.amazonaws.mediaconvert#ConflictException":
1760
- response = {
1761
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1762
- name: errorCode,
1763
- $metadata: deserializeMetadata(output),
1764
- };
1765
- break;
1361
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1766
1362
  case "ForbiddenException":
1767
1363
  case "com.amazonaws.mediaconvert#ForbiddenException":
1768
- response = {
1769
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1770
- name: errorCode,
1771
- $metadata: deserializeMetadata(output),
1772
- };
1773
- break;
1364
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1774
1365
  case "InternalServerErrorException":
1775
1366
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1776
- response = {
1777
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1778
- name: errorCode,
1779
- $metadata: deserializeMetadata(output),
1780
- };
1781
- break;
1367
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1782
1368
  case "NotFoundException":
1783
1369
  case "com.amazonaws.mediaconvert#NotFoundException":
1784
- response = {
1785
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1786
- name: errorCode,
1787
- $metadata: deserializeMetadata(output),
1788
- };
1789
- break;
1370
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1790
1371
  case "TooManyRequestsException":
1791
1372
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1792
- response = {
1793
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1794
- name: errorCode,
1795
- $metadata: deserializeMetadata(output),
1796
- };
1797
- break;
1373
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1798
1374
  default:
1799
1375
  const parsedBody = parsedOutput.body;
1800
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1801
- response = {
1802
- ...parsedBody,
1803
- name: `${errorCode}`,
1804
- message: parsedBody.message || parsedBody.Message || errorCode,
1376
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1377
+ name: parsedBody.code || parsedBody.Code || errorCode,
1805
1378
  $fault: "client",
1806
1379
  $metadata: deserializeMetadata(output),
1807
- };
1380
+ });
1381
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1808
1382
  }
1809
- const message = response.message || response.Message || errorCode;
1810
- response.message = message;
1811
- delete response.Message;
1812
- return Promise.reject(Object.assign(new Error(message), response));
1813
1383
  };
1814
1384
  const deserializeAws_restJson1GetJobCommand = async (output, context) => {
1815
1385
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1837,67 +1407,31 @@ const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
1837
1407
  switch (errorCode) {
1838
1408
  case "BadRequestException":
1839
1409
  case "com.amazonaws.mediaconvert#BadRequestException":
1840
- response = {
1841
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1842
- name: errorCode,
1843
- $metadata: deserializeMetadata(output),
1844
- };
1845
- break;
1410
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1846
1411
  case "ConflictException":
1847
1412
  case "com.amazonaws.mediaconvert#ConflictException":
1848
- response = {
1849
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1850
- name: errorCode,
1851
- $metadata: deserializeMetadata(output),
1852
- };
1853
- break;
1413
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1854
1414
  case "ForbiddenException":
1855
1415
  case "com.amazonaws.mediaconvert#ForbiddenException":
1856
- response = {
1857
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1858
- name: errorCode,
1859
- $metadata: deserializeMetadata(output),
1860
- };
1861
- break;
1416
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1862
1417
  case "InternalServerErrorException":
1863
1418
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1864
- response = {
1865
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1866
- name: errorCode,
1867
- $metadata: deserializeMetadata(output),
1868
- };
1869
- break;
1419
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1870
1420
  case "NotFoundException":
1871
1421
  case "com.amazonaws.mediaconvert#NotFoundException":
1872
- response = {
1873
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1874
- name: errorCode,
1875
- $metadata: deserializeMetadata(output),
1876
- };
1877
- break;
1422
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1878
1423
  case "TooManyRequestsException":
1879
1424
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1880
- response = {
1881
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1882
- name: errorCode,
1883
- $metadata: deserializeMetadata(output),
1884
- };
1885
- break;
1425
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1886
1426
  default:
1887
1427
  const parsedBody = parsedOutput.body;
1888
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1889
- response = {
1890
- ...parsedBody,
1891
- name: `${errorCode}`,
1892
- message: parsedBody.message || parsedBody.Message || errorCode,
1428
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1429
+ name: parsedBody.code || parsedBody.Code || errorCode,
1893
1430
  $fault: "client",
1894
1431
  $metadata: deserializeMetadata(output),
1895
- };
1432
+ });
1433
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1896
1434
  }
1897
- const message = response.message || response.Message || errorCode;
1898
- response.message = message;
1899
- delete response.Message;
1900
- return Promise.reject(Object.assign(new Error(message), response));
1901
1435
  };
1902
1436
  const deserializeAws_restJson1GetJobTemplateCommand = async (output, context) => {
1903
1437
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1925,67 +1459,31 @@ const deserializeAws_restJson1GetJobTemplateCommandError = async (output, contex
1925
1459
  switch (errorCode) {
1926
1460
  case "BadRequestException":
1927
1461
  case "com.amazonaws.mediaconvert#BadRequestException":
1928
- response = {
1929
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
1930
- name: errorCode,
1931
- $metadata: deserializeMetadata(output),
1932
- };
1933
- break;
1462
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
1934
1463
  case "ConflictException":
1935
1464
  case "com.amazonaws.mediaconvert#ConflictException":
1936
- response = {
1937
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1938
- name: errorCode,
1939
- $metadata: deserializeMetadata(output),
1940
- };
1941
- break;
1465
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1942
1466
  case "ForbiddenException":
1943
1467
  case "com.amazonaws.mediaconvert#ForbiddenException":
1944
- response = {
1945
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
1946
- name: errorCode,
1947
- $metadata: deserializeMetadata(output),
1948
- };
1949
- break;
1468
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
1950
1469
  case "InternalServerErrorException":
1951
1470
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
1952
- response = {
1953
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
1954
- name: errorCode,
1955
- $metadata: deserializeMetadata(output),
1956
- };
1957
- break;
1471
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
1958
1472
  case "NotFoundException":
1959
1473
  case "com.amazonaws.mediaconvert#NotFoundException":
1960
- response = {
1961
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
1962
- name: errorCode,
1963
- $metadata: deserializeMetadata(output),
1964
- };
1965
- break;
1474
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
1966
1475
  case "TooManyRequestsException":
1967
1476
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
1968
- response = {
1969
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
1970
- name: errorCode,
1971
- $metadata: deserializeMetadata(output),
1972
- };
1973
- break;
1477
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1974
1478
  default:
1975
1479
  const parsedBody = parsedOutput.body;
1976
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1977
- response = {
1978
- ...parsedBody,
1979
- name: `${errorCode}`,
1980
- message: parsedBody.message || parsedBody.Message || errorCode,
1480
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1481
+ name: parsedBody.code || parsedBody.Code || errorCode,
1981
1482
  $fault: "client",
1982
1483
  $metadata: deserializeMetadata(output),
1983
- };
1484
+ });
1485
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1984
1486
  }
1985
- const message = response.message || response.Message || errorCode;
1986
- response.message = message;
1987
- delete response.Message;
1988
- return Promise.reject(Object.assign(new Error(message), response));
1989
1487
  };
1990
1488
  const deserializeAws_restJson1GetPolicyCommand = async (output, context) => {
1991
1489
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2013,67 +1511,31 @@ const deserializeAws_restJson1GetPolicyCommandError = async (output, context) =>
2013
1511
  switch (errorCode) {
2014
1512
  case "BadRequestException":
2015
1513
  case "com.amazonaws.mediaconvert#BadRequestException":
2016
- response = {
2017
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2018
- name: errorCode,
2019
- $metadata: deserializeMetadata(output),
2020
- };
2021
- break;
1514
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2022
1515
  case "ConflictException":
2023
1516
  case "com.amazonaws.mediaconvert#ConflictException":
2024
- response = {
2025
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2026
- name: errorCode,
2027
- $metadata: deserializeMetadata(output),
2028
- };
2029
- break;
1517
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2030
1518
  case "ForbiddenException":
2031
1519
  case "com.amazonaws.mediaconvert#ForbiddenException":
2032
- response = {
2033
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2034
- name: errorCode,
2035
- $metadata: deserializeMetadata(output),
2036
- };
2037
- break;
1520
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2038
1521
  case "InternalServerErrorException":
2039
1522
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2040
- response = {
2041
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2042
- name: errorCode,
2043
- $metadata: deserializeMetadata(output),
2044
- };
2045
- break;
1523
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2046
1524
  case "NotFoundException":
2047
1525
  case "com.amazonaws.mediaconvert#NotFoundException":
2048
- response = {
2049
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2050
- name: errorCode,
2051
- $metadata: deserializeMetadata(output),
2052
- };
2053
- break;
1526
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2054
1527
  case "TooManyRequestsException":
2055
1528
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2056
- response = {
2057
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2058
- name: errorCode,
2059
- $metadata: deserializeMetadata(output),
2060
- };
2061
- break;
1529
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2062
1530
  default:
2063
1531
  const parsedBody = parsedOutput.body;
2064
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2065
- response = {
2066
- ...parsedBody,
2067
- name: `${errorCode}`,
2068
- message: parsedBody.message || parsedBody.Message || errorCode,
1532
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1533
+ name: parsedBody.code || parsedBody.Code || errorCode,
2069
1534
  $fault: "client",
2070
1535
  $metadata: deserializeMetadata(output),
2071
- };
1536
+ });
1537
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2072
1538
  }
2073
- const message = response.message || response.Message || errorCode;
2074
- response.message = message;
2075
- delete response.Message;
2076
- return Promise.reject(Object.assign(new Error(message), response));
2077
1539
  };
2078
1540
  const deserializeAws_restJson1GetPresetCommand = async (output, context) => {
2079
1541
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2101,67 +1563,31 @@ const deserializeAws_restJson1GetPresetCommandError = async (output, context) =>
2101
1563
  switch (errorCode) {
2102
1564
  case "BadRequestException":
2103
1565
  case "com.amazonaws.mediaconvert#BadRequestException":
2104
- response = {
2105
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2106
- name: errorCode,
2107
- $metadata: deserializeMetadata(output),
2108
- };
2109
- break;
1566
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2110
1567
  case "ConflictException":
2111
1568
  case "com.amazonaws.mediaconvert#ConflictException":
2112
- response = {
2113
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2114
- name: errorCode,
2115
- $metadata: deserializeMetadata(output),
2116
- };
2117
- break;
1569
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2118
1570
  case "ForbiddenException":
2119
1571
  case "com.amazonaws.mediaconvert#ForbiddenException":
2120
- response = {
2121
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2122
- name: errorCode,
2123
- $metadata: deserializeMetadata(output),
2124
- };
2125
- break;
1572
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2126
1573
  case "InternalServerErrorException":
2127
1574
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2128
- response = {
2129
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2130
- name: errorCode,
2131
- $metadata: deserializeMetadata(output),
2132
- };
2133
- break;
1575
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2134
1576
  case "NotFoundException":
2135
1577
  case "com.amazonaws.mediaconvert#NotFoundException":
2136
- response = {
2137
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2138
- name: errorCode,
2139
- $metadata: deserializeMetadata(output),
2140
- };
2141
- break;
1578
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2142
1579
  case "TooManyRequestsException":
2143
1580
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2144
- response = {
2145
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2146
- name: errorCode,
2147
- $metadata: deserializeMetadata(output),
2148
- };
2149
- break;
1581
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2150
1582
  default:
2151
1583
  const parsedBody = parsedOutput.body;
2152
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2153
- response = {
2154
- ...parsedBody,
2155
- name: `${errorCode}`,
2156
- message: parsedBody.message || parsedBody.Message || errorCode,
1584
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1585
+ name: parsedBody.code || parsedBody.Code || errorCode,
2157
1586
  $fault: "client",
2158
1587
  $metadata: deserializeMetadata(output),
2159
- };
1588
+ });
1589
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2160
1590
  }
2161
- const message = response.message || response.Message || errorCode;
2162
- response.message = message;
2163
- delete response.Message;
2164
- return Promise.reject(Object.assign(new Error(message), response));
2165
1591
  };
2166
1592
  const deserializeAws_restJson1GetQueueCommand = async (output, context) => {
2167
1593
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2189,67 +1615,31 @@ const deserializeAws_restJson1GetQueueCommandError = async (output, context) =>
2189
1615
  switch (errorCode) {
2190
1616
  case "BadRequestException":
2191
1617
  case "com.amazonaws.mediaconvert#BadRequestException":
2192
- response = {
2193
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2194
- name: errorCode,
2195
- $metadata: deserializeMetadata(output),
2196
- };
2197
- break;
1618
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2198
1619
  case "ConflictException":
2199
1620
  case "com.amazonaws.mediaconvert#ConflictException":
2200
- response = {
2201
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2202
- name: errorCode,
2203
- $metadata: deserializeMetadata(output),
2204
- };
2205
- break;
1621
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2206
1622
  case "ForbiddenException":
2207
1623
  case "com.amazonaws.mediaconvert#ForbiddenException":
2208
- response = {
2209
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2210
- name: errorCode,
2211
- $metadata: deserializeMetadata(output),
2212
- };
2213
- break;
1624
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2214
1625
  case "InternalServerErrorException":
2215
1626
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2216
- response = {
2217
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2218
- name: errorCode,
2219
- $metadata: deserializeMetadata(output),
2220
- };
2221
- break;
1627
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2222
1628
  case "NotFoundException":
2223
1629
  case "com.amazonaws.mediaconvert#NotFoundException":
2224
- response = {
2225
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2226
- name: errorCode,
2227
- $metadata: deserializeMetadata(output),
2228
- };
2229
- break;
1630
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2230
1631
  case "TooManyRequestsException":
2231
1632
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2232
- response = {
2233
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2234
- name: errorCode,
2235
- $metadata: deserializeMetadata(output),
2236
- };
2237
- break;
1633
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2238
1634
  default:
2239
1635
  const parsedBody = parsedOutput.body;
2240
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2241
- response = {
2242
- ...parsedBody,
2243
- name: `${errorCode}`,
2244
- message: parsedBody.message || parsedBody.Message || errorCode,
1636
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1637
+ name: parsedBody.code || parsedBody.Code || errorCode,
2245
1638
  $fault: "client",
2246
1639
  $metadata: deserializeMetadata(output),
2247
- };
1640
+ });
1641
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2248
1642
  }
2249
- const message = response.message || response.Message || errorCode;
2250
- response.message = message;
2251
- delete response.Message;
2252
- return Promise.reject(Object.assign(new Error(message), response));
2253
1643
  };
2254
1644
  const deserializeAws_restJson1ListJobsCommand = async (output, context) => {
2255
1645
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2281,67 +1671,31 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
2281
1671
  switch (errorCode) {
2282
1672
  case "BadRequestException":
2283
1673
  case "com.amazonaws.mediaconvert#BadRequestException":
2284
- response = {
2285
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2286
- name: errorCode,
2287
- $metadata: deserializeMetadata(output),
2288
- };
2289
- break;
1674
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2290
1675
  case "ConflictException":
2291
1676
  case "com.amazonaws.mediaconvert#ConflictException":
2292
- response = {
2293
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2294
- name: errorCode,
2295
- $metadata: deserializeMetadata(output),
2296
- };
2297
- break;
1677
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2298
1678
  case "ForbiddenException":
2299
1679
  case "com.amazonaws.mediaconvert#ForbiddenException":
2300
- response = {
2301
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2302
- name: errorCode,
2303
- $metadata: deserializeMetadata(output),
2304
- };
2305
- break;
1680
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2306
1681
  case "InternalServerErrorException":
2307
1682
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2308
- response = {
2309
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2310
- name: errorCode,
2311
- $metadata: deserializeMetadata(output),
2312
- };
2313
- break;
1683
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2314
1684
  case "NotFoundException":
2315
1685
  case "com.amazonaws.mediaconvert#NotFoundException":
2316
- response = {
2317
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2318
- name: errorCode,
2319
- $metadata: deserializeMetadata(output),
2320
- };
2321
- break;
1686
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2322
1687
  case "TooManyRequestsException":
2323
1688
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2324
- response = {
2325
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2326
- name: errorCode,
2327
- $metadata: deserializeMetadata(output),
2328
- };
2329
- break;
1689
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2330
1690
  default:
2331
1691
  const parsedBody = parsedOutput.body;
2332
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2333
- response = {
2334
- ...parsedBody,
2335
- name: `${errorCode}`,
2336
- message: parsedBody.message || parsedBody.Message || errorCode,
1692
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1693
+ name: parsedBody.code || parsedBody.Code || errorCode,
2337
1694
  $fault: "client",
2338
1695
  $metadata: deserializeMetadata(output),
2339
- };
1696
+ });
1697
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2340
1698
  }
2341
- const message = response.message || response.Message || errorCode;
2342
- response.message = message;
2343
- delete response.Message;
2344
- return Promise.reject(Object.assign(new Error(message), response));
2345
1699
  };
2346
1700
  const deserializeAws_restJson1ListJobTemplatesCommand = async (output, context) => {
2347
1701
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2373,67 +1727,31 @@ const deserializeAws_restJson1ListJobTemplatesCommandError = async (output, cont
2373
1727
  switch (errorCode) {
2374
1728
  case "BadRequestException":
2375
1729
  case "com.amazonaws.mediaconvert#BadRequestException":
2376
- response = {
2377
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2378
- name: errorCode,
2379
- $metadata: deserializeMetadata(output),
2380
- };
2381
- break;
1730
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2382
1731
  case "ConflictException":
2383
1732
  case "com.amazonaws.mediaconvert#ConflictException":
2384
- response = {
2385
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2386
- name: errorCode,
2387
- $metadata: deserializeMetadata(output),
2388
- };
2389
- break;
1733
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2390
1734
  case "ForbiddenException":
2391
1735
  case "com.amazonaws.mediaconvert#ForbiddenException":
2392
- response = {
2393
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2394
- name: errorCode,
2395
- $metadata: deserializeMetadata(output),
2396
- };
2397
- break;
1736
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2398
1737
  case "InternalServerErrorException":
2399
1738
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2400
- response = {
2401
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2402
- name: errorCode,
2403
- $metadata: deserializeMetadata(output),
2404
- };
2405
- break;
1739
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2406
1740
  case "NotFoundException":
2407
1741
  case "com.amazonaws.mediaconvert#NotFoundException":
2408
- response = {
2409
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2410
- name: errorCode,
2411
- $metadata: deserializeMetadata(output),
2412
- };
2413
- break;
1742
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2414
1743
  case "TooManyRequestsException":
2415
1744
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2416
- response = {
2417
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2418
- name: errorCode,
2419
- $metadata: deserializeMetadata(output),
2420
- };
2421
- break;
1745
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2422
1746
  default:
2423
1747
  const parsedBody = parsedOutput.body;
2424
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2425
- response = {
2426
- ...parsedBody,
2427
- name: `${errorCode}`,
2428
- message: parsedBody.message || parsedBody.Message || errorCode,
1748
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1749
+ name: parsedBody.code || parsedBody.Code || errorCode,
2429
1750
  $fault: "client",
2430
1751
  $metadata: deserializeMetadata(output),
2431
- };
1752
+ });
1753
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2432
1754
  }
2433
- const message = response.message || response.Message || errorCode;
2434
- response.message = message;
2435
- delete response.Message;
2436
- return Promise.reject(Object.assign(new Error(message), response));
2437
1755
  };
2438
1756
  const deserializeAws_restJson1ListPresetsCommand = async (output, context) => {
2439
1757
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2465,67 +1783,31 @@ const deserializeAws_restJson1ListPresetsCommandError = async (output, context)
2465
1783
  switch (errorCode) {
2466
1784
  case "BadRequestException":
2467
1785
  case "com.amazonaws.mediaconvert#BadRequestException":
2468
- response = {
2469
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2470
- name: errorCode,
2471
- $metadata: deserializeMetadata(output),
2472
- };
2473
- break;
1786
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2474
1787
  case "ConflictException":
2475
1788
  case "com.amazonaws.mediaconvert#ConflictException":
2476
- response = {
2477
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2478
- name: errorCode,
2479
- $metadata: deserializeMetadata(output),
2480
- };
2481
- break;
1789
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2482
1790
  case "ForbiddenException":
2483
1791
  case "com.amazonaws.mediaconvert#ForbiddenException":
2484
- response = {
2485
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2486
- name: errorCode,
2487
- $metadata: deserializeMetadata(output),
2488
- };
2489
- break;
1792
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2490
1793
  case "InternalServerErrorException":
2491
1794
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2492
- response = {
2493
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2494
- name: errorCode,
2495
- $metadata: deserializeMetadata(output),
2496
- };
2497
- break;
1795
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2498
1796
  case "NotFoundException":
2499
1797
  case "com.amazonaws.mediaconvert#NotFoundException":
2500
- response = {
2501
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2502
- name: errorCode,
2503
- $metadata: deserializeMetadata(output),
2504
- };
2505
- break;
1798
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2506
1799
  case "TooManyRequestsException":
2507
1800
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2508
- response = {
2509
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2510
- name: errorCode,
2511
- $metadata: deserializeMetadata(output),
2512
- };
2513
- break;
1801
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2514
1802
  default:
2515
1803
  const parsedBody = parsedOutput.body;
2516
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2517
- response = {
2518
- ...parsedBody,
2519
- name: `${errorCode}`,
2520
- message: parsedBody.message || parsedBody.Message || errorCode,
1804
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1805
+ name: parsedBody.code || parsedBody.Code || errorCode,
2521
1806
  $fault: "client",
2522
1807
  $metadata: deserializeMetadata(output),
2523
- };
1808
+ });
1809
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2524
1810
  }
2525
- const message = response.message || response.Message || errorCode;
2526
- response.message = message;
2527
- delete response.Message;
2528
- return Promise.reject(Object.assign(new Error(message), response));
2529
1811
  };
2530
1812
  const deserializeAws_restJson1ListQueuesCommand = async (output, context) => {
2531
1813
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2557,67 +1839,31 @@ const deserializeAws_restJson1ListQueuesCommandError = async (output, context) =
2557
1839
  switch (errorCode) {
2558
1840
  case "BadRequestException":
2559
1841
  case "com.amazonaws.mediaconvert#BadRequestException":
2560
- response = {
2561
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2562
- name: errorCode,
2563
- $metadata: deserializeMetadata(output),
2564
- };
2565
- break;
1842
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2566
1843
  case "ConflictException":
2567
1844
  case "com.amazonaws.mediaconvert#ConflictException":
2568
- response = {
2569
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2570
- name: errorCode,
2571
- $metadata: deserializeMetadata(output),
2572
- };
2573
- break;
1845
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2574
1846
  case "ForbiddenException":
2575
1847
  case "com.amazonaws.mediaconvert#ForbiddenException":
2576
- response = {
2577
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2578
- name: errorCode,
2579
- $metadata: deserializeMetadata(output),
2580
- };
2581
- break;
1848
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2582
1849
  case "InternalServerErrorException":
2583
1850
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2584
- response = {
2585
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2586
- name: errorCode,
2587
- $metadata: deserializeMetadata(output),
2588
- };
2589
- break;
1851
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2590
1852
  case "NotFoundException":
2591
1853
  case "com.amazonaws.mediaconvert#NotFoundException":
2592
- response = {
2593
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2594
- name: errorCode,
2595
- $metadata: deserializeMetadata(output),
2596
- };
2597
- break;
1854
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2598
1855
  case "TooManyRequestsException":
2599
1856
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2600
- response = {
2601
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2602
- name: errorCode,
2603
- $metadata: deserializeMetadata(output),
2604
- };
2605
- break;
1857
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2606
1858
  default:
2607
1859
  const parsedBody = parsedOutput.body;
2608
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2609
- response = {
2610
- ...parsedBody,
2611
- name: `${errorCode}`,
2612
- message: parsedBody.message || parsedBody.Message || errorCode,
1860
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1861
+ name: parsedBody.code || parsedBody.Code || errorCode,
2613
1862
  $fault: "client",
2614
1863
  $metadata: deserializeMetadata(output),
2615
- };
1864
+ });
1865
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2616
1866
  }
2617
- const message = response.message || response.Message || errorCode;
2618
- response.message = message;
2619
- delete response.Message;
2620
- return Promise.reject(Object.assign(new Error(message), response));
2621
1867
  };
2622
1868
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
2623
1869
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2645,67 +1891,31 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2645
1891
  switch (errorCode) {
2646
1892
  case "BadRequestException":
2647
1893
  case "com.amazonaws.mediaconvert#BadRequestException":
2648
- response = {
2649
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2650
- name: errorCode,
2651
- $metadata: deserializeMetadata(output),
2652
- };
2653
- break;
1894
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2654
1895
  case "ConflictException":
2655
1896
  case "com.amazonaws.mediaconvert#ConflictException":
2656
- response = {
2657
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2658
- name: errorCode,
2659
- $metadata: deserializeMetadata(output),
2660
- };
2661
- break;
1897
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2662
1898
  case "ForbiddenException":
2663
1899
  case "com.amazonaws.mediaconvert#ForbiddenException":
2664
- response = {
2665
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2666
- name: errorCode,
2667
- $metadata: deserializeMetadata(output),
2668
- };
2669
- break;
1900
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2670
1901
  case "InternalServerErrorException":
2671
1902
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2672
- response = {
2673
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2674
- name: errorCode,
2675
- $metadata: deserializeMetadata(output),
2676
- };
2677
- break;
1903
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2678
1904
  case "NotFoundException":
2679
1905
  case "com.amazonaws.mediaconvert#NotFoundException":
2680
- response = {
2681
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2682
- name: errorCode,
2683
- $metadata: deserializeMetadata(output),
2684
- };
2685
- break;
1906
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2686
1907
  case "TooManyRequestsException":
2687
1908
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2688
- response = {
2689
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2690
- name: errorCode,
2691
- $metadata: deserializeMetadata(output),
2692
- };
2693
- break;
1909
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2694
1910
  default:
2695
1911
  const parsedBody = parsedOutput.body;
2696
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2697
- response = {
2698
- ...parsedBody,
2699
- name: `${errorCode}`,
2700
- message: parsedBody.message || parsedBody.Message || errorCode,
1912
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1913
+ name: parsedBody.code || parsedBody.Code || errorCode,
2701
1914
  $fault: "client",
2702
1915
  $metadata: deserializeMetadata(output),
2703
- };
1916
+ });
1917
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2704
1918
  }
2705
- const message = response.message || response.Message || errorCode;
2706
- response.message = message;
2707
- delete response.Message;
2708
- return Promise.reject(Object.assign(new Error(message), response));
2709
1919
  };
2710
1920
  const deserializeAws_restJson1PutPolicyCommand = async (output, context) => {
2711
1921
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2733,67 +1943,31 @@ const deserializeAws_restJson1PutPolicyCommandError = async (output, context) =>
2733
1943
  switch (errorCode) {
2734
1944
  case "BadRequestException":
2735
1945
  case "com.amazonaws.mediaconvert#BadRequestException":
2736
- response = {
2737
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2738
- name: errorCode,
2739
- $metadata: deserializeMetadata(output),
2740
- };
2741
- break;
1946
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2742
1947
  case "ConflictException":
2743
1948
  case "com.amazonaws.mediaconvert#ConflictException":
2744
- response = {
2745
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2746
- name: errorCode,
2747
- $metadata: deserializeMetadata(output),
2748
- };
2749
- break;
1949
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2750
1950
  case "ForbiddenException":
2751
1951
  case "com.amazonaws.mediaconvert#ForbiddenException":
2752
- response = {
2753
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2754
- name: errorCode,
2755
- $metadata: deserializeMetadata(output),
2756
- };
2757
- break;
1952
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2758
1953
  case "InternalServerErrorException":
2759
1954
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2760
- response = {
2761
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2762
- name: errorCode,
2763
- $metadata: deserializeMetadata(output),
2764
- };
2765
- break;
1955
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2766
1956
  case "NotFoundException":
2767
1957
  case "com.amazonaws.mediaconvert#NotFoundException":
2768
- response = {
2769
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2770
- name: errorCode,
2771
- $metadata: deserializeMetadata(output),
2772
- };
2773
- break;
1958
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2774
1959
  case "TooManyRequestsException":
2775
1960
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2776
- response = {
2777
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2778
- name: errorCode,
2779
- $metadata: deserializeMetadata(output),
2780
- };
2781
- break;
1961
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2782
1962
  default:
2783
1963
  const parsedBody = parsedOutput.body;
2784
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2785
- response = {
2786
- ...parsedBody,
2787
- name: `${errorCode}`,
2788
- message: parsedBody.message || parsedBody.Message || errorCode,
1964
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
1965
+ name: parsedBody.code || parsedBody.Code || errorCode,
2789
1966
  $fault: "client",
2790
1967
  $metadata: deserializeMetadata(output),
2791
- };
1968
+ });
1969
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2792
1970
  }
2793
- const message = response.message || response.Message || errorCode;
2794
- response.message = message;
2795
- delete response.Message;
2796
- return Promise.reject(Object.assign(new Error(message), response));
2797
1971
  };
2798
1972
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
2799
1973
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2817,67 +1991,31 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2817
1991
  switch (errorCode) {
2818
1992
  case "BadRequestException":
2819
1993
  case "com.amazonaws.mediaconvert#BadRequestException":
2820
- response = {
2821
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2822
- name: errorCode,
2823
- $metadata: deserializeMetadata(output),
2824
- };
2825
- break;
1994
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2826
1995
  case "ConflictException":
2827
1996
  case "com.amazonaws.mediaconvert#ConflictException":
2828
- response = {
2829
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2830
- name: errorCode,
2831
- $metadata: deserializeMetadata(output),
2832
- };
2833
- break;
1997
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2834
1998
  case "ForbiddenException":
2835
1999
  case "com.amazonaws.mediaconvert#ForbiddenException":
2836
- response = {
2837
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2838
- name: errorCode,
2839
- $metadata: deserializeMetadata(output),
2840
- };
2841
- break;
2000
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2842
2001
  case "InternalServerErrorException":
2843
2002
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2844
- response = {
2845
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2846
- name: errorCode,
2847
- $metadata: deserializeMetadata(output),
2848
- };
2849
- break;
2003
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2850
2004
  case "NotFoundException":
2851
2005
  case "com.amazonaws.mediaconvert#NotFoundException":
2852
- response = {
2853
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2854
- name: errorCode,
2855
- $metadata: deserializeMetadata(output),
2856
- };
2857
- break;
2006
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2858
2007
  case "TooManyRequestsException":
2859
2008
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2860
- response = {
2861
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2862
- name: errorCode,
2863
- $metadata: deserializeMetadata(output),
2864
- };
2865
- break;
2009
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2866
2010
  default:
2867
2011
  const parsedBody = parsedOutput.body;
2868
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2869
- response = {
2870
- ...parsedBody,
2871
- name: `${errorCode}`,
2872
- message: parsedBody.message || parsedBody.Message || errorCode,
2012
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
2013
+ name: parsedBody.code || parsedBody.Code || errorCode,
2873
2014
  $fault: "client",
2874
2015
  $metadata: deserializeMetadata(output),
2875
- };
2016
+ });
2017
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2876
2018
  }
2877
- const message = response.message || response.Message || errorCode;
2878
- response.message = message;
2879
- delete response.Message;
2880
- return Promise.reject(Object.assign(new Error(message), response));
2881
2019
  };
2882
2020
  const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
2883
2021
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2901,67 +2039,31 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2901
2039
  switch (errorCode) {
2902
2040
  case "BadRequestException":
2903
2041
  case "com.amazonaws.mediaconvert#BadRequestException":
2904
- response = {
2905
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2906
- name: errorCode,
2907
- $metadata: deserializeMetadata(output),
2908
- };
2909
- break;
2042
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2910
2043
  case "ConflictException":
2911
2044
  case "com.amazonaws.mediaconvert#ConflictException":
2912
- response = {
2913
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
2914
- name: errorCode,
2915
- $metadata: deserializeMetadata(output),
2916
- };
2917
- break;
2045
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
2918
2046
  case "ForbiddenException":
2919
2047
  case "com.amazonaws.mediaconvert#ForbiddenException":
2920
- response = {
2921
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
2922
- name: errorCode,
2923
- $metadata: deserializeMetadata(output),
2924
- };
2925
- break;
2048
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
2926
2049
  case "InternalServerErrorException":
2927
2050
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
2928
- response = {
2929
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
2930
- name: errorCode,
2931
- $metadata: deserializeMetadata(output),
2932
- };
2933
- break;
2051
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
2934
2052
  case "NotFoundException":
2935
2053
  case "com.amazonaws.mediaconvert#NotFoundException":
2936
- response = {
2937
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
2938
- name: errorCode,
2939
- $metadata: deserializeMetadata(output),
2940
- };
2941
- break;
2054
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
2942
2055
  case "TooManyRequestsException":
2943
2056
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
2944
- response = {
2945
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
2946
- name: errorCode,
2947
- $metadata: deserializeMetadata(output),
2948
- };
2949
- break;
2057
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2950
2058
  default:
2951
2059
  const parsedBody = parsedOutput.body;
2952
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2953
- response = {
2954
- ...parsedBody,
2955
- name: `${errorCode}`,
2956
- message: parsedBody.message || parsedBody.Message || errorCode,
2060
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
2061
+ name: parsedBody.code || parsedBody.Code || errorCode,
2957
2062
  $fault: "client",
2958
2063
  $metadata: deserializeMetadata(output),
2959
- };
2064
+ });
2065
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2960
2066
  }
2961
- const message = response.message || response.Message || errorCode;
2962
- response.message = message;
2963
- delete response.Message;
2964
- return Promise.reject(Object.assign(new Error(message), response));
2965
2067
  };
2966
2068
  const deserializeAws_restJson1UpdateJobTemplateCommand = async (output, context) => {
2967
2069
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2989,67 +2091,31 @@ const deserializeAws_restJson1UpdateJobTemplateCommandError = async (output, con
2989
2091
  switch (errorCode) {
2990
2092
  case "BadRequestException":
2991
2093
  case "com.amazonaws.mediaconvert#BadRequestException":
2992
- response = {
2993
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
2994
- name: errorCode,
2995
- $metadata: deserializeMetadata(output),
2996
- };
2997
- break;
2094
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
2998
2095
  case "ConflictException":
2999
2096
  case "com.amazonaws.mediaconvert#ConflictException":
3000
- response = {
3001
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
3002
- name: errorCode,
3003
- $metadata: deserializeMetadata(output),
3004
- };
3005
- break;
2097
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3006
2098
  case "ForbiddenException":
3007
2099
  case "com.amazonaws.mediaconvert#ForbiddenException":
3008
- response = {
3009
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
3010
- name: errorCode,
3011
- $metadata: deserializeMetadata(output),
3012
- };
3013
- break;
2100
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
3014
2101
  case "InternalServerErrorException":
3015
2102
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
3016
- response = {
3017
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
3018
- name: errorCode,
3019
- $metadata: deserializeMetadata(output),
3020
- };
3021
- break;
2103
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
3022
2104
  case "NotFoundException":
3023
2105
  case "com.amazonaws.mediaconvert#NotFoundException":
3024
- response = {
3025
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
3026
- name: errorCode,
3027
- $metadata: deserializeMetadata(output),
3028
- };
3029
- break;
2106
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3030
2107
  case "TooManyRequestsException":
3031
2108
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
3032
- response = {
3033
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
3034
- name: errorCode,
3035
- $metadata: deserializeMetadata(output),
3036
- };
3037
- break;
2109
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3038
2110
  default:
3039
2111
  const parsedBody = parsedOutput.body;
3040
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3041
- response = {
3042
- ...parsedBody,
3043
- name: `${errorCode}`,
3044
- message: parsedBody.message || parsedBody.Message || errorCode,
2112
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
2113
+ name: parsedBody.code || parsedBody.Code || errorCode,
3045
2114
  $fault: "client",
3046
2115
  $metadata: deserializeMetadata(output),
3047
- };
2116
+ });
2117
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3048
2118
  }
3049
- const message = response.message || response.Message || errorCode;
3050
- response.message = message;
3051
- delete response.Message;
3052
- return Promise.reject(Object.assign(new Error(message), response));
3053
2119
  };
3054
2120
  const deserializeAws_restJson1UpdatePresetCommand = async (output, context) => {
3055
2121
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3077,67 +2143,31 @@ const deserializeAws_restJson1UpdatePresetCommandError = async (output, context)
3077
2143
  switch (errorCode) {
3078
2144
  case "BadRequestException":
3079
2145
  case "com.amazonaws.mediaconvert#BadRequestException":
3080
- response = {
3081
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3082
- name: errorCode,
3083
- $metadata: deserializeMetadata(output),
3084
- };
3085
- break;
2146
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3086
2147
  case "ConflictException":
3087
2148
  case "com.amazonaws.mediaconvert#ConflictException":
3088
- response = {
3089
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
3090
- name: errorCode,
3091
- $metadata: deserializeMetadata(output),
3092
- };
3093
- break;
2149
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3094
2150
  case "ForbiddenException":
3095
2151
  case "com.amazonaws.mediaconvert#ForbiddenException":
3096
- response = {
3097
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
3098
- name: errorCode,
3099
- $metadata: deserializeMetadata(output),
3100
- };
3101
- break;
2152
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
3102
2153
  case "InternalServerErrorException":
3103
2154
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
3104
- response = {
3105
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
3106
- name: errorCode,
3107
- $metadata: deserializeMetadata(output),
3108
- };
3109
- break;
2155
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
3110
2156
  case "NotFoundException":
3111
2157
  case "com.amazonaws.mediaconvert#NotFoundException":
3112
- response = {
3113
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
3114
- name: errorCode,
3115
- $metadata: deserializeMetadata(output),
3116
- };
3117
- break;
2158
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3118
2159
  case "TooManyRequestsException":
3119
2160
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
3120
- response = {
3121
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
3122
- name: errorCode,
3123
- $metadata: deserializeMetadata(output),
3124
- };
3125
- break;
2161
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3126
2162
  default:
3127
2163
  const parsedBody = parsedOutput.body;
3128
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3129
- response = {
3130
- ...parsedBody,
3131
- name: `${errorCode}`,
3132
- message: parsedBody.message || parsedBody.Message || errorCode,
2164
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
2165
+ name: parsedBody.code || parsedBody.Code || errorCode,
3133
2166
  $fault: "client",
3134
2167
  $metadata: deserializeMetadata(output),
3135
- };
2168
+ });
2169
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3136
2170
  }
3137
- const message = response.message || response.Message || errorCode;
3138
- response.message = message;
3139
- delete response.Message;
3140
- return Promise.reject(Object.assign(new Error(message), response));
3141
2171
  };
3142
2172
  const deserializeAws_restJson1UpdateQueueCommand = async (output, context) => {
3143
2173
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -3165,145 +2195,103 @@ const deserializeAws_restJson1UpdateQueueCommandError = async (output, context)
3165
2195
  switch (errorCode) {
3166
2196
  case "BadRequestException":
3167
2197
  case "com.amazonaws.mediaconvert#BadRequestException":
3168
- response = {
3169
- ...(await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)),
3170
- name: errorCode,
3171
- $metadata: deserializeMetadata(output),
3172
- };
3173
- break;
2198
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3174
2199
  case "ConflictException":
3175
2200
  case "com.amazonaws.mediaconvert#ConflictException":
3176
- response = {
3177
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
3178
- name: errorCode,
3179
- $metadata: deserializeMetadata(output),
3180
- };
3181
- break;
2201
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3182
2202
  case "ForbiddenException":
3183
2203
  case "com.amazonaws.mediaconvert#ForbiddenException":
3184
- response = {
3185
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
3186
- name: errorCode,
3187
- $metadata: deserializeMetadata(output),
3188
- };
3189
- break;
2204
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
3190
2205
  case "InternalServerErrorException":
3191
2206
  case "com.amazonaws.mediaconvert#InternalServerErrorException":
3192
- response = {
3193
- ...(await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)),
3194
- name: errorCode,
3195
- $metadata: deserializeMetadata(output),
3196
- };
3197
- break;
2207
+ throw await deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context);
3198
2208
  case "NotFoundException":
3199
2209
  case "com.amazonaws.mediaconvert#NotFoundException":
3200
- response = {
3201
- ...(await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)),
3202
- name: errorCode,
3203
- $metadata: deserializeMetadata(output),
3204
- };
3205
- break;
2210
+ throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
3206
2211
  case "TooManyRequestsException":
3207
2212
  case "com.amazonaws.mediaconvert#TooManyRequestsException":
3208
- response = {
3209
- ...(await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context)),
3210
- name: errorCode,
3211
- $metadata: deserializeMetadata(output),
3212
- };
3213
- break;
2213
+ throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3214
2214
  default:
3215
2215
  const parsedBody = parsedOutput.body;
3216
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
3217
- response = {
3218
- ...parsedBody,
3219
- name: `${errorCode}`,
3220
- message: parsedBody.message || parsedBody.Message || errorCode,
2216
+ response = new MediaConvertServiceException_1.MediaConvertServiceException({
2217
+ name: parsedBody.code || parsedBody.Code || errorCode,
3221
2218
  $fault: "client",
3222
2219
  $metadata: deserializeMetadata(output),
3223
- };
2220
+ });
2221
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
3224
2222
  }
3225
- const message = response.message || response.Message || errorCode;
3226
- response.message = message;
3227
- delete response.Message;
3228
- return Promise.reject(Object.assign(new Error(message), response));
3229
2223
  };
3230
2224
  const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
3231
- const contents = {
3232
- name: "BadRequestException",
3233
- $fault: "client",
3234
- $metadata: deserializeMetadata(parsedOutput),
3235
- Message: undefined,
3236
- };
2225
+ const contents = {};
3237
2226
  const data = parsedOutput.body;
3238
2227
  if (data.message !== undefined && data.message !== null) {
3239
2228
  contents.Message = smithy_client_1.expectString(data.message);
3240
2229
  }
3241
- return contents;
2230
+ const exception = new models_1_1.BadRequestException({
2231
+ $metadata: deserializeMetadata(parsedOutput),
2232
+ ...contents,
2233
+ });
2234
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3242
2235
  };
3243
2236
  const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
3244
- const contents = {
3245
- name: "ConflictException",
3246
- $fault: "client",
3247
- $metadata: deserializeMetadata(parsedOutput),
3248
- Message: undefined,
3249
- };
2237
+ const contents = {};
3250
2238
  const data = parsedOutput.body;
3251
2239
  if (data.message !== undefined && data.message !== null) {
3252
2240
  contents.Message = smithy_client_1.expectString(data.message);
3253
2241
  }
3254
- return contents;
2242
+ const exception = new models_1_1.ConflictException({
2243
+ $metadata: deserializeMetadata(parsedOutput),
2244
+ ...contents,
2245
+ });
2246
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3255
2247
  };
3256
2248
  const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
3257
- const contents = {
3258
- name: "ForbiddenException",
3259
- $fault: "client",
3260
- $metadata: deserializeMetadata(parsedOutput),
3261
- Message: undefined,
3262
- };
2249
+ const contents = {};
3263
2250
  const data = parsedOutput.body;
3264
2251
  if (data.message !== undefined && data.message !== null) {
3265
2252
  contents.Message = smithy_client_1.expectString(data.message);
3266
2253
  }
3267
- return contents;
2254
+ const exception = new models_1_1.ForbiddenException({
2255
+ $metadata: deserializeMetadata(parsedOutput),
2256
+ ...contents,
2257
+ });
2258
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3268
2259
  };
3269
2260
  const deserializeAws_restJson1InternalServerErrorExceptionResponse = async (parsedOutput, context) => {
3270
- const contents = {
3271
- name: "InternalServerErrorException",
3272
- $fault: "server",
3273
- $metadata: deserializeMetadata(parsedOutput),
3274
- Message: undefined,
3275
- };
2261
+ const contents = {};
3276
2262
  const data = parsedOutput.body;
3277
2263
  if (data.message !== undefined && data.message !== null) {
3278
2264
  contents.Message = smithy_client_1.expectString(data.message);
3279
2265
  }
3280
- return contents;
2266
+ const exception = new models_1_1.InternalServerErrorException({
2267
+ $metadata: deserializeMetadata(parsedOutput),
2268
+ ...contents,
2269
+ });
2270
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3281
2271
  };
3282
2272
  const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
3283
- const contents = {
3284
- name: "NotFoundException",
3285
- $fault: "client",
3286
- $metadata: deserializeMetadata(parsedOutput),
3287
- Message: undefined,
3288
- };
2273
+ const contents = {};
3289
2274
  const data = parsedOutput.body;
3290
2275
  if (data.message !== undefined && data.message !== null) {
3291
2276
  contents.Message = smithy_client_1.expectString(data.message);
3292
2277
  }
3293
- return contents;
2278
+ const exception = new models_1_1.NotFoundException({
2279
+ $metadata: deserializeMetadata(parsedOutput),
2280
+ ...contents,
2281
+ });
2282
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3294
2283
  };
3295
2284
  const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
3296
- const contents = {
3297
- name: "TooManyRequestsException",
3298
- $fault: "client",
3299
- $metadata: deserializeMetadata(parsedOutput),
3300
- Message: undefined,
3301
- };
2285
+ const contents = {};
3302
2286
  const data = parsedOutput.body;
3303
2287
  if (data.message !== undefined && data.message !== null) {
3304
2288
  contents.Message = smithy_client_1.expectString(data.message);
3305
2289
  }
3306
- return contents;
2290
+ const exception = new models_1_1.TooManyRequestsException({
2291
+ $metadata: deserializeMetadata(parsedOutput),
2292
+ ...contents,
2293
+ });
2294
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
3307
2295
  };
3308
2296
  const serializeAws_restJson1__listOf__doubleMinNegative60Max6 = (input, context) => {
3309
2297
  return input
@@ -4821,6 +3809,8 @@ const serializeAws_restJson1HlsGroupSettings = (input, context) => {
4821
3809
  }),
4822
3810
  ...(input.CaptionLanguageSetting !== undefined &&
4823
3811
  input.CaptionLanguageSetting !== null && { captionLanguageSetting: input.CaptionLanguageSetting }),
3812
+ ...(input.CaptionSegmentLengthControl !== undefined &&
3813
+ input.CaptionSegmentLengthControl !== null && { captionSegmentLengthControl: input.CaptionSegmentLengthControl }),
4824
3814
  ...(input.ClientCache !== undefined && input.ClientCache !== null && { clientCache: input.ClientCache }),
4825
3815
  ...(input.CodecSpecification !== undefined &&
4826
3816
  input.CodecSpecification !== null && { codecSpecification: input.CodecSpecification }),
@@ -5997,6 +4987,8 @@ const serializeAws_restJson1VideoSelector = (input, context) => {
5997
4987
  ...(input.ColorSpace !== undefined && input.ColorSpace !== null && { colorSpace: input.ColorSpace }),
5998
4988
  ...(input.ColorSpaceUsage !== undefined &&
5999
4989
  input.ColorSpaceUsage !== null && { colorSpaceUsage: input.ColorSpaceUsage }),
4990
+ ...(input.EmbeddedTimecodeOverride !== undefined &&
4991
+ input.EmbeddedTimecodeOverride !== null && { embeddedTimecodeOverride: input.EmbeddedTimecodeOverride }),
6000
4992
  ...(input.Hdr10Metadata !== undefined &&
6001
4993
  input.Hdr10Metadata !== null && {
6002
4994
  hdr10Metadata: serializeAws_restJson1Hdr10Metadata(input.Hdr10Metadata, context),
@@ -6184,7 +5176,7 @@ const serializeAws_restJson1XavcSettings = (input, context) => {
6184
5176
  };
6185
5177
  };
6186
5178
  const deserializeAws_restJson1__listOf__doubleMinNegative60Max6 = (output, context) => {
6187
- return (output || [])
5179
+ const retVal = (output || [])
6188
5180
  .filter((e) => e != null)
6189
5181
  .map((entry) => {
6190
5182
  if (entry === null) {
@@ -6192,9 +5184,10 @@ const deserializeAws_restJson1__listOf__doubleMinNegative60Max6 = (output, conte
6192
5184
  }
6193
5185
  return smithy_client_1.limitedParseDouble(entry);
6194
5186
  });
5187
+ return retVal;
6195
5188
  };
6196
5189
  const deserializeAws_restJson1__listOf__integerMin1Max2147483647 = (output, context) => {
6197
- return (output || [])
5190
+ const retVal = (output || [])
6198
5191
  .filter((e) => e != null)
6199
5192
  .map((entry) => {
6200
5193
  if (entry === null) {
@@ -6202,9 +5195,10 @@ const deserializeAws_restJson1__listOf__integerMin1Max2147483647 = (output, cont
6202
5195
  }
6203
5196
  return smithy_client_1.expectInt32(entry);
6204
5197
  });
5198
+ return retVal;
6205
5199
  };
6206
5200
  const deserializeAws_restJson1__listOf__integerMin32Max8182 = (output, context) => {
6207
- return (output || [])
5201
+ const retVal = (output || [])
6208
5202
  .filter((e) => e != null)
6209
5203
  .map((entry) => {
6210
5204
  if (entry === null) {
@@ -6212,9 +5206,10 @@ const deserializeAws_restJson1__listOf__integerMin32Max8182 = (output, context)
6212
5206
  }
6213
5207
  return smithy_client_1.expectInt32(entry);
6214
5208
  });
5209
+ return retVal;
6215
5210
  };
6216
5211
  const deserializeAws_restJson1__listOf__integerMinNegative60Max6 = (output, context) => {
6217
- return (output || [])
5212
+ const retVal = (output || [])
6218
5213
  .filter((e) => e != null)
6219
5214
  .map((entry) => {
6220
5215
  if (entry === null) {
@@ -6222,9 +5217,10 @@ const deserializeAws_restJson1__listOf__integerMinNegative60Max6 = (output, cont
6222
5217
  }
6223
5218
  return smithy_client_1.expectInt32(entry);
6224
5219
  });
5220
+ return retVal;
6225
5221
  };
6226
5222
  const deserializeAws_restJson1__listOf__string = (output, context) => {
6227
- return (output || [])
5223
+ const retVal = (output || [])
6228
5224
  .filter((e) => e != null)
6229
5225
  .map((entry) => {
6230
5226
  if (entry === null) {
@@ -6232,9 +5228,10 @@ const deserializeAws_restJson1__listOf__string = (output, context) => {
6232
5228
  }
6233
5229
  return smithy_client_1.expectString(entry);
6234
5230
  });
5231
+ return retVal;
6235
5232
  };
6236
5233
  const deserializeAws_restJson1__listOf__stringMin1 = (output, context) => {
6237
- return (output || [])
5234
+ const retVal = (output || [])
6238
5235
  .filter((e) => e != null)
6239
5236
  .map((entry) => {
6240
5237
  if (entry === null) {
@@ -6242,9 +5239,10 @@ const deserializeAws_restJson1__listOf__stringMin1 = (output, context) => {
6242
5239
  }
6243
5240
  return smithy_client_1.expectString(entry);
6244
5241
  });
5242
+ return retVal;
6245
5243
  };
6246
5244
  const deserializeAws_restJson1__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12 = (output, context) => {
6247
- return (output || [])
5245
+ const retVal = (output || [])
6248
5246
  .filter((e) => e != null)
6249
5247
  .map((entry) => {
6250
5248
  if (entry === null) {
@@ -6252,9 +5250,10 @@ const deserializeAws_restJson1__listOf__stringMin36Max36Pattern09aFAF809aFAF409a
6252
5250
  }
6253
5251
  return smithy_client_1.expectString(entry);
6254
5252
  });
5253
+ return retVal;
6255
5254
  };
6256
5255
  const deserializeAws_restJson1__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12 = (output, context) => {
6257
- return (output || [])
5256
+ const retVal = (output || [])
6258
5257
  .filter((e) => e != null)
6259
5258
  .map((entry) => {
6260
5259
  if (entry === null) {
@@ -6262,9 +5261,10 @@ const deserializeAws_restJson1__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF
6262
5261
  }
6263
5262
  return smithy_client_1.expectString(entry);
6264
5263
  });
5264
+ return retVal;
6265
5265
  };
6266
5266
  const deserializeAws_restJson1__listOf__stringPatternS3ASSETMAPXml = (output, context) => {
6267
- return (output || [])
5267
+ const retVal = (output || [])
6268
5268
  .filter((e) => e != null)
6269
5269
  .map((entry) => {
6270
5270
  if (entry === null) {
@@ -6272,9 +5272,10 @@ const deserializeAws_restJson1__listOf__stringPatternS3ASSETMAPXml = (output, co
6272
5272
  }
6273
5273
  return smithy_client_1.expectString(entry);
6274
5274
  });
5275
+ return retVal;
6275
5276
  };
6276
5277
  const deserializeAws_restJson1__listOfAudioDescription = (output, context) => {
6277
- return (output || [])
5278
+ const retVal = (output || [])
6278
5279
  .filter((e) => e != null)
6279
5280
  .map((entry) => {
6280
5281
  if (entry === null) {
@@ -6282,9 +5283,10 @@ const deserializeAws_restJson1__listOfAudioDescription = (output, context) => {
6282
5283
  }
6283
5284
  return deserializeAws_restJson1AudioDescription(entry, context);
6284
5285
  });
5286
+ return retVal;
6285
5287
  };
6286
5288
  const deserializeAws_restJson1__listOfCaptionDescription = (output, context) => {
6287
- return (output || [])
5289
+ const retVal = (output || [])
6288
5290
  .filter((e) => e != null)
6289
5291
  .map((entry) => {
6290
5292
  if (entry === null) {
@@ -6292,9 +5294,10 @@ const deserializeAws_restJson1__listOfCaptionDescription = (output, context) =>
6292
5294
  }
6293
5295
  return deserializeAws_restJson1CaptionDescription(entry, context);
6294
5296
  });
5297
+ return retVal;
6295
5298
  };
6296
5299
  const deserializeAws_restJson1__listOfCaptionDescriptionPreset = (output, context) => {
6297
- return (output || [])
5300
+ const retVal = (output || [])
6298
5301
  .filter((e) => e != null)
6299
5302
  .map((entry) => {
6300
5303
  if (entry === null) {
@@ -6302,9 +5305,10 @@ const deserializeAws_restJson1__listOfCaptionDescriptionPreset = (output, contex
6302
5305
  }
6303
5306
  return deserializeAws_restJson1CaptionDescriptionPreset(entry, context);
6304
5307
  });
5308
+ return retVal;
6305
5309
  };
6306
5310
  const deserializeAws_restJson1__listOfCmafAdditionalManifest = (output, context) => {
6307
- return (output || [])
5311
+ const retVal = (output || [])
6308
5312
  .filter((e) => e != null)
6309
5313
  .map((entry) => {
6310
5314
  if (entry === null) {
@@ -6312,9 +5316,10 @@ const deserializeAws_restJson1__listOfCmafAdditionalManifest = (output, context)
6312
5316
  }
6313
5317
  return deserializeAws_restJson1CmafAdditionalManifest(entry, context);
6314
5318
  });
5319
+ return retVal;
6315
5320
  };
6316
5321
  const deserializeAws_restJson1__listOfDashAdditionalManifest = (output, context) => {
6317
- return (output || [])
5322
+ const retVal = (output || [])
6318
5323
  .filter((e) => e != null)
6319
5324
  .map((entry) => {
6320
5325
  if (entry === null) {
@@ -6322,9 +5327,10 @@ const deserializeAws_restJson1__listOfDashAdditionalManifest = (output, context)
6322
5327
  }
6323
5328
  return deserializeAws_restJson1DashAdditionalManifest(entry, context);
6324
5329
  });
5330
+ return retVal;
6325
5331
  };
6326
5332
  const deserializeAws_restJson1__listOfEndpoint = (output, context) => {
6327
- return (output || [])
5333
+ const retVal = (output || [])
6328
5334
  .filter((e) => e != null)
6329
5335
  .map((entry) => {
6330
5336
  if (entry === null) {
@@ -6332,9 +5338,10 @@ const deserializeAws_restJson1__listOfEndpoint = (output, context) => {
6332
5338
  }
6333
5339
  return deserializeAws_restJson1Endpoint(entry, context);
6334
5340
  });
5341
+ return retVal;
6335
5342
  };
6336
5343
  const deserializeAws_restJson1__listOfHlsAdditionalManifest = (output, context) => {
6337
- return (output || [])
5344
+ const retVal = (output || [])
6338
5345
  .filter((e) => e != null)
6339
5346
  .map((entry) => {
6340
5347
  if (entry === null) {
@@ -6342,9 +5349,10 @@ const deserializeAws_restJson1__listOfHlsAdditionalManifest = (output, context)
6342
5349
  }
6343
5350
  return deserializeAws_restJson1HlsAdditionalManifest(entry, context);
6344
5351
  });
5352
+ return retVal;
6345
5353
  };
6346
5354
  const deserializeAws_restJson1__listOfHlsAdMarkers = (output, context) => {
6347
- return (output || [])
5355
+ const retVal = (output || [])
6348
5356
  .filter((e) => e != null)
6349
5357
  .map((entry) => {
6350
5358
  if (entry === null) {
@@ -6352,9 +5360,10 @@ const deserializeAws_restJson1__listOfHlsAdMarkers = (output, context) => {
6352
5360
  }
6353
5361
  return smithy_client_1.expectString(entry);
6354
5362
  });
5363
+ return retVal;
6355
5364
  };
6356
5365
  const deserializeAws_restJson1__listOfHlsCaptionLanguageMapping = (output, context) => {
6357
- return (output || [])
5366
+ const retVal = (output || [])
6358
5367
  .filter((e) => e != null)
6359
5368
  .map((entry) => {
6360
5369
  if (entry === null) {
@@ -6362,9 +5371,10 @@ const deserializeAws_restJson1__listOfHlsCaptionLanguageMapping = (output, conte
6362
5371
  }
6363
5372
  return deserializeAws_restJson1HlsCaptionLanguageMapping(entry, context);
6364
5373
  });
5374
+ return retVal;
6365
5375
  };
6366
5376
  const deserializeAws_restJson1__listOfHopDestination = (output, context) => {
6367
- return (output || [])
5377
+ const retVal = (output || [])
6368
5378
  .filter((e) => e != null)
6369
5379
  .map((entry) => {
6370
5380
  if (entry === null) {
@@ -6372,9 +5382,10 @@ const deserializeAws_restJson1__listOfHopDestination = (output, context) => {
6372
5382
  }
6373
5383
  return deserializeAws_restJson1HopDestination(entry, context);
6374
5384
  });
5385
+ return retVal;
6375
5386
  };
6376
5387
  const deserializeAws_restJson1__listOfId3Insertion = (output, context) => {
6377
- return (output || [])
5388
+ const retVal = (output || [])
6378
5389
  .filter((e) => e != null)
6379
5390
  .map((entry) => {
6380
5391
  if (entry === null) {
@@ -6382,9 +5393,10 @@ const deserializeAws_restJson1__listOfId3Insertion = (output, context) => {
6382
5393
  }
6383
5394
  return deserializeAws_restJson1Id3Insertion(entry, context);
6384
5395
  });
5396
+ return retVal;
6385
5397
  };
6386
5398
  const deserializeAws_restJson1__listOfInput = (output, context) => {
6387
- return (output || [])
5399
+ const retVal = (output || [])
6388
5400
  .filter((e) => e != null)
6389
5401
  .map((entry) => {
6390
5402
  if (entry === null) {
@@ -6392,9 +5404,10 @@ const deserializeAws_restJson1__listOfInput = (output, context) => {
6392
5404
  }
6393
5405
  return deserializeAws_restJson1Input(entry, context);
6394
5406
  });
5407
+ return retVal;
6395
5408
  };
6396
5409
  const deserializeAws_restJson1__listOfInputClipping = (output, context) => {
6397
- return (output || [])
5410
+ const retVal = (output || [])
6398
5411
  .filter((e) => e != null)
6399
5412
  .map((entry) => {
6400
5413
  if (entry === null) {
@@ -6402,9 +5415,10 @@ const deserializeAws_restJson1__listOfInputClipping = (output, context) => {
6402
5415
  }
6403
5416
  return deserializeAws_restJson1InputClipping(entry, context);
6404
5417
  });
5418
+ return retVal;
6405
5419
  };
6406
5420
  const deserializeAws_restJson1__listOfInputTemplate = (output, context) => {
6407
- return (output || [])
5421
+ const retVal = (output || [])
6408
5422
  .filter((e) => e != null)
6409
5423
  .map((entry) => {
6410
5424
  if (entry === null) {
@@ -6412,9 +5426,10 @@ const deserializeAws_restJson1__listOfInputTemplate = (output, context) => {
6412
5426
  }
6413
5427
  return deserializeAws_restJson1InputTemplate(entry, context);
6414
5428
  });
5429
+ return retVal;
6415
5430
  };
6416
5431
  const deserializeAws_restJson1__listOfInsertableImage = (output, context) => {
6417
- return (output || [])
5432
+ const retVal = (output || [])
6418
5433
  .filter((e) => e != null)
6419
5434
  .map((entry) => {
6420
5435
  if (entry === null) {
@@ -6422,9 +5437,10 @@ const deserializeAws_restJson1__listOfInsertableImage = (output, context) => {
6422
5437
  }
6423
5438
  return deserializeAws_restJson1InsertableImage(entry, context);
6424
5439
  });
5440
+ return retVal;
6425
5441
  };
6426
5442
  const deserializeAws_restJson1__listOfJob = (output, context) => {
6427
- return (output || [])
5443
+ const retVal = (output || [])
6428
5444
  .filter((e) => e != null)
6429
5445
  .map((entry) => {
6430
5446
  if (entry === null) {
@@ -6432,9 +5448,10 @@ const deserializeAws_restJson1__listOfJob = (output, context) => {
6432
5448
  }
6433
5449
  return deserializeAws_restJson1Job(entry, context);
6434
5450
  });
5451
+ return retVal;
6435
5452
  };
6436
5453
  const deserializeAws_restJson1__listOfJobTemplate = (output, context) => {
6437
- return (output || [])
5454
+ const retVal = (output || [])
6438
5455
  .filter((e) => e != null)
6439
5456
  .map((entry) => {
6440
5457
  if (entry === null) {
@@ -6442,9 +5459,10 @@ const deserializeAws_restJson1__listOfJobTemplate = (output, context) => {
6442
5459
  }
6443
5460
  return deserializeAws_restJson1JobTemplate(entry, context);
6444
5461
  });
5462
+ return retVal;
6445
5463
  };
6446
5464
  const deserializeAws_restJson1__listOfMsSmoothAdditionalManifest = (output, context) => {
6447
- return (output || [])
5465
+ const retVal = (output || [])
6448
5466
  .filter((e) => e != null)
6449
5467
  .map((entry) => {
6450
5468
  if (entry === null) {
@@ -6452,9 +5470,10 @@ const deserializeAws_restJson1__listOfMsSmoothAdditionalManifest = (output, cont
6452
5470
  }
6453
5471
  return deserializeAws_restJson1MsSmoothAdditionalManifest(entry, context);
6454
5472
  });
5473
+ return retVal;
6455
5474
  };
6456
5475
  const deserializeAws_restJson1__listOfOutput = (output, context) => {
6457
- return (output || [])
5476
+ const retVal = (output || [])
6458
5477
  .filter((e) => e != null)
6459
5478
  .map((entry) => {
6460
5479
  if (entry === null) {
@@ -6462,9 +5481,10 @@ const deserializeAws_restJson1__listOfOutput = (output, context) => {
6462
5481
  }
6463
5482
  return deserializeAws_restJson1Output(entry, context);
6464
5483
  });
5484
+ return retVal;
6465
5485
  };
6466
5486
  const deserializeAws_restJson1__listOfOutputChannelMapping = (output, context) => {
6467
- return (output || [])
5487
+ const retVal = (output || [])
6468
5488
  .filter((e) => e != null)
6469
5489
  .map((entry) => {
6470
5490
  if (entry === null) {
@@ -6472,9 +5492,10 @@ const deserializeAws_restJson1__listOfOutputChannelMapping = (output, context) =
6472
5492
  }
6473
5493
  return deserializeAws_restJson1OutputChannelMapping(entry, context);
6474
5494
  });
5495
+ return retVal;
6475
5496
  };
6476
5497
  const deserializeAws_restJson1__listOfOutputDetail = (output, context) => {
6477
- return (output || [])
5498
+ const retVal = (output || [])
6478
5499
  .filter((e) => e != null)
6479
5500
  .map((entry) => {
6480
5501
  if (entry === null) {
@@ -6482,9 +5503,10 @@ const deserializeAws_restJson1__listOfOutputDetail = (output, context) => {
6482
5503
  }
6483
5504
  return deserializeAws_restJson1OutputDetail(entry, context);
6484
5505
  });
5506
+ return retVal;
6485
5507
  };
6486
5508
  const deserializeAws_restJson1__listOfOutputGroup = (output, context) => {
6487
- return (output || [])
5509
+ const retVal = (output || [])
6488
5510
  .filter((e) => e != null)
6489
5511
  .map((entry) => {
6490
5512
  if (entry === null) {
@@ -6492,9 +5514,10 @@ const deserializeAws_restJson1__listOfOutputGroup = (output, context) => {
6492
5514
  }
6493
5515
  return deserializeAws_restJson1OutputGroup(entry, context);
6494
5516
  });
5517
+ return retVal;
6495
5518
  };
6496
5519
  const deserializeAws_restJson1__listOfOutputGroupDetail = (output, context) => {
6497
- return (output || [])
5520
+ const retVal = (output || [])
6498
5521
  .filter((e) => e != null)
6499
5522
  .map((entry) => {
6500
5523
  if (entry === null) {
@@ -6502,9 +5525,10 @@ const deserializeAws_restJson1__listOfOutputGroupDetail = (output, context) => {
6502
5525
  }
6503
5526
  return deserializeAws_restJson1OutputGroupDetail(entry, context);
6504
5527
  });
5528
+ return retVal;
6505
5529
  };
6506
5530
  const deserializeAws_restJson1__listOfPreset = (output, context) => {
6507
- return (output || [])
5531
+ const retVal = (output || [])
6508
5532
  .filter((e) => e != null)
6509
5533
  .map((entry) => {
6510
5534
  if (entry === null) {
@@ -6512,9 +5536,10 @@ const deserializeAws_restJson1__listOfPreset = (output, context) => {
6512
5536
  }
6513
5537
  return deserializeAws_restJson1Preset(entry, context);
6514
5538
  });
5539
+ return retVal;
6515
5540
  };
6516
5541
  const deserializeAws_restJson1__listOfQueue = (output, context) => {
6517
- return (output || [])
5542
+ const retVal = (output || [])
6518
5543
  .filter((e) => e != null)
6519
5544
  .map((entry) => {
6520
5545
  if (entry === null) {
@@ -6522,9 +5547,10 @@ const deserializeAws_restJson1__listOfQueue = (output, context) => {
6522
5547
  }
6523
5548
  return deserializeAws_restJson1Queue(entry, context);
6524
5549
  });
5550
+ return retVal;
6525
5551
  };
6526
5552
  const deserializeAws_restJson1__listOfQueueTransition = (output, context) => {
6527
- return (output || [])
5553
+ const retVal = (output || [])
6528
5554
  .filter((e) => e != null)
6529
5555
  .map((entry) => {
6530
5556
  if (entry === null) {
@@ -6532,9 +5558,10 @@ const deserializeAws_restJson1__listOfQueueTransition = (output, context) => {
6532
5558
  }
6533
5559
  return deserializeAws_restJson1QueueTransition(entry, context);
6534
5560
  });
5561
+ return retVal;
6535
5562
  };
6536
5563
  const deserializeAws_restJson1__listOfTeletextPageType = (output, context) => {
6537
- return (output || [])
5564
+ const retVal = (output || [])
6538
5565
  .filter((e) => e != null)
6539
5566
  .map((entry) => {
6540
5567
  if (entry === null) {
@@ -6542,6 +5569,7 @@ const deserializeAws_restJson1__listOfTeletextPageType = (output, context) => {
6542
5569
  }
6543
5570
  return smithy_client_1.expectString(entry);
6544
5571
  });
5572
+ return retVal;
6545
5573
  };
6546
5574
  const deserializeAws_restJson1__mapOf__string = (output, context) => {
6547
5575
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -7488,6 +6516,7 @@ const deserializeAws_restJson1HlsGroupSettings = (output, context) => {
7488
6516
  ? deserializeAws_restJson1__listOfHlsCaptionLanguageMapping(output.captionLanguageMappings, context)
7489
6517
  : undefined,
7490
6518
  CaptionLanguageSetting: smithy_client_1.expectString(output.captionLanguageSetting),
6519
+ CaptionSegmentLengthControl: smithy_client_1.expectString(output.captionSegmentLengthControl),
7491
6520
  ClientCache: smithy_client_1.expectString(output.clientCache),
7492
6521
  CodecSpecification: smithy_client_1.expectString(output.codecSpecification),
7493
6522
  Destination: smithy_client_1.expectString(output.destination),
@@ -8634,6 +7663,7 @@ const deserializeAws_restJson1VideoSelector = (output, context) => {
8634
7663
  AlphaBehavior: smithy_client_1.expectString(output.alphaBehavior),
8635
7664
  ColorSpace: smithy_client_1.expectString(output.colorSpace),
8636
7665
  ColorSpaceUsage: smithy_client_1.expectString(output.colorSpaceUsage),
7666
+ EmbeddedTimecodeOverride: smithy_client_1.expectString(output.embeddedTimecodeOverride),
8637
7667
  Hdr10Metadata: output.hdr10Metadata !== undefined && output.hdr10Metadata !== null
8638
7668
  ? deserializeAws_restJson1Hdr10Metadata(output.hdr10Metadata, context)
8639
7669
  : undefined,