@aws-sdk/client-frauddetector 3.118.1 → 3.128.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -706,8 +706,7 @@ const deserializeAws_json1_1BatchCreateVariableCommandError = async (output, con
706
706
  body: await parseBody(output.body, context),
707
707
  };
708
708
  let response;
709
- let errorCode = "UnknownError";
710
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
709
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
711
710
  switch (errorCode) {
712
711
  case "AccessDeniedException":
713
712
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -723,10 +722,12 @@ const deserializeAws_json1_1BatchCreateVariableCommandError = async (output, con
723
722
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
724
723
  default:
725
724
  const parsedBody = parsedOutput.body;
725
+ const $metadata = deserializeMetadata(output);
726
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
726
727
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
727
- name: parsedBody.code || parsedBody.Code || errorCode,
728
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
728
729
  $fault: "client",
729
- $metadata: deserializeMetadata(output),
730
+ $metadata,
730
731
  });
731
732
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
732
733
  }
@@ -751,8 +752,7 @@ const deserializeAws_json1_1BatchGetVariableCommandError = async (output, contex
751
752
  body: await parseBody(output.body, context),
752
753
  };
753
754
  let response;
754
- let errorCode = "UnknownError";
755
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
755
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
756
756
  switch (errorCode) {
757
757
  case "AccessDeniedException":
758
758
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -768,10 +768,12 @@ const deserializeAws_json1_1BatchGetVariableCommandError = async (output, contex
768
768
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
769
769
  default:
770
770
  const parsedBody = parsedOutput.body;
771
+ const $metadata = deserializeMetadata(output);
772
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
771
773
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
772
- name: parsedBody.code || parsedBody.Code || errorCode,
774
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
773
775
  $fault: "client",
774
- $metadata: deserializeMetadata(output),
776
+ $metadata,
775
777
  });
776
778
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
777
779
  }
@@ -796,8 +798,7 @@ const deserializeAws_json1_1CancelBatchImportJobCommandError = async (output, co
796
798
  body: await parseBody(output.body, context),
797
799
  };
798
800
  let response;
799
- let errorCode = "UnknownError";
800
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
801
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
801
802
  switch (errorCode) {
802
803
  case "AccessDeniedException":
803
804
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -816,10 +817,12 @@ const deserializeAws_json1_1CancelBatchImportJobCommandError = async (output, co
816
817
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
817
818
  default:
818
819
  const parsedBody = parsedOutput.body;
820
+ const $metadata = deserializeMetadata(output);
821
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
819
822
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
820
- name: parsedBody.code || parsedBody.Code || errorCode,
823
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
821
824
  $fault: "client",
822
- $metadata: deserializeMetadata(output),
825
+ $metadata,
823
826
  });
824
827
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
825
828
  }
@@ -844,8 +847,7 @@ const deserializeAws_json1_1CancelBatchPredictionJobCommandError = async (output
844
847
  body: await parseBody(output.body, context),
845
848
  };
846
849
  let response;
847
- let errorCode = "UnknownError";
848
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
850
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
849
851
  switch (errorCode) {
850
852
  case "AccessDeniedException":
851
853
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -864,10 +866,12 @@ const deserializeAws_json1_1CancelBatchPredictionJobCommandError = async (output
864
866
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
865
867
  default:
866
868
  const parsedBody = parsedOutput.body;
869
+ const $metadata = deserializeMetadata(output);
870
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
867
871
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
868
- name: parsedBody.code || parsedBody.Code || errorCode,
872
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
869
873
  $fault: "client",
870
- $metadata: deserializeMetadata(output),
874
+ $metadata,
871
875
  });
872
876
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
873
877
  }
@@ -892,8 +896,7 @@ const deserializeAws_json1_1CreateBatchImportJobCommandError = async (output, co
892
896
  body: await parseBody(output.body, context),
893
897
  };
894
898
  let response;
895
- let errorCode = "UnknownError";
896
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
899
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
900
  switch (errorCode) {
898
901
  case "AccessDeniedException":
899
902
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -912,10 +915,12 @@ const deserializeAws_json1_1CreateBatchImportJobCommandError = async (output, co
912
915
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
913
916
  default:
914
917
  const parsedBody = parsedOutput.body;
918
+ const $metadata = deserializeMetadata(output);
919
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
915
920
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
916
- name: parsedBody.code || parsedBody.Code || errorCode,
921
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
917
922
  $fault: "client",
918
- $metadata: deserializeMetadata(output),
923
+ $metadata,
919
924
  });
920
925
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
921
926
  }
@@ -940,8 +945,7 @@ const deserializeAws_json1_1CreateBatchPredictionJobCommandError = async (output
940
945
  body: await parseBody(output.body, context),
941
946
  };
942
947
  let response;
943
- let errorCode = "UnknownError";
944
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
948
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
945
949
  switch (errorCode) {
946
950
  case "AccessDeniedException":
947
951
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -960,10 +964,12 @@ const deserializeAws_json1_1CreateBatchPredictionJobCommandError = async (output
960
964
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
961
965
  default:
962
966
  const parsedBody = parsedOutput.body;
967
+ const $metadata = deserializeMetadata(output);
968
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
963
969
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
964
- name: parsedBody.code || parsedBody.Code || errorCode,
970
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
965
971
  $fault: "client",
966
- $metadata: deserializeMetadata(output),
972
+ $metadata,
967
973
  });
968
974
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
969
975
  }
@@ -988,8 +994,7 @@ const deserializeAws_json1_1CreateDetectorVersionCommandError = async (output, c
988
994
  body: await parseBody(output.body, context),
989
995
  };
990
996
  let response;
991
- let errorCode = "UnknownError";
992
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
997
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
993
998
  switch (errorCode) {
994
999
  case "AccessDeniedException":
995
1000
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1008,10 +1013,12 @@ const deserializeAws_json1_1CreateDetectorVersionCommandError = async (output, c
1008
1013
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1009
1014
  default:
1010
1015
  const parsedBody = parsedOutput.body;
1016
+ const $metadata = deserializeMetadata(output);
1017
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1011
1018
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1012
- name: parsedBody.code || parsedBody.Code || errorCode,
1019
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1013
1020
  $fault: "client",
1014
- $metadata: deserializeMetadata(output),
1021
+ $metadata,
1015
1022
  });
1016
1023
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1017
1024
  }
@@ -1036,8 +1043,7 @@ const deserializeAws_json1_1CreateModelCommandError = async (output, context) =>
1036
1043
  body: await parseBody(output.body, context),
1037
1044
  };
1038
1045
  let response;
1039
- let errorCode = "UnknownError";
1040
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1046
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1041
1047
  switch (errorCode) {
1042
1048
  case "AccessDeniedException":
1043
1049
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1053,10 +1059,12 @@ const deserializeAws_json1_1CreateModelCommandError = async (output, context) =>
1053
1059
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1054
1060
  default:
1055
1061
  const parsedBody = parsedOutput.body;
1062
+ const $metadata = deserializeMetadata(output);
1063
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1056
1064
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1057
- name: parsedBody.code || parsedBody.Code || errorCode,
1065
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1058
1066
  $fault: "client",
1059
- $metadata: deserializeMetadata(output),
1067
+ $metadata,
1060
1068
  });
1061
1069
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1062
1070
  }
@@ -1081,8 +1089,7 @@ const deserializeAws_json1_1CreateModelVersionCommandError = async (output, cont
1081
1089
  body: await parseBody(output.body, context),
1082
1090
  };
1083
1091
  let response;
1084
- let errorCode = "UnknownError";
1085
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1092
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1086
1093
  switch (errorCode) {
1087
1094
  case "AccessDeniedException":
1088
1095
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1101,10 +1108,12 @@ const deserializeAws_json1_1CreateModelVersionCommandError = async (output, cont
1101
1108
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1102
1109
  default:
1103
1110
  const parsedBody = parsedOutput.body;
1111
+ const $metadata = deserializeMetadata(output);
1112
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1104
1113
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1105
- name: parsedBody.code || parsedBody.Code || errorCode,
1114
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1106
1115
  $fault: "client",
1107
- $metadata: deserializeMetadata(output),
1116
+ $metadata,
1108
1117
  });
1109
1118
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1110
1119
  }
@@ -1129,8 +1138,7 @@ const deserializeAws_json1_1CreateRuleCommandError = async (output, context) =>
1129
1138
  body: await parseBody(output.body, context),
1130
1139
  };
1131
1140
  let response;
1132
- let errorCode = "UnknownError";
1133
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1141
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1134
1142
  switch (errorCode) {
1135
1143
  case "AccessDeniedException":
1136
1144
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1146,10 +1154,12 @@ const deserializeAws_json1_1CreateRuleCommandError = async (output, context) =>
1146
1154
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1147
1155
  default:
1148
1156
  const parsedBody = parsedOutput.body;
1157
+ const $metadata = deserializeMetadata(output);
1158
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1149
1159
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1150
- name: parsedBody.code || parsedBody.Code || errorCode,
1160
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1151
1161
  $fault: "client",
1152
- $metadata: deserializeMetadata(output),
1162
+ $metadata,
1153
1163
  });
1154
1164
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1155
1165
  }
@@ -1174,8 +1184,7 @@ const deserializeAws_json1_1CreateVariableCommandError = async (output, context)
1174
1184
  body: await parseBody(output.body, context),
1175
1185
  };
1176
1186
  let response;
1177
- let errorCode = "UnknownError";
1178
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1187
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1179
1188
  switch (errorCode) {
1180
1189
  case "AccessDeniedException":
1181
1190
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1191,10 +1200,12 @@ const deserializeAws_json1_1CreateVariableCommandError = async (output, context)
1191
1200
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1192
1201
  default:
1193
1202
  const parsedBody = parsedOutput.body;
1203
+ const $metadata = deserializeMetadata(output);
1204
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1194
1205
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1195
- name: parsedBody.code || parsedBody.Code || errorCode,
1206
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1196
1207
  $fault: "client",
1197
- $metadata: deserializeMetadata(output),
1208
+ $metadata,
1198
1209
  });
1199
1210
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1200
1211
  }
@@ -1219,8 +1230,7 @@ const deserializeAws_json1_1DeleteBatchImportJobCommandError = async (output, co
1219
1230
  body: await parseBody(output.body, context),
1220
1231
  };
1221
1232
  let response;
1222
- let errorCode = "UnknownError";
1223
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1233
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1224
1234
  switch (errorCode) {
1225
1235
  case "AccessDeniedException":
1226
1236
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1236,10 +1246,12 @@ const deserializeAws_json1_1DeleteBatchImportJobCommandError = async (output, co
1236
1246
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1237
1247
  default:
1238
1248
  const parsedBody = parsedOutput.body;
1249
+ const $metadata = deserializeMetadata(output);
1250
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1239
1251
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1240
- name: parsedBody.code || parsedBody.Code || errorCode,
1252
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1241
1253
  $fault: "client",
1242
- $metadata: deserializeMetadata(output),
1254
+ $metadata,
1243
1255
  });
1244
1256
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1245
1257
  }
@@ -1264,8 +1276,7 @@ const deserializeAws_json1_1DeleteBatchPredictionJobCommandError = async (output
1264
1276
  body: await parseBody(output.body, context),
1265
1277
  };
1266
1278
  let response;
1267
- let errorCode = "UnknownError";
1268
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1279
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1269
1280
  switch (errorCode) {
1270
1281
  case "AccessDeniedException":
1271
1282
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1281,10 +1292,12 @@ const deserializeAws_json1_1DeleteBatchPredictionJobCommandError = async (output
1281
1292
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1282
1293
  default:
1283
1294
  const parsedBody = parsedOutput.body;
1295
+ const $metadata = deserializeMetadata(output);
1296
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1284
1297
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1285
- name: parsedBody.code || parsedBody.Code || errorCode,
1298
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1286
1299
  $fault: "client",
1287
- $metadata: deserializeMetadata(output),
1300
+ $metadata,
1288
1301
  });
1289
1302
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1290
1303
  }
@@ -1309,8 +1322,7 @@ const deserializeAws_json1_1DeleteDetectorCommandError = async (output, context)
1309
1322
  body: await parseBody(output.body, context),
1310
1323
  };
1311
1324
  let response;
1312
- let errorCode = "UnknownError";
1313
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1325
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1314
1326
  switch (errorCode) {
1315
1327
  case "AccessDeniedException":
1316
1328
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1329,10 +1341,12 @@ const deserializeAws_json1_1DeleteDetectorCommandError = async (output, context)
1329
1341
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1330
1342
  default:
1331
1343
  const parsedBody = parsedOutput.body;
1344
+ const $metadata = deserializeMetadata(output);
1345
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1332
1346
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1333
- name: parsedBody.code || parsedBody.Code || errorCode,
1347
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1334
1348
  $fault: "client",
1335
- $metadata: deserializeMetadata(output),
1349
+ $metadata,
1336
1350
  });
1337
1351
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1338
1352
  }
@@ -1357,8 +1371,7 @@ const deserializeAws_json1_1DeleteDetectorVersionCommandError = async (output, c
1357
1371
  body: await parseBody(output.body, context),
1358
1372
  };
1359
1373
  let response;
1360
- let errorCode = "UnknownError";
1361
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1374
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1362
1375
  switch (errorCode) {
1363
1376
  case "AccessDeniedException":
1364
1377
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1380,10 +1393,12 @@ const deserializeAws_json1_1DeleteDetectorVersionCommandError = async (output, c
1380
1393
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1381
1394
  default:
1382
1395
  const parsedBody = parsedOutput.body;
1396
+ const $metadata = deserializeMetadata(output);
1397
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1383
1398
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1384
- name: parsedBody.code || parsedBody.Code || errorCode,
1399
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1385
1400
  $fault: "client",
1386
- $metadata: deserializeMetadata(output),
1401
+ $metadata,
1387
1402
  });
1388
1403
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1389
1404
  }
@@ -1408,8 +1423,7 @@ const deserializeAws_json1_1DeleteEntityTypeCommandError = async (output, contex
1408
1423
  body: await parseBody(output.body, context),
1409
1424
  };
1410
1425
  let response;
1411
- let errorCode = "UnknownError";
1412
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1426
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1413
1427
  switch (errorCode) {
1414
1428
  case "AccessDeniedException":
1415
1429
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1428,10 +1442,12 @@ const deserializeAws_json1_1DeleteEntityTypeCommandError = async (output, contex
1428
1442
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1429
1443
  default:
1430
1444
  const parsedBody = parsedOutput.body;
1445
+ const $metadata = deserializeMetadata(output);
1446
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1431
1447
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1432
- name: parsedBody.code || parsedBody.Code || errorCode,
1448
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1433
1449
  $fault: "client",
1434
- $metadata: deserializeMetadata(output),
1450
+ $metadata,
1435
1451
  });
1436
1452
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1437
1453
  }
@@ -1456,8 +1472,7 @@ const deserializeAws_json1_1DeleteEventCommandError = async (output, context) =>
1456
1472
  body: await parseBody(output.body, context),
1457
1473
  };
1458
1474
  let response;
1459
- let errorCode = "UnknownError";
1460
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1475
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1461
1476
  switch (errorCode) {
1462
1477
  case "AccessDeniedException":
1463
1478
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1473,10 +1488,12 @@ const deserializeAws_json1_1DeleteEventCommandError = async (output, context) =>
1473
1488
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1474
1489
  default:
1475
1490
  const parsedBody = parsedOutput.body;
1491
+ const $metadata = deserializeMetadata(output);
1492
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1476
1493
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1477
- name: parsedBody.code || parsedBody.Code || errorCode,
1494
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1478
1495
  $fault: "client",
1479
- $metadata: deserializeMetadata(output),
1496
+ $metadata,
1480
1497
  });
1481
1498
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1482
1499
  }
@@ -1501,8 +1518,7 @@ const deserializeAws_json1_1DeleteEventsByEventTypeCommandError = async (output,
1501
1518
  body: await parseBody(output.body, context),
1502
1519
  };
1503
1520
  let response;
1504
- let errorCode = "UnknownError";
1505
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1521
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1506
1522
  switch (errorCode) {
1507
1523
  case "AccessDeniedException":
1508
1524
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1524,10 +1540,12 @@ const deserializeAws_json1_1DeleteEventsByEventTypeCommandError = async (output,
1524
1540
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1525
1541
  default:
1526
1542
  const parsedBody = parsedOutput.body;
1543
+ const $metadata = deserializeMetadata(output);
1544
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1527
1545
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1528
- name: parsedBody.code || parsedBody.Code || errorCode,
1546
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1529
1547
  $fault: "client",
1530
- $metadata: deserializeMetadata(output),
1548
+ $metadata,
1531
1549
  });
1532
1550
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1533
1551
  }
@@ -1552,8 +1570,7 @@ const deserializeAws_json1_1DeleteEventTypeCommandError = async (output, context
1552
1570
  body: await parseBody(output.body, context),
1553
1571
  };
1554
1572
  let response;
1555
- let errorCode = "UnknownError";
1556
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1573
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1557
1574
  switch (errorCode) {
1558
1575
  case "AccessDeniedException":
1559
1576
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1572,10 +1589,12 @@ const deserializeAws_json1_1DeleteEventTypeCommandError = async (output, context
1572
1589
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1573
1590
  default:
1574
1591
  const parsedBody = parsedOutput.body;
1592
+ const $metadata = deserializeMetadata(output);
1593
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1575
1594
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1576
- name: parsedBody.code || parsedBody.Code || errorCode,
1595
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1577
1596
  $fault: "client",
1578
- $metadata: deserializeMetadata(output),
1597
+ $metadata,
1579
1598
  });
1580
1599
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1581
1600
  }
@@ -1600,8 +1619,7 @@ const deserializeAws_json1_1DeleteExternalModelCommandError = async (output, con
1600
1619
  body: await parseBody(output.body, context),
1601
1620
  };
1602
1621
  let response;
1603
- let errorCode = "UnknownError";
1604
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1622
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1605
1623
  switch (errorCode) {
1606
1624
  case "AccessDeniedException":
1607
1625
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1620,10 +1638,12 @@ const deserializeAws_json1_1DeleteExternalModelCommandError = async (output, con
1620
1638
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1621
1639
  default:
1622
1640
  const parsedBody = parsedOutput.body;
1641
+ const $metadata = deserializeMetadata(output);
1642
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1623
1643
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1624
- name: parsedBody.code || parsedBody.Code || errorCode,
1644
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1625
1645
  $fault: "client",
1626
- $metadata: deserializeMetadata(output),
1646
+ $metadata,
1627
1647
  });
1628
1648
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1629
1649
  }
@@ -1648,8 +1668,7 @@ const deserializeAws_json1_1DeleteLabelCommandError = async (output, context) =>
1648
1668
  body: await parseBody(output.body, context),
1649
1669
  };
1650
1670
  let response;
1651
- let errorCode = "UnknownError";
1652
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1671
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1653
1672
  switch (errorCode) {
1654
1673
  case "ConflictException":
1655
1674
  case "com.amazonaws.frauddetector#ConflictException":
@@ -1665,10 +1684,12 @@ const deserializeAws_json1_1DeleteLabelCommandError = async (output, context) =>
1665
1684
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1666
1685
  default:
1667
1686
  const parsedBody = parsedOutput.body;
1687
+ const $metadata = deserializeMetadata(output);
1688
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1668
1689
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1669
- name: parsedBody.code || parsedBody.Code || errorCode,
1690
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1670
1691
  $fault: "client",
1671
- $metadata: deserializeMetadata(output),
1692
+ $metadata,
1672
1693
  });
1673
1694
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1674
1695
  }
@@ -1693,8 +1714,7 @@ const deserializeAws_json1_1DeleteModelCommandError = async (output, context) =>
1693
1714
  body: await parseBody(output.body, context),
1694
1715
  };
1695
1716
  let response;
1696
- let errorCode = "UnknownError";
1697
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1717
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1698
1718
  switch (errorCode) {
1699
1719
  case "AccessDeniedException":
1700
1720
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1713,10 +1733,12 @@ const deserializeAws_json1_1DeleteModelCommandError = async (output, context) =>
1713
1733
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1714
1734
  default:
1715
1735
  const parsedBody = parsedOutput.body;
1736
+ const $metadata = deserializeMetadata(output);
1737
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1716
1738
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1717
- name: parsedBody.code || parsedBody.Code || errorCode,
1739
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1718
1740
  $fault: "client",
1719
- $metadata: deserializeMetadata(output),
1741
+ $metadata,
1720
1742
  });
1721
1743
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1722
1744
  }
@@ -1741,8 +1763,7 @@ const deserializeAws_json1_1DeleteModelVersionCommandError = async (output, cont
1741
1763
  body: await parseBody(output.body, context),
1742
1764
  };
1743
1765
  let response;
1744
- let errorCode = "UnknownError";
1745
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1766
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1746
1767
  switch (errorCode) {
1747
1768
  case "AccessDeniedException":
1748
1769
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1761,10 +1782,12 @@ const deserializeAws_json1_1DeleteModelVersionCommandError = async (output, cont
1761
1782
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1762
1783
  default:
1763
1784
  const parsedBody = parsedOutput.body;
1785
+ const $metadata = deserializeMetadata(output);
1786
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1764
1787
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1765
- name: parsedBody.code || parsedBody.Code || errorCode,
1788
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1766
1789
  $fault: "client",
1767
- $metadata: deserializeMetadata(output),
1790
+ $metadata,
1768
1791
  });
1769
1792
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1770
1793
  }
@@ -1789,8 +1812,7 @@ const deserializeAws_json1_1DeleteOutcomeCommandError = async (output, context)
1789
1812
  body: await parseBody(output.body, context),
1790
1813
  };
1791
1814
  let response;
1792
- let errorCode = "UnknownError";
1793
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1815
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1794
1816
  switch (errorCode) {
1795
1817
  case "AccessDeniedException":
1796
1818
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1809,10 +1831,12 @@ const deserializeAws_json1_1DeleteOutcomeCommandError = async (output, context)
1809
1831
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1810
1832
  default:
1811
1833
  const parsedBody = parsedOutput.body;
1834
+ const $metadata = deserializeMetadata(output);
1835
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1812
1836
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1813
- name: parsedBody.code || parsedBody.Code || errorCode,
1837
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1814
1838
  $fault: "client",
1815
- $metadata: deserializeMetadata(output),
1839
+ $metadata,
1816
1840
  });
1817
1841
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1818
1842
  }
@@ -1837,8 +1861,7 @@ const deserializeAws_json1_1DeleteRuleCommandError = async (output, context) =>
1837
1861
  body: await parseBody(output.body, context),
1838
1862
  };
1839
1863
  let response;
1840
- let errorCode = "UnknownError";
1841
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1864
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1842
1865
  switch (errorCode) {
1843
1866
  case "AccessDeniedException":
1844
1867
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1857,10 +1880,12 @@ const deserializeAws_json1_1DeleteRuleCommandError = async (output, context) =>
1857
1880
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1858
1881
  default:
1859
1882
  const parsedBody = parsedOutput.body;
1883
+ const $metadata = deserializeMetadata(output);
1884
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1860
1885
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1861
- name: parsedBody.code || parsedBody.Code || errorCode,
1886
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1862
1887
  $fault: "client",
1863
- $metadata: deserializeMetadata(output),
1888
+ $metadata,
1864
1889
  });
1865
1890
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1866
1891
  }
@@ -1885,8 +1910,7 @@ const deserializeAws_json1_1DeleteVariableCommandError = async (output, context)
1885
1910
  body: await parseBody(output.body, context),
1886
1911
  };
1887
1912
  let response;
1888
- let errorCode = "UnknownError";
1889
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1913
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1890
1914
  switch (errorCode) {
1891
1915
  case "AccessDeniedException":
1892
1916
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1905,10 +1929,12 @@ const deserializeAws_json1_1DeleteVariableCommandError = async (output, context)
1905
1929
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1906
1930
  default:
1907
1931
  const parsedBody = parsedOutput.body;
1932
+ const $metadata = deserializeMetadata(output);
1933
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1908
1934
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1909
- name: parsedBody.code || parsedBody.Code || errorCode,
1935
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1910
1936
  $fault: "client",
1911
- $metadata: deserializeMetadata(output),
1937
+ $metadata,
1912
1938
  });
1913
1939
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1914
1940
  }
@@ -1933,8 +1959,7 @@ const deserializeAws_json1_1DescribeDetectorCommandError = async (output, contex
1933
1959
  body: await parseBody(output.body, context),
1934
1960
  };
1935
1961
  let response;
1936
- let errorCode = "UnknownError";
1937
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1962
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1938
1963
  switch (errorCode) {
1939
1964
  case "AccessDeniedException":
1940
1965
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -1953,10 +1978,12 @@ const deserializeAws_json1_1DescribeDetectorCommandError = async (output, contex
1953
1978
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
1954
1979
  default:
1955
1980
  const parsedBody = parsedOutput.body;
1981
+ const $metadata = deserializeMetadata(output);
1982
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1956
1983
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
1957
- name: parsedBody.code || parsedBody.Code || errorCode,
1984
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1958
1985
  $fault: "client",
1959
- $metadata: deserializeMetadata(output),
1986
+ $metadata,
1960
1987
  });
1961
1988
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1962
1989
  }
@@ -1981,8 +2008,7 @@ const deserializeAws_json1_1DescribeModelVersionsCommandError = async (output, c
1981
2008
  body: await parseBody(output.body, context),
1982
2009
  };
1983
2010
  let response;
1984
- let errorCode = "UnknownError";
1985
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2011
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1986
2012
  switch (errorCode) {
1987
2013
  case "AccessDeniedException":
1988
2014
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2001,10 +2027,12 @@ const deserializeAws_json1_1DescribeModelVersionsCommandError = async (output, c
2001
2027
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2002
2028
  default:
2003
2029
  const parsedBody = parsedOutput.body;
2030
+ const $metadata = deserializeMetadata(output);
2031
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2004
2032
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2005
- name: parsedBody.code || parsedBody.Code || errorCode,
2033
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2006
2034
  $fault: "client",
2007
- $metadata: deserializeMetadata(output),
2035
+ $metadata,
2008
2036
  });
2009
2037
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2010
2038
  }
@@ -2029,8 +2057,7 @@ const deserializeAws_json1_1GetBatchImportJobsCommandError = async (output, cont
2029
2057
  body: await parseBody(output.body, context),
2030
2058
  };
2031
2059
  let response;
2032
- let errorCode = "UnknownError";
2033
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2060
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2034
2061
  switch (errorCode) {
2035
2062
  case "AccessDeniedException":
2036
2063
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2049,10 +2076,12 @@ const deserializeAws_json1_1GetBatchImportJobsCommandError = async (output, cont
2049
2076
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2050
2077
  default:
2051
2078
  const parsedBody = parsedOutput.body;
2079
+ const $metadata = deserializeMetadata(output);
2080
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2052
2081
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2053
- name: parsedBody.code || parsedBody.Code || errorCode,
2082
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2054
2083
  $fault: "client",
2055
- $metadata: deserializeMetadata(output),
2084
+ $metadata,
2056
2085
  });
2057
2086
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2058
2087
  }
@@ -2077,8 +2106,7 @@ const deserializeAws_json1_1GetBatchPredictionJobsCommandError = async (output,
2077
2106
  body: await parseBody(output.body, context),
2078
2107
  };
2079
2108
  let response;
2080
- let errorCode = "UnknownError";
2081
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2109
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2082
2110
  switch (errorCode) {
2083
2111
  case "AccessDeniedException":
2084
2112
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2097,10 +2125,12 @@ const deserializeAws_json1_1GetBatchPredictionJobsCommandError = async (output,
2097
2125
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2098
2126
  default:
2099
2127
  const parsedBody = parsedOutput.body;
2128
+ const $metadata = deserializeMetadata(output);
2129
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2100
2130
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2101
- name: parsedBody.code || parsedBody.Code || errorCode,
2131
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2102
2132
  $fault: "client",
2103
- $metadata: deserializeMetadata(output),
2133
+ $metadata,
2104
2134
  });
2105
2135
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2106
2136
  }
@@ -2125,8 +2155,7 @@ const deserializeAws_json1_1GetDeleteEventsByEventTypeStatusCommandError = async
2125
2155
  body: await parseBody(output.body, context),
2126
2156
  };
2127
2157
  let response;
2128
- let errorCode = "UnknownError";
2129
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2158
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2130
2159
  switch (errorCode) {
2131
2160
  case "AccessDeniedException":
2132
2161
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2145,10 +2174,12 @@ const deserializeAws_json1_1GetDeleteEventsByEventTypeStatusCommandError = async
2145
2174
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2146
2175
  default:
2147
2176
  const parsedBody = parsedOutput.body;
2177
+ const $metadata = deserializeMetadata(output);
2178
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2148
2179
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2149
- name: parsedBody.code || parsedBody.Code || errorCode,
2180
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2150
2181
  $fault: "client",
2151
- $metadata: deserializeMetadata(output),
2182
+ $metadata,
2152
2183
  });
2153
2184
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2154
2185
  }
@@ -2173,8 +2204,7 @@ const deserializeAws_json1_1GetDetectorsCommandError = async (output, context) =
2173
2204
  body: await parseBody(output.body, context),
2174
2205
  };
2175
2206
  let response;
2176
- let errorCode = "UnknownError";
2177
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2207
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2178
2208
  switch (errorCode) {
2179
2209
  case "AccessDeniedException":
2180
2210
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2193,10 +2223,12 @@ const deserializeAws_json1_1GetDetectorsCommandError = async (output, context) =
2193
2223
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2194
2224
  default:
2195
2225
  const parsedBody = parsedOutput.body;
2226
+ const $metadata = deserializeMetadata(output);
2227
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2196
2228
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2197
- name: parsedBody.code || parsedBody.Code || errorCode,
2229
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2198
2230
  $fault: "client",
2199
- $metadata: deserializeMetadata(output),
2231
+ $metadata,
2200
2232
  });
2201
2233
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2202
2234
  }
@@ -2221,8 +2253,7 @@ const deserializeAws_json1_1GetDetectorVersionCommandError = async (output, cont
2221
2253
  body: await parseBody(output.body, context),
2222
2254
  };
2223
2255
  let response;
2224
- let errorCode = "UnknownError";
2225
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2256
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2226
2257
  switch (errorCode) {
2227
2258
  case "AccessDeniedException":
2228
2259
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2241,10 +2272,12 @@ const deserializeAws_json1_1GetDetectorVersionCommandError = async (output, cont
2241
2272
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2242
2273
  default:
2243
2274
  const parsedBody = parsedOutput.body;
2275
+ const $metadata = deserializeMetadata(output);
2276
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2244
2277
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2245
- name: parsedBody.code || parsedBody.Code || errorCode,
2278
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2246
2279
  $fault: "client",
2247
- $metadata: deserializeMetadata(output),
2280
+ $metadata,
2248
2281
  });
2249
2282
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2250
2283
  }
@@ -2269,8 +2302,7 @@ const deserializeAws_json1_1GetEntityTypesCommandError = async (output, context)
2269
2302
  body: await parseBody(output.body, context),
2270
2303
  };
2271
2304
  let response;
2272
- let errorCode = "UnknownError";
2273
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2305
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2274
2306
  switch (errorCode) {
2275
2307
  case "AccessDeniedException":
2276
2308
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2289,10 +2321,12 @@ const deserializeAws_json1_1GetEntityTypesCommandError = async (output, context)
2289
2321
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2290
2322
  default:
2291
2323
  const parsedBody = parsedOutput.body;
2324
+ const $metadata = deserializeMetadata(output);
2325
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2292
2326
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2293
- name: parsedBody.code || parsedBody.Code || errorCode,
2327
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2294
2328
  $fault: "client",
2295
- $metadata: deserializeMetadata(output),
2329
+ $metadata,
2296
2330
  });
2297
2331
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2298
2332
  }
@@ -2317,8 +2351,7 @@ const deserializeAws_json1_1GetEventCommandError = async (output, context) => {
2317
2351
  body: await parseBody(output.body, context),
2318
2352
  };
2319
2353
  let response;
2320
- let errorCode = "UnknownError";
2321
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2354
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2322
2355
  switch (errorCode) {
2323
2356
  case "AccessDeniedException":
2324
2357
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2337,10 +2370,12 @@ const deserializeAws_json1_1GetEventCommandError = async (output, context) => {
2337
2370
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2338
2371
  default:
2339
2372
  const parsedBody = parsedOutput.body;
2373
+ const $metadata = deserializeMetadata(output);
2374
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2340
2375
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2341
- name: parsedBody.code || parsedBody.Code || errorCode,
2376
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2342
2377
  $fault: "client",
2343
- $metadata: deserializeMetadata(output),
2378
+ $metadata,
2344
2379
  });
2345
2380
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2346
2381
  }
@@ -2365,8 +2400,7 @@ const deserializeAws_json1_1GetEventPredictionCommandError = async (output, cont
2365
2400
  body: await parseBody(output.body, context),
2366
2401
  };
2367
2402
  let response;
2368
- let errorCode = "UnknownError";
2369
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2403
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2370
2404
  switch (errorCode) {
2371
2405
  case "AccessDeniedException":
2372
2406
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2391,10 +2425,12 @@ const deserializeAws_json1_1GetEventPredictionCommandError = async (output, cont
2391
2425
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2392
2426
  default:
2393
2427
  const parsedBody = parsedOutput.body;
2428
+ const $metadata = deserializeMetadata(output);
2429
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2394
2430
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2395
- name: parsedBody.code || parsedBody.Code || errorCode,
2431
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2396
2432
  $fault: "client",
2397
- $metadata: deserializeMetadata(output),
2433
+ $metadata,
2398
2434
  });
2399
2435
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2400
2436
  }
@@ -2419,8 +2455,7 @@ const deserializeAws_json1_1GetEventPredictionMetadataCommandError = async (outp
2419
2455
  body: await parseBody(output.body, context),
2420
2456
  };
2421
2457
  let response;
2422
- let errorCode = "UnknownError";
2423
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2458
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2424
2459
  switch (errorCode) {
2425
2460
  case "AccessDeniedException":
2426
2461
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2439,10 +2474,12 @@ const deserializeAws_json1_1GetEventPredictionMetadataCommandError = async (outp
2439
2474
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2440
2475
  default:
2441
2476
  const parsedBody = parsedOutput.body;
2477
+ const $metadata = deserializeMetadata(output);
2478
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2442
2479
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2443
- name: parsedBody.code || parsedBody.Code || errorCode,
2480
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2444
2481
  $fault: "client",
2445
- $metadata: deserializeMetadata(output),
2482
+ $metadata,
2446
2483
  });
2447
2484
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2448
2485
  }
@@ -2467,8 +2504,7 @@ const deserializeAws_json1_1GetEventTypesCommandError = async (output, context)
2467
2504
  body: await parseBody(output.body, context),
2468
2505
  };
2469
2506
  let response;
2470
- let errorCode = "UnknownError";
2471
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2507
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2472
2508
  switch (errorCode) {
2473
2509
  case "AccessDeniedException":
2474
2510
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2487,10 +2523,12 @@ const deserializeAws_json1_1GetEventTypesCommandError = async (output, context)
2487
2523
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2488
2524
  default:
2489
2525
  const parsedBody = parsedOutput.body;
2526
+ const $metadata = deserializeMetadata(output);
2527
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2490
2528
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2491
- name: parsedBody.code || parsedBody.Code || errorCode,
2529
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2492
2530
  $fault: "client",
2493
- $metadata: deserializeMetadata(output),
2531
+ $metadata,
2494
2532
  });
2495
2533
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2496
2534
  }
@@ -2515,8 +2553,7 @@ const deserializeAws_json1_1GetExternalModelsCommandError = async (output, conte
2515
2553
  body: await parseBody(output.body, context),
2516
2554
  };
2517
2555
  let response;
2518
- let errorCode = "UnknownError";
2519
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2556
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2520
2557
  switch (errorCode) {
2521
2558
  case "AccessDeniedException":
2522
2559
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2535,10 +2572,12 @@ const deserializeAws_json1_1GetExternalModelsCommandError = async (output, conte
2535
2572
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2536
2573
  default:
2537
2574
  const parsedBody = parsedOutput.body;
2575
+ const $metadata = deserializeMetadata(output);
2576
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2538
2577
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2539
- name: parsedBody.code || parsedBody.Code || errorCode,
2578
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2540
2579
  $fault: "client",
2541
- $metadata: deserializeMetadata(output),
2580
+ $metadata,
2542
2581
  });
2543
2582
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2544
2583
  }
@@ -2563,8 +2602,7 @@ const deserializeAws_json1_1GetKMSEncryptionKeyCommandError = async (output, con
2563
2602
  body: await parseBody(output.body, context),
2564
2603
  };
2565
2604
  let response;
2566
- let errorCode = "UnknownError";
2567
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2605
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2568
2606
  switch (errorCode) {
2569
2607
  case "AccessDeniedException":
2570
2608
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2580,10 +2618,12 @@ const deserializeAws_json1_1GetKMSEncryptionKeyCommandError = async (output, con
2580
2618
  throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
2581
2619
  default:
2582
2620
  const parsedBody = parsedOutput.body;
2621
+ const $metadata = deserializeMetadata(output);
2622
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2583
2623
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2584
- name: parsedBody.code || parsedBody.Code || errorCode,
2624
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2585
2625
  $fault: "client",
2586
- $metadata: deserializeMetadata(output),
2626
+ $metadata,
2587
2627
  });
2588
2628
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2589
2629
  }
@@ -2608,8 +2648,7 @@ const deserializeAws_json1_1GetLabelsCommandError = async (output, context) => {
2608
2648
  body: await parseBody(output.body, context),
2609
2649
  };
2610
2650
  let response;
2611
- let errorCode = "UnknownError";
2612
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2651
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2613
2652
  switch (errorCode) {
2614
2653
  case "AccessDeniedException":
2615
2654
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2628,10 +2667,12 @@ const deserializeAws_json1_1GetLabelsCommandError = async (output, context) => {
2628
2667
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2629
2668
  default:
2630
2669
  const parsedBody = parsedOutput.body;
2670
+ const $metadata = deserializeMetadata(output);
2671
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2631
2672
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2632
- name: parsedBody.code || parsedBody.Code || errorCode,
2673
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2633
2674
  $fault: "client",
2634
- $metadata: deserializeMetadata(output),
2675
+ $metadata,
2635
2676
  });
2636
2677
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2637
2678
  }
@@ -2656,8 +2697,7 @@ const deserializeAws_json1_1GetModelsCommandError = async (output, context) => {
2656
2697
  body: await parseBody(output.body, context),
2657
2698
  };
2658
2699
  let response;
2659
- let errorCode = "UnknownError";
2660
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2700
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2661
2701
  switch (errorCode) {
2662
2702
  case "AccessDeniedException":
2663
2703
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2676,10 +2716,12 @@ const deserializeAws_json1_1GetModelsCommandError = async (output, context) => {
2676
2716
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2677
2717
  default:
2678
2718
  const parsedBody = parsedOutput.body;
2719
+ const $metadata = deserializeMetadata(output);
2720
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2679
2721
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2680
- name: parsedBody.code || parsedBody.Code || errorCode,
2722
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2681
2723
  $fault: "client",
2682
- $metadata: deserializeMetadata(output),
2724
+ $metadata,
2683
2725
  });
2684
2726
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2685
2727
  }
@@ -2704,8 +2746,7 @@ const deserializeAws_json1_1GetModelVersionCommandError = async (output, context
2704
2746
  body: await parseBody(output.body, context),
2705
2747
  };
2706
2748
  let response;
2707
- let errorCode = "UnknownError";
2708
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2749
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2709
2750
  switch (errorCode) {
2710
2751
  case "AccessDeniedException":
2711
2752
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2724,10 +2765,12 @@ const deserializeAws_json1_1GetModelVersionCommandError = async (output, context
2724
2765
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2725
2766
  default:
2726
2767
  const parsedBody = parsedOutput.body;
2768
+ const $metadata = deserializeMetadata(output);
2769
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2727
2770
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2728
- name: parsedBody.code || parsedBody.Code || errorCode,
2771
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2729
2772
  $fault: "client",
2730
- $metadata: deserializeMetadata(output),
2773
+ $metadata,
2731
2774
  });
2732
2775
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2733
2776
  }
@@ -2752,8 +2795,7 @@ const deserializeAws_json1_1GetOutcomesCommandError = async (output, context) =>
2752
2795
  body: await parseBody(output.body, context),
2753
2796
  };
2754
2797
  let response;
2755
- let errorCode = "UnknownError";
2756
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2798
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2757
2799
  switch (errorCode) {
2758
2800
  case "AccessDeniedException":
2759
2801
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2772,10 +2814,12 @@ const deserializeAws_json1_1GetOutcomesCommandError = async (output, context) =>
2772
2814
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2773
2815
  default:
2774
2816
  const parsedBody = parsedOutput.body;
2817
+ const $metadata = deserializeMetadata(output);
2818
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2775
2819
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2776
- name: parsedBody.code || parsedBody.Code || errorCode,
2820
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2777
2821
  $fault: "client",
2778
- $metadata: deserializeMetadata(output),
2822
+ $metadata,
2779
2823
  });
2780
2824
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2781
2825
  }
@@ -2800,8 +2844,7 @@ const deserializeAws_json1_1GetRulesCommandError = async (output, context) => {
2800
2844
  body: await parseBody(output.body, context),
2801
2845
  };
2802
2846
  let response;
2803
- let errorCode = "UnknownError";
2804
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2847
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2805
2848
  switch (errorCode) {
2806
2849
  case "AccessDeniedException":
2807
2850
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2820,10 +2863,12 @@ const deserializeAws_json1_1GetRulesCommandError = async (output, context) => {
2820
2863
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2821
2864
  default:
2822
2865
  const parsedBody = parsedOutput.body;
2866
+ const $metadata = deserializeMetadata(output);
2867
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2823
2868
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2824
- name: parsedBody.code || parsedBody.Code || errorCode,
2869
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2825
2870
  $fault: "client",
2826
- $metadata: deserializeMetadata(output),
2871
+ $metadata,
2827
2872
  });
2828
2873
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2829
2874
  }
@@ -2848,8 +2893,7 @@ const deserializeAws_json1_1GetVariablesCommandError = async (output, context) =
2848
2893
  body: await parseBody(output.body, context),
2849
2894
  };
2850
2895
  let response;
2851
- let errorCode = "UnknownError";
2852
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2896
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2853
2897
  switch (errorCode) {
2854
2898
  case "AccessDeniedException":
2855
2899
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2868,10 +2912,12 @@ const deserializeAws_json1_1GetVariablesCommandError = async (output, context) =
2868
2912
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2869
2913
  default:
2870
2914
  const parsedBody = parsedOutput.body;
2915
+ const $metadata = deserializeMetadata(output);
2916
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2871
2917
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2872
- name: parsedBody.code || parsedBody.Code || errorCode,
2918
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2873
2919
  $fault: "client",
2874
- $metadata: deserializeMetadata(output),
2920
+ $metadata,
2875
2921
  });
2876
2922
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2877
2923
  }
@@ -2896,8 +2942,7 @@ const deserializeAws_json1_1ListEventPredictionsCommandError = async (output, co
2896
2942
  body: await parseBody(output.body, context),
2897
2943
  };
2898
2944
  let response;
2899
- let errorCode = "UnknownError";
2900
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2945
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2901
2946
  switch (errorCode) {
2902
2947
  case "AccessDeniedException":
2903
2948
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2913,10 +2958,12 @@ const deserializeAws_json1_1ListEventPredictionsCommandError = async (output, co
2913
2958
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2914
2959
  default:
2915
2960
  const parsedBody = parsedOutput.body;
2961
+ const $metadata = deserializeMetadata(output);
2962
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2916
2963
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2917
- name: parsedBody.code || parsedBody.Code || errorCode,
2964
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2918
2965
  $fault: "client",
2919
- $metadata: deserializeMetadata(output),
2966
+ $metadata,
2920
2967
  });
2921
2968
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2922
2969
  }
@@ -2941,8 +2988,7 @@ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, con
2941
2988
  body: await parseBody(output.body, context),
2942
2989
  };
2943
2990
  let response;
2944
- let errorCode = "UnknownError";
2945
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2991
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2946
2992
  switch (errorCode) {
2947
2993
  case "AccessDeniedException":
2948
2994
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -2958,10 +3004,12 @@ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, con
2958
3004
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
2959
3005
  default:
2960
3006
  const parsedBody = parsedOutput.body;
3007
+ const $metadata = deserializeMetadata(output);
3008
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2961
3009
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
2962
- name: parsedBody.code || parsedBody.Code || errorCode,
3010
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2963
3011
  $fault: "client",
2964
- $metadata: deserializeMetadata(output),
3012
+ $metadata,
2965
3013
  });
2966
3014
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2967
3015
  }
@@ -2986,8 +3034,7 @@ const deserializeAws_json1_1PutDetectorCommandError = async (output, context) =>
2986
3034
  body: await parseBody(output.body, context),
2987
3035
  };
2988
3036
  let response;
2989
- let errorCode = "UnknownError";
2990
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3037
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2991
3038
  switch (errorCode) {
2992
3039
  case "AccessDeniedException":
2993
3040
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3006,10 +3053,12 @@ const deserializeAws_json1_1PutDetectorCommandError = async (output, context) =>
3006
3053
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3007
3054
  default:
3008
3055
  const parsedBody = parsedOutput.body;
3056
+ const $metadata = deserializeMetadata(output);
3057
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3009
3058
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3010
- name: parsedBody.code || parsedBody.Code || errorCode,
3059
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3011
3060
  $fault: "client",
3012
- $metadata: deserializeMetadata(output),
3061
+ $metadata,
3013
3062
  });
3014
3063
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3015
3064
  }
@@ -3034,8 +3083,7 @@ const deserializeAws_json1_1PutEntityTypeCommandError = async (output, context)
3034
3083
  body: await parseBody(output.body, context),
3035
3084
  };
3036
3085
  let response;
3037
- let errorCode = "UnknownError";
3038
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3086
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3039
3087
  switch (errorCode) {
3040
3088
  case "AccessDeniedException":
3041
3089
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3054,10 +3102,12 @@ const deserializeAws_json1_1PutEntityTypeCommandError = async (output, context)
3054
3102
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3055
3103
  default:
3056
3104
  const parsedBody = parsedOutput.body;
3105
+ const $metadata = deserializeMetadata(output);
3106
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3057
3107
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3058
- name: parsedBody.code || parsedBody.Code || errorCode,
3108
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3059
3109
  $fault: "client",
3060
- $metadata: deserializeMetadata(output),
3110
+ $metadata,
3061
3111
  });
3062
3112
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3063
3113
  }
@@ -3082,8 +3132,7 @@ const deserializeAws_json1_1PutEventTypeCommandError = async (output, context) =
3082
3132
  body: await parseBody(output.body, context),
3083
3133
  };
3084
3134
  let response;
3085
- let errorCode = "UnknownError";
3086
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3135
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3087
3136
  switch (errorCode) {
3088
3137
  case "AccessDeniedException":
3089
3138
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3102,10 +3151,12 @@ const deserializeAws_json1_1PutEventTypeCommandError = async (output, context) =
3102
3151
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3103
3152
  default:
3104
3153
  const parsedBody = parsedOutput.body;
3154
+ const $metadata = deserializeMetadata(output);
3155
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3105
3156
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3106
- name: parsedBody.code || parsedBody.Code || errorCode,
3157
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3107
3158
  $fault: "client",
3108
- $metadata: deserializeMetadata(output),
3159
+ $metadata,
3109
3160
  });
3110
3161
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3111
3162
  }
@@ -3130,8 +3181,7 @@ const deserializeAws_json1_1PutExternalModelCommandError = async (output, contex
3130
3181
  body: await parseBody(output.body, context),
3131
3182
  };
3132
3183
  let response;
3133
- let errorCode = "UnknownError";
3134
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3184
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3135
3185
  switch (errorCode) {
3136
3186
  case "AccessDeniedException":
3137
3187
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3150,10 +3200,12 @@ const deserializeAws_json1_1PutExternalModelCommandError = async (output, contex
3150
3200
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3151
3201
  default:
3152
3202
  const parsedBody = parsedOutput.body;
3203
+ const $metadata = deserializeMetadata(output);
3204
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3153
3205
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3154
- name: parsedBody.code || parsedBody.Code || errorCode,
3206
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3155
3207
  $fault: "client",
3156
- $metadata: deserializeMetadata(output),
3208
+ $metadata,
3157
3209
  });
3158
3210
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3159
3211
  }
@@ -3178,8 +3230,7 @@ const deserializeAws_json1_1PutKMSEncryptionKeyCommandError = async (output, con
3178
3230
  body: await parseBody(output.body, context),
3179
3231
  };
3180
3232
  let response;
3181
- let errorCode = "UnknownError";
3182
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3233
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3183
3234
  switch (errorCode) {
3184
3235
  case "AccessDeniedException":
3185
3236
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3201,10 +3252,12 @@ const deserializeAws_json1_1PutKMSEncryptionKeyCommandError = async (output, con
3201
3252
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3202
3253
  default:
3203
3254
  const parsedBody = parsedOutput.body;
3255
+ const $metadata = deserializeMetadata(output);
3256
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3204
3257
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3205
- name: parsedBody.code || parsedBody.Code || errorCode,
3258
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3206
3259
  $fault: "client",
3207
- $metadata: deserializeMetadata(output),
3260
+ $metadata,
3208
3261
  });
3209
3262
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3210
3263
  }
@@ -3229,8 +3282,7 @@ const deserializeAws_json1_1PutLabelCommandError = async (output, context) => {
3229
3282
  body: await parseBody(output.body, context),
3230
3283
  };
3231
3284
  let response;
3232
- let errorCode = "UnknownError";
3233
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3285
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3234
3286
  switch (errorCode) {
3235
3287
  case "AccessDeniedException":
3236
3288
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3249,10 +3301,12 @@ const deserializeAws_json1_1PutLabelCommandError = async (output, context) => {
3249
3301
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3250
3302
  default:
3251
3303
  const parsedBody = parsedOutput.body;
3304
+ const $metadata = deserializeMetadata(output);
3305
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3252
3306
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3253
- name: parsedBody.code || parsedBody.Code || errorCode,
3307
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3254
3308
  $fault: "client",
3255
- $metadata: deserializeMetadata(output),
3309
+ $metadata,
3256
3310
  });
3257
3311
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3258
3312
  }
@@ -3277,8 +3331,7 @@ const deserializeAws_json1_1PutOutcomeCommandError = async (output, context) =>
3277
3331
  body: await parseBody(output.body, context),
3278
3332
  };
3279
3333
  let response;
3280
- let errorCode = "UnknownError";
3281
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3334
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3282
3335
  switch (errorCode) {
3283
3336
  case "AccessDeniedException":
3284
3337
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3297,10 +3350,12 @@ const deserializeAws_json1_1PutOutcomeCommandError = async (output, context) =>
3297
3350
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3298
3351
  default:
3299
3352
  const parsedBody = parsedOutput.body;
3353
+ const $metadata = deserializeMetadata(output);
3354
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3300
3355
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3301
- name: parsedBody.code || parsedBody.Code || errorCode,
3356
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3302
3357
  $fault: "client",
3303
- $metadata: deserializeMetadata(output),
3358
+ $metadata,
3304
3359
  });
3305
3360
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3306
3361
  }
@@ -3325,8 +3380,7 @@ const deserializeAws_json1_1SendEventCommandError = async (output, context) => {
3325
3380
  body: await parseBody(output.body, context),
3326
3381
  };
3327
3382
  let response;
3328
- let errorCode = "UnknownError";
3329
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3383
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3330
3384
  switch (errorCode) {
3331
3385
  case "AccessDeniedException":
3332
3386
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3348,10 +3402,12 @@ const deserializeAws_json1_1SendEventCommandError = async (output, context) => {
3348
3402
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3349
3403
  default:
3350
3404
  const parsedBody = parsedOutput.body;
3405
+ const $metadata = deserializeMetadata(output);
3406
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3351
3407
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3352
- name: parsedBody.code || parsedBody.Code || errorCode,
3408
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3353
3409
  $fault: "client",
3354
- $metadata: deserializeMetadata(output),
3410
+ $metadata,
3355
3411
  });
3356
3412
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3357
3413
  }
@@ -3376,8 +3432,7 @@ const deserializeAws_json1_1TagResourceCommandError = async (output, context) =>
3376
3432
  body: await parseBody(output.body, context),
3377
3433
  };
3378
3434
  let response;
3379
- let errorCode = "UnknownError";
3380
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3435
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3381
3436
  switch (errorCode) {
3382
3437
  case "AccessDeniedException":
3383
3438
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3393,10 +3448,12 @@ const deserializeAws_json1_1TagResourceCommandError = async (output, context) =>
3393
3448
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3394
3449
  default:
3395
3450
  const parsedBody = parsedOutput.body;
3451
+ const $metadata = deserializeMetadata(output);
3452
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3396
3453
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3397
- name: parsedBody.code || parsedBody.Code || errorCode,
3454
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3398
3455
  $fault: "client",
3399
- $metadata: deserializeMetadata(output),
3456
+ $metadata,
3400
3457
  });
3401
3458
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3402
3459
  }
@@ -3421,8 +3478,7 @@ const deserializeAws_json1_1UntagResourceCommandError = async (output, context)
3421
3478
  body: await parseBody(output.body, context),
3422
3479
  };
3423
3480
  let response;
3424
- let errorCode = "UnknownError";
3425
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3481
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3426
3482
  switch (errorCode) {
3427
3483
  case "AccessDeniedException":
3428
3484
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3438,10 +3494,12 @@ const deserializeAws_json1_1UntagResourceCommandError = async (output, context)
3438
3494
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3439
3495
  default:
3440
3496
  const parsedBody = parsedOutput.body;
3497
+ const $metadata = deserializeMetadata(output);
3498
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3441
3499
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3442
- name: parsedBody.code || parsedBody.Code || errorCode,
3500
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3443
3501
  $fault: "client",
3444
- $metadata: deserializeMetadata(output),
3502
+ $metadata,
3445
3503
  });
3446
3504
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3447
3505
  }
@@ -3466,8 +3524,7 @@ const deserializeAws_json1_1UpdateDetectorVersionCommandError = async (output, c
3466
3524
  body: await parseBody(output.body, context),
3467
3525
  };
3468
3526
  let response;
3469
- let errorCode = "UnknownError";
3470
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3527
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3471
3528
  switch (errorCode) {
3472
3529
  case "AccessDeniedException":
3473
3530
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3489,10 +3546,12 @@ const deserializeAws_json1_1UpdateDetectorVersionCommandError = async (output, c
3489
3546
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3490
3547
  default:
3491
3548
  const parsedBody = parsedOutput.body;
3549
+ const $metadata = deserializeMetadata(output);
3550
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3492
3551
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3493
- name: parsedBody.code || parsedBody.Code || errorCode,
3552
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3494
3553
  $fault: "client",
3495
- $metadata: deserializeMetadata(output),
3554
+ $metadata,
3496
3555
  });
3497
3556
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3498
3557
  }
@@ -3517,8 +3576,7 @@ const deserializeAws_json1_1UpdateDetectorVersionMetadataCommandError = async (o
3517
3576
  body: await parseBody(output.body, context),
3518
3577
  };
3519
3578
  let response;
3520
- let errorCode = "UnknownError";
3521
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3579
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3522
3580
  switch (errorCode) {
3523
3581
  case "AccessDeniedException":
3524
3582
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3537,10 +3595,12 @@ const deserializeAws_json1_1UpdateDetectorVersionMetadataCommandError = async (o
3537
3595
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3538
3596
  default:
3539
3597
  const parsedBody = parsedOutput.body;
3598
+ const $metadata = deserializeMetadata(output);
3599
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3540
3600
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3541
- name: parsedBody.code || parsedBody.Code || errorCode,
3601
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3542
3602
  $fault: "client",
3543
- $metadata: deserializeMetadata(output),
3603
+ $metadata,
3544
3604
  });
3545
3605
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3546
3606
  }
@@ -3565,8 +3625,7 @@ const deserializeAws_json1_1UpdateDetectorVersionStatusCommandError = async (out
3565
3625
  body: await parseBody(output.body, context),
3566
3626
  };
3567
3627
  let response;
3568
- let errorCode = "UnknownError";
3569
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3628
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3570
3629
  switch (errorCode) {
3571
3630
  case "AccessDeniedException":
3572
3631
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3588,10 +3647,12 @@ const deserializeAws_json1_1UpdateDetectorVersionStatusCommandError = async (out
3588
3647
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3589
3648
  default:
3590
3649
  const parsedBody = parsedOutput.body;
3650
+ const $metadata = deserializeMetadata(output);
3651
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3591
3652
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3592
- name: parsedBody.code || parsedBody.Code || errorCode,
3653
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3593
3654
  $fault: "client",
3594
- $metadata: deserializeMetadata(output),
3655
+ $metadata,
3595
3656
  });
3596
3657
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3597
3658
  }
@@ -3616,8 +3677,7 @@ const deserializeAws_json1_1UpdateEventLabelCommandError = async (output, contex
3616
3677
  body: await parseBody(output.body, context),
3617
3678
  };
3618
3679
  let response;
3619
- let errorCode = "UnknownError";
3620
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3680
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3621
3681
  switch (errorCode) {
3622
3682
  case "AccessDeniedException":
3623
3683
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3639,10 +3699,12 @@ const deserializeAws_json1_1UpdateEventLabelCommandError = async (output, contex
3639
3699
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3640
3700
  default:
3641
3701
  const parsedBody = parsedOutput.body;
3702
+ const $metadata = deserializeMetadata(output);
3703
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3642
3704
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3643
- name: parsedBody.code || parsedBody.Code || errorCode,
3705
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3644
3706
  $fault: "client",
3645
- $metadata: deserializeMetadata(output),
3707
+ $metadata,
3646
3708
  });
3647
3709
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3648
3710
  }
@@ -3667,8 +3729,7 @@ const deserializeAws_json1_1UpdateModelCommandError = async (output, context) =>
3667
3729
  body: await parseBody(output.body, context),
3668
3730
  };
3669
3731
  let response;
3670
- let errorCode = "UnknownError";
3671
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3732
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3672
3733
  switch (errorCode) {
3673
3734
  case "AccessDeniedException":
3674
3735
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3690,10 +3751,12 @@ const deserializeAws_json1_1UpdateModelCommandError = async (output, context) =>
3690
3751
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3691
3752
  default:
3692
3753
  const parsedBody = parsedOutput.body;
3754
+ const $metadata = deserializeMetadata(output);
3755
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3693
3756
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3694
- name: parsedBody.code || parsedBody.Code || errorCode,
3757
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3695
3758
  $fault: "client",
3696
- $metadata: deserializeMetadata(output),
3759
+ $metadata,
3697
3760
  });
3698
3761
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3699
3762
  }
@@ -3718,8 +3781,7 @@ const deserializeAws_json1_1UpdateModelVersionCommandError = async (output, cont
3718
3781
  body: await parseBody(output.body, context),
3719
3782
  };
3720
3783
  let response;
3721
- let errorCode = "UnknownError";
3722
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3784
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3723
3785
  switch (errorCode) {
3724
3786
  case "AccessDeniedException":
3725
3787
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3741,10 +3803,12 @@ const deserializeAws_json1_1UpdateModelVersionCommandError = async (output, cont
3741
3803
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3742
3804
  default:
3743
3805
  const parsedBody = parsedOutput.body;
3806
+ const $metadata = deserializeMetadata(output);
3807
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3744
3808
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3745
- name: parsedBody.code || parsedBody.Code || errorCode,
3809
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3746
3810
  $fault: "client",
3747
- $metadata: deserializeMetadata(output),
3811
+ $metadata,
3748
3812
  });
3749
3813
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3750
3814
  }
@@ -3769,8 +3833,7 @@ const deserializeAws_json1_1UpdateModelVersionStatusCommandError = async (output
3769
3833
  body: await parseBody(output.body, context),
3770
3834
  };
3771
3835
  let response;
3772
- let errorCode = "UnknownError";
3773
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3836
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3774
3837
  switch (errorCode) {
3775
3838
  case "AccessDeniedException":
3776
3839
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3792,10 +3855,12 @@ const deserializeAws_json1_1UpdateModelVersionStatusCommandError = async (output
3792
3855
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3793
3856
  default:
3794
3857
  const parsedBody = parsedOutput.body;
3858
+ const $metadata = deserializeMetadata(output);
3859
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3795
3860
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3796
- name: parsedBody.code || parsedBody.Code || errorCode,
3861
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3797
3862
  $fault: "client",
3798
- $metadata: deserializeMetadata(output),
3863
+ $metadata,
3799
3864
  });
3800
3865
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3801
3866
  }
@@ -3820,8 +3885,7 @@ const deserializeAws_json1_1UpdateRuleMetadataCommandError = async (output, cont
3820
3885
  body: await parseBody(output.body, context),
3821
3886
  };
3822
3887
  let response;
3823
- let errorCode = "UnknownError";
3824
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3888
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3825
3889
  switch (errorCode) {
3826
3890
  case "AccessDeniedException":
3827
3891
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3843,10 +3907,12 @@ const deserializeAws_json1_1UpdateRuleMetadataCommandError = async (output, cont
3843
3907
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3844
3908
  default:
3845
3909
  const parsedBody = parsedOutput.body;
3910
+ const $metadata = deserializeMetadata(output);
3911
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3846
3912
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3847
- name: parsedBody.code || parsedBody.Code || errorCode,
3913
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3848
3914
  $fault: "client",
3849
- $metadata: deserializeMetadata(output),
3915
+ $metadata,
3850
3916
  });
3851
3917
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3852
3918
  }
@@ -3871,8 +3937,7 @@ const deserializeAws_json1_1UpdateRuleVersionCommandError = async (output, conte
3871
3937
  body: await parseBody(output.body, context),
3872
3938
  };
3873
3939
  let response;
3874
- let errorCode = "UnknownError";
3875
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3940
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3876
3941
  switch (errorCode) {
3877
3942
  case "AccessDeniedException":
3878
3943
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3894,10 +3959,12 @@ const deserializeAws_json1_1UpdateRuleVersionCommandError = async (output, conte
3894
3959
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3895
3960
  default:
3896
3961
  const parsedBody = parsedOutput.body;
3962
+ const $metadata = deserializeMetadata(output);
3963
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3897
3964
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3898
- name: parsedBody.code || parsedBody.Code || errorCode,
3965
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3899
3966
  $fault: "client",
3900
- $metadata: deserializeMetadata(output),
3967
+ $metadata,
3901
3968
  });
3902
3969
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3903
3970
  }
@@ -3922,8 +3989,7 @@ const deserializeAws_json1_1UpdateVariableCommandError = async (output, context)
3922
3989
  body: await parseBody(output.body, context),
3923
3990
  };
3924
3991
  let response;
3925
- let errorCode = "UnknownError";
3926
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3992
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3927
3993
  switch (errorCode) {
3928
3994
  case "AccessDeniedException":
3929
3995
  case "com.amazonaws.frauddetector#AccessDeniedException":
@@ -3945,10 +4011,12 @@ const deserializeAws_json1_1UpdateVariableCommandError = async (output, context)
3945
4011
  throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context);
3946
4012
  default:
3947
4013
  const parsedBody = parsedOutput.body;
4014
+ const $metadata = deserializeMetadata(output);
4015
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3948
4016
  response = new FraudDetectorServiceException_1.FraudDetectorServiceException({
3949
- name: parsedBody.code || parsedBody.Code || errorCode,
4017
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3950
4018
  $fault: "client",
3951
- $metadata: deserializeMetadata(output),
4019
+ $metadata,
3952
4020
  });
3953
4021
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3954
4022
  }
@@ -4018,122 +4086,110 @@ const deserializeAws_json1_1ValidationExceptionResponse = async (parsedOutput, c
4018
4086
  };
4019
4087
  const serializeAws_json1_1BatchCreateVariableRequest = (input, context) => {
4020
4088
  return {
4021
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4022
- ...(input.variableEntries !== undefined &&
4023
- input.variableEntries !== null && {
4089
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4090
+ ...(input.variableEntries != null && {
4024
4091
  variableEntries: serializeAws_json1_1VariableEntryList(input.variableEntries, context),
4025
4092
  }),
4026
4093
  };
4027
4094
  };
4028
4095
  const serializeAws_json1_1BatchGetVariableRequest = (input, context) => {
4029
4096
  return {
4030
- ...(input.names !== undefined &&
4031
- input.names !== null && { names: serializeAws_json1_1NameList(input.names, context) }),
4097
+ ...(input.names != null && { names: serializeAws_json1_1NameList(input.names, context) }),
4032
4098
  };
4033
4099
  };
4034
4100
  const serializeAws_json1_1CancelBatchImportJobRequest = (input, context) => {
4035
4101
  return {
4036
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
4102
+ ...(input.jobId != null && { jobId: input.jobId }),
4037
4103
  };
4038
4104
  };
4039
4105
  const serializeAws_json1_1CancelBatchPredictionJobRequest = (input, context) => {
4040
4106
  return {
4041
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
4107
+ ...(input.jobId != null && { jobId: input.jobId }),
4042
4108
  };
4043
4109
  };
4044
4110
  const serializeAws_json1_1CreateBatchImportJobRequest = (input, context) => {
4045
4111
  return {
4046
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4047
- ...(input.iamRoleArn !== undefined && input.iamRoleArn !== null && { iamRoleArn: input.iamRoleArn }),
4048
- ...(input.inputPath !== undefined && input.inputPath !== null && { inputPath: input.inputPath }),
4049
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
4050
- ...(input.outputPath !== undefined && input.outputPath !== null && { outputPath: input.outputPath }),
4051
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4112
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4113
+ ...(input.iamRoleArn != null && { iamRoleArn: input.iamRoleArn }),
4114
+ ...(input.inputPath != null && { inputPath: input.inputPath }),
4115
+ ...(input.jobId != null && { jobId: input.jobId }),
4116
+ ...(input.outputPath != null && { outputPath: input.outputPath }),
4117
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4052
4118
  };
4053
4119
  };
4054
4120
  const serializeAws_json1_1CreateBatchPredictionJobRequest = (input, context) => {
4055
4121
  return {
4056
- ...(input.detectorName !== undefined && input.detectorName !== null && { detectorName: input.detectorName }),
4057
- ...(input.detectorVersion !== undefined &&
4058
- input.detectorVersion !== null && { detectorVersion: input.detectorVersion }),
4059
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4060
- ...(input.iamRoleArn !== undefined && input.iamRoleArn !== null && { iamRoleArn: input.iamRoleArn }),
4061
- ...(input.inputPath !== undefined && input.inputPath !== null && { inputPath: input.inputPath }),
4062
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
4063
- ...(input.outputPath !== undefined && input.outputPath !== null && { outputPath: input.outputPath }),
4064
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4122
+ ...(input.detectorName != null && { detectorName: input.detectorName }),
4123
+ ...(input.detectorVersion != null && { detectorVersion: input.detectorVersion }),
4124
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4125
+ ...(input.iamRoleArn != null && { iamRoleArn: input.iamRoleArn }),
4126
+ ...(input.inputPath != null && { inputPath: input.inputPath }),
4127
+ ...(input.jobId != null && { jobId: input.jobId }),
4128
+ ...(input.outputPath != null && { outputPath: input.outputPath }),
4129
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4065
4130
  };
4066
4131
  };
4067
4132
  const serializeAws_json1_1CreateDetectorVersionRequest = (input, context) => {
4068
4133
  return {
4069
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4070
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4071
- ...(input.externalModelEndpoints !== undefined &&
4072
- input.externalModelEndpoints !== null && {
4134
+ ...(input.description != null && { description: input.description }),
4135
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4136
+ ...(input.externalModelEndpoints != null && {
4073
4137
  externalModelEndpoints: serializeAws_json1_1ListOfStrings(input.externalModelEndpoints, context),
4074
4138
  }),
4075
- ...(input.modelVersions !== undefined &&
4076
- input.modelVersions !== null && {
4139
+ ...(input.modelVersions != null && {
4077
4140
  modelVersions: serializeAws_json1_1ListOfModelVersions(input.modelVersions, context),
4078
4141
  }),
4079
- ...(input.ruleExecutionMode !== undefined &&
4080
- input.ruleExecutionMode !== null && { ruleExecutionMode: input.ruleExecutionMode }),
4081
- ...(input.rules !== undefined &&
4082
- input.rules !== null && { rules: serializeAws_json1_1RuleList(input.rules, context) }),
4083
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4142
+ ...(input.ruleExecutionMode != null && { ruleExecutionMode: input.ruleExecutionMode }),
4143
+ ...(input.rules != null && { rules: serializeAws_json1_1RuleList(input.rules, context) }),
4144
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4084
4145
  };
4085
4146
  };
4086
4147
  const serializeAws_json1_1CreateModelRequest = (input, context) => {
4087
4148
  return {
4088
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4089
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4090
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4091
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4092
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4149
+ ...(input.description != null && { description: input.description }),
4150
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4151
+ ...(input.modelId != null && { modelId: input.modelId }),
4152
+ ...(input.modelType != null && { modelType: input.modelType }),
4153
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4093
4154
  };
4094
4155
  };
4095
4156
  const serializeAws_json1_1CreateModelVersionRequest = (input, context) => {
4096
4157
  return {
4097
- ...(input.externalEventsDetail !== undefined &&
4098
- input.externalEventsDetail !== null && {
4158
+ ...(input.externalEventsDetail != null && {
4099
4159
  externalEventsDetail: serializeAws_json1_1ExternalEventsDetail(input.externalEventsDetail, context),
4100
4160
  }),
4101
- ...(input.ingestedEventsDetail !== undefined &&
4102
- input.ingestedEventsDetail !== null && {
4161
+ ...(input.ingestedEventsDetail != null && {
4103
4162
  ingestedEventsDetail: serializeAws_json1_1IngestedEventsDetail(input.ingestedEventsDetail, context),
4104
4163
  }),
4105
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4106
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4107
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4108
- ...(input.trainingDataSchema !== undefined &&
4109
- input.trainingDataSchema !== null && {
4164
+ ...(input.modelId != null && { modelId: input.modelId }),
4165
+ ...(input.modelType != null && { modelType: input.modelType }),
4166
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4167
+ ...(input.trainingDataSchema != null && {
4110
4168
  trainingDataSchema: serializeAws_json1_1TrainingDataSchema(input.trainingDataSchema, context),
4111
4169
  }),
4112
- ...(input.trainingDataSource !== undefined &&
4113
- input.trainingDataSource !== null && { trainingDataSource: input.trainingDataSource }),
4170
+ ...(input.trainingDataSource != null && { trainingDataSource: input.trainingDataSource }),
4114
4171
  };
4115
4172
  };
4116
4173
  const serializeAws_json1_1CreateRuleRequest = (input, context) => {
4117
4174
  return {
4118
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4119
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4120
- ...(input.expression !== undefined && input.expression !== null && { expression: input.expression }),
4121
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
4122
- ...(input.outcomes !== undefined &&
4123
- input.outcomes !== null && { outcomes: serializeAws_json1_1NonEmptyListOfStrings(input.outcomes, context) }),
4124
- ...(input.ruleId !== undefined && input.ruleId !== null && { ruleId: input.ruleId }),
4125
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4175
+ ...(input.description != null && { description: input.description }),
4176
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4177
+ ...(input.expression != null && { expression: input.expression }),
4178
+ ...(input.language != null && { language: input.language }),
4179
+ ...(input.outcomes != null && { outcomes: serializeAws_json1_1NonEmptyListOfStrings(input.outcomes, context) }),
4180
+ ...(input.ruleId != null && { ruleId: input.ruleId }),
4181
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4126
4182
  };
4127
4183
  };
4128
4184
  const serializeAws_json1_1CreateVariableRequest = (input, context) => {
4129
4185
  return {
4130
- ...(input.dataSource !== undefined && input.dataSource !== null && { dataSource: input.dataSource }),
4131
- ...(input.dataType !== undefined && input.dataType !== null && { dataType: input.dataType }),
4132
- ...(input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue }),
4133
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4134
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4135
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4136
- ...(input.variableType !== undefined && input.variableType !== null && { variableType: input.variableType }),
4186
+ ...(input.dataSource != null && { dataSource: input.dataSource }),
4187
+ ...(input.dataType != null && { dataType: input.dataType }),
4188
+ ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
4189
+ ...(input.description != null && { description: input.description }),
4190
+ ...(input.name != null && { name: input.name }),
4191
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4192
+ ...(input.variableType != null && { variableType: input.variableType }),
4137
4193
  };
4138
4194
  };
4139
4195
  const serializeAws_json1_1CsvIndexToVariableMap = (input, context) => {
@@ -4149,109 +4205,105 @@ const serializeAws_json1_1CsvIndexToVariableMap = (input, context) => {
4149
4205
  };
4150
4206
  const serializeAws_json1_1DeleteBatchImportJobRequest = (input, context) => {
4151
4207
  return {
4152
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
4208
+ ...(input.jobId != null && { jobId: input.jobId }),
4153
4209
  };
4154
4210
  };
4155
4211
  const serializeAws_json1_1DeleteBatchPredictionJobRequest = (input, context) => {
4156
4212
  return {
4157
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
4213
+ ...(input.jobId != null && { jobId: input.jobId }),
4158
4214
  };
4159
4215
  };
4160
4216
  const serializeAws_json1_1DeleteDetectorRequest = (input, context) => {
4161
4217
  return {
4162
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4218
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4163
4219
  };
4164
4220
  };
4165
4221
  const serializeAws_json1_1DeleteDetectorVersionRequest = (input, context) => {
4166
4222
  return {
4167
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4168
- ...(input.detectorVersionId !== undefined &&
4169
- input.detectorVersionId !== null && { detectorVersionId: input.detectorVersionId }),
4223
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4224
+ ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }),
4170
4225
  };
4171
4226
  };
4172
4227
  const serializeAws_json1_1DeleteEntityTypeRequest = (input, context) => {
4173
4228
  return {
4174
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4229
+ ...(input.name != null && { name: input.name }),
4175
4230
  };
4176
4231
  };
4177
4232
  const serializeAws_json1_1DeleteEventRequest = (input, context) => {
4178
4233
  return {
4179
- ...(input.deleteAuditHistory !== undefined &&
4180
- input.deleteAuditHistory !== null && { deleteAuditHistory: input.deleteAuditHistory }),
4181
- ...(input.eventId !== undefined && input.eventId !== null && { eventId: input.eventId }),
4182
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4234
+ ...(input.deleteAuditHistory != null && { deleteAuditHistory: input.deleteAuditHistory }),
4235
+ ...(input.eventId != null && { eventId: input.eventId }),
4236
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4183
4237
  };
4184
4238
  };
4185
4239
  const serializeAws_json1_1DeleteEventsByEventTypeRequest = (input, context) => {
4186
4240
  return {
4187
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4241
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4188
4242
  };
4189
4243
  };
4190
4244
  const serializeAws_json1_1DeleteEventTypeRequest = (input, context) => {
4191
4245
  return {
4192
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4246
+ ...(input.name != null && { name: input.name }),
4193
4247
  };
4194
4248
  };
4195
4249
  const serializeAws_json1_1DeleteExternalModelRequest = (input, context) => {
4196
4250
  return {
4197
- ...(input.modelEndpoint !== undefined && input.modelEndpoint !== null && { modelEndpoint: input.modelEndpoint }),
4251
+ ...(input.modelEndpoint != null && { modelEndpoint: input.modelEndpoint }),
4198
4252
  };
4199
4253
  };
4200
4254
  const serializeAws_json1_1DeleteLabelRequest = (input, context) => {
4201
4255
  return {
4202
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4256
+ ...(input.name != null && { name: input.name }),
4203
4257
  };
4204
4258
  };
4205
4259
  const serializeAws_json1_1DeleteModelRequest = (input, context) => {
4206
4260
  return {
4207
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4208
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4261
+ ...(input.modelId != null && { modelId: input.modelId }),
4262
+ ...(input.modelType != null && { modelType: input.modelType }),
4209
4263
  };
4210
4264
  };
4211
4265
  const serializeAws_json1_1DeleteModelVersionRequest = (input, context) => {
4212
4266
  return {
4213
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4214
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4215
- ...(input.modelVersionNumber !== undefined &&
4216
- input.modelVersionNumber !== null && { modelVersionNumber: input.modelVersionNumber }),
4267
+ ...(input.modelId != null && { modelId: input.modelId }),
4268
+ ...(input.modelType != null && { modelType: input.modelType }),
4269
+ ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }),
4217
4270
  };
4218
4271
  };
4219
4272
  const serializeAws_json1_1DeleteOutcomeRequest = (input, context) => {
4220
4273
  return {
4221
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4274
+ ...(input.name != null && { name: input.name }),
4222
4275
  };
4223
4276
  };
4224
4277
  const serializeAws_json1_1DeleteRuleRequest = (input, context) => {
4225
4278
  return {
4226
- ...(input.rule !== undefined && input.rule !== null && { rule: serializeAws_json1_1Rule(input.rule, context) }),
4279
+ ...(input.rule != null && { rule: serializeAws_json1_1Rule(input.rule, context) }),
4227
4280
  };
4228
4281
  };
4229
4282
  const serializeAws_json1_1DeleteVariableRequest = (input, context) => {
4230
4283
  return {
4231
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4284
+ ...(input.name != null && { name: input.name }),
4232
4285
  };
4233
4286
  };
4234
4287
  const serializeAws_json1_1DescribeDetectorRequest = (input, context) => {
4235
4288
  return {
4236
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4237
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4238
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4289
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4290
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4291
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4239
4292
  };
4240
4293
  };
4241
4294
  const serializeAws_json1_1DescribeModelVersionsRequest = (input, context) => {
4242
4295
  return {
4243
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4244
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4245
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4246
- ...(input.modelVersionNumber !== undefined &&
4247
- input.modelVersionNumber !== null && { modelVersionNumber: input.modelVersionNumber }),
4248
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4296
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4297
+ ...(input.modelId != null && { modelId: input.modelId }),
4298
+ ...(input.modelType != null && { modelType: input.modelType }),
4299
+ ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }),
4300
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4249
4301
  };
4250
4302
  };
4251
4303
  const serializeAws_json1_1Entity = (input, context) => {
4252
4304
  return {
4253
- ...(input.entityId !== undefined && input.entityId !== null && { entityId: input.entityId }),
4254
- ...(input.entityType !== undefined && input.entityType !== null && { entityType: input.entityType }),
4305
+ ...(input.entityId != null && { entityId: input.entityId }),
4306
+ ...(input.entityType != null && { entityType: input.entityType }),
4255
4307
  };
4256
4308
  };
4257
4309
  const serializeAws_json1_1EventVariableMap = (input, context) => {
@@ -4267,9 +4319,8 @@ const serializeAws_json1_1EventVariableMap = (input, context) => {
4267
4319
  };
4268
4320
  const serializeAws_json1_1ExternalEventsDetail = (input, context) => {
4269
4321
  return {
4270
- ...(input.dataAccessRoleArn !== undefined &&
4271
- input.dataAccessRoleArn !== null && { dataAccessRoleArn: input.dataAccessRoleArn }),
4272
- ...(input.dataLocation !== undefined && input.dataLocation !== null && { dataLocation: input.dataLocation }),
4322
+ ...(input.dataAccessRoleArn != null && { dataAccessRoleArn: input.dataAccessRoleArn }),
4323
+ ...(input.dataLocation != null && { dataLocation: input.dataLocation }),
4273
4324
  };
4274
4325
  };
4275
4326
  const serializeAws_json1_1ExternalModelEndpointDataBlobMap = (input, context) => {
@@ -4285,159 +4336,149 @@ const serializeAws_json1_1ExternalModelEndpointDataBlobMap = (input, context) =>
4285
4336
  };
4286
4337
  const serializeAws_json1_1FilterCondition = (input, context) => {
4287
4338
  return {
4288
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
4339
+ ...(input.value != null && { value: input.value }),
4289
4340
  };
4290
4341
  };
4291
4342
  const serializeAws_json1_1GetBatchImportJobsRequest = (input, context) => {
4292
4343
  return {
4293
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
4294
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4295
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4344
+ ...(input.jobId != null && { jobId: input.jobId }),
4345
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4346
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4296
4347
  };
4297
4348
  };
4298
4349
  const serializeAws_json1_1GetBatchPredictionJobsRequest = (input, context) => {
4299
4350
  return {
4300
- ...(input.jobId !== undefined && input.jobId !== null && { jobId: input.jobId }),
4301
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4302
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4351
+ ...(input.jobId != null && { jobId: input.jobId }),
4352
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4353
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4303
4354
  };
4304
4355
  };
4305
4356
  const serializeAws_json1_1GetDeleteEventsByEventTypeStatusRequest = (input, context) => {
4306
4357
  return {
4307
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4358
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4308
4359
  };
4309
4360
  };
4310
4361
  const serializeAws_json1_1GetDetectorsRequest = (input, context) => {
4311
4362
  return {
4312
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4313
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4314
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4363
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4364
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4365
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4315
4366
  };
4316
4367
  };
4317
4368
  const serializeAws_json1_1GetDetectorVersionRequest = (input, context) => {
4318
4369
  return {
4319
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4320
- ...(input.detectorVersionId !== undefined &&
4321
- input.detectorVersionId !== null && { detectorVersionId: input.detectorVersionId }),
4370
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4371
+ ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }),
4322
4372
  };
4323
4373
  };
4324
4374
  const serializeAws_json1_1GetEntityTypesRequest = (input, context) => {
4325
4375
  return {
4326
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4327
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4328
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4376
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4377
+ ...(input.name != null && { name: input.name }),
4378
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4329
4379
  };
4330
4380
  };
4331
4381
  const serializeAws_json1_1GetEventPredictionMetadataRequest = (input, context) => {
4332
4382
  return {
4333
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4334
- ...(input.detectorVersionId !== undefined &&
4335
- input.detectorVersionId !== null && { detectorVersionId: input.detectorVersionId }),
4336
- ...(input.eventId !== undefined && input.eventId !== null && { eventId: input.eventId }),
4337
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4338
- ...(input.predictionTimestamp !== undefined &&
4339
- input.predictionTimestamp !== null && { predictionTimestamp: input.predictionTimestamp }),
4383
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4384
+ ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }),
4385
+ ...(input.eventId != null && { eventId: input.eventId }),
4386
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4387
+ ...(input.predictionTimestamp != null && { predictionTimestamp: input.predictionTimestamp }),
4340
4388
  };
4341
4389
  };
4342
4390
  const serializeAws_json1_1GetEventPredictionRequest = (input, context) => {
4343
4391
  return {
4344
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4345
- ...(input.detectorVersionId !== undefined &&
4346
- input.detectorVersionId !== null && { detectorVersionId: input.detectorVersionId }),
4347
- ...(input.entities !== undefined &&
4348
- input.entities !== null && { entities: serializeAws_json1_1listOfEntities(input.entities, context) }),
4349
- ...(input.eventId !== undefined && input.eventId !== null && { eventId: input.eventId }),
4350
- ...(input.eventTimestamp !== undefined &&
4351
- input.eventTimestamp !== null && { eventTimestamp: input.eventTimestamp }),
4352
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4353
- ...(input.eventVariables !== undefined &&
4354
- input.eventVariables !== null && {
4392
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4393
+ ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }),
4394
+ ...(input.entities != null && { entities: serializeAws_json1_1listOfEntities(input.entities, context) }),
4395
+ ...(input.eventId != null && { eventId: input.eventId }),
4396
+ ...(input.eventTimestamp != null && { eventTimestamp: input.eventTimestamp }),
4397
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4398
+ ...(input.eventVariables != null && {
4355
4399
  eventVariables: serializeAws_json1_1EventVariableMap(input.eventVariables, context),
4356
4400
  }),
4357
- ...(input.externalModelEndpointDataBlobs !== undefined &&
4358
- input.externalModelEndpointDataBlobs !== null && {
4401
+ ...(input.externalModelEndpointDataBlobs != null && {
4359
4402
  externalModelEndpointDataBlobs: serializeAws_json1_1ExternalModelEndpointDataBlobMap(input.externalModelEndpointDataBlobs, context),
4360
4403
  }),
4361
4404
  };
4362
4405
  };
4363
4406
  const serializeAws_json1_1GetEventRequest = (input, context) => {
4364
4407
  return {
4365
- ...(input.eventId !== undefined && input.eventId !== null && { eventId: input.eventId }),
4366
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4408
+ ...(input.eventId != null && { eventId: input.eventId }),
4409
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4367
4410
  };
4368
4411
  };
4369
4412
  const serializeAws_json1_1GetEventTypesRequest = (input, context) => {
4370
4413
  return {
4371
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4372
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4373
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4414
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4415
+ ...(input.name != null && { name: input.name }),
4416
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4374
4417
  };
4375
4418
  };
4376
4419
  const serializeAws_json1_1GetExternalModelsRequest = (input, context) => {
4377
4420
  return {
4378
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4379
- ...(input.modelEndpoint !== undefined && input.modelEndpoint !== null && { modelEndpoint: input.modelEndpoint }),
4380
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4421
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4422
+ ...(input.modelEndpoint != null && { modelEndpoint: input.modelEndpoint }),
4423
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4381
4424
  };
4382
4425
  };
4383
4426
  const serializeAws_json1_1GetLabelsRequest = (input, context) => {
4384
4427
  return {
4385
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4386
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4387
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4428
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4429
+ ...(input.name != null && { name: input.name }),
4430
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4388
4431
  };
4389
4432
  };
4390
4433
  const serializeAws_json1_1GetModelsRequest = (input, context) => {
4391
4434
  return {
4392
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4393
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4394
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4395
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4435
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4436
+ ...(input.modelId != null && { modelId: input.modelId }),
4437
+ ...(input.modelType != null && { modelType: input.modelType }),
4438
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4396
4439
  };
4397
4440
  };
4398
4441
  const serializeAws_json1_1GetModelVersionRequest = (input, context) => {
4399
4442
  return {
4400
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4401
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4402
- ...(input.modelVersionNumber !== undefined &&
4403
- input.modelVersionNumber !== null && { modelVersionNumber: input.modelVersionNumber }),
4443
+ ...(input.modelId != null && { modelId: input.modelId }),
4444
+ ...(input.modelType != null && { modelType: input.modelType }),
4445
+ ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }),
4404
4446
  };
4405
4447
  };
4406
4448
  const serializeAws_json1_1GetOutcomesRequest = (input, context) => {
4407
4449
  return {
4408
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4409
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4410
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4450
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4451
+ ...(input.name != null && { name: input.name }),
4452
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4411
4453
  };
4412
4454
  };
4413
4455
  const serializeAws_json1_1GetRulesRequest = (input, context) => {
4414
4456
  return {
4415
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4416
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4417
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4418
- ...(input.ruleId !== undefined && input.ruleId !== null && { ruleId: input.ruleId }),
4419
- ...(input.ruleVersion !== undefined && input.ruleVersion !== null && { ruleVersion: input.ruleVersion }),
4457
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4458
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4459
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4460
+ ...(input.ruleId != null && { ruleId: input.ruleId }),
4461
+ ...(input.ruleVersion != null && { ruleVersion: input.ruleVersion }),
4420
4462
  };
4421
4463
  };
4422
4464
  const serializeAws_json1_1GetVariablesRequest = (input, context) => {
4423
4465
  return {
4424
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4425
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4426
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4466
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4467
+ ...(input.name != null && { name: input.name }),
4468
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4427
4469
  };
4428
4470
  };
4429
4471
  const serializeAws_json1_1IngestedEventsDetail = (input, context) => {
4430
4472
  return {
4431
- ...(input.ingestedEventsTimeWindow !== undefined &&
4432
- input.ingestedEventsTimeWindow !== null && {
4473
+ ...(input.ingestedEventsTimeWindow != null && {
4433
4474
  ingestedEventsTimeWindow: serializeAws_json1_1IngestedEventsTimeWindow(input.ingestedEventsTimeWindow, context),
4434
4475
  }),
4435
4476
  };
4436
4477
  };
4437
4478
  const serializeAws_json1_1IngestedEventsTimeWindow = (input, context) => {
4438
4479
  return {
4439
- ...(input.endTime !== undefined && input.endTime !== null && { endTime: input.endTime }),
4440
- ...(input.startTime !== undefined && input.startTime !== null && { startTime: input.startTime }),
4480
+ ...(input.endTime != null && { endTime: input.endTime }),
4481
+ ...(input.startTime != null && { startTime: input.startTime }),
4441
4482
  };
4442
4483
  };
4443
4484
  const serializeAws_json1_1JsonKeyToVariableMap = (input, context) => {
@@ -4464,28 +4505,21 @@ const serializeAws_json1_1labelMapper = (input, context) => {
4464
4505
  };
4465
4506
  const serializeAws_json1_1LabelSchema = (input, context) => {
4466
4507
  return {
4467
- ...(input.labelMapper !== undefined &&
4468
- input.labelMapper !== null && { labelMapper: serializeAws_json1_1labelMapper(input.labelMapper, context) }),
4469
- ...(input.unlabeledEventsTreatment !== undefined &&
4470
- input.unlabeledEventsTreatment !== null && { unlabeledEventsTreatment: input.unlabeledEventsTreatment }),
4508
+ ...(input.labelMapper != null && { labelMapper: serializeAws_json1_1labelMapper(input.labelMapper, context) }),
4509
+ ...(input.unlabeledEventsTreatment != null && { unlabeledEventsTreatment: input.unlabeledEventsTreatment }),
4471
4510
  };
4472
4511
  };
4473
4512
  const serializeAws_json1_1ListEventPredictionsRequest = (input, context) => {
4474
4513
  return {
4475
- ...(input.detectorId !== undefined &&
4476
- input.detectorId !== null && { detectorId: serializeAws_json1_1FilterCondition(input.detectorId, context) }),
4477
- ...(input.detectorVersionId !== undefined &&
4478
- input.detectorVersionId !== null && {
4514
+ ...(input.detectorId != null && { detectorId: serializeAws_json1_1FilterCondition(input.detectorId, context) }),
4515
+ ...(input.detectorVersionId != null && {
4479
4516
  detectorVersionId: serializeAws_json1_1FilterCondition(input.detectorVersionId, context),
4480
4517
  }),
4481
- ...(input.eventId !== undefined &&
4482
- input.eventId !== null && { eventId: serializeAws_json1_1FilterCondition(input.eventId, context) }),
4483
- ...(input.eventType !== undefined &&
4484
- input.eventType !== null && { eventType: serializeAws_json1_1FilterCondition(input.eventType, context) }),
4485
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4486
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4487
- ...(input.predictionTimeRange !== undefined &&
4488
- input.predictionTimeRange !== null && {
4518
+ ...(input.eventId != null && { eventId: serializeAws_json1_1FilterCondition(input.eventId, context) }),
4519
+ ...(input.eventType != null && { eventType: serializeAws_json1_1FilterCondition(input.eventType, context) }),
4520
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4521
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4522
+ ...(input.predictionTimeRange != null && {
4489
4523
  predictionTimeRange: serializeAws_json1_1PredictionTimeRange(input.predictionTimeRange, context),
4490
4524
  }),
4491
4525
  };
@@ -4522,50 +4556,43 @@ const serializeAws_json1_1ListOfStrings = (input, context) => {
4522
4556
  };
4523
4557
  const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
4524
4558
  return {
4525
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
4526
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
4527
- ...(input.resourceARN !== undefined && input.resourceARN !== null && { resourceARN: input.resourceARN }),
4559
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
4560
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
4561
+ ...(input.resourceARN != null && { resourceARN: input.resourceARN }),
4528
4562
  };
4529
4563
  };
4530
4564
  const serializeAws_json1_1ModelEndpointDataBlob = (input, context) => {
4531
4565
  return {
4532
- ...(input.byteBuffer !== undefined &&
4533
- input.byteBuffer !== null && { byteBuffer: context.base64Encoder(input.byteBuffer) }),
4534
- ...(input.contentType !== undefined && input.contentType !== null && { contentType: input.contentType }),
4566
+ ...(input.byteBuffer != null && { byteBuffer: context.base64Encoder(input.byteBuffer) }),
4567
+ ...(input.contentType != null && { contentType: input.contentType }),
4535
4568
  };
4536
4569
  };
4537
4570
  const serializeAws_json1_1ModelInputConfiguration = (input, context) => {
4538
4571
  return {
4539
- ...(input.csvInputTemplate !== undefined &&
4540
- input.csvInputTemplate !== null && { csvInputTemplate: input.csvInputTemplate }),
4541
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4542
- ...(input.format !== undefined && input.format !== null && { format: input.format }),
4543
- ...(input.jsonInputTemplate !== undefined &&
4544
- input.jsonInputTemplate !== null && { jsonInputTemplate: input.jsonInputTemplate }),
4545
- ...(input.useEventVariables !== undefined &&
4546
- input.useEventVariables !== null && { useEventVariables: input.useEventVariables }),
4572
+ ...(input.csvInputTemplate != null && { csvInputTemplate: input.csvInputTemplate }),
4573
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4574
+ ...(input.format != null && { format: input.format }),
4575
+ ...(input.jsonInputTemplate != null && { jsonInputTemplate: input.jsonInputTemplate }),
4576
+ ...(input.useEventVariables != null && { useEventVariables: input.useEventVariables }),
4547
4577
  };
4548
4578
  };
4549
4579
  const serializeAws_json1_1ModelOutputConfiguration = (input, context) => {
4550
4580
  return {
4551
- ...(input.csvIndexToVariableMap !== undefined &&
4552
- input.csvIndexToVariableMap !== null && {
4581
+ ...(input.csvIndexToVariableMap != null && {
4553
4582
  csvIndexToVariableMap: serializeAws_json1_1CsvIndexToVariableMap(input.csvIndexToVariableMap, context),
4554
4583
  }),
4555
- ...(input.format !== undefined && input.format !== null && { format: input.format }),
4556
- ...(input.jsonKeyToVariableMap !== undefined &&
4557
- input.jsonKeyToVariableMap !== null && {
4584
+ ...(input.format != null && { format: input.format }),
4585
+ ...(input.jsonKeyToVariableMap != null && {
4558
4586
  jsonKeyToVariableMap: serializeAws_json1_1JsonKeyToVariableMap(input.jsonKeyToVariableMap, context),
4559
4587
  }),
4560
4588
  };
4561
4589
  };
4562
4590
  const serializeAws_json1_1ModelVersion = (input, context) => {
4563
4591
  return {
4564
- ...(input.arn !== undefined && input.arn !== null && { arn: input.arn }),
4565
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4566
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4567
- ...(input.modelVersionNumber !== undefined &&
4568
- input.modelVersionNumber !== null && { modelVersionNumber: input.modelVersionNumber }),
4592
+ ...(input.arn != null && { arn: input.arn }),
4593
+ ...(input.modelId != null && { modelId: input.modelId }),
4594
+ ...(input.modelType != null && { modelType: input.modelType }),
4595
+ ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }),
4569
4596
  };
4570
4597
  };
4571
4598
  const serializeAws_json1_1NameList = (input, context) => {
@@ -4590,88 +4617,79 @@ const serializeAws_json1_1NonEmptyListOfStrings = (input, context) => {
4590
4617
  };
4591
4618
  const serializeAws_json1_1PredictionTimeRange = (input, context) => {
4592
4619
  return {
4593
- ...(input.endTime !== undefined && input.endTime !== null && { endTime: input.endTime }),
4594
- ...(input.startTime !== undefined && input.startTime !== null && { startTime: input.startTime }),
4620
+ ...(input.endTime != null && { endTime: input.endTime }),
4621
+ ...(input.startTime != null && { startTime: input.startTime }),
4595
4622
  };
4596
4623
  };
4597
4624
  const serializeAws_json1_1PutDetectorRequest = (input, context) => {
4598
4625
  return {
4599
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4600
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4601
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4602
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4626
+ ...(input.description != null && { description: input.description }),
4627
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4628
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4629
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4603
4630
  };
4604
4631
  };
4605
4632
  const serializeAws_json1_1PutEntityTypeRequest = (input, context) => {
4606
4633
  return {
4607
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4608
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4609
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4634
+ ...(input.description != null && { description: input.description }),
4635
+ ...(input.name != null && { name: input.name }),
4636
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4610
4637
  };
4611
4638
  };
4612
4639
  const serializeAws_json1_1PutEventTypeRequest = (input, context) => {
4613
4640
  return {
4614
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4615
- ...(input.entityTypes !== undefined &&
4616
- input.entityTypes !== null && {
4641
+ ...(input.description != null && { description: input.description }),
4642
+ ...(input.entityTypes != null && {
4617
4643
  entityTypes: serializeAws_json1_1NonEmptyListOfStrings(input.entityTypes, context),
4618
4644
  }),
4619
- ...(input.eventIngestion !== undefined &&
4620
- input.eventIngestion !== null && { eventIngestion: input.eventIngestion }),
4621
- ...(input.eventVariables !== undefined &&
4622
- input.eventVariables !== null && {
4645
+ ...(input.eventIngestion != null && { eventIngestion: input.eventIngestion }),
4646
+ ...(input.eventVariables != null && {
4623
4647
  eventVariables: serializeAws_json1_1NonEmptyListOfStrings(input.eventVariables, context),
4624
4648
  }),
4625
- ...(input.labels !== undefined &&
4626
- input.labels !== null && { labels: serializeAws_json1_1ListOfStrings(input.labels, context) }),
4627
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4628
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4649
+ ...(input.labels != null && { labels: serializeAws_json1_1ListOfStrings(input.labels, context) }),
4650
+ ...(input.name != null && { name: input.name }),
4651
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4629
4652
  };
4630
4653
  };
4631
4654
  const serializeAws_json1_1PutExternalModelRequest = (input, context) => {
4632
4655
  return {
4633
- ...(input.inputConfiguration !== undefined &&
4634
- input.inputConfiguration !== null && {
4656
+ ...(input.inputConfiguration != null && {
4635
4657
  inputConfiguration: serializeAws_json1_1ModelInputConfiguration(input.inputConfiguration, context),
4636
4658
  }),
4637
- ...(input.invokeModelEndpointRoleArn !== undefined &&
4638
- input.invokeModelEndpointRoleArn !== null && { invokeModelEndpointRoleArn: input.invokeModelEndpointRoleArn }),
4639
- ...(input.modelEndpoint !== undefined && input.modelEndpoint !== null && { modelEndpoint: input.modelEndpoint }),
4640
- ...(input.modelEndpointStatus !== undefined &&
4641
- input.modelEndpointStatus !== null && { modelEndpointStatus: input.modelEndpointStatus }),
4642
- ...(input.modelSource !== undefined && input.modelSource !== null && { modelSource: input.modelSource }),
4643
- ...(input.outputConfiguration !== undefined &&
4644
- input.outputConfiguration !== null && {
4659
+ ...(input.invokeModelEndpointRoleArn != null && { invokeModelEndpointRoleArn: input.invokeModelEndpointRoleArn }),
4660
+ ...(input.modelEndpoint != null && { modelEndpoint: input.modelEndpoint }),
4661
+ ...(input.modelEndpointStatus != null && { modelEndpointStatus: input.modelEndpointStatus }),
4662
+ ...(input.modelSource != null && { modelSource: input.modelSource }),
4663
+ ...(input.outputConfiguration != null && {
4645
4664
  outputConfiguration: serializeAws_json1_1ModelOutputConfiguration(input.outputConfiguration, context),
4646
4665
  }),
4647
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4666
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4648
4667
  };
4649
4668
  };
4650
4669
  const serializeAws_json1_1PutKMSEncryptionKeyRequest = (input, context) => {
4651
4670
  return {
4652
- ...(input.kmsEncryptionKeyArn !== undefined &&
4653
- input.kmsEncryptionKeyArn !== null && { kmsEncryptionKeyArn: input.kmsEncryptionKeyArn }),
4671
+ ...(input.kmsEncryptionKeyArn != null && { kmsEncryptionKeyArn: input.kmsEncryptionKeyArn }),
4654
4672
  };
4655
4673
  };
4656
4674
  const serializeAws_json1_1PutLabelRequest = (input, context) => {
4657
4675
  return {
4658
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4659
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4660
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4676
+ ...(input.description != null && { description: input.description }),
4677
+ ...(input.name != null && { name: input.name }),
4678
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4661
4679
  };
4662
4680
  };
4663
4681
  const serializeAws_json1_1PutOutcomeRequest = (input, context) => {
4664
4682
  return {
4665
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4666
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4667
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4683
+ ...(input.description != null && { description: input.description }),
4684
+ ...(input.name != null && { name: input.name }),
4685
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4668
4686
  };
4669
4687
  };
4670
4688
  const serializeAws_json1_1Rule = (input, context) => {
4671
4689
  return {
4672
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4673
- ...(input.ruleId !== undefined && input.ruleId !== null && { ruleId: input.ruleId }),
4674
- ...(input.ruleVersion !== undefined && input.ruleVersion !== null && { ruleVersion: input.ruleVersion }),
4690
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4691
+ ...(input.ruleId != null && { ruleId: input.ruleId }),
4692
+ ...(input.ruleVersion != null && { ruleVersion: input.ruleVersion }),
4675
4693
  };
4676
4694
  };
4677
4695
  const serializeAws_json1_1RuleList = (input, context) => {
@@ -4686,25 +4704,21 @@ const serializeAws_json1_1RuleList = (input, context) => {
4686
4704
  };
4687
4705
  const serializeAws_json1_1SendEventRequest = (input, context) => {
4688
4706
  return {
4689
- ...(input.assignedLabel !== undefined && input.assignedLabel !== null && { assignedLabel: input.assignedLabel }),
4690
- ...(input.entities !== undefined &&
4691
- input.entities !== null && { entities: serializeAws_json1_1listOfEntities(input.entities, context) }),
4692
- ...(input.eventId !== undefined && input.eventId !== null && { eventId: input.eventId }),
4693
- ...(input.eventTimestamp !== undefined &&
4694
- input.eventTimestamp !== null && { eventTimestamp: input.eventTimestamp }),
4695
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4696
- ...(input.eventVariables !== undefined &&
4697
- input.eventVariables !== null && {
4707
+ ...(input.assignedLabel != null && { assignedLabel: input.assignedLabel }),
4708
+ ...(input.entities != null && { entities: serializeAws_json1_1listOfEntities(input.entities, context) }),
4709
+ ...(input.eventId != null && { eventId: input.eventId }),
4710
+ ...(input.eventTimestamp != null && { eventTimestamp: input.eventTimestamp }),
4711
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4712
+ ...(input.eventVariables != null && {
4698
4713
  eventVariables: serializeAws_json1_1EventVariableMap(input.eventVariables, context),
4699
4714
  }),
4700
- ...(input.labelTimestamp !== undefined &&
4701
- input.labelTimestamp !== null && { labelTimestamp: input.labelTimestamp }),
4715
+ ...(input.labelTimestamp != null && { labelTimestamp: input.labelTimestamp }),
4702
4716
  };
4703
4717
  };
4704
4718
  const serializeAws_json1_1Tag = (input, context) => {
4705
4719
  return {
4706
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
4707
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
4720
+ ...(input.key != null && { key: input.key }),
4721
+ ...(input.value != null && { value: input.value }),
4708
4722
  };
4709
4723
  };
4710
4724
  const serializeAws_json1_1tagKeyList = (input, context) => {
@@ -4729,138 +4743,122 @@ const serializeAws_json1_1tagList = (input, context) => {
4729
4743
  };
4730
4744
  const serializeAws_json1_1TagResourceRequest = (input, context) => {
4731
4745
  return {
4732
- ...(input.resourceARN !== undefined && input.resourceARN !== null && { resourceARN: input.resourceARN }),
4733
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4746
+ ...(input.resourceARN != null && { resourceARN: input.resourceARN }),
4747
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4734
4748
  };
4735
4749
  };
4736
4750
  const serializeAws_json1_1TrainingDataSchema = (input, context) => {
4737
4751
  return {
4738
- ...(input.labelSchema !== undefined &&
4739
- input.labelSchema !== null && { labelSchema: serializeAws_json1_1LabelSchema(input.labelSchema, context) }),
4740
- ...(input.modelVariables !== undefined &&
4741
- input.modelVariables !== null && {
4752
+ ...(input.labelSchema != null && { labelSchema: serializeAws_json1_1LabelSchema(input.labelSchema, context) }),
4753
+ ...(input.modelVariables != null && {
4742
4754
  modelVariables: serializeAws_json1_1ListOfStrings(input.modelVariables, context),
4743
4755
  }),
4744
4756
  };
4745
4757
  };
4746
4758
  const serializeAws_json1_1UntagResourceRequest = (input, context) => {
4747
4759
  return {
4748
- ...(input.resourceARN !== undefined && input.resourceARN !== null && { resourceARN: input.resourceARN }),
4749
- ...(input.tagKeys !== undefined &&
4750
- input.tagKeys !== null && { tagKeys: serializeAws_json1_1tagKeyList(input.tagKeys, context) }),
4760
+ ...(input.resourceARN != null && { resourceARN: input.resourceARN }),
4761
+ ...(input.tagKeys != null && { tagKeys: serializeAws_json1_1tagKeyList(input.tagKeys, context) }),
4751
4762
  };
4752
4763
  };
4753
4764
  const serializeAws_json1_1UpdateDetectorVersionMetadataRequest = (input, context) => {
4754
4765
  return {
4755
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4756
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4757
- ...(input.detectorVersionId !== undefined &&
4758
- input.detectorVersionId !== null && { detectorVersionId: input.detectorVersionId }),
4766
+ ...(input.description != null && { description: input.description }),
4767
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4768
+ ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }),
4759
4769
  };
4760
4770
  };
4761
4771
  const serializeAws_json1_1UpdateDetectorVersionRequest = (input, context) => {
4762
4772
  return {
4763
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4764
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4765
- ...(input.detectorVersionId !== undefined &&
4766
- input.detectorVersionId !== null && { detectorVersionId: input.detectorVersionId }),
4767
- ...(input.externalModelEndpoints !== undefined &&
4768
- input.externalModelEndpoints !== null && {
4773
+ ...(input.description != null && { description: input.description }),
4774
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4775
+ ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }),
4776
+ ...(input.externalModelEndpoints != null && {
4769
4777
  externalModelEndpoints: serializeAws_json1_1ListOfStrings(input.externalModelEndpoints, context),
4770
4778
  }),
4771
- ...(input.modelVersions !== undefined &&
4772
- input.modelVersions !== null && {
4779
+ ...(input.modelVersions != null && {
4773
4780
  modelVersions: serializeAws_json1_1ListOfModelVersions(input.modelVersions, context),
4774
4781
  }),
4775
- ...(input.ruleExecutionMode !== undefined &&
4776
- input.ruleExecutionMode !== null && { ruleExecutionMode: input.ruleExecutionMode }),
4777
- ...(input.rules !== undefined &&
4778
- input.rules !== null && { rules: serializeAws_json1_1RuleList(input.rules, context) }),
4782
+ ...(input.ruleExecutionMode != null && { ruleExecutionMode: input.ruleExecutionMode }),
4783
+ ...(input.rules != null && { rules: serializeAws_json1_1RuleList(input.rules, context) }),
4779
4784
  };
4780
4785
  };
4781
4786
  const serializeAws_json1_1UpdateDetectorVersionStatusRequest = (input, context) => {
4782
4787
  return {
4783
- ...(input.detectorId !== undefined && input.detectorId !== null && { detectorId: input.detectorId }),
4784
- ...(input.detectorVersionId !== undefined &&
4785
- input.detectorVersionId !== null && { detectorVersionId: input.detectorVersionId }),
4786
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
4788
+ ...(input.detectorId != null && { detectorId: input.detectorId }),
4789
+ ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }),
4790
+ ...(input.status != null && { status: input.status }),
4787
4791
  };
4788
4792
  };
4789
4793
  const serializeAws_json1_1UpdateEventLabelRequest = (input, context) => {
4790
4794
  return {
4791
- ...(input.assignedLabel !== undefined && input.assignedLabel !== null && { assignedLabel: input.assignedLabel }),
4792
- ...(input.eventId !== undefined && input.eventId !== null && { eventId: input.eventId }),
4793
- ...(input.eventTypeName !== undefined && input.eventTypeName !== null && { eventTypeName: input.eventTypeName }),
4794
- ...(input.labelTimestamp !== undefined &&
4795
- input.labelTimestamp !== null && { labelTimestamp: input.labelTimestamp }),
4795
+ ...(input.assignedLabel != null && { assignedLabel: input.assignedLabel }),
4796
+ ...(input.eventId != null && { eventId: input.eventId }),
4797
+ ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }),
4798
+ ...(input.labelTimestamp != null && { labelTimestamp: input.labelTimestamp }),
4796
4799
  };
4797
4800
  };
4798
4801
  const serializeAws_json1_1UpdateModelRequest = (input, context) => {
4799
4802
  return {
4800
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4801
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4802
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4803
+ ...(input.description != null && { description: input.description }),
4804
+ ...(input.modelId != null && { modelId: input.modelId }),
4805
+ ...(input.modelType != null && { modelType: input.modelType }),
4803
4806
  };
4804
4807
  };
4805
4808
  const serializeAws_json1_1UpdateModelVersionRequest = (input, context) => {
4806
4809
  return {
4807
- ...(input.externalEventsDetail !== undefined &&
4808
- input.externalEventsDetail !== null && {
4810
+ ...(input.externalEventsDetail != null && {
4809
4811
  externalEventsDetail: serializeAws_json1_1ExternalEventsDetail(input.externalEventsDetail, context),
4810
4812
  }),
4811
- ...(input.ingestedEventsDetail !== undefined &&
4812
- input.ingestedEventsDetail !== null && {
4813
+ ...(input.ingestedEventsDetail != null && {
4813
4814
  ingestedEventsDetail: serializeAws_json1_1IngestedEventsDetail(input.ingestedEventsDetail, context),
4814
4815
  }),
4815
- ...(input.majorVersionNumber !== undefined &&
4816
- input.majorVersionNumber !== null && { majorVersionNumber: input.majorVersionNumber }),
4817
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4818
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4819
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4816
+ ...(input.majorVersionNumber != null && { majorVersionNumber: input.majorVersionNumber }),
4817
+ ...(input.modelId != null && { modelId: input.modelId }),
4818
+ ...(input.modelType != null && { modelType: input.modelType }),
4819
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4820
4820
  };
4821
4821
  };
4822
4822
  const serializeAws_json1_1UpdateModelVersionStatusRequest = (input, context) => {
4823
4823
  return {
4824
- ...(input.modelId !== undefined && input.modelId !== null && { modelId: input.modelId }),
4825
- ...(input.modelType !== undefined && input.modelType !== null && { modelType: input.modelType }),
4826
- ...(input.modelVersionNumber !== undefined &&
4827
- input.modelVersionNumber !== null && { modelVersionNumber: input.modelVersionNumber }),
4828
- ...(input.status !== undefined && input.status !== null && { status: input.status }),
4824
+ ...(input.modelId != null && { modelId: input.modelId }),
4825
+ ...(input.modelType != null && { modelType: input.modelType }),
4826
+ ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }),
4827
+ ...(input.status != null && { status: input.status }),
4829
4828
  };
4830
4829
  };
4831
4830
  const serializeAws_json1_1UpdateRuleMetadataRequest = (input, context) => {
4832
4831
  return {
4833
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4834
- ...(input.rule !== undefined && input.rule !== null && { rule: serializeAws_json1_1Rule(input.rule, context) }),
4832
+ ...(input.description != null && { description: input.description }),
4833
+ ...(input.rule != null && { rule: serializeAws_json1_1Rule(input.rule, context) }),
4835
4834
  };
4836
4835
  };
4837
4836
  const serializeAws_json1_1UpdateRuleVersionRequest = (input, context) => {
4838
4837
  return {
4839
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4840
- ...(input.expression !== undefined && input.expression !== null && { expression: input.expression }),
4841
- ...(input.language !== undefined && input.language !== null && { language: input.language }),
4842
- ...(input.outcomes !== undefined &&
4843
- input.outcomes !== null && { outcomes: serializeAws_json1_1NonEmptyListOfStrings(input.outcomes, context) }),
4844
- ...(input.rule !== undefined && input.rule !== null && { rule: serializeAws_json1_1Rule(input.rule, context) }),
4845
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4838
+ ...(input.description != null && { description: input.description }),
4839
+ ...(input.expression != null && { expression: input.expression }),
4840
+ ...(input.language != null && { language: input.language }),
4841
+ ...(input.outcomes != null && { outcomes: serializeAws_json1_1NonEmptyListOfStrings(input.outcomes, context) }),
4842
+ ...(input.rule != null && { rule: serializeAws_json1_1Rule(input.rule, context) }),
4843
+ ...(input.tags != null && { tags: serializeAws_json1_1tagList(input.tags, context) }),
4846
4844
  };
4847
4845
  };
4848
4846
  const serializeAws_json1_1UpdateVariableRequest = (input, context) => {
4849
4847
  return {
4850
- ...(input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue }),
4851
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4852
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4853
- ...(input.variableType !== undefined && input.variableType !== null && { variableType: input.variableType }),
4848
+ ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
4849
+ ...(input.description != null && { description: input.description }),
4850
+ ...(input.name != null && { name: input.name }),
4851
+ ...(input.variableType != null && { variableType: input.variableType }),
4854
4852
  };
4855
4853
  };
4856
4854
  const serializeAws_json1_1VariableEntry = (input, context) => {
4857
4855
  return {
4858
- ...(input.dataSource !== undefined && input.dataSource !== null && { dataSource: input.dataSource }),
4859
- ...(input.dataType !== undefined && input.dataType !== null && { dataType: input.dataType }),
4860
- ...(input.defaultValue !== undefined && input.defaultValue !== null && { defaultValue: input.defaultValue }),
4861
- ...(input.description !== undefined && input.description !== null && { description: input.description }),
4862
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4863
- ...(input.variableType !== undefined && input.variableType !== null && { variableType: input.variableType }),
4856
+ ...(input.dataSource != null && { dataSource: input.dataSource }),
4857
+ ...(input.dataType != null && { dataType: input.dataType }),
4858
+ ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
4859
+ ...(input.description != null && { description: input.description }),
4860
+ ...(input.name != null && { name: input.name }),
4861
+ ...(input.variableType != null && { variableType: input.variableType }),
4864
4862
  };
4865
4863
  };
4866
4864
  const serializeAws_json1_1VariableEntryList = (input, context) => {
@@ -4898,9 +4896,7 @@ const deserializeAws_json1_1BatchCreateVariableErrorList = (output, context) =>
4898
4896
  };
4899
4897
  const deserializeAws_json1_1BatchCreateVariableResult = (output, context) => {
4900
4898
  return {
4901
- errors: output.errors !== undefined && output.errors !== null
4902
- ? deserializeAws_json1_1BatchCreateVariableErrorList(output.errors, context)
4903
- : undefined,
4899
+ errors: output.errors != null ? deserializeAws_json1_1BatchCreateVariableErrorList(output.errors, context) : undefined,
4904
4900
  };
4905
4901
  };
4906
4902
  const deserializeAws_json1_1BatchGetVariableError = (output, context) => {
@@ -4923,12 +4919,8 @@ const deserializeAws_json1_1BatchGetVariableErrorList = (output, context) => {
4923
4919
  };
4924
4920
  const deserializeAws_json1_1BatchGetVariableResult = (output, context) => {
4925
4921
  return {
4926
- errors: output.errors !== undefined && output.errors !== null
4927
- ? deserializeAws_json1_1BatchGetVariableErrorList(output.errors, context)
4928
- : undefined,
4929
- variables: output.variables !== undefined && output.variables !== null
4930
- ? deserializeAws_json1_1VariableList(output.variables, context)
4931
- : undefined,
4922
+ errors: output.errors != null ? deserializeAws_json1_1BatchGetVariableErrorList(output.errors, context) : undefined,
4923
+ variables: output.variables != null ? deserializeAws_json1_1VariableList(output.variables, context) : undefined,
4932
4924
  };
4933
4925
  };
4934
4926
  const deserializeAws_json1_1BatchImport = (output, context) => {
@@ -5026,7 +5018,7 @@ const deserializeAws_json1_1CreateModelVersionResult = (output, context) => {
5026
5018
  };
5027
5019
  const deserializeAws_json1_1CreateRuleResult = (output, context) => {
5028
5020
  return {
5029
- rule: output.rule !== undefined && output.rule !== null ? deserializeAws_json1_1Rule(output.rule, context) : undefined,
5021
+ rule: output.rule != null ? deserializeAws_json1_1Rule(output.rule, context) : undefined,
5030
5022
  };
5031
5023
  };
5032
5024
  const deserializeAws_json1_1CreateVariableResult = (output, context) => {
@@ -5045,10 +5037,10 @@ const deserializeAws_json1_1CsvIndexToVariableMap = (output, context) => {
5045
5037
  };
5046
5038
  const deserializeAws_json1_1DataValidationMetrics = (output, context) => {
5047
5039
  return {
5048
- fieldLevelMessages: output.fieldLevelMessages !== undefined && output.fieldLevelMessages !== null
5040
+ fieldLevelMessages: output.fieldLevelMessages != null
5049
5041
  ? deserializeAws_json1_1fieldValidationMessageList(output.fieldLevelMessages, context)
5050
5042
  : undefined,
5051
- fileLevelMessages: output.fileLevelMessages !== undefined && output.fileLevelMessages !== null
5043
+ fileLevelMessages: output.fileLevelMessages != null
5052
5044
  ? deserializeAws_json1_1fileValidationMessageList(output.fileLevelMessages, context)
5053
5045
  : undefined,
5054
5046
  };
@@ -5105,7 +5097,7 @@ const deserializeAws_json1_1DescribeDetectorResult = (output, context) => {
5105
5097
  return {
5106
5098
  arn: (0, smithy_client_1.expectString)(output.arn),
5107
5099
  detectorId: (0, smithy_client_1.expectString)(output.detectorId),
5108
- detectorVersionSummaries: output.detectorVersionSummaries !== undefined && output.detectorVersionSummaries !== null
5100
+ detectorVersionSummaries: output.detectorVersionSummaries != null
5109
5101
  ? deserializeAws_json1_1DetectorVersionSummaryList(output.detectorVersionSummaries, context)
5110
5102
  : undefined,
5111
5103
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
@@ -5113,7 +5105,7 @@ const deserializeAws_json1_1DescribeDetectorResult = (output, context) => {
5113
5105
  };
5114
5106
  const deserializeAws_json1_1DescribeModelVersionsResult = (output, context) => {
5115
5107
  return {
5116
- modelVersionDetails: output.modelVersionDetails !== undefined && output.modelVersionDetails !== null
5108
+ modelVersionDetails: output.modelVersionDetails != null
5117
5109
  ? deserializeAws_json1_1modelVersionDetailList(output.modelVersionDetails, context)
5118
5110
  : undefined,
5119
5111
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
@@ -5187,19 +5179,15 @@ const deserializeAws_json1_1entityTypeList = (output, context) => {
5187
5179
  };
5188
5180
  const deserializeAws_json1_1EvaluatedExternalModel = (output, context) => {
5189
5181
  return {
5190
- inputVariables: output.inputVariables !== undefined && output.inputVariables !== null
5191
- ? deserializeAws_json1_1MapOfStrings(output.inputVariables, context)
5192
- : undefined,
5182
+ inputVariables: output.inputVariables != null ? deserializeAws_json1_1MapOfStrings(output.inputVariables, context) : undefined,
5193
5183
  modelEndpoint: (0, smithy_client_1.expectString)(output.modelEndpoint),
5194
- outputVariables: output.outputVariables !== undefined && output.outputVariables !== null
5195
- ? deserializeAws_json1_1MapOfStrings(output.outputVariables, context)
5196
- : undefined,
5184
+ outputVariables: output.outputVariables != null ? deserializeAws_json1_1MapOfStrings(output.outputVariables, context) : undefined,
5197
5185
  useEventVariables: (0, smithy_client_1.expectBoolean)(output.useEventVariables),
5198
5186
  };
5199
5187
  };
5200
5188
  const deserializeAws_json1_1EvaluatedModelVersion = (output, context) => {
5201
5189
  return {
5202
- evaluations: output.evaluations !== undefined && output.evaluations !== null
5190
+ evaluations: output.evaluations != null
5203
5191
  ? deserializeAws_json1_1ListOfModelVersionEvaluations(output.evaluations, context)
5204
5192
  : undefined,
5205
5193
  modelId: (0, smithy_client_1.expectString)(output.modelId),
@@ -5213,9 +5201,7 @@ const deserializeAws_json1_1EvaluatedRule = (output, context) => {
5213
5201
  expression: (0, smithy_client_1.expectString)(output.expression),
5214
5202
  expressionWithValues: (0, smithy_client_1.expectString)(output.expressionWithValues),
5215
5203
  matched: (0, smithy_client_1.expectBoolean)(output.matched),
5216
- outcomes: output.outcomes !== undefined && output.outcomes !== null
5217
- ? deserializeAws_json1_1ListOfStrings(output.outcomes, context)
5218
- : undefined,
5204
+ outcomes: output.outcomes != null ? deserializeAws_json1_1ListOfStrings(output.outcomes, context) : undefined,
5219
5205
  ruleId: (0, smithy_client_1.expectString)(output.ruleId),
5220
5206
  ruleVersion: (0, smithy_client_1.expectString)(output.ruleVersion),
5221
5207
  };
@@ -5234,13 +5220,11 @@ const deserializeAws_json1_1EvaluatedRuleList = (output, context) => {
5234
5220
  const deserializeAws_json1_1Event = (output, context) => {
5235
5221
  return {
5236
5222
  currentLabel: (0, smithy_client_1.expectString)(output.currentLabel),
5237
- entities: output.entities !== undefined && output.entities !== null
5238
- ? deserializeAws_json1_1listOfEntities(output.entities, context)
5239
- : undefined,
5223
+ entities: output.entities != null ? deserializeAws_json1_1listOfEntities(output.entities, context) : undefined,
5240
5224
  eventId: (0, smithy_client_1.expectString)(output.eventId),
5241
5225
  eventTimestamp: (0, smithy_client_1.expectString)(output.eventTimestamp),
5242
5226
  eventTypeName: (0, smithy_client_1.expectString)(output.eventTypeName),
5243
- eventVariables: output.eventVariables !== undefined && output.eventVariables !== null
5227
+ eventVariables: output.eventVariables != null
5244
5228
  ? deserializeAws_json1_1EventAttributeMap(output.eventVariables, context)
5245
5229
  : undefined,
5246
5230
  labelTimestamp: (0, smithy_client_1.expectString)(output.labelTimestamp),
@@ -5272,19 +5256,13 @@ const deserializeAws_json1_1EventType = (output, context) => {
5272
5256
  arn: (0, smithy_client_1.expectString)(output.arn),
5273
5257
  createdTime: (0, smithy_client_1.expectString)(output.createdTime),
5274
5258
  description: (0, smithy_client_1.expectString)(output.description),
5275
- entityTypes: output.entityTypes !== undefined && output.entityTypes !== null
5276
- ? deserializeAws_json1_1NonEmptyListOfStrings(output.entityTypes, context)
5277
- : undefined,
5259
+ entityTypes: output.entityTypes != null ? deserializeAws_json1_1NonEmptyListOfStrings(output.entityTypes, context) : undefined,
5278
5260
  eventIngestion: (0, smithy_client_1.expectString)(output.eventIngestion),
5279
- eventVariables: output.eventVariables !== undefined && output.eventVariables !== null
5280
- ? deserializeAws_json1_1ListOfStrings(output.eventVariables, context)
5281
- : undefined,
5282
- ingestedEventStatistics: output.ingestedEventStatistics !== undefined && output.ingestedEventStatistics !== null
5261
+ eventVariables: output.eventVariables != null ? deserializeAws_json1_1ListOfStrings(output.eventVariables, context) : undefined,
5262
+ ingestedEventStatistics: output.ingestedEventStatistics != null
5283
5263
  ? deserializeAws_json1_1IngestedEventStatistics(output.ingestedEventStatistics, context)
5284
5264
  : undefined,
5285
- labels: output.labels !== undefined && output.labels !== null
5286
- ? deserializeAws_json1_1ListOfStrings(output.labels, context)
5287
- : undefined,
5265
+ labels: output.labels != null ? deserializeAws_json1_1ListOfStrings(output.labels, context) : undefined,
5288
5266
  lastUpdatedTime: (0, smithy_client_1.expectString)(output.lastUpdatedTime),
5289
5267
  name: (0, smithy_client_1.expectString)(output.name),
5290
5268
  };
@@ -5317,7 +5295,7 @@ const deserializeAws_json1_1ExternalModel = (output, context) => {
5317
5295
  return {
5318
5296
  arn: (0, smithy_client_1.expectString)(output.arn),
5319
5297
  createdTime: (0, smithy_client_1.expectString)(output.createdTime),
5320
- inputConfiguration: output.inputConfiguration !== undefined && output.inputConfiguration !== null
5298
+ inputConfiguration: output.inputConfiguration != null
5321
5299
  ? deserializeAws_json1_1ModelInputConfiguration(output.inputConfiguration, context)
5322
5300
  : undefined,
5323
5301
  invokeModelEndpointRoleArn: (0, smithy_client_1.expectString)(output.invokeModelEndpointRoleArn),
@@ -5325,7 +5303,7 @@ const deserializeAws_json1_1ExternalModel = (output, context) => {
5325
5303
  modelEndpoint: (0, smithy_client_1.expectString)(output.modelEndpoint),
5326
5304
  modelEndpointStatus: (0, smithy_client_1.expectString)(output.modelEndpointStatus),
5327
5305
  modelSource: (0, smithy_client_1.expectString)(output.modelSource),
5328
- outputConfiguration: output.outputConfiguration !== undefined && output.outputConfiguration !== null
5306
+ outputConfiguration: output.outputConfiguration != null
5329
5307
  ? deserializeAws_json1_1ModelOutputConfiguration(output.outputConfiguration, context)
5330
5308
  : undefined,
5331
5309
  };
@@ -5343,12 +5321,10 @@ const deserializeAws_json1_1ExternalModelList = (output, context) => {
5343
5321
  };
5344
5322
  const deserializeAws_json1_1ExternalModelOutputs = (output, context) => {
5345
5323
  return {
5346
- externalModel: output.externalModel !== undefined && output.externalModel !== null
5324
+ externalModel: output.externalModel != null
5347
5325
  ? deserializeAws_json1_1ExternalModelSummary(output.externalModel, context)
5348
5326
  : undefined,
5349
- outputs: output.outputs !== undefined && output.outputs !== null
5350
- ? deserializeAws_json1_1ExternalModelPredictionMap(output.outputs, context)
5351
- : undefined,
5327
+ outputs: output.outputs != null ? deserializeAws_json1_1ExternalModelPredictionMap(output.outputs, context) : undefined,
5352
5328
  };
5353
5329
  };
5354
5330
  const deserializeAws_json1_1ExternalModelPredictionMap = (output, context) => {
@@ -5408,15 +5384,13 @@ const deserializeAws_json1_1fileValidationMessageList = (output, context) => {
5408
5384
  };
5409
5385
  const deserializeAws_json1_1GetBatchImportJobsResult = (output, context) => {
5410
5386
  return {
5411
- batchImports: output.batchImports !== undefined && output.batchImports !== null
5412
- ? deserializeAws_json1_1BatchImportList(output.batchImports, context)
5413
- : undefined,
5387
+ batchImports: output.batchImports != null ? deserializeAws_json1_1BatchImportList(output.batchImports, context) : undefined,
5414
5388
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5415
5389
  };
5416
5390
  };
5417
5391
  const deserializeAws_json1_1GetBatchPredictionJobsResult = (output, context) => {
5418
5392
  return {
5419
- batchPredictions: output.batchPredictions !== undefined && output.batchPredictions !== null
5393
+ batchPredictions: output.batchPredictions != null
5420
5394
  ? deserializeAws_json1_1BatchPredictionList(output.batchPredictions, context)
5421
5395
  : undefined,
5422
5396
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
@@ -5430,9 +5404,7 @@ const deserializeAws_json1_1GetDeleteEventsByEventTypeStatusResult = (output, co
5430
5404
  };
5431
5405
  const deserializeAws_json1_1GetDetectorsResult = (output, context) => {
5432
5406
  return {
5433
- detectors: output.detectors !== undefined && output.detectors !== null
5434
- ? deserializeAws_json1_1DetectorList(output.detectors, context)
5435
- : undefined,
5407
+ detectors: output.detectors != null ? deserializeAws_json1_1DetectorList(output.detectors, context) : undefined,
5436
5408
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5437
5409
  };
5438
5410
  };
@@ -5443,25 +5415,21 @@ const deserializeAws_json1_1GetDetectorVersionResult = (output, context) => {
5443
5415
  description: (0, smithy_client_1.expectString)(output.description),
5444
5416
  detectorId: (0, smithy_client_1.expectString)(output.detectorId),
5445
5417
  detectorVersionId: (0, smithy_client_1.expectString)(output.detectorVersionId),
5446
- externalModelEndpoints: output.externalModelEndpoints !== undefined && output.externalModelEndpoints !== null
5418
+ externalModelEndpoints: output.externalModelEndpoints != null
5447
5419
  ? deserializeAws_json1_1ListOfStrings(output.externalModelEndpoints, context)
5448
5420
  : undefined,
5449
5421
  lastUpdatedTime: (0, smithy_client_1.expectString)(output.lastUpdatedTime),
5450
- modelVersions: output.modelVersions !== undefined && output.modelVersions !== null
5422
+ modelVersions: output.modelVersions != null
5451
5423
  ? deserializeAws_json1_1ListOfModelVersions(output.modelVersions, context)
5452
5424
  : undefined,
5453
5425
  ruleExecutionMode: (0, smithy_client_1.expectString)(output.ruleExecutionMode),
5454
- rules: output.rules !== undefined && output.rules !== null
5455
- ? deserializeAws_json1_1RuleList(output.rules, context)
5456
- : undefined,
5426
+ rules: output.rules != null ? deserializeAws_json1_1RuleList(output.rules, context) : undefined,
5457
5427
  status: (0, smithy_client_1.expectString)(output.status),
5458
5428
  };
5459
5429
  };
5460
5430
  const deserializeAws_json1_1GetEntityTypesResult = (output, context) => {
5461
5431
  return {
5462
- entityTypes: output.entityTypes !== undefined && output.entityTypes !== null
5463
- ? deserializeAws_json1_1entityTypeList(output.entityTypes, context)
5464
- : undefined,
5432
+ entityTypes: output.entityTypes != null ? deserializeAws_json1_1entityTypeList(output.entityTypes, context) : undefined,
5465
5433
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5466
5434
  };
5467
5435
  };
@@ -5472,59 +5440,47 @@ const deserializeAws_json1_1GetEventPredictionMetadataResult = (output, context)
5472
5440
  detectorVersionStatus: (0, smithy_client_1.expectString)(output.detectorVersionStatus),
5473
5441
  entityId: (0, smithy_client_1.expectString)(output.entityId),
5474
5442
  entityType: (0, smithy_client_1.expectString)(output.entityType),
5475
- evaluatedExternalModels: output.evaluatedExternalModels !== undefined && output.evaluatedExternalModels !== null
5443
+ evaluatedExternalModels: output.evaluatedExternalModels != null
5476
5444
  ? deserializeAws_json1_1ListOfEvaluatedExternalModels(output.evaluatedExternalModels, context)
5477
5445
  : undefined,
5478
- evaluatedModelVersions: output.evaluatedModelVersions !== undefined && output.evaluatedModelVersions !== null
5446
+ evaluatedModelVersions: output.evaluatedModelVersions != null
5479
5447
  ? deserializeAws_json1_1ListOfEvaluatedModelVersions(output.evaluatedModelVersions, context)
5480
5448
  : undefined,
5481
5449
  eventId: (0, smithy_client_1.expectString)(output.eventId),
5482
5450
  eventTimestamp: (0, smithy_client_1.expectString)(output.eventTimestamp),
5483
5451
  eventTypeName: (0, smithy_client_1.expectString)(output.eventTypeName),
5484
- eventVariables: output.eventVariables !== undefined && output.eventVariables !== null
5452
+ eventVariables: output.eventVariables != null
5485
5453
  ? deserializeAws_json1_1ListOfEventVariableSummaries(output.eventVariables, context)
5486
5454
  : undefined,
5487
- outcomes: output.outcomes !== undefined && output.outcomes !== null
5488
- ? deserializeAws_json1_1ListOfStrings(output.outcomes, context)
5489
- : undefined,
5455
+ outcomes: output.outcomes != null ? deserializeAws_json1_1ListOfStrings(output.outcomes, context) : undefined,
5490
5456
  predictionTimestamp: (0, smithy_client_1.expectString)(output.predictionTimestamp),
5491
5457
  ruleExecutionMode: (0, smithy_client_1.expectString)(output.ruleExecutionMode),
5492
- rules: output.rules !== undefined && output.rules !== null
5493
- ? deserializeAws_json1_1EvaluatedRuleList(output.rules, context)
5494
- : undefined,
5458
+ rules: output.rules != null ? deserializeAws_json1_1EvaluatedRuleList(output.rules, context) : undefined,
5495
5459
  };
5496
5460
  };
5497
5461
  const deserializeAws_json1_1GetEventPredictionResult = (output, context) => {
5498
5462
  return {
5499
- externalModelOutputs: output.externalModelOutputs !== undefined && output.externalModelOutputs !== null
5463
+ externalModelOutputs: output.externalModelOutputs != null
5500
5464
  ? deserializeAws_json1_1ListOfExternalModelOutputs(output.externalModelOutputs, context)
5501
5465
  : undefined,
5502
- modelScores: output.modelScores !== undefined && output.modelScores !== null
5503
- ? deserializeAws_json1_1ListOfModelScores(output.modelScores, context)
5504
- : undefined,
5505
- ruleResults: output.ruleResults !== undefined && output.ruleResults !== null
5506
- ? deserializeAws_json1_1ListOfRuleResults(output.ruleResults, context)
5507
- : undefined,
5466
+ modelScores: output.modelScores != null ? deserializeAws_json1_1ListOfModelScores(output.modelScores, context) : undefined,
5467
+ ruleResults: output.ruleResults != null ? deserializeAws_json1_1ListOfRuleResults(output.ruleResults, context) : undefined,
5508
5468
  };
5509
5469
  };
5510
5470
  const deserializeAws_json1_1GetEventResult = (output, context) => {
5511
5471
  return {
5512
- event: output.event !== undefined && output.event !== null
5513
- ? deserializeAws_json1_1Event(output.event, context)
5514
- : undefined,
5472
+ event: output.event != null ? deserializeAws_json1_1Event(output.event, context) : undefined,
5515
5473
  };
5516
5474
  };
5517
5475
  const deserializeAws_json1_1GetEventTypesResult = (output, context) => {
5518
5476
  return {
5519
- eventTypes: output.eventTypes !== undefined && output.eventTypes !== null
5520
- ? deserializeAws_json1_1eventTypeList(output.eventTypes, context)
5521
- : undefined,
5477
+ eventTypes: output.eventTypes != null ? deserializeAws_json1_1eventTypeList(output.eventTypes, context) : undefined,
5522
5478
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5523
5479
  };
5524
5480
  };
5525
5481
  const deserializeAws_json1_1GetExternalModelsResult = (output, context) => {
5526
5482
  return {
5527
- externalModels: output.externalModels !== undefined && output.externalModels !== null
5483
+ externalModels: output.externalModels != null
5528
5484
  ? deserializeAws_json1_1ExternalModelList(output.externalModels, context)
5529
5485
  : undefined,
5530
5486
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
@@ -5532,41 +5488,35 @@ const deserializeAws_json1_1GetExternalModelsResult = (output, context) => {
5532
5488
  };
5533
5489
  const deserializeAws_json1_1GetKMSEncryptionKeyResult = (output, context) => {
5534
5490
  return {
5535
- kmsKey: output.kmsKey !== undefined && output.kmsKey !== null
5536
- ? deserializeAws_json1_1KMSKey(output.kmsKey, context)
5537
- : undefined,
5491
+ kmsKey: output.kmsKey != null ? deserializeAws_json1_1KMSKey(output.kmsKey, context) : undefined,
5538
5492
  };
5539
5493
  };
5540
5494
  const deserializeAws_json1_1GetLabelsResult = (output, context) => {
5541
5495
  return {
5542
- labels: output.labels !== undefined && output.labels !== null
5543
- ? deserializeAws_json1_1labelList(output.labels, context)
5544
- : undefined,
5496
+ labels: output.labels != null ? deserializeAws_json1_1labelList(output.labels, context) : undefined,
5545
5497
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5546
5498
  };
5547
5499
  };
5548
5500
  const deserializeAws_json1_1GetModelsResult = (output, context) => {
5549
5501
  return {
5550
- models: output.models !== undefined && output.models !== null
5551
- ? deserializeAws_json1_1modelList(output.models, context)
5552
- : undefined,
5502
+ models: output.models != null ? deserializeAws_json1_1modelList(output.models, context) : undefined,
5553
5503
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5554
5504
  };
5555
5505
  };
5556
5506
  const deserializeAws_json1_1GetModelVersionResult = (output, context) => {
5557
5507
  return {
5558
5508
  arn: (0, smithy_client_1.expectString)(output.arn),
5559
- externalEventsDetail: output.externalEventsDetail !== undefined && output.externalEventsDetail !== null
5509
+ externalEventsDetail: output.externalEventsDetail != null
5560
5510
  ? deserializeAws_json1_1ExternalEventsDetail(output.externalEventsDetail, context)
5561
5511
  : undefined,
5562
- ingestedEventsDetail: output.ingestedEventsDetail !== undefined && output.ingestedEventsDetail !== null
5512
+ ingestedEventsDetail: output.ingestedEventsDetail != null
5563
5513
  ? deserializeAws_json1_1IngestedEventsDetail(output.ingestedEventsDetail, context)
5564
5514
  : undefined,
5565
5515
  modelId: (0, smithy_client_1.expectString)(output.modelId),
5566
5516
  modelType: (0, smithy_client_1.expectString)(output.modelType),
5567
5517
  modelVersionNumber: (0, smithy_client_1.expectString)(output.modelVersionNumber),
5568
5518
  status: (0, smithy_client_1.expectString)(output.status),
5569
- trainingDataSchema: output.trainingDataSchema !== undefined && output.trainingDataSchema !== null
5519
+ trainingDataSchema: output.trainingDataSchema != null
5570
5520
  ? deserializeAws_json1_1TrainingDataSchema(output.trainingDataSchema, context)
5571
5521
  : undefined,
5572
5522
  trainingDataSource: (0, smithy_client_1.expectString)(output.trainingDataSource),
@@ -5575,30 +5525,24 @@ const deserializeAws_json1_1GetModelVersionResult = (output, context) => {
5575
5525
  const deserializeAws_json1_1GetOutcomesResult = (output, context) => {
5576
5526
  return {
5577
5527
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5578
- outcomes: output.outcomes !== undefined && output.outcomes !== null
5579
- ? deserializeAws_json1_1OutcomeList(output.outcomes, context)
5580
- : undefined,
5528
+ outcomes: output.outcomes != null ? deserializeAws_json1_1OutcomeList(output.outcomes, context) : undefined,
5581
5529
  };
5582
5530
  };
5583
5531
  const deserializeAws_json1_1GetRulesResult = (output, context) => {
5584
5532
  return {
5585
5533
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5586
- ruleDetails: output.ruleDetails !== undefined && output.ruleDetails !== null
5587
- ? deserializeAws_json1_1RuleDetailList(output.ruleDetails, context)
5588
- : undefined,
5534
+ ruleDetails: output.ruleDetails != null ? deserializeAws_json1_1RuleDetailList(output.ruleDetails, context) : undefined,
5589
5535
  };
5590
5536
  };
5591
5537
  const deserializeAws_json1_1GetVariablesResult = (output, context) => {
5592
5538
  return {
5593
5539
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5594
- variables: output.variables !== undefined && output.variables !== null
5595
- ? deserializeAws_json1_1VariableList(output.variables, context)
5596
- : undefined,
5540
+ variables: output.variables != null ? deserializeAws_json1_1VariableList(output.variables, context) : undefined,
5597
5541
  };
5598
5542
  };
5599
5543
  const deserializeAws_json1_1IngestedEventsDetail = (output, context) => {
5600
5544
  return {
5601
- ingestedEventsTimeWindow: output.ingestedEventsTimeWindow !== undefined && output.ingestedEventsTimeWindow !== null
5545
+ ingestedEventsTimeWindow: output.ingestedEventsTimeWindow != null
5602
5546
  ? deserializeAws_json1_1IngestedEventsTimeWindow(output.ingestedEventsTimeWindow, context)
5603
5547
  : undefined,
5604
5548
  };
@@ -5672,15 +5616,13 @@ const deserializeAws_json1_1labelMapper = (output, context) => {
5672
5616
  };
5673
5617
  const deserializeAws_json1_1LabelSchema = (output, context) => {
5674
5618
  return {
5675
- labelMapper: output.labelMapper !== undefined && output.labelMapper !== null
5676
- ? deserializeAws_json1_1labelMapper(output.labelMapper, context)
5677
- : undefined,
5619
+ labelMapper: output.labelMapper != null ? deserializeAws_json1_1labelMapper(output.labelMapper, context) : undefined,
5678
5620
  unlabeledEventsTreatment: (0, smithy_client_1.expectString)(output.unlabeledEventsTreatment),
5679
5621
  };
5680
5622
  };
5681
5623
  const deserializeAws_json1_1ListEventPredictionsResult = (output, context) => {
5682
5624
  return {
5683
- eventPredictionSummaries: output.eventPredictionSummaries !== undefined && output.eventPredictionSummaries !== null
5625
+ eventPredictionSummaries: output.eventPredictionSummaries != null
5684
5626
  ? deserializeAws_json1_1ListOfEventPredictionSummaries(output.eventPredictionSummaries, context)
5685
5627
  : undefined,
5686
5628
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
@@ -5832,9 +5774,7 @@ const deserializeAws_json1_1listOfVariableImpactExplanations = (output, context)
5832
5774
  const deserializeAws_json1_1ListTagsForResourceResult = (output, context) => {
5833
5775
  return {
5834
5776
  nextToken: (0, smithy_client_1.expectString)(output.nextToken),
5835
- tags: output.tags !== undefined && output.tags !== null
5836
- ? deserializeAws_json1_1tagList(output.tags, context)
5837
- : undefined,
5777
+ tags: output.tags != null ? deserializeAws_json1_1tagList(output.tags, context) : undefined,
5838
5778
  };
5839
5779
  };
5840
5780
  const deserializeAws_json1_1LogOddsMetric = (output, context) => {
@@ -5907,11 +5847,11 @@ const deserializeAws_json1_1modelList = (output, context) => {
5907
5847
  };
5908
5848
  const deserializeAws_json1_1ModelOutputConfiguration = (output, context) => {
5909
5849
  return {
5910
- csvIndexToVariableMap: output.csvIndexToVariableMap !== undefined && output.csvIndexToVariableMap !== null
5850
+ csvIndexToVariableMap: output.csvIndexToVariableMap != null
5911
5851
  ? deserializeAws_json1_1CsvIndexToVariableMap(output.csvIndexToVariableMap, context)
5912
5852
  : undefined,
5913
5853
  format: (0, smithy_client_1.expectString)(output.format),
5914
- jsonKeyToVariableMap: output.jsonKeyToVariableMap !== undefined && output.jsonKeyToVariableMap !== null
5854
+ jsonKeyToVariableMap: output.jsonKeyToVariableMap != null
5915
5855
  ? deserializeAws_json1_1JsonKeyToVariableMap(output.jsonKeyToVariableMap, context)
5916
5856
  : undefined,
5917
5857
  };
@@ -5929,12 +5869,8 @@ const deserializeAws_json1_1ModelPredictionMap = (output, context) => {
5929
5869
  };
5930
5870
  const deserializeAws_json1_1ModelScores = (output, context) => {
5931
5871
  return {
5932
- modelVersion: output.modelVersion !== undefined && output.modelVersion !== null
5933
- ? deserializeAws_json1_1ModelVersion(output.modelVersion, context)
5934
- : undefined,
5935
- scores: output.scores !== undefined && output.scores !== null
5936
- ? deserializeAws_json1_1ModelPredictionMap(output.scores, context)
5937
- : undefined,
5872
+ modelVersion: output.modelVersion != null ? deserializeAws_json1_1ModelVersion(output.modelVersion, context) : undefined,
5873
+ scores: output.scores != null ? deserializeAws_json1_1ModelPredictionMap(output.scores, context) : undefined,
5938
5874
  };
5939
5875
  };
5940
5876
  const deserializeAws_json1_1ModelVersion = (output, context) => {
@@ -5949,10 +5885,10 @@ const deserializeAws_json1_1ModelVersionDetail = (output, context) => {
5949
5885
  return {
5950
5886
  arn: (0, smithy_client_1.expectString)(output.arn),
5951
5887
  createdTime: (0, smithy_client_1.expectString)(output.createdTime),
5952
- externalEventsDetail: output.externalEventsDetail !== undefined && output.externalEventsDetail !== null
5888
+ externalEventsDetail: output.externalEventsDetail != null
5953
5889
  ? deserializeAws_json1_1ExternalEventsDetail(output.externalEventsDetail, context)
5954
5890
  : undefined,
5955
- ingestedEventsDetail: output.ingestedEventsDetail !== undefined && output.ingestedEventsDetail !== null
5891
+ ingestedEventsDetail: output.ingestedEventsDetail != null
5956
5892
  ? deserializeAws_json1_1IngestedEventsDetail(output.ingestedEventsDetail, context)
5957
5893
  : undefined,
5958
5894
  lastUpdatedTime: (0, smithy_client_1.expectString)(output.lastUpdatedTime),
@@ -5960,13 +5896,11 @@ const deserializeAws_json1_1ModelVersionDetail = (output, context) => {
5960
5896
  modelType: (0, smithy_client_1.expectString)(output.modelType),
5961
5897
  modelVersionNumber: (0, smithy_client_1.expectString)(output.modelVersionNumber),
5962
5898
  status: (0, smithy_client_1.expectString)(output.status),
5963
- trainingDataSchema: output.trainingDataSchema !== undefined && output.trainingDataSchema !== null
5899
+ trainingDataSchema: output.trainingDataSchema != null
5964
5900
  ? deserializeAws_json1_1TrainingDataSchema(output.trainingDataSchema, context)
5965
5901
  : undefined,
5966
5902
  trainingDataSource: (0, smithy_client_1.expectString)(output.trainingDataSource),
5967
- trainingResult: output.trainingResult !== undefined && output.trainingResult !== null
5968
- ? deserializeAws_json1_1TrainingResult(output.trainingResult, context)
5969
- : undefined,
5903
+ trainingResult: output.trainingResult != null ? deserializeAws_json1_1TrainingResult(output.trainingResult, context) : undefined,
5970
5904
  };
5971
5905
  };
5972
5906
  const deserializeAws_json1_1modelVersionDetailList = (output, context) => {
@@ -5984,7 +5918,7 @@ const deserializeAws_json1_1ModelVersionEvaluation = (output, context) => {
5984
5918
  return {
5985
5919
  evaluationScore: (0, smithy_client_1.expectString)(output.evaluationScore),
5986
5920
  outputVariableName: (0, smithy_client_1.expectString)(output.outputVariableName),
5987
- predictionExplanations: output.predictionExplanations !== undefined && output.predictionExplanations !== null
5921
+ predictionExplanations: output.predictionExplanations != null
5988
5922
  ? deserializeAws_json1_1PredictionExplanations(output.predictionExplanations, context)
5989
5923
  : undefined,
5990
5924
  };
@@ -6022,7 +5956,7 @@ const deserializeAws_json1_1OutcomeList = (output, context) => {
6022
5956
  };
6023
5957
  const deserializeAws_json1_1PredictionExplanations = (output, context) => {
6024
5958
  return {
6025
- variableImpactExplanations: output.variableImpactExplanations !== undefined && output.variableImpactExplanations !== null
5959
+ variableImpactExplanations: output.variableImpactExplanations != null
6026
5960
  ? deserializeAws_json1_1listOfVariableImpactExplanations(output.variableImpactExplanations, context)
6027
5961
  : undefined,
6028
5962
  };
@@ -6074,9 +6008,7 @@ const deserializeAws_json1_1RuleDetail = (output, context) => {
6074
6008
  expression: (0, smithy_client_1.expectString)(output.expression),
6075
6009
  language: (0, smithy_client_1.expectString)(output.language),
6076
6010
  lastUpdatedTime: (0, smithy_client_1.expectString)(output.lastUpdatedTime),
6077
- outcomes: output.outcomes !== undefined && output.outcomes !== null
6078
- ? deserializeAws_json1_1NonEmptyListOfStrings(output.outcomes, context)
6079
- : undefined,
6011
+ outcomes: output.outcomes != null ? deserializeAws_json1_1NonEmptyListOfStrings(output.outcomes, context) : undefined,
6080
6012
  ruleId: (0, smithy_client_1.expectString)(output.ruleId),
6081
6013
  ruleVersion: (0, smithy_client_1.expectString)(output.ruleVersion),
6082
6014
  };
@@ -6105,9 +6037,7 @@ const deserializeAws_json1_1RuleList = (output, context) => {
6105
6037
  };
6106
6038
  const deserializeAws_json1_1RuleResult = (output, context) => {
6107
6039
  return {
6108
- outcomes: output.outcomes !== undefined && output.outcomes !== null
6109
- ? deserializeAws_json1_1ListOfStrings(output.outcomes, context)
6110
- : undefined,
6040
+ outcomes: output.outcomes != null ? deserializeAws_json1_1ListOfStrings(output.outcomes, context) : undefined,
6111
6041
  ruleId: (0, smithy_client_1.expectString)(output.ruleId),
6112
6042
  };
6113
6043
  };
@@ -6141,31 +6071,27 @@ const deserializeAws_json1_1ThrottlingException = (output, context) => {
6141
6071
  };
6142
6072
  const deserializeAws_json1_1TrainingDataSchema = (output, context) => {
6143
6073
  return {
6144
- labelSchema: output.labelSchema !== undefined && output.labelSchema !== null
6145
- ? deserializeAws_json1_1LabelSchema(output.labelSchema, context)
6146
- : undefined,
6147
- modelVariables: output.modelVariables !== undefined && output.modelVariables !== null
6148
- ? deserializeAws_json1_1ListOfStrings(output.modelVariables, context)
6149
- : undefined,
6074
+ labelSchema: output.labelSchema != null ? deserializeAws_json1_1LabelSchema(output.labelSchema, context) : undefined,
6075
+ modelVariables: output.modelVariables != null ? deserializeAws_json1_1ListOfStrings(output.modelVariables, context) : undefined,
6150
6076
  };
6151
6077
  };
6152
6078
  const deserializeAws_json1_1TrainingMetrics = (output, context) => {
6153
6079
  return {
6154
6080
  auc: (0, smithy_client_1.limitedParseFloat32)(output.auc),
6155
- metricDataPoints: output.metricDataPoints !== undefined && output.metricDataPoints !== null
6081
+ metricDataPoints: output.metricDataPoints != null
6156
6082
  ? deserializeAws_json1_1metricDataPointsList(output.metricDataPoints, context)
6157
6083
  : undefined,
6158
6084
  };
6159
6085
  };
6160
6086
  const deserializeAws_json1_1TrainingResult = (output, context) => {
6161
6087
  return {
6162
- dataValidationMetrics: output.dataValidationMetrics !== undefined && output.dataValidationMetrics !== null
6088
+ dataValidationMetrics: output.dataValidationMetrics != null
6163
6089
  ? deserializeAws_json1_1DataValidationMetrics(output.dataValidationMetrics, context)
6164
6090
  : undefined,
6165
- trainingMetrics: output.trainingMetrics !== undefined && output.trainingMetrics !== null
6091
+ trainingMetrics: output.trainingMetrics != null
6166
6092
  ? deserializeAws_json1_1TrainingMetrics(output.trainingMetrics, context)
6167
6093
  : undefined,
6168
- variableImportanceMetrics: output.variableImportanceMetrics !== undefined && output.variableImportanceMetrics !== null
6094
+ variableImportanceMetrics: output.variableImportanceMetrics != null
6169
6095
  ? deserializeAws_json1_1VariableImportanceMetrics(output.variableImportanceMetrics, context)
6170
6096
  : undefined,
6171
6097
  };
@@ -6204,7 +6130,7 @@ const deserializeAws_json1_1UpdateRuleMetadataResult = (output, context) => {
6204
6130
  };
6205
6131
  const deserializeAws_json1_1UpdateRuleVersionResult = (output, context) => {
6206
6132
  return {
6207
- rule: output.rule !== undefined && output.rule !== null ? deserializeAws_json1_1Rule(output.rule, context) : undefined,
6133
+ rule: output.rule != null ? deserializeAws_json1_1Rule(output.rule, context) : undefined,
6208
6134
  };
6209
6135
  };
6210
6136
  const deserializeAws_json1_1UpdateVariableResult = (output, context) => {
@@ -6237,7 +6163,7 @@ const deserializeAws_json1_1VariableImpactExplanation = (output, context) => {
6237
6163
  };
6238
6164
  const deserializeAws_json1_1VariableImportanceMetrics = (output, context) => {
6239
6165
  return {
6240
- logOddsMetrics: output.logOddsMetrics !== undefined && output.logOddsMetrics !== null
6166
+ logOddsMetrics: output.logOddsMetrics != null
6241
6167
  ? deserializeAws_json1_1ListOfLogOddsMetrics(output.logOddsMetrics, context)
6242
6168
  : undefined,
6243
6169
  };
@@ -6315,5 +6241,4 @@ const loadRestJsonErrorCode = (output, data) => {
6315
6241
  if (data["__type"] !== undefined) {
6316
6242
  return sanitizeErrorCode(data["__type"]);
6317
6243
  }
6318
- return "";
6319
6244
  };