@aws-sdk/client-comprehend 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.
@@ -804,7 +804,7 @@ export var deserializeAws_json1_1BatchDetectDominantLanguageCommand = function (
804
804
  });
805
805
  }); };
806
806
  var deserializeAws_json1_1BatchDetectDominantLanguageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
807
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
807
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
808
808
  var _c;
809
809
  return __generator(this, function (_d) {
810
810
  switch (_d.label) {
@@ -814,7 +814,6 @@ var deserializeAws_json1_1BatchDetectDominantLanguageCommandError = function (ou
814
814
  return [4, parseBody(output.body, context)];
815
815
  case 1:
816
816
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
817
- errorCode = "UnknownError";
818
817
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
819
818
  _b = errorCode;
820
819
  switch (_b) {
@@ -838,10 +837,12 @@ var deserializeAws_json1_1BatchDetectDominantLanguageCommandError = function (ou
838
837
  case 9: throw _d.sent();
839
838
  case 10:
840
839
  parsedBody = parsedOutput.body;
840
+ $metadata = deserializeMetadata(output);
841
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
841
842
  response = new __BaseException({
842
- name: parsedBody.code || parsedBody.Code || errorCode,
843
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
843
844
  $fault: "client",
844
- $metadata: deserializeMetadata(output),
845
+ $metadata: $metadata,
845
846
  });
846
847
  throw __decorateServiceException(response, parsedBody);
847
848
  }
@@ -866,7 +867,7 @@ export var deserializeAws_json1_1BatchDetectEntitiesCommand = function (output,
866
867
  });
867
868
  }); };
868
869
  var deserializeAws_json1_1BatchDetectEntitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
869
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
870
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
870
871
  var _c;
871
872
  return __generator(this, function (_d) {
872
873
  switch (_d.label) {
@@ -876,7 +877,6 @@ var deserializeAws_json1_1BatchDetectEntitiesCommandError = function (output, co
876
877
  return [4, parseBody(output.body, context)];
877
878
  case 1:
878
879
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
879
- errorCode = "UnknownError";
880
880
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
881
881
  _b = errorCode;
882
882
  switch (_b) {
@@ -904,10 +904,12 @@ var deserializeAws_json1_1BatchDetectEntitiesCommandError = function (output, co
904
904
  case 11: throw _d.sent();
905
905
  case 12:
906
906
  parsedBody = parsedOutput.body;
907
+ $metadata = deserializeMetadata(output);
908
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
907
909
  response = new __BaseException({
908
- name: parsedBody.code || parsedBody.Code || errorCode,
910
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
909
911
  $fault: "client",
910
- $metadata: deserializeMetadata(output),
912
+ $metadata: $metadata,
911
913
  });
912
914
  throw __decorateServiceException(response, parsedBody);
913
915
  }
@@ -932,7 +934,7 @@ export var deserializeAws_json1_1BatchDetectKeyPhrasesCommand = function (output
932
934
  });
933
935
  }); };
934
936
  var deserializeAws_json1_1BatchDetectKeyPhrasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
935
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
937
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
936
938
  var _c;
937
939
  return __generator(this, function (_d) {
938
940
  switch (_d.label) {
@@ -942,7 +944,6 @@ var deserializeAws_json1_1BatchDetectKeyPhrasesCommandError = function (output,
942
944
  return [4, parseBody(output.body, context)];
943
945
  case 1:
944
946
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
945
- errorCode = "UnknownError";
946
947
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
947
948
  _b = errorCode;
948
949
  switch (_b) {
@@ -970,10 +971,12 @@ var deserializeAws_json1_1BatchDetectKeyPhrasesCommandError = function (output,
970
971
  case 11: throw _d.sent();
971
972
  case 12:
972
973
  parsedBody = parsedOutput.body;
974
+ $metadata = deserializeMetadata(output);
975
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
973
976
  response = new __BaseException({
974
- name: parsedBody.code || parsedBody.Code || errorCode,
977
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
975
978
  $fault: "client",
976
- $metadata: deserializeMetadata(output),
979
+ $metadata: $metadata,
977
980
  });
978
981
  throw __decorateServiceException(response, parsedBody);
979
982
  }
@@ -998,7 +1001,7 @@ export var deserializeAws_json1_1BatchDetectSentimentCommand = function (output,
998
1001
  });
999
1002
  }); };
1000
1003
  var deserializeAws_json1_1BatchDetectSentimentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1001
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1004
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1002
1005
  var _c;
1003
1006
  return __generator(this, function (_d) {
1004
1007
  switch (_d.label) {
@@ -1008,7 +1011,6 @@ var deserializeAws_json1_1BatchDetectSentimentCommandError = function (output, c
1008
1011
  return [4, parseBody(output.body, context)];
1009
1012
  case 1:
1010
1013
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1011
- errorCode = "UnknownError";
1012
1014
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1013
1015
  _b = errorCode;
1014
1016
  switch (_b) {
@@ -1036,10 +1038,12 @@ var deserializeAws_json1_1BatchDetectSentimentCommandError = function (output, c
1036
1038
  case 11: throw _d.sent();
1037
1039
  case 12:
1038
1040
  parsedBody = parsedOutput.body;
1041
+ $metadata = deserializeMetadata(output);
1042
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1039
1043
  response = new __BaseException({
1040
- name: parsedBody.code || parsedBody.Code || errorCode,
1044
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1041
1045
  $fault: "client",
1042
- $metadata: deserializeMetadata(output),
1046
+ $metadata: $metadata,
1043
1047
  });
1044
1048
  throw __decorateServiceException(response, parsedBody);
1045
1049
  }
@@ -1064,7 +1068,7 @@ export var deserializeAws_json1_1BatchDetectSyntaxCommand = function (output, co
1064
1068
  });
1065
1069
  }); };
1066
1070
  var deserializeAws_json1_1BatchDetectSyntaxCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1067
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1071
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1068
1072
  var _c;
1069
1073
  return __generator(this, function (_d) {
1070
1074
  switch (_d.label) {
@@ -1074,7 +1078,6 @@ var deserializeAws_json1_1BatchDetectSyntaxCommandError = function (output, cont
1074
1078
  return [4, parseBody(output.body, context)];
1075
1079
  case 1:
1076
1080
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1077
- errorCode = "UnknownError";
1078
1081
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1079
1082
  _b = errorCode;
1080
1083
  switch (_b) {
@@ -1102,10 +1105,12 @@ var deserializeAws_json1_1BatchDetectSyntaxCommandError = function (output, cont
1102
1105
  case 11: throw _d.sent();
1103
1106
  case 12:
1104
1107
  parsedBody = parsedOutput.body;
1108
+ $metadata = deserializeMetadata(output);
1109
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1105
1110
  response = new __BaseException({
1106
- name: parsedBody.code || parsedBody.Code || errorCode,
1111
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1107
1112
  $fault: "client",
1108
- $metadata: deserializeMetadata(output),
1113
+ $metadata: $metadata,
1109
1114
  });
1110
1115
  throw __decorateServiceException(response, parsedBody);
1111
1116
  }
@@ -1130,7 +1135,7 @@ export var deserializeAws_json1_1ClassifyDocumentCommand = function (output, con
1130
1135
  });
1131
1136
  }); };
1132
1137
  var deserializeAws_json1_1ClassifyDocumentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1133
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1138
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1134
1139
  var _c;
1135
1140
  return __generator(this, function (_d) {
1136
1141
  switch (_d.label) {
@@ -1140,7 +1145,6 @@ var deserializeAws_json1_1ClassifyDocumentCommandError = function (output, conte
1140
1145
  return [4, parseBody(output.body, context)];
1141
1146
  case 1:
1142
1147
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1143
- errorCode = "UnknownError";
1144
1148
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1145
1149
  _b = errorCode;
1146
1150
  switch (_b) {
@@ -1164,10 +1168,12 @@ var deserializeAws_json1_1ClassifyDocumentCommandError = function (output, conte
1164
1168
  case 9: throw _d.sent();
1165
1169
  case 10:
1166
1170
  parsedBody = parsedOutput.body;
1171
+ $metadata = deserializeMetadata(output);
1172
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1167
1173
  response = new __BaseException({
1168
- name: parsedBody.code || parsedBody.Code || errorCode,
1174
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1169
1175
  $fault: "client",
1170
- $metadata: deserializeMetadata(output),
1176
+ $metadata: $metadata,
1171
1177
  });
1172
1178
  throw __decorateServiceException(response, parsedBody);
1173
1179
  }
@@ -1192,7 +1198,7 @@ export var deserializeAws_json1_1ContainsPiiEntitiesCommand = function (output,
1192
1198
  });
1193
1199
  }); };
1194
1200
  var deserializeAws_json1_1ContainsPiiEntitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1195
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1201
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1196
1202
  var _c;
1197
1203
  return __generator(this, function (_d) {
1198
1204
  switch (_d.label) {
@@ -1202,7 +1208,6 @@ var deserializeAws_json1_1ContainsPiiEntitiesCommandError = function (output, co
1202
1208
  return [4, parseBody(output.body, context)];
1203
1209
  case 1:
1204
1210
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1205
- errorCode = "UnknownError";
1206
1211
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1207
1212
  _b = errorCode;
1208
1213
  switch (_b) {
@@ -1226,10 +1231,12 @@ var deserializeAws_json1_1ContainsPiiEntitiesCommandError = function (output, co
1226
1231
  case 9: throw _d.sent();
1227
1232
  case 10:
1228
1233
  parsedBody = parsedOutput.body;
1234
+ $metadata = deserializeMetadata(output);
1235
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1229
1236
  response = new __BaseException({
1230
- name: parsedBody.code || parsedBody.Code || errorCode,
1237
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1231
1238
  $fault: "client",
1232
- $metadata: deserializeMetadata(output),
1239
+ $metadata: $metadata,
1233
1240
  });
1234
1241
  throw __decorateServiceException(response, parsedBody);
1235
1242
  }
@@ -1254,7 +1261,7 @@ export var deserializeAws_json1_1CreateDocumentClassifierCommand = function (out
1254
1261
  });
1255
1262
  }); };
1256
1263
  var deserializeAws_json1_1CreateDocumentClassifierCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1257
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1264
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1258
1265
  var _c;
1259
1266
  return __generator(this, function (_d) {
1260
1267
  switch (_d.label) {
@@ -1264,7 +1271,6 @@ var deserializeAws_json1_1CreateDocumentClassifierCommandError = function (outpu
1264
1271
  return [4, parseBody(output.body, context)];
1265
1272
  case 1:
1266
1273
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1267
- errorCode = "UnknownError";
1268
1274
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1269
1275
  _b = errorCode;
1270
1276
  switch (_b) {
@@ -1304,10 +1310,12 @@ var deserializeAws_json1_1CreateDocumentClassifierCommandError = function (outpu
1304
1310
  case 17: throw _d.sent();
1305
1311
  case 18:
1306
1312
  parsedBody = parsedOutput.body;
1313
+ $metadata = deserializeMetadata(output);
1314
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1307
1315
  response = new __BaseException({
1308
- name: parsedBody.code || parsedBody.Code || errorCode,
1316
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1309
1317
  $fault: "client",
1310
- $metadata: deserializeMetadata(output),
1318
+ $metadata: $metadata,
1311
1319
  });
1312
1320
  throw __decorateServiceException(response, parsedBody);
1313
1321
  }
@@ -1332,7 +1340,7 @@ export var deserializeAws_json1_1CreateEndpointCommand = function (output, conte
1332
1340
  });
1333
1341
  }); };
1334
1342
  var deserializeAws_json1_1CreateEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1335
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1343
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1336
1344
  var _c;
1337
1345
  return __generator(this, function (_d) {
1338
1346
  switch (_d.label) {
@@ -1342,7 +1350,6 @@ var deserializeAws_json1_1CreateEndpointCommandError = function (output, context
1342
1350
  return [4, parseBody(output.body, context)];
1343
1351
  case 1:
1344
1352
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1345
- errorCode = "UnknownError";
1346
1353
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1347
1354
  _b = errorCode;
1348
1355
  switch (_b) {
@@ -1382,10 +1389,12 @@ var deserializeAws_json1_1CreateEndpointCommandError = function (output, context
1382
1389
  case 17: throw _d.sent();
1383
1390
  case 18:
1384
1391
  parsedBody = parsedOutput.body;
1392
+ $metadata = deserializeMetadata(output);
1393
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1385
1394
  response = new __BaseException({
1386
- name: parsedBody.code || parsedBody.Code || errorCode,
1395
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1387
1396
  $fault: "client",
1388
- $metadata: deserializeMetadata(output),
1397
+ $metadata: $metadata,
1389
1398
  });
1390
1399
  throw __decorateServiceException(response, parsedBody);
1391
1400
  }
@@ -1410,7 +1419,7 @@ export var deserializeAws_json1_1CreateEntityRecognizerCommand = function (outpu
1410
1419
  });
1411
1420
  }); };
1412
1421
  var deserializeAws_json1_1CreateEntityRecognizerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1413
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1422
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1414
1423
  var _c;
1415
1424
  return __generator(this, function (_d) {
1416
1425
  switch (_d.label) {
@@ -1420,7 +1429,6 @@ var deserializeAws_json1_1CreateEntityRecognizerCommandError = function (output,
1420
1429
  return [4, parseBody(output.body, context)];
1421
1430
  case 1:
1422
1431
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1423
- errorCode = "UnknownError";
1424
1432
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1425
1433
  _b = errorCode;
1426
1434
  switch (_b) {
@@ -1460,10 +1468,12 @@ var deserializeAws_json1_1CreateEntityRecognizerCommandError = function (output,
1460
1468
  case 17: throw _d.sent();
1461
1469
  case 18:
1462
1470
  parsedBody = parsedOutput.body;
1471
+ $metadata = deserializeMetadata(output);
1472
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1463
1473
  response = new __BaseException({
1464
- name: parsedBody.code || parsedBody.Code || errorCode,
1474
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1465
1475
  $fault: "client",
1466
- $metadata: deserializeMetadata(output),
1476
+ $metadata: $metadata,
1467
1477
  });
1468
1478
  throw __decorateServiceException(response, parsedBody);
1469
1479
  }
@@ -1488,7 +1498,7 @@ export var deserializeAws_json1_1DeleteDocumentClassifierCommand = function (out
1488
1498
  });
1489
1499
  }); };
1490
1500
  var deserializeAws_json1_1DeleteDocumentClassifierCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1491
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1501
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1492
1502
  var _c;
1493
1503
  return __generator(this, function (_d) {
1494
1504
  switch (_d.label) {
@@ -1498,7 +1508,6 @@ var deserializeAws_json1_1DeleteDocumentClassifierCommandError = function (outpu
1498
1508
  return [4, parseBody(output.body, context)];
1499
1509
  case 1:
1500
1510
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1501
- errorCode = "UnknownError";
1502
1511
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1503
1512
  _b = errorCode;
1504
1513
  switch (_b) {
@@ -1530,10 +1539,12 @@ var deserializeAws_json1_1DeleteDocumentClassifierCommandError = function (outpu
1530
1539
  case 13: throw _d.sent();
1531
1540
  case 14:
1532
1541
  parsedBody = parsedOutput.body;
1542
+ $metadata = deserializeMetadata(output);
1543
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1533
1544
  response = new __BaseException({
1534
- name: parsedBody.code || parsedBody.Code || errorCode,
1545
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1535
1546
  $fault: "client",
1536
- $metadata: deserializeMetadata(output),
1547
+ $metadata: $metadata,
1537
1548
  });
1538
1549
  throw __decorateServiceException(response, parsedBody);
1539
1550
  }
@@ -1558,7 +1569,7 @@ export var deserializeAws_json1_1DeleteEndpointCommand = function (output, conte
1558
1569
  });
1559
1570
  }); };
1560
1571
  var deserializeAws_json1_1DeleteEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1561
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1572
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1562
1573
  var _c;
1563
1574
  return __generator(this, function (_d) {
1564
1575
  switch (_d.label) {
@@ -1568,7 +1579,6 @@ var deserializeAws_json1_1DeleteEndpointCommandError = function (output, context
1568
1579
  return [4, parseBody(output.body, context)];
1569
1580
  case 1:
1570
1581
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1571
- errorCode = "UnknownError";
1572
1582
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1573
1583
  _b = errorCode;
1574
1584
  switch (_b) {
@@ -1596,10 +1606,12 @@ var deserializeAws_json1_1DeleteEndpointCommandError = function (output, context
1596
1606
  case 11: throw _d.sent();
1597
1607
  case 12:
1598
1608
  parsedBody = parsedOutput.body;
1609
+ $metadata = deserializeMetadata(output);
1610
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1599
1611
  response = new __BaseException({
1600
- name: parsedBody.code || parsedBody.Code || errorCode,
1612
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1601
1613
  $fault: "client",
1602
- $metadata: deserializeMetadata(output),
1614
+ $metadata: $metadata,
1603
1615
  });
1604
1616
  throw __decorateServiceException(response, parsedBody);
1605
1617
  }
@@ -1624,7 +1636,7 @@ export var deserializeAws_json1_1DeleteEntityRecognizerCommand = function (outpu
1624
1636
  });
1625
1637
  }); };
1626
1638
  var deserializeAws_json1_1DeleteEntityRecognizerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1627
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1639
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1628
1640
  var _c;
1629
1641
  return __generator(this, function (_d) {
1630
1642
  switch (_d.label) {
@@ -1634,7 +1646,6 @@ var deserializeAws_json1_1DeleteEntityRecognizerCommandError = function (output,
1634
1646
  return [4, parseBody(output.body, context)];
1635
1647
  case 1:
1636
1648
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1637
- errorCode = "UnknownError";
1638
1649
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1639
1650
  _b = errorCode;
1640
1651
  switch (_b) {
@@ -1666,10 +1677,12 @@ var deserializeAws_json1_1DeleteEntityRecognizerCommandError = function (output,
1666
1677
  case 13: throw _d.sent();
1667
1678
  case 14:
1668
1679
  parsedBody = parsedOutput.body;
1680
+ $metadata = deserializeMetadata(output);
1681
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1669
1682
  response = new __BaseException({
1670
- name: parsedBody.code || parsedBody.Code || errorCode,
1683
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1671
1684
  $fault: "client",
1672
- $metadata: deserializeMetadata(output),
1685
+ $metadata: $metadata,
1673
1686
  });
1674
1687
  throw __decorateServiceException(response, parsedBody);
1675
1688
  }
@@ -1694,7 +1707,7 @@ export var deserializeAws_json1_1DeleteResourcePolicyCommand = function (output,
1694
1707
  });
1695
1708
  }); };
1696
1709
  var deserializeAws_json1_1DeleteResourcePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1697
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1710
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1698
1711
  var _c;
1699
1712
  return __generator(this, function (_d) {
1700
1713
  switch (_d.label) {
@@ -1704,7 +1717,6 @@ var deserializeAws_json1_1DeleteResourcePolicyCommandError = function (output, c
1704
1717
  return [4, parseBody(output.body, context)];
1705
1718
  case 1:
1706
1719
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1707
- errorCode = "UnknownError";
1708
1720
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1709
1721
  _b = errorCode;
1710
1722
  switch (_b) {
@@ -1724,10 +1736,12 @@ var deserializeAws_json1_1DeleteResourcePolicyCommandError = function (output, c
1724
1736
  case 7: throw _d.sent();
1725
1737
  case 8:
1726
1738
  parsedBody = parsedOutput.body;
1739
+ $metadata = deserializeMetadata(output);
1740
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1727
1741
  response = new __BaseException({
1728
- name: parsedBody.code || parsedBody.Code || errorCode,
1742
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1729
1743
  $fault: "client",
1730
- $metadata: deserializeMetadata(output),
1744
+ $metadata: $metadata,
1731
1745
  });
1732
1746
  throw __decorateServiceException(response, parsedBody);
1733
1747
  }
@@ -1752,7 +1766,7 @@ export var deserializeAws_json1_1DescribeDocumentClassificationJobCommand = func
1752
1766
  });
1753
1767
  }); };
1754
1768
  var deserializeAws_json1_1DescribeDocumentClassificationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1755
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1769
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1756
1770
  var _c;
1757
1771
  return __generator(this, function (_d) {
1758
1772
  switch (_d.label) {
@@ -1762,7 +1776,6 @@ var deserializeAws_json1_1DescribeDocumentClassificationJobCommandError = functi
1762
1776
  return [4, parseBody(output.body, context)];
1763
1777
  case 1:
1764
1778
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1765
- errorCode = "UnknownError";
1766
1779
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1767
1780
  _b = errorCode;
1768
1781
  switch (_b) {
@@ -1786,10 +1799,12 @@ var deserializeAws_json1_1DescribeDocumentClassificationJobCommandError = functi
1786
1799
  case 9: throw _d.sent();
1787
1800
  case 10:
1788
1801
  parsedBody = parsedOutput.body;
1802
+ $metadata = deserializeMetadata(output);
1803
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1789
1804
  response = new __BaseException({
1790
- name: parsedBody.code || parsedBody.Code || errorCode,
1805
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1791
1806
  $fault: "client",
1792
- $metadata: deserializeMetadata(output),
1807
+ $metadata: $metadata,
1793
1808
  });
1794
1809
  throw __decorateServiceException(response, parsedBody);
1795
1810
  }
@@ -1814,7 +1829,7 @@ export var deserializeAws_json1_1DescribeDocumentClassifierCommand = function (o
1814
1829
  });
1815
1830
  }); };
1816
1831
  var deserializeAws_json1_1DescribeDocumentClassifierCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1817
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1832
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1818
1833
  var _c;
1819
1834
  return __generator(this, function (_d) {
1820
1835
  switch (_d.label) {
@@ -1824,7 +1839,6 @@ var deserializeAws_json1_1DescribeDocumentClassifierCommandError = function (out
1824
1839
  return [4, parseBody(output.body, context)];
1825
1840
  case 1:
1826
1841
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1827
- errorCode = "UnknownError";
1828
1842
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1829
1843
  _b = errorCode;
1830
1844
  switch (_b) {
@@ -1848,10 +1862,12 @@ var deserializeAws_json1_1DescribeDocumentClassifierCommandError = function (out
1848
1862
  case 9: throw _d.sent();
1849
1863
  case 10:
1850
1864
  parsedBody = parsedOutput.body;
1865
+ $metadata = deserializeMetadata(output);
1866
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1851
1867
  response = new __BaseException({
1852
- name: parsedBody.code || parsedBody.Code || errorCode,
1868
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1853
1869
  $fault: "client",
1854
- $metadata: deserializeMetadata(output),
1870
+ $metadata: $metadata,
1855
1871
  });
1856
1872
  throw __decorateServiceException(response, parsedBody);
1857
1873
  }
@@ -1876,7 +1892,7 @@ export var deserializeAws_json1_1DescribeDominantLanguageDetectionJobCommand = f
1876
1892
  });
1877
1893
  }); };
1878
1894
  var deserializeAws_json1_1DescribeDominantLanguageDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1879
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1895
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1880
1896
  var _c;
1881
1897
  return __generator(this, function (_d) {
1882
1898
  switch (_d.label) {
@@ -1886,7 +1902,6 @@ var deserializeAws_json1_1DescribeDominantLanguageDetectionJobCommandError = fun
1886
1902
  return [4, parseBody(output.body, context)];
1887
1903
  case 1:
1888
1904
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1889
- errorCode = "UnknownError";
1890
1905
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1891
1906
  _b = errorCode;
1892
1907
  switch (_b) {
@@ -1910,10 +1925,12 @@ var deserializeAws_json1_1DescribeDominantLanguageDetectionJobCommandError = fun
1910
1925
  case 9: throw _d.sent();
1911
1926
  case 10:
1912
1927
  parsedBody = parsedOutput.body;
1928
+ $metadata = deserializeMetadata(output);
1929
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1913
1930
  response = new __BaseException({
1914
- name: parsedBody.code || parsedBody.Code || errorCode,
1931
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1915
1932
  $fault: "client",
1916
- $metadata: deserializeMetadata(output),
1933
+ $metadata: $metadata,
1917
1934
  });
1918
1935
  throw __decorateServiceException(response, parsedBody);
1919
1936
  }
@@ -1938,7 +1955,7 @@ export var deserializeAws_json1_1DescribeEndpointCommand = function (output, con
1938
1955
  });
1939
1956
  }); };
1940
1957
  var deserializeAws_json1_1DescribeEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1941
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
1958
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
1942
1959
  var _c;
1943
1960
  return __generator(this, function (_d) {
1944
1961
  switch (_d.label) {
@@ -1948,7 +1965,6 @@ var deserializeAws_json1_1DescribeEndpointCommandError = function (output, conte
1948
1965
  return [4, parseBody(output.body, context)];
1949
1966
  case 1:
1950
1967
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
1951
- errorCode = "UnknownError";
1952
1968
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1953
1969
  _b = errorCode;
1954
1970
  switch (_b) {
@@ -1972,10 +1988,12 @@ var deserializeAws_json1_1DescribeEndpointCommandError = function (output, conte
1972
1988
  case 9: throw _d.sent();
1973
1989
  case 10:
1974
1990
  parsedBody = parsedOutput.body;
1991
+ $metadata = deserializeMetadata(output);
1992
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1975
1993
  response = new __BaseException({
1976
- name: parsedBody.code || parsedBody.Code || errorCode,
1994
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1977
1995
  $fault: "client",
1978
- $metadata: deserializeMetadata(output),
1996
+ $metadata: $metadata,
1979
1997
  });
1980
1998
  throw __decorateServiceException(response, parsedBody);
1981
1999
  }
@@ -2000,7 +2018,7 @@ export var deserializeAws_json1_1DescribeEntitiesDetectionJobCommand = function
2000
2018
  });
2001
2019
  }); };
2002
2020
  var deserializeAws_json1_1DescribeEntitiesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2003
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2021
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2004
2022
  var _c;
2005
2023
  return __generator(this, function (_d) {
2006
2024
  switch (_d.label) {
@@ -2010,7 +2028,6 @@ var deserializeAws_json1_1DescribeEntitiesDetectionJobCommandError = function (o
2010
2028
  return [4, parseBody(output.body, context)];
2011
2029
  case 1:
2012
2030
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2013
- errorCode = "UnknownError";
2014
2031
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2015
2032
  _b = errorCode;
2016
2033
  switch (_b) {
@@ -2034,10 +2051,12 @@ var deserializeAws_json1_1DescribeEntitiesDetectionJobCommandError = function (o
2034
2051
  case 9: throw _d.sent();
2035
2052
  case 10:
2036
2053
  parsedBody = parsedOutput.body;
2054
+ $metadata = deserializeMetadata(output);
2055
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2037
2056
  response = new __BaseException({
2038
- name: parsedBody.code || parsedBody.Code || errorCode,
2057
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2039
2058
  $fault: "client",
2040
- $metadata: deserializeMetadata(output),
2059
+ $metadata: $metadata,
2041
2060
  });
2042
2061
  throw __decorateServiceException(response, parsedBody);
2043
2062
  }
@@ -2062,7 +2081,7 @@ export var deserializeAws_json1_1DescribeEntityRecognizerCommand = function (out
2062
2081
  });
2063
2082
  }); };
2064
2083
  var deserializeAws_json1_1DescribeEntityRecognizerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2065
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2084
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2066
2085
  var _c;
2067
2086
  return __generator(this, function (_d) {
2068
2087
  switch (_d.label) {
@@ -2072,7 +2091,6 @@ var deserializeAws_json1_1DescribeEntityRecognizerCommandError = function (outpu
2072
2091
  return [4, parseBody(output.body, context)];
2073
2092
  case 1:
2074
2093
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2075
- errorCode = "UnknownError";
2076
2094
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2077
2095
  _b = errorCode;
2078
2096
  switch (_b) {
@@ -2096,10 +2114,12 @@ var deserializeAws_json1_1DescribeEntityRecognizerCommandError = function (outpu
2096
2114
  case 9: throw _d.sent();
2097
2115
  case 10:
2098
2116
  parsedBody = parsedOutput.body;
2117
+ $metadata = deserializeMetadata(output);
2118
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2099
2119
  response = new __BaseException({
2100
- name: parsedBody.code || parsedBody.Code || errorCode,
2120
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2101
2121
  $fault: "client",
2102
- $metadata: deserializeMetadata(output),
2122
+ $metadata: $metadata,
2103
2123
  });
2104
2124
  throw __decorateServiceException(response, parsedBody);
2105
2125
  }
@@ -2124,7 +2144,7 @@ export var deserializeAws_json1_1DescribeEventsDetectionJobCommand = function (o
2124
2144
  });
2125
2145
  }); };
2126
2146
  var deserializeAws_json1_1DescribeEventsDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2127
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2147
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2128
2148
  var _c;
2129
2149
  return __generator(this, function (_d) {
2130
2150
  switch (_d.label) {
@@ -2134,7 +2154,6 @@ var deserializeAws_json1_1DescribeEventsDetectionJobCommandError = function (out
2134
2154
  return [4, parseBody(output.body, context)];
2135
2155
  case 1:
2136
2156
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2137
- errorCode = "UnknownError";
2138
2157
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2139
2158
  _b = errorCode;
2140
2159
  switch (_b) {
@@ -2158,10 +2177,12 @@ var deserializeAws_json1_1DescribeEventsDetectionJobCommandError = function (out
2158
2177
  case 9: throw _d.sent();
2159
2178
  case 10:
2160
2179
  parsedBody = parsedOutput.body;
2180
+ $metadata = deserializeMetadata(output);
2181
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2161
2182
  response = new __BaseException({
2162
- name: parsedBody.code || parsedBody.Code || errorCode,
2183
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2163
2184
  $fault: "client",
2164
- $metadata: deserializeMetadata(output),
2185
+ $metadata: $metadata,
2165
2186
  });
2166
2187
  throw __decorateServiceException(response, parsedBody);
2167
2188
  }
@@ -2186,7 +2207,7 @@ export var deserializeAws_json1_1DescribeKeyPhrasesDetectionJobCommand = functio
2186
2207
  });
2187
2208
  }); };
2188
2209
  var deserializeAws_json1_1DescribeKeyPhrasesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2189
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2210
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2190
2211
  var _c;
2191
2212
  return __generator(this, function (_d) {
2192
2213
  switch (_d.label) {
@@ -2196,7 +2217,6 @@ var deserializeAws_json1_1DescribeKeyPhrasesDetectionJobCommandError = function
2196
2217
  return [4, parseBody(output.body, context)];
2197
2218
  case 1:
2198
2219
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2199
- errorCode = "UnknownError";
2200
2220
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2201
2221
  _b = errorCode;
2202
2222
  switch (_b) {
@@ -2220,10 +2240,12 @@ var deserializeAws_json1_1DescribeKeyPhrasesDetectionJobCommandError = function
2220
2240
  case 9: throw _d.sent();
2221
2241
  case 10:
2222
2242
  parsedBody = parsedOutput.body;
2243
+ $metadata = deserializeMetadata(output);
2244
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2223
2245
  response = new __BaseException({
2224
- name: parsedBody.code || parsedBody.Code || errorCode,
2246
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2225
2247
  $fault: "client",
2226
- $metadata: deserializeMetadata(output),
2248
+ $metadata: $metadata,
2227
2249
  });
2228
2250
  throw __decorateServiceException(response, parsedBody);
2229
2251
  }
@@ -2248,7 +2270,7 @@ export var deserializeAws_json1_1DescribePiiEntitiesDetectionJobCommand = functi
2248
2270
  });
2249
2271
  }); };
2250
2272
  var deserializeAws_json1_1DescribePiiEntitiesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2251
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2273
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2252
2274
  var _c;
2253
2275
  return __generator(this, function (_d) {
2254
2276
  switch (_d.label) {
@@ -2258,7 +2280,6 @@ var deserializeAws_json1_1DescribePiiEntitiesDetectionJobCommandError = function
2258
2280
  return [4, parseBody(output.body, context)];
2259
2281
  case 1:
2260
2282
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2261
- errorCode = "UnknownError";
2262
2283
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2263
2284
  _b = errorCode;
2264
2285
  switch (_b) {
@@ -2282,10 +2303,12 @@ var deserializeAws_json1_1DescribePiiEntitiesDetectionJobCommandError = function
2282
2303
  case 9: throw _d.sent();
2283
2304
  case 10:
2284
2305
  parsedBody = parsedOutput.body;
2306
+ $metadata = deserializeMetadata(output);
2307
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2285
2308
  response = new __BaseException({
2286
- name: parsedBody.code || parsedBody.Code || errorCode,
2309
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2287
2310
  $fault: "client",
2288
- $metadata: deserializeMetadata(output),
2311
+ $metadata: $metadata,
2289
2312
  });
2290
2313
  throw __decorateServiceException(response, parsedBody);
2291
2314
  }
@@ -2310,7 +2333,7 @@ export var deserializeAws_json1_1DescribeResourcePolicyCommand = function (outpu
2310
2333
  });
2311
2334
  }); };
2312
2335
  var deserializeAws_json1_1DescribeResourcePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2313
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2336
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2314
2337
  var _c;
2315
2338
  return __generator(this, function (_d) {
2316
2339
  switch (_d.label) {
@@ -2320,7 +2343,6 @@ var deserializeAws_json1_1DescribeResourcePolicyCommandError = function (output,
2320
2343
  return [4, parseBody(output.body, context)];
2321
2344
  case 1:
2322
2345
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2323
- errorCode = "UnknownError";
2324
2346
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2325
2347
  _b = errorCode;
2326
2348
  switch (_b) {
@@ -2340,10 +2362,12 @@ var deserializeAws_json1_1DescribeResourcePolicyCommandError = function (output,
2340
2362
  case 7: throw _d.sent();
2341
2363
  case 8:
2342
2364
  parsedBody = parsedOutput.body;
2365
+ $metadata = deserializeMetadata(output);
2366
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2343
2367
  response = new __BaseException({
2344
- name: parsedBody.code || parsedBody.Code || errorCode,
2368
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2345
2369
  $fault: "client",
2346
- $metadata: deserializeMetadata(output),
2370
+ $metadata: $metadata,
2347
2371
  });
2348
2372
  throw __decorateServiceException(response, parsedBody);
2349
2373
  }
@@ -2368,7 +2392,7 @@ export var deserializeAws_json1_1DescribeSentimentDetectionJobCommand = function
2368
2392
  });
2369
2393
  }); };
2370
2394
  var deserializeAws_json1_1DescribeSentimentDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2371
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2395
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2372
2396
  var _c;
2373
2397
  return __generator(this, function (_d) {
2374
2398
  switch (_d.label) {
@@ -2378,7 +2402,6 @@ var deserializeAws_json1_1DescribeSentimentDetectionJobCommandError = function (
2378
2402
  return [4, parseBody(output.body, context)];
2379
2403
  case 1:
2380
2404
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2381
- errorCode = "UnknownError";
2382
2405
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2383
2406
  _b = errorCode;
2384
2407
  switch (_b) {
@@ -2402,10 +2425,12 @@ var deserializeAws_json1_1DescribeSentimentDetectionJobCommandError = function (
2402
2425
  case 9: throw _d.sent();
2403
2426
  case 10:
2404
2427
  parsedBody = parsedOutput.body;
2428
+ $metadata = deserializeMetadata(output);
2429
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2405
2430
  response = new __BaseException({
2406
- name: parsedBody.code || parsedBody.Code || errorCode,
2431
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2407
2432
  $fault: "client",
2408
- $metadata: deserializeMetadata(output),
2433
+ $metadata: $metadata,
2409
2434
  });
2410
2435
  throw __decorateServiceException(response, parsedBody);
2411
2436
  }
@@ -2430,7 +2455,7 @@ export var deserializeAws_json1_1DescribeTargetedSentimentDetectionJobCommand =
2430
2455
  });
2431
2456
  }); };
2432
2457
  var deserializeAws_json1_1DescribeTargetedSentimentDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2433
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2458
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2434
2459
  var _c;
2435
2460
  return __generator(this, function (_d) {
2436
2461
  switch (_d.label) {
@@ -2440,7 +2465,6 @@ var deserializeAws_json1_1DescribeTargetedSentimentDetectionJobCommandError = fu
2440
2465
  return [4, parseBody(output.body, context)];
2441
2466
  case 1:
2442
2467
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2443
- errorCode = "UnknownError";
2444
2468
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2445
2469
  _b = errorCode;
2446
2470
  switch (_b) {
@@ -2464,10 +2488,12 @@ var deserializeAws_json1_1DescribeTargetedSentimentDetectionJobCommandError = fu
2464
2488
  case 9: throw _d.sent();
2465
2489
  case 10:
2466
2490
  parsedBody = parsedOutput.body;
2491
+ $metadata = deserializeMetadata(output);
2492
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2467
2493
  response = new __BaseException({
2468
- name: parsedBody.code || parsedBody.Code || errorCode,
2494
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2469
2495
  $fault: "client",
2470
- $metadata: deserializeMetadata(output),
2496
+ $metadata: $metadata,
2471
2497
  });
2472
2498
  throw __decorateServiceException(response, parsedBody);
2473
2499
  }
@@ -2492,7 +2518,7 @@ export var deserializeAws_json1_1DescribeTopicsDetectionJobCommand = function (o
2492
2518
  });
2493
2519
  }); };
2494
2520
  var deserializeAws_json1_1DescribeTopicsDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2495
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2521
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2496
2522
  var _c;
2497
2523
  return __generator(this, function (_d) {
2498
2524
  switch (_d.label) {
@@ -2502,7 +2528,6 @@ var deserializeAws_json1_1DescribeTopicsDetectionJobCommandError = function (out
2502
2528
  return [4, parseBody(output.body, context)];
2503
2529
  case 1:
2504
2530
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2505
- errorCode = "UnknownError";
2506
2531
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2507
2532
  _b = errorCode;
2508
2533
  switch (_b) {
@@ -2526,10 +2551,12 @@ var deserializeAws_json1_1DescribeTopicsDetectionJobCommandError = function (out
2526
2551
  case 9: throw _d.sent();
2527
2552
  case 10:
2528
2553
  parsedBody = parsedOutput.body;
2554
+ $metadata = deserializeMetadata(output);
2555
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2529
2556
  response = new __BaseException({
2530
- name: parsedBody.code || parsedBody.Code || errorCode,
2557
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2531
2558
  $fault: "client",
2532
- $metadata: deserializeMetadata(output),
2559
+ $metadata: $metadata,
2533
2560
  });
2534
2561
  throw __decorateServiceException(response, parsedBody);
2535
2562
  }
@@ -2554,7 +2581,7 @@ export var deserializeAws_json1_1DetectDominantLanguageCommand = function (outpu
2554
2581
  });
2555
2582
  }); };
2556
2583
  var deserializeAws_json1_1DetectDominantLanguageCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2557
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2584
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2558
2585
  var _c;
2559
2586
  return __generator(this, function (_d) {
2560
2587
  switch (_d.label) {
@@ -2564,7 +2591,6 @@ var deserializeAws_json1_1DetectDominantLanguageCommandError = function (output,
2564
2591
  return [4, parseBody(output.body, context)];
2565
2592
  case 1:
2566
2593
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2567
- errorCode = "UnknownError";
2568
2594
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2569
2595
  _b = errorCode;
2570
2596
  switch (_b) {
@@ -2584,10 +2610,12 @@ var deserializeAws_json1_1DetectDominantLanguageCommandError = function (output,
2584
2610
  case 7: throw _d.sent();
2585
2611
  case 8:
2586
2612
  parsedBody = parsedOutput.body;
2613
+ $metadata = deserializeMetadata(output);
2614
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2587
2615
  response = new __BaseException({
2588
- name: parsedBody.code || parsedBody.Code || errorCode,
2616
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2589
2617
  $fault: "client",
2590
- $metadata: deserializeMetadata(output),
2618
+ $metadata: $metadata,
2591
2619
  });
2592
2620
  throw __decorateServiceException(response, parsedBody);
2593
2621
  }
@@ -2612,7 +2640,7 @@ export var deserializeAws_json1_1DetectEntitiesCommand = function (output, conte
2612
2640
  });
2613
2641
  }); };
2614
2642
  var deserializeAws_json1_1DetectEntitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2615
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2643
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2616
2644
  var _c;
2617
2645
  return __generator(this, function (_d) {
2618
2646
  switch (_d.label) {
@@ -2622,7 +2650,6 @@ var deserializeAws_json1_1DetectEntitiesCommandError = function (output, context
2622
2650
  return [4, parseBody(output.body, context)];
2623
2651
  case 1:
2624
2652
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2625
- errorCode = "UnknownError";
2626
2653
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2627
2654
  _b = errorCode;
2628
2655
  switch (_b) {
@@ -2650,10 +2677,12 @@ var deserializeAws_json1_1DetectEntitiesCommandError = function (output, context
2650
2677
  case 11: throw _d.sent();
2651
2678
  case 12:
2652
2679
  parsedBody = parsedOutput.body;
2680
+ $metadata = deserializeMetadata(output);
2681
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2653
2682
  response = new __BaseException({
2654
- name: parsedBody.code || parsedBody.Code || errorCode,
2683
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2655
2684
  $fault: "client",
2656
- $metadata: deserializeMetadata(output),
2685
+ $metadata: $metadata,
2657
2686
  });
2658
2687
  throw __decorateServiceException(response, parsedBody);
2659
2688
  }
@@ -2678,7 +2707,7 @@ export var deserializeAws_json1_1DetectKeyPhrasesCommand = function (output, con
2678
2707
  });
2679
2708
  }); };
2680
2709
  var deserializeAws_json1_1DetectKeyPhrasesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2681
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2710
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2682
2711
  var _c;
2683
2712
  return __generator(this, function (_d) {
2684
2713
  switch (_d.label) {
@@ -2688,7 +2717,6 @@ var deserializeAws_json1_1DetectKeyPhrasesCommandError = function (output, conte
2688
2717
  return [4, parseBody(output.body, context)];
2689
2718
  case 1:
2690
2719
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2691
- errorCode = "UnknownError";
2692
2720
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2693
2721
  _b = errorCode;
2694
2722
  switch (_b) {
@@ -2712,10 +2740,12 @@ var deserializeAws_json1_1DetectKeyPhrasesCommandError = function (output, conte
2712
2740
  case 9: throw _d.sent();
2713
2741
  case 10:
2714
2742
  parsedBody = parsedOutput.body;
2743
+ $metadata = deserializeMetadata(output);
2744
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2715
2745
  response = new __BaseException({
2716
- name: parsedBody.code || parsedBody.Code || errorCode,
2746
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2717
2747
  $fault: "client",
2718
- $metadata: deserializeMetadata(output),
2748
+ $metadata: $metadata,
2719
2749
  });
2720
2750
  throw __decorateServiceException(response, parsedBody);
2721
2751
  }
@@ -2740,7 +2770,7 @@ export var deserializeAws_json1_1DetectPiiEntitiesCommand = function (output, co
2740
2770
  });
2741
2771
  }); };
2742
2772
  var deserializeAws_json1_1DetectPiiEntitiesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2743
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2773
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2744
2774
  var _c;
2745
2775
  return __generator(this, function (_d) {
2746
2776
  switch (_d.label) {
@@ -2750,7 +2780,6 @@ var deserializeAws_json1_1DetectPiiEntitiesCommandError = function (output, cont
2750
2780
  return [4, parseBody(output.body, context)];
2751
2781
  case 1:
2752
2782
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2753
- errorCode = "UnknownError";
2754
2783
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2755
2784
  _b = errorCode;
2756
2785
  switch (_b) {
@@ -2774,10 +2803,12 @@ var deserializeAws_json1_1DetectPiiEntitiesCommandError = function (output, cont
2774
2803
  case 9: throw _d.sent();
2775
2804
  case 10:
2776
2805
  parsedBody = parsedOutput.body;
2806
+ $metadata = deserializeMetadata(output);
2807
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2777
2808
  response = new __BaseException({
2778
- name: parsedBody.code || parsedBody.Code || errorCode,
2809
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2779
2810
  $fault: "client",
2780
- $metadata: deserializeMetadata(output),
2811
+ $metadata: $metadata,
2781
2812
  });
2782
2813
  throw __decorateServiceException(response, parsedBody);
2783
2814
  }
@@ -2802,7 +2833,7 @@ export var deserializeAws_json1_1DetectSentimentCommand = function (output, cont
2802
2833
  });
2803
2834
  }); };
2804
2835
  var deserializeAws_json1_1DetectSentimentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2805
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2836
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2806
2837
  var _c;
2807
2838
  return __generator(this, function (_d) {
2808
2839
  switch (_d.label) {
@@ -2812,7 +2843,6 @@ var deserializeAws_json1_1DetectSentimentCommandError = function (output, contex
2812
2843
  return [4, parseBody(output.body, context)];
2813
2844
  case 1:
2814
2845
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2815
- errorCode = "UnknownError";
2816
2846
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2817
2847
  _b = errorCode;
2818
2848
  switch (_b) {
@@ -2836,10 +2866,12 @@ var deserializeAws_json1_1DetectSentimentCommandError = function (output, contex
2836
2866
  case 9: throw _d.sent();
2837
2867
  case 10:
2838
2868
  parsedBody = parsedOutput.body;
2869
+ $metadata = deserializeMetadata(output);
2870
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2839
2871
  response = new __BaseException({
2840
- name: parsedBody.code || parsedBody.Code || errorCode,
2872
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2841
2873
  $fault: "client",
2842
- $metadata: deserializeMetadata(output),
2874
+ $metadata: $metadata,
2843
2875
  });
2844
2876
  throw __decorateServiceException(response, parsedBody);
2845
2877
  }
@@ -2864,7 +2896,7 @@ export var deserializeAws_json1_1DetectSyntaxCommand = function (output, context
2864
2896
  });
2865
2897
  }); };
2866
2898
  var deserializeAws_json1_1DetectSyntaxCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2867
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2899
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2868
2900
  var _c;
2869
2901
  return __generator(this, function (_d) {
2870
2902
  switch (_d.label) {
@@ -2874,7 +2906,6 @@ var deserializeAws_json1_1DetectSyntaxCommandError = function (output, context)
2874
2906
  return [4, parseBody(output.body, context)];
2875
2907
  case 1:
2876
2908
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2877
- errorCode = "UnknownError";
2878
2909
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2879
2910
  _b = errorCode;
2880
2911
  switch (_b) {
@@ -2898,10 +2929,12 @@ var deserializeAws_json1_1DetectSyntaxCommandError = function (output, context)
2898
2929
  case 9: throw _d.sent();
2899
2930
  case 10:
2900
2931
  parsedBody = parsedOutput.body;
2932
+ $metadata = deserializeMetadata(output);
2933
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2901
2934
  response = new __BaseException({
2902
- name: parsedBody.code || parsedBody.Code || errorCode,
2935
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2903
2936
  $fault: "client",
2904
- $metadata: deserializeMetadata(output),
2937
+ $metadata: $metadata,
2905
2938
  });
2906
2939
  throw __decorateServiceException(response, parsedBody);
2907
2940
  }
@@ -2926,7 +2959,7 @@ export var deserializeAws_json1_1ImportModelCommand = function (output, context)
2926
2959
  });
2927
2960
  }); };
2928
2961
  var deserializeAws_json1_1ImportModelCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2929
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
2962
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
2930
2963
  var _c;
2931
2964
  return __generator(this, function (_d) {
2932
2965
  switch (_d.label) {
@@ -2936,7 +2969,6 @@ var deserializeAws_json1_1ImportModelCommandError = function (output, context) {
2936
2969
  return [4, parseBody(output.body, context)];
2937
2970
  case 1:
2938
2971
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
2939
- errorCode = "UnknownError";
2940
2972
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2941
2973
  _b = errorCode;
2942
2974
  switch (_b) {
@@ -2980,10 +3012,12 @@ var deserializeAws_json1_1ImportModelCommandError = function (output, context) {
2980
3012
  case 19: throw _d.sent();
2981
3013
  case 20:
2982
3014
  parsedBody = parsedOutput.body;
3015
+ $metadata = deserializeMetadata(output);
3016
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2983
3017
  response = new __BaseException({
2984
- name: parsedBody.code || parsedBody.Code || errorCode,
3018
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2985
3019
  $fault: "client",
2986
- $metadata: deserializeMetadata(output),
3020
+ $metadata: $metadata,
2987
3021
  });
2988
3022
  throw __decorateServiceException(response, parsedBody);
2989
3023
  }
@@ -3008,7 +3042,7 @@ export var deserializeAws_json1_1ListDocumentClassificationJobsCommand = functio
3008
3042
  });
3009
3043
  }); };
3010
3044
  var deserializeAws_json1_1ListDocumentClassificationJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3011
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3045
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3012
3046
  var _c;
3013
3047
  return __generator(this, function (_d) {
3014
3048
  switch (_d.label) {
@@ -3018,7 +3052,6 @@ var deserializeAws_json1_1ListDocumentClassificationJobsCommandError = function
3018
3052
  return [4, parseBody(output.body, context)];
3019
3053
  case 1:
3020
3054
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3021
- errorCode = "UnknownError";
3022
3055
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3023
3056
  _b = errorCode;
3024
3057
  switch (_b) {
@@ -3042,10 +3075,12 @@ var deserializeAws_json1_1ListDocumentClassificationJobsCommandError = function
3042
3075
  case 9: throw _d.sent();
3043
3076
  case 10:
3044
3077
  parsedBody = parsedOutput.body;
3078
+ $metadata = deserializeMetadata(output);
3079
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3045
3080
  response = new __BaseException({
3046
- name: parsedBody.code || parsedBody.Code || errorCode,
3081
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3047
3082
  $fault: "client",
3048
- $metadata: deserializeMetadata(output),
3083
+ $metadata: $metadata,
3049
3084
  });
3050
3085
  throw __decorateServiceException(response, parsedBody);
3051
3086
  }
@@ -3070,7 +3105,7 @@ export var deserializeAws_json1_1ListDocumentClassifiersCommand = function (outp
3070
3105
  });
3071
3106
  }); };
3072
3107
  var deserializeAws_json1_1ListDocumentClassifiersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3073
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3108
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3074
3109
  var _c;
3075
3110
  return __generator(this, function (_d) {
3076
3111
  switch (_d.label) {
@@ -3080,7 +3115,6 @@ var deserializeAws_json1_1ListDocumentClassifiersCommandError = function (output
3080
3115
  return [4, parseBody(output.body, context)];
3081
3116
  case 1:
3082
3117
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3083
- errorCode = "UnknownError";
3084
3118
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3085
3119
  _b = errorCode;
3086
3120
  switch (_b) {
@@ -3104,10 +3138,12 @@ var deserializeAws_json1_1ListDocumentClassifiersCommandError = function (output
3104
3138
  case 9: throw _d.sent();
3105
3139
  case 10:
3106
3140
  parsedBody = parsedOutput.body;
3141
+ $metadata = deserializeMetadata(output);
3142
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3107
3143
  response = new __BaseException({
3108
- name: parsedBody.code || parsedBody.Code || errorCode,
3144
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3109
3145
  $fault: "client",
3110
- $metadata: deserializeMetadata(output),
3146
+ $metadata: $metadata,
3111
3147
  });
3112
3148
  throw __decorateServiceException(response, parsedBody);
3113
3149
  }
@@ -3132,7 +3168,7 @@ export var deserializeAws_json1_1ListDocumentClassifierSummariesCommand = functi
3132
3168
  });
3133
3169
  }); };
3134
3170
  var deserializeAws_json1_1ListDocumentClassifierSummariesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3135
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3171
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3136
3172
  var _c;
3137
3173
  return __generator(this, function (_d) {
3138
3174
  switch (_d.label) {
@@ -3142,7 +3178,6 @@ var deserializeAws_json1_1ListDocumentClassifierSummariesCommandError = function
3142
3178
  return [4, parseBody(output.body, context)];
3143
3179
  case 1:
3144
3180
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3145
- errorCode = "UnknownError";
3146
3181
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3147
3182
  _b = errorCode;
3148
3183
  switch (_b) {
@@ -3162,10 +3197,12 @@ var deserializeAws_json1_1ListDocumentClassifierSummariesCommandError = function
3162
3197
  case 7: throw _d.sent();
3163
3198
  case 8:
3164
3199
  parsedBody = parsedOutput.body;
3200
+ $metadata = deserializeMetadata(output);
3201
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3165
3202
  response = new __BaseException({
3166
- name: parsedBody.code || parsedBody.Code || errorCode,
3203
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3167
3204
  $fault: "client",
3168
- $metadata: deserializeMetadata(output),
3205
+ $metadata: $metadata,
3169
3206
  });
3170
3207
  throw __decorateServiceException(response, parsedBody);
3171
3208
  }
@@ -3190,7 +3227,7 @@ export var deserializeAws_json1_1ListDominantLanguageDetectionJobsCommand = func
3190
3227
  });
3191
3228
  }); };
3192
3229
  var deserializeAws_json1_1ListDominantLanguageDetectionJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3193
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3230
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3194
3231
  var _c;
3195
3232
  return __generator(this, function (_d) {
3196
3233
  switch (_d.label) {
@@ -3200,7 +3237,6 @@ var deserializeAws_json1_1ListDominantLanguageDetectionJobsCommandError = functi
3200
3237
  return [4, parseBody(output.body, context)];
3201
3238
  case 1:
3202
3239
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3203
- errorCode = "UnknownError";
3204
3240
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3205
3241
  _b = errorCode;
3206
3242
  switch (_b) {
@@ -3224,10 +3260,12 @@ var deserializeAws_json1_1ListDominantLanguageDetectionJobsCommandError = functi
3224
3260
  case 9: throw _d.sent();
3225
3261
  case 10:
3226
3262
  parsedBody = parsedOutput.body;
3263
+ $metadata = deserializeMetadata(output);
3264
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3227
3265
  response = new __BaseException({
3228
- name: parsedBody.code || parsedBody.Code || errorCode,
3266
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3229
3267
  $fault: "client",
3230
- $metadata: deserializeMetadata(output),
3268
+ $metadata: $metadata,
3231
3269
  });
3232
3270
  throw __decorateServiceException(response, parsedBody);
3233
3271
  }
@@ -3252,7 +3290,7 @@ export var deserializeAws_json1_1ListEndpointsCommand = function (output, contex
3252
3290
  });
3253
3291
  }); };
3254
3292
  var deserializeAws_json1_1ListEndpointsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3255
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3293
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3256
3294
  var _c;
3257
3295
  return __generator(this, function (_d) {
3258
3296
  switch (_d.label) {
@@ -3262,7 +3300,6 @@ var deserializeAws_json1_1ListEndpointsCommandError = function (output, context)
3262
3300
  return [4, parseBody(output.body, context)];
3263
3301
  case 1:
3264
3302
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3265
- errorCode = "UnknownError";
3266
3303
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3267
3304
  _b = errorCode;
3268
3305
  switch (_b) {
@@ -3282,10 +3319,12 @@ var deserializeAws_json1_1ListEndpointsCommandError = function (output, context)
3282
3319
  case 7: throw _d.sent();
3283
3320
  case 8:
3284
3321
  parsedBody = parsedOutput.body;
3322
+ $metadata = deserializeMetadata(output);
3323
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3285
3324
  response = new __BaseException({
3286
- name: parsedBody.code || parsedBody.Code || errorCode,
3325
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3287
3326
  $fault: "client",
3288
- $metadata: deserializeMetadata(output),
3327
+ $metadata: $metadata,
3289
3328
  });
3290
3329
  throw __decorateServiceException(response, parsedBody);
3291
3330
  }
@@ -3310,7 +3349,7 @@ export var deserializeAws_json1_1ListEntitiesDetectionJobsCommand = function (ou
3310
3349
  });
3311
3350
  }); };
3312
3351
  var deserializeAws_json1_1ListEntitiesDetectionJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3313
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3352
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3314
3353
  var _c;
3315
3354
  return __generator(this, function (_d) {
3316
3355
  switch (_d.label) {
@@ -3320,7 +3359,6 @@ var deserializeAws_json1_1ListEntitiesDetectionJobsCommandError = function (outp
3320
3359
  return [4, parseBody(output.body, context)];
3321
3360
  case 1:
3322
3361
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3323
- errorCode = "UnknownError";
3324
3362
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3325
3363
  _b = errorCode;
3326
3364
  switch (_b) {
@@ -3344,10 +3382,12 @@ var deserializeAws_json1_1ListEntitiesDetectionJobsCommandError = function (outp
3344
3382
  case 9: throw _d.sent();
3345
3383
  case 10:
3346
3384
  parsedBody = parsedOutput.body;
3385
+ $metadata = deserializeMetadata(output);
3386
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3347
3387
  response = new __BaseException({
3348
- name: parsedBody.code || parsedBody.Code || errorCode,
3388
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3349
3389
  $fault: "client",
3350
- $metadata: deserializeMetadata(output),
3390
+ $metadata: $metadata,
3351
3391
  });
3352
3392
  throw __decorateServiceException(response, parsedBody);
3353
3393
  }
@@ -3372,7 +3412,7 @@ export var deserializeAws_json1_1ListEntityRecognizersCommand = function (output
3372
3412
  });
3373
3413
  }); };
3374
3414
  var deserializeAws_json1_1ListEntityRecognizersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3375
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3415
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3376
3416
  var _c;
3377
3417
  return __generator(this, function (_d) {
3378
3418
  switch (_d.label) {
@@ -3382,7 +3422,6 @@ var deserializeAws_json1_1ListEntityRecognizersCommandError = function (output,
3382
3422
  return [4, parseBody(output.body, context)];
3383
3423
  case 1:
3384
3424
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3385
- errorCode = "UnknownError";
3386
3425
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3387
3426
  _b = errorCode;
3388
3427
  switch (_b) {
@@ -3406,10 +3445,12 @@ var deserializeAws_json1_1ListEntityRecognizersCommandError = function (output,
3406
3445
  case 9: throw _d.sent();
3407
3446
  case 10:
3408
3447
  parsedBody = parsedOutput.body;
3448
+ $metadata = deserializeMetadata(output);
3449
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3409
3450
  response = new __BaseException({
3410
- name: parsedBody.code || parsedBody.Code || errorCode,
3451
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3411
3452
  $fault: "client",
3412
- $metadata: deserializeMetadata(output),
3453
+ $metadata: $metadata,
3413
3454
  });
3414
3455
  throw __decorateServiceException(response, parsedBody);
3415
3456
  }
@@ -3434,7 +3475,7 @@ export var deserializeAws_json1_1ListEntityRecognizerSummariesCommand = function
3434
3475
  });
3435
3476
  }); };
3436
3477
  var deserializeAws_json1_1ListEntityRecognizerSummariesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3437
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3478
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3438
3479
  var _c;
3439
3480
  return __generator(this, function (_d) {
3440
3481
  switch (_d.label) {
@@ -3444,7 +3485,6 @@ var deserializeAws_json1_1ListEntityRecognizerSummariesCommandError = function (
3444
3485
  return [4, parseBody(output.body, context)];
3445
3486
  case 1:
3446
3487
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3447
- errorCode = "UnknownError";
3448
3488
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3449
3489
  _b = errorCode;
3450
3490
  switch (_b) {
@@ -3464,10 +3504,12 @@ var deserializeAws_json1_1ListEntityRecognizerSummariesCommandError = function (
3464
3504
  case 7: throw _d.sent();
3465
3505
  case 8:
3466
3506
  parsedBody = parsedOutput.body;
3507
+ $metadata = deserializeMetadata(output);
3508
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3467
3509
  response = new __BaseException({
3468
- name: parsedBody.code || parsedBody.Code || errorCode,
3510
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3469
3511
  $fault: "client",
3470
- $metadata: deserializeMetadata(output),
3512
+ $metadata: $metadata,
3471
3513
  });
3472
3514
  throw __decorateServiceException(response, parsedBody);
3473
3515
  }
@@ -3492,7 +3534,7 @@ export var deserializeAws_json1_1ListEventsDetectionJobsCommand = function (outp
3492
3534
  });
3493
3535
  }); };
3494
3536
  var deserializeAws_json1_1ListEventsDetectionJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3495
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3537
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3496
3538
  var _c;
3497
3539
  return __generator(this, function (_d) {
3498
3540
  switch (_d.label) {
@@ -3502,7 +3544,6 @@ var deserializeAws_json1_1ListEventsDetectionJobsCommandError = function (output
3502
3544
  return [4, parseBody(output.body, context)];
3503
3545
  case 1:
3504
3546
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3505
- errorCode = "UnknownError";
3506
3547
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3507
3548
  _b = errorCode;
3508
3549
  switch (_b) {
@@ -3526,10 +3567,12 @@ var deserializeAws_json1_1ListEventsDetectionJobsCommandError = function (output
3526
3567
  case 9: throw _d.sent();
3527
3568
  case 10:
3528
3569
  parsedBody = parsedOutput.body;
3570
+ $metadata = deserializeMetadata(output);
3571
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3529
3572
  response = new __BaseException({
3530
- name: parsedBody.code || parsedBody.Code || errorCode,
3573
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3531
3574
  $fault: "client",
3532
- $metadata: deserializeMetadata(output),
3575
+ $metadata: $metadata,
3533
3576
  });
3534
3577
  throw __decorateServiceException(response, parsedBody);
3535
3578
  }
@@ -3554,7 +3597,7 @@ export var deserializeAws_json1_1ListKeyPhrasesDetectionJobsCommand = function (
3554
3597
  });
3555
3598
  }); };
3556
3599
  var deserializeAws_json1_1ListKeyPhrasesDetectionJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3557
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3600
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3558
3601
  var _c;
3559
3602
  return __generator(this, function (_d) {
3560
3603
  switch (_d.label) {
@@ -3564,7 +3607,6 @@ var deserializeAws_json1_1ListKeyPhrasesDetectionJobsCommandError = function (ou
3564
3607
  return [4, parseBody(output.body, context)];
3565
3608
  case 1:
3566
3609
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3567
- errorCode = "UnknownError";
3568
3610
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3569
3611
  _b = errorCode;
3570
3612
  switch (_b) {
@@ -3588,10 +3630,12 @@ var deserializeAws_json1_1ListKeyPhrasesDetectionJobsCommandError = function (ou
3588
3630
  case 9: throw _d.sent();
3589
3631
  case 10:
3590
3632
  parsedBody = parsedOutput.body;
3633
+ $metadata = deserializeMetadata(output);
3634
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3591
3635
  response = new __BaseException({
3592
- name: parsedBody.code || parsedBody.Code || errorCode,
3636
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3593
3637
  $fault: "client",
3594
- $metadata: deserializeMetadata(output),
3638
+ $metadata: $metadata,
3595
3639
  });
3596
3640
  throw __decorateServiceException(response, parsedBody);
3597
3641
  }
@@ -3616,7 +3660,7 @@ export var deserializeAws_json1_1ListPiiEntitiesDetectionJobsCommand = function
3616
3660
  });
3617
3661
  }); };
3618
3662
  var deserializeAws_json1_1ListPiiEntitiesDetectionJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3619
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3663
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3620
3664
  var _c;
3621
3665
  return __generator(this, function (_d) {
3622
3666
  switch (_d.label) {
@@ -3626,7 +3670,6 @@ var deserializeAws_json1_1ListPiiEntitiesDetectionJobsCommandError = function (o
3626
3670
  return [4, parseBody(output.body, context)];
3627
3671
  case 1:
3628
3672
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3629
- errorCode = "UnknownError";
3630
3673
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3631
3674
  _b = errorCode;
3632
3675
  switch (_b) {
@@ -3650,10 +3693,12 @@ var deserializeAws_json1_1ListPiiEntitiesDetectionJobsCommandError = function (o
3650
3693
  case 9: throw _d.sent();
3651
3694
  case 10:
3652
3695
  parsedBody = parsedOutput.body;
3696
+ $metadata = deserializeMetadata(output);
3697
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3653
3698
  response = new __BaseException({
3654
- name: parsedBody.code || parsedBody.Code || errorCode,
3699
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3655
3700
  $fault: "client",
3656
- $metadata: deserializeMetadata(output),
3701
+ $metadata: $metadata,
3657
3702
  });
3658
3703
  throw __decorateServiceException(response, parsedBody);
3659
3704
  }
@@ -3678,7 +3723,7 @@ export var deserializeAws_json1_1ListSentimentDetectionJobsCommand = function (o
3678
3723
  });
3679
3724
  }); };
3680
3725
  var deserializeAws_json1_1ListSentimentDetectionJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3681
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3726
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3682
3727
  var _c;
3683
3728
  return __generator(this, function (_d) {
3684
3729
  switch (_d.label) {
@@ -3688,7 +3733,6 @@ var deserializeAws_json1_1ListSentimentDetectionJobsCommandError = function (out
3688
3733
  return [4, parseBody(output.body, context)];
3689
3734
  case 1:
3690
3735
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3691
- errorCode = "UnknownError";
3692
3736
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3693
3737
  _b = errorCode;
3694
3738
  switch (_b) {
@@ -3712,10 +3756,12 @@ var deserializeAws_json1_1ListSentimentDetectionJobsCommandError = function (out
3712
3756
  case 9: throw _d.sent();
3713
3757
  case 10:
3714
3758
  parsedBody = parsedOutput.body;
3759
+ $metadata = deserializeMetadata(output);
3760
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3715
3761
  response = new __BaseException({
3716
- name: parsedBody.code || parsedBody.Code || errorCode,
3762
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3717
3763
  $fault: "client",
3718
- $metadata: deserializeMetadata(output),
3764
+ $metadata: $metadata,
3719
3765
  });
3720
3766
  throw __decorateServiceException(response, parsedBody);
3721
3767
  }
@@ -3740,7 +3786,7 @@ export var deserializeAws_json1_1ListTagsForResourceCommand = function (output,
3740
3786
  });
3741
3787
  }); };
3742
3788
  var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3743
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3789
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3744
3790
  var _c;
3745
3791
  return __generator(this, function (_d) {
3746
3792
  switch (_d.label) {
@@ -3750,7 +3796,6 @@ var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, co
3750
3796
  return [4, parseBody(output.body, context)];
3751
3797
  case 1:
3752
3798
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3753
- errorCode = "UnknownError";
3754
3799
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3755
3800
  _b = errorCode;
3756
3801
  switch (_b) {
@@ -3770,10 +3815,12 @@ var deserializeAws_json1_1ListTagsForResourceCommandError = function (output, co
3770
3815
  case 7: throw _d.sent();
3771
3816
  case 8:
3772
3817
  parsedBody = parsedOutput.body;
3818
+ $metadata = deserializeMetadata(output);
3819
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3773
3820
  response = new __BaseException({
3774
- name: parsedBody.code || parsedBody.Code || errorCode,
3821
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3775
3822
  $fault: "client",
3776
- $metadata: deserializeMetadata(output),
3823
+ $metadata: $metadata,
3777
3824
  });
3778
3825
  throw __decorateServiceException(response, parsedBody);
3779
3826
  }
@@ -3798,7 +3845,7 @@ export var deserializeAws_json1_1ListTargetedSentimentDetectionJobsCommand = fun
3798
3845
  });
3799
3846
  }); };
3800
3847
  var deserializeAws_json1_1ListTargetedSentimentDetectionJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3801
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3848
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3802
3849
  var _c;
3803
3850
  return __generator(this, function (_d) {
3804
3851
  switch (_d.label) {
@@ -3808,7 +3855,6 @@ var deserializeAws_json1_1ListTargetedSentimentDetectionJobsCommandError = funct
3808
3855
  return [4, parseBody(output.body, context)];
3809
3856
  case 1:
3810
3857
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3811
- errorCode = "UnknownError";
3812
3858
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3813
3859
  _b = errorCode;
3814
3860
  switch (_b) {
@@ -3832,10 +3878,12 @@ var deserializeAws_json1_1ListTargetedSentimentDetectionJobsCommandError = funct
3832
3878
  case 9: throw _d.sent();
3833
3879
  case 10:
3834
3880
  parsedBody = parsedOutput.body;
3881
+ $metadata = deserializeMetadata(output);
3882
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3835
3883
  response = new __BaseException({
3836
- name: parsedBody.code || parsedBody.Code || errorCode,
3884
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3837
3885
  $fault: "client",
3838
- $metadata: deserializeMetadata(output),
3886
+ $metadata: $metadata,
3839
3887
  });
3840
3888
  throw __decorateServiceException(response, parsedBody);
3841
3889
  }
@@ -3860,7 +3908,7 @@ export var deserializeAws_json1_1ListTopicsDetectionJobsCommand = function (outp
3860
3908
  });
3861
3909
  }); };
3862
3910
  var deserializeAws_json1_1ListTopicsDetectionJobsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3863
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3911
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3864
3912
  var _c;
3865
3913
  return __generator(this, function (_d) {
3866
3914
  switch (_d.label) {
@@ -3870,7 +3918,6 @@ var deserializeAws_json1_1ListTopicsDetectionJobsCommandError = function (output
3870
3918
  return [4, parseBody(output.body, context)];
3871
3919
  case 1:
3872
3920
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3873
- errorCode = "UnknownError";
3874
3921
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3875
3922
  _b = errorCode;
3876
3923
  switch (_b) {
@@ -3894,10 +3941,12 @@ var deserializeAws_json1_1ListTopicsDetectionJobsCommandError = function (output
3894
3941
  case 9: throw _d.sent();
3895
3942
  case 10:
3896
3943
  parsedBody = parsedOutput.body;
3944
+ $metadata = deserializeMetadata(output);
3945
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3897
3946
  response = new __BaseException({
3898
- name: parsedBody.code || parsedBody.Code || errorCode,
3947
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3899
3948
  $fault: "client",
3900
- $metadata: deserializeMetadata(output),
3949
+ $metadata: $metadata,
3901
3950
  });
3902
3951
  throw __decorateServiceException(response, parsedBody);
3903
3952
  }
@@ -3922,7 +3971,7 @@ export var deserializeAws_json1_1PutResourcePolicyCommand = function (output, co
3922
3971
  });
3923
3972
  }); };
3924
3973
  var deserializeAws_json1_1PutResourcePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3925
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
3974
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3926
3975
  var _c;
3927
3976
  return __generator(this, function (_d) {
3928
3977
  switch (_d.label) {
@@ -3932,7 +3981,6 @@ var deserializeAws_json1_1PutResourcePolicyCommandError = function (output, cont
3932
3981
  return [4, parseBody(output.body, context)];
3933
3982
  case 1:
3934
3983
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3935
- errorCode = "UnknownError";
3936
3984
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3937
3985
  _b = errorCode;
3938
3986
  switch (_b) {
@@ -3952,10 +4000,12 @@ var deserializeAws_json1_1PutResourcePolicyCommandError = function (output, cont
3952
4000
  case 7: throw _d.sent();
3953
4001
  case 8:
3954
4002
  parsedBody = parsedOutput.body;
4003
+ $metadata = deserializeMetadata(output);
4004
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3955
4005
  response = new __BaseException({
3956
- name: parsedBody.code || parsedBody.Code || errorCode,
4006
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3957
4007
  $fault: "client",
3958
- $metadata: deserializeMetadata(output),
4008
+ $metadata: $metadata,
3959
4009
  });
3960
4010
  throw __decorateServiceException(response, parsedBody);
3961
4011
  }
@@ -3980,7 +4030,7 @@ export var deserializeAws_json1_1StartDocumentClassificationJobCommand = functio
3980
4030
  });
3981
4031
  }); };
3982
4032
  var deserializeAws_json1_1StartDocumentClassificationJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3983
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4033
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3984
4034
  var _c;
3985
4035
  return __generator(this, function (_d) {
3986
4036
  switch (_d.label) {
@@ -3990,7 +4040,6 @@ var deserializeAws_json1_1StartDocumentClassificationJobCommandError = function
3990
4040
  return [4, parseBody(output.body, context)];
3991
4041
  case 1:
3992
4042
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
3993
- errorCode = "UnknownError";
3994
4043
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3995
4044
  _b = errorCode;
3996
4045
  switch (_b) {
@@ -4026,10 +4075,12 @@ var deserializeAws_json1_1StartDocumentClassificationJobCommandError = function
4026
4075
  case 15: throw _d.sent();
4027
4076
  case 16:
4028
4077
  parsedBody = parsedOutput.body;
4078
+ $metadata = deserializeMetadata(output);
4079
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4029
4080
  response = new __BaseException({
4030
- name: parsedBody.code || parsedBody.Code || errorCode,
4081
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4031
4082
  $fault: "client",
4032
- $metadata: deserializeMetadata(output),
4083
+ $metadata: $metadata,
4033
4084
  });
4034
4085
  throw __decorateServiceException(response, parsedBody);
4035
4086
  }
@@ -4054,7 +4105,7 @@ export var deserializeAws_json1_1StartDominantLanguageDetectionJobCommand = func
4054
4105
  });
4055
4106
  }); };
4056
4107
  var deserializeAws_json1_1StartDominantLanguageDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4057
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4108
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4058
4109
  var _c;
4059
4110
  return __generator(this, function (_d) {
4060
4111
  switch (_d.label) {
@@ -4064,7 +4115,6 @@ var deserializeAws_json1_1StartDominantLanguageDetectionJobCommandError = functi
4064
4115
  return [4, parseBody(output.body, context)];
4065
4116
  case 1:
4066
4117
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4067
- errorCode = "UnknownError";
4068
4118
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4069
4119
  _b = errorCode;
4070
4120
  switch (_b) {
@@ -4092,10 +4142,12 @@ var deserializeAws_json1_1StartDominantLanguageDetectionJobCommandError = functi
4092
4142
  case 11: throw _d.sent();
4093
4143
  case 12:
4094
4144
  parsedBody = parsedOutput.body;
4145
+ $metadata = deserializeMetadata(output);
4146
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4095
4147
  response = new __BaseException({
4096
- name: parsedBody.code || parsedBody.Code || errorCode,
4148
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4097
4149
  $fault: "client",
4098
- $metadata: deserializeMetadata(output),
4150
+ $metadata: $metadata,
4099
4151
  });
4100
4152
  throw __decorateServiceException(response, parsedBody);
4101
4153
  }
@@ -4120,7 +4172,7 @@ export var deserializeAws_json1_1StartEntitiesDetectionJobCommand = function (ou
4120
4172
  });
4121
4173
  }); };
4122
4174
  var deserializeAws_json1_1StartEntitiesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4123
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4175
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4124
4176
  var _c;
4125
4177
  return __generator(this, function (_d) {
4126
4178
  switch (_d.label) {
@@ -4130,7 +4182,6 @@ var deserializeAws_json1_1StartEntitiesDetectionJobCommandError = function (outp
4130
4182
  return [4, parseBody(output.body, context)];
4131
4183
  case 1:
4132
4184
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4133
- errorCode = "UnknownError";
4134
4185
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4135
4186
  _b = errorCode;
4136
4187
  switch (_b) {
@@ -4166,10 +4217,12 @@ var deserializeAws_json1_1StartEntitiesDetectionJobCommandError = function (outp
4166
4217
  case 15: throw _d.sent();
4167
4218
  case 16:
4168
4219
  parsedBody = parsedOutput.body;
4220
+ $metadata = deserializeMetadata(output);
4221
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4169
4222
  response = new __BaseException({
4170
- name: parsedBody.code || parsedBody.Code || errorCode,
4223
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4171
4224
  $fault: "client",
4172
- $metadata: deserializeMetadata(output),
4225
+ $metadata: $metadata,
4173
4226
  });
4174
4227
  throw __decorateServiceException(response, parsedBody);
4175
4228
  }
@@ -4194,7 +4247,7 @@ export var deserializeAws_json1_1StartEventsDetectionJobCommand = function (outp
4194
4247
  });
4195
4248
  }); };
4196
4249
  var deserializeAws_json1_1StartEventsDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4197
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4250
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4198
4251
  var _c;
4199
4252
  return __generator(this, function (_d) {
4200
4253
  switch (_d.label) {
@@ -4204,7 +4257,6 @@ var deserializeAws_json1_1StartEventsDetectionJobCommandError = function (output
4204
4257
  return [4, parseBody(output.body, context)];
4205
4258
  case 1:
4206
4259
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4207
- errorCode = "UnknownError";
4208
4260
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4209
4261
  _b = errorCode;
4210
4262
  switch (_b) {
@@ -4232,10 +4284,12 @@ var deserializeAws_json1_1StartEventsDetectionJobCommandError = function (output
4232
4284
  case 11: throw _d.sent();
4233
4285
  case 12:
4234
4286
  parsedBody = parsedOutput.body;
4287
+ $metadata = deserializeMetadata(output);
4288
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4235
4289
  response = new __BaseException({
4236
- name: parsedBody.code || parsedBody.Code || errorCode,
4290
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4237
4291
  $fault: "client",
4238
- $metadata: deserializeMetadata(output),
4292
+ $metadata: $metadata,
4239
4293
  });
4240
4294
  throw __decorateServiceException(response, parsedBody);
4241
4295
  }
@@ -4260,7 +4314,7 @@ export var deserializeAws_json1_1StartKeyPhrasesDetectionJobCommand = function (
4260
4314
  });
4261
4315
  }); };
4262
4316
  var deserializeAws_json1_1StartKeyPhrasesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4263
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4317
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4264
4318
  var _c;
4265
4319
  return __generator(this, function (_d) {
4266
4320
  switch (_d.label) {
@@ -4270,7 +4324,6 @@ var deserializeAws_json1_1StartKeyPhrasesDetectionJobCommandError = function (ou
4270
4324
  return [4, parseBody(output.body, context)];
4271
4325
  case 1:
4272
4326
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4273
- errorCode = "UnknownError";
4274
4327
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4275
4328
  _b = errorCode;
4276
4329
  switch (_b) {
@@ -4298,10 +4351,12 @@ var deserializeAws_json1_1StartKeyPhrasesDetectionJobCommandError = function (ou
4298
4351
  case 11: throw _d.sent();
4299
4352
  case 12:
4300
4353
  parsedBody = parsedOutput.body;
4354
+ $metadata = deserializeMetadata(output);
4355
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4301
4356
  response = new __BaseException({
4302
- name: parsedBody.code || parsedBody.Code || errorCode,
4357
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4303
4358
  $fault: "client",
4304
- $metadata: deserializeMetadata(output),
4359
+ $metadata: $metadata,
4305
4360
  });
4306
4361
  throw __decorateServiceException(response, parsedBody);
4307
4362
  }
@@ -4326,7 +4381,7 @@ export var deserializeAws_json1_1StartPiiEntitiesDetectionJobCommand = function
4326
4381
  });
4327
4382
  }); };
4328
4383
  var deserializeAws_json1_1StartPiiEntitiesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4329
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4384
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4330
4385
  var _c;
4331
4386
  return __generator(this, function (_d) {
4332
4387
  switch (_d.label) {
@@ -4336,7 +4391,6 @@ var deserializeAws_json1_1StartPiiEntitiesDetectionJobCommandError = function (o
4336
4391
  return [4, parseBody(output.body, context)];
4337
4392
  case 1:
4338
4393
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4339
- errorCode = "UnknownError";
4340
4394
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4341
4395
  _b = errorCode;
4342
4396
  switch (_b) {
@@ -4364,10 +4418,12 @@ var deserializeAws_json1_1StartPiiEntitiesDetectionJobCommandError = function (o
4364
4418
  case 11: throw _d.sent();
4365
4419
  case 12:
4366
4420
  parsedBody = parsedOutput.body;
4421
+ $metadata = deserializeMetadata(output);
4422
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4367
4423
  response = new __BaseException({
4368
- name: parsedBody.code || parsedBody.Code || errorCode,
4424
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4369
4425
  $fault: "client",
4370
- $metadata: deserializeMetadata(output),
4426
+ $metadata: $metadata,
4371
4427
  });
4372
4428
  throw __decorateServiceException(response, parsedBody);
4373
4429
  }
@@ -4392,7 +4448,7 @@ export var deserializeAws_json1_1StartSentimentDetectionJobCommand = function (o
4392
4448
  });
4393
4449
  }); };
4394
4450
  var deserializeAws_json1_1StartSentimentDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4395
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4451
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4396
4452
  var _c;
4397
4453
  return __generator(this, function (_d) {
4398
4454
  switch (_d.label) {
@@ -4402,7 +4458,6 @@ var deserializeAws_json1_1StartSentimentDetectionJobCommandError = function (out
4402
4458
  return [4, parseBody(output.body, context)];
4403
4459
  case 1:
4404
4460
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4405
- errorCode = "UnknownError";
4406
4461
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4407
4462
  _b = errorCode;
4408
4463
  switch (_b) {
@@ -4430,10 +4485,12 @@ var deserializeAws_json1_1StartSentimentDetectionJobCommandError = function (out
4430
4485
  case 11: throw _d.sent();
4431
4486
  case 12:
4432
4487
  parsedBody = parsedOutput.body;
4488
+ $metadata = deserializeMetadata(output);
4489
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4433
4490
  response = new __BaseException({
4434
- name: parsedBody.code || parsedBody.Code || errorCode,
4491
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4435
4492
  $fault: "client",
4436
- $metadata: deserializeMetadata(output),
4493
+ $metadata: $metadata,
4437
4494
  });
4438
4495
  throw __decorateServiceException(response, parsedBody);
4439
4496
  }
@@ -4458,7 +4515,7 @@ export var deserializeAws_json1_1StartTargetedSentimentDetectionJobCommand = fun
4458
4515
  });
4459
4516
  }); };
4460
4517
  var deserializeAws_json1_1StartTargetedSentimentDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4461
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4518
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4462
4519
  var _c;
4463
4520
  return __generator(this, function (_d) {
4464
4521
  switch (_d.label) {
@@ -4468,7 +4525,6 @@ var deserializeAws_json1_1StartTargetedSentimentDetectionJobCommandError = funct
4468
4525
  return [4, parseBody(output.body, context)];
4469
4526
  case 1:
4470
4527
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4471
- errorCode = "UnknownError";
4472
4528
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4473
4529
  _b = errorCode;
4474
4530
  switch (_b) {
@@ -4496,10 +4552,12 @@ var deserializeAws_json1_1StartTargetedSentimentDetectionJobCommandError = funct
4496
4552
  case 11: throw _d.sent();
4497
4553
  case 12:
4498
4554
  parsedBody = parsedOutput.body;
4555
+ $metadata = deserializeMetadata(output);
4556
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4499
4557
  response = new __BaseException({
4500
- name: parsedBody.code || parsedBody.Code || errorCode,
4558
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4501
4559
  $fault: "client",
4502
- $metadata: deserializeMetadata(output),
4560
+ $metadata: $metadata,
4503
4561
  });
4504
4562
  throw __decorateServiceException(response, parsedBody);
4505
4563
  }
@@ -4524,7 +4582,7 @@ export var deserializeAws_json1_1StartTopicsDetectionJobCommand = function (outp
4524
4582
  });
4525
4583
  }); };
4526
4584
  var deserializeAws_json1_1StartTopicsDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4527
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4585
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4528
4586
  var _c;
4529
4587
  return __generator(this, function (_d) {
4530
4588
  switch (_d.label) {
@@ -4534,7 +4592,6 @@ var deserializeAws_json1_1StartTopicsDetectionJobCommandError = function (output
4534
4592
  return [4, parseBody(output.body, context)];
4535
4593
  case 1:
4536
4594
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4537
- errorCode = "UnknownError";
4538
4595
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4539
4596
  _b = errorCode;
4540
4597
  switch (_b) {
@@ -4562,10 +4619,12 @@ var deserializeAws_json1_1StartTopicsDetectionJobCommandError = function (output
4562
4619
  case 11: throw _d.sent();
4563
4620
  case 12:
4564
4621
  parsedBody = parsedOutput.body;
4622
+ $metadata = deserializeMetadata(output);
4623
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4565
4624
  response = new __BaseException({
4566
- name: parsedBody.code || parsedBody.Code || errorCode,
4625
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4567
4626
  $fault: "client",
4568
- $metadata: deserializeMetadata(output),
4627
+ $metadata: $metadata,
4569
4628
  });
4570
4629
  throw __decorateServiceException(response, parsedBody);
4571
4630
  }
@@ -4590,7 +4649,7 @@ export var deserializeAws_json1_1StopDominantLanguageDetectionJobCommand = funct
4590
4649
  });
4591
4650
  }); };
4592
4651
  var deserializeAws_json1_1StopDominantLanguageDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4593
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4652
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4594
4653
  var _c;
4595
4654
  return __generator(this, function (_d) {
4596
4655
  switch (_d.label) {
@@ -4600,7 +4659,6 @@ var deserializeAws_json1_1StopDominantLanguageDetectionJobCommandError = functio
4600
4659
  return [4, parseBody(output.body, context)];
4601
4660
  case 1:
4602
4661
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4603
- errorCode = "UnknownError";
4604
4662
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4605
4663
  _b = errorCode;
4606
4664
  switch (_b) {
@@ -4620,10 +4678,12 @@ var deserializeAws_json1_1StopDominantLanguageDetectionJobCommandError = functio
4620
4678
  case 7: throw _d.sent();
4621
4679
  case 8:
4622
4680
  parsedBody = parsedOutput.body;
4681
+ $metadata = deserializeMetadata(output);
4682
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4623
4683
  response = new __BaseException({
4624
- name: parsedBody.code || parsedBody.Code || errorCode,
4684
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4625
4685
  $fault: "client",
4626
- $metadata: deserializeMetadata(output),
4686
+ $metadata: $metadata,
4627
4687
  });
4628
4688
  throw __decorateServiceException(response, parsedBody);
4629
4689
  }
@@ -4648,7 +4708,7 @@ export var deserializeAws_json1_1StopEntitiesDetectionJobCommand = function (out
4648
4708
  });
4649
4709
  }); };
4650
4710
  var deserializeAws_json1_1StopEntitiesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4651
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4711
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4652
4712
  var _c;
4653
4713
  return __generator(this, function (_d) {
4654
4714
  switch (_d.label) {
@@ -4658,7 +4718,6 @@ var deserializeAws_json1_1StopEntitiesDetectionJobCommandError = function (outpu
4658
4718
  return [4, parseBody(output.body, context)];
4659
4719
  case 1:
4660
4720
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4661
- errorCode = "UnknownError";
4662
4721
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4663
4722
  _b = errorCode;
4664
4723
  switch (_b) {
@@ -4678,10 +4737,12 @@ var deserializeAws_json1_1StopEntitiesDetectionJobCommandError = function (outpu
4678
4737
  case 7: throw _d.sent();
4679
4738
  case 8:
4680
4739
  parsedBody = parsedOutput.body;
4740
+ $metadata = deserializeMetadata(output);
4741
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4681
4742
  response = new __BaseException({
4682
- name: parsedBody.code || parsedBody.Code || errorCode,
4743
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4683
4744
  $fault: "client",
4684
- $metadata: deserializeMetadata(output),
4745
+ $metadata: $metadata,
4685
4746
  });
4686
4747
  throw __decorateServiceException(response, parsedBody);
4687
4748
  }
@@ -4706,7 +4767,7 @@ export var deserializeAws_json1_1StopEventsDetectionJobCommand = function (outpu
4706
4767
  });
4707
4768
  }); };
4708
4769
  var deserializeAws_json1_1StopEventsDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4709
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4770
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4710
4771
  var _c;
4711
4772
  return __generator(this, function (_d) {
4712
4773
  switch (_d.label) {
@@ -4716,7 +4777,6 @@ var deserializeAws_json1_1StopEventsDetectionJobCommandError = function (output,
4716
4777
  return [4, parseBody(output.body, context)];
4717
4778
  case 1:
4718
4779
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4719
- errorCode = "UnknownError";
4720
4780
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4721
4781
  _b = errorCode;
4722
4782
  switch (_b) {
@@ -4736,10 +4796,12 @@ var deserializeAws_json1_1StopEventsDetectionJobCommandError = function (output,
4736
4796
  case 7: throw _d.sent();
4737
4797
  case 8:
4738
4798
  parsedBody = parsedOutput.body;
4799
+ $metadata = deserializeMetadata(output);
4800
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4739
4801
  response = new __BaseException({
4740
- name: parsedBody.code || parsedBody.Code || errorCode,
4802
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4741
4803
  $fault: "client",
4742
- $metadata: deserializeMetadata(output),
4804
+ $metadata: $metadata,
4743
4805
  });
4744
4806
  throw __decorateServiceException(response, parsedBody);
4745
4807
  }
@@ -4764,7 +4826,7 @@ export var deserializeAws_json1_1StopKeyPhrasesDetectionJobCommand = function (o
4764
4826
  });
4765
4827
  }); };
4766
4828
  var deserializeAws_json1_1StopKeyPhrasesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4767
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4829
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4768
4830
  var _c;
4769
4831
  return __generator(this, function (_d) {
4770
4832
  switch (_d.label) {
@@ -4774,7 +4836,6 @@ var deserializeAws_json1_1StopKeyPhrasesDetectionJobCommandError = function (out
4774
4836
  return [4, parseBody(output.body, context)];
4775
4837
  case 1:
4776
4838
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4777
- errorCode = "UnknownError";
4778
4839
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4779
4840
  _b = errorCode;
4780
4841
  switch (_b) {
@@ -4794,10 +4855,12 @@ var deserializeAws_json1_1StopKeyPhrasesDetectionJobCommandError = function (out
4794
4855
  case 7: throw _d.sent();
4795
4856
  case 8:
4796
4857
  parsedBody = parsedOutput.body;
4858
+ $metadata = deserializeMetadata(output);
4859
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4797
4860
  response = new __BaseException({
4798
- name: parsedBody.code || parsedBody.Code || errorCode,
4861
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4799
4862
  $fault: "client",
4800
- $metadata: deserializeMetadata(output),
4863
+ $metadata: $metadata,
4801
4864
  });
4802
4865
  throw __decorateServiceException(response, parsedBody);
4803
4866
  }
@@ -4822,7 +4885,7 @@ export var deserializeAws_json1_1StopPiiEntitiesDetectionJobCommand = function (
4822
4885
  });
4823
4886
  }); };
4824
4887
  var deserializeAws_json1_1StopPiiEntitiesDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4825
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4888
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4826
4889
  var _c;
4827
4890
  return __generator(this, function (_d) {
4828
4891
  switch (_d.label) {
@@ -4832,7 +4895,6 @@ var deserializeAws_json1_1StopPiiEntitiesDetectionJobCommandError = function (ou
4832
4895
  return [4, parseBody(output.body, context)];
4833
4896
  case 1:
4834
4897
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4835
- errorCode = "UnknownError";
4836
4898
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4837
4899
  _b = errorCode;
4838
4900
  switch (_b) {
@@ -4852,10 +4914,12 @@ var deserializeAws_json1_1StopPiiEntitiesDetectionJobCommandError = function (ou
4852
4914
  case 7: throw _d.sent();
4853
4915
  case 8:
4854
4916
  parsedBody = parsedOutput.body;
4917
+ $metadata = deserializeMetadata(output);
4918
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4855
4919
  response = new __BaseException({
4856
- name: parsedBody.code || parsedBody.Code || errorCode,
4920
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4857
4921
  $fault: "client",
4858
- $metadata: deserializeMetadata(output),
4922
+ $metadata: $metadata,
4859
4923
  });
4860
4924
  throw __decorateServiceException(response, parsedBody);
4861
4925
  }
@@ -4880,7 +4944,7 @@ export var deserializeAws_json1_1StopSentimentDetectionJobCommand = function (ou
4880
4944
  });
4881
4945
  }); };
4882
4946
  var deserializeAws_json1_1StopSentimentDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4883
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
4947
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4884
4948
  var _c;
4885
4949
  return __generator(this, function (_d) {
4886
4950
  switch (_d.label) {
@@ -4890,7 +4954,6 @@ var deserializeAws_json1_1StopSentimentDetectionJobCommandError = function (outp
4890
4954
  return [4, parseBody(output.body, context)];
4891
4955
  case 1:
4892
4956
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4893
- errorCode = "UnknownError";
4894
4957
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4895
4958
  _b = errorCode;
4896
4959
  switch (_b) {
@@ -4910,10 +4973,12 @@ var deserializeAws_json1_1StopSentimentDetectionJobCommandError = function (outp
4910
4973
  case 7: throw _d.sent();
4911
4974
  case 8:
4912
4975
  parsedBody = parsedOutput.body;
4976
+ $metadata = deserializeMetadata(output);
4977
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4913
4978
  response = new __BaseException({
4914
- name: parsedBody.code || parsedBody.Code || errorCode,
4979
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4915
4980
  $fault: "client",
4916
- $metadata: deserializeMetadata(output),
4981
+ $metadata: $metadata,
4917
4982
  });
4918
4983
  throw __decorateServiceException(response, parsedBody);
4919
4984
  }
@@ -4938,7 +5003,7 @@ export var deserializeAws_json1_1StopTargetedSentimentDetectionJobCommand = func
4938
5003
  });
4939
5004
  }); };
4940
5005
  var deserializeAws_json1_1StopTargetedSentimentDetectionJobCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4941
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5006
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4942
5007
  var _c;
4943
5008
  return __generator(this, function (_d) {
4944
5009
  switch (_d.label) {
@@ -4948,7 +5013,6 @@ var deserializeAws_json1_1StopTargetedSentimentDetectionJobCommandError = functi
4948
5013
  return [4, parseBody(output.body, context)];
4949
5014
  case 1:
4950
5015
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4951
- errorCode = "UnknownError";
4952
5016
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4953
5017
  _b = errorCode;
4954
5018
  switch (_b) {
@@ -4968,10 +5032,12 @@ var deserializeAws_json1_1StopTargetedSentimentDetectionJobCommandError = functi
4968
5032
  case 7: throw _d.sent();
4969
5033
  case 8:
4970
5034
  parsedBody = parsedOutput.body;
5035
+ $metadata = deserializeMetadata(output);
5036
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4971
5037
  response = new __BaseException({
4972
- name: parsedBody.code || parsedBody.Code || errorCode,
5038
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4973
5039
  $fault: "client",
4974
- $metadata: deserializeMetadata(output),
5040
+ $metadata: $metadata,
4975
5041
  });
4976
5042
  throw __decorateServiceException(response, parsedBody);
4977
5043
  }
@@ -4996,7 +5062,7 @@ export var deserializeAws_json1_1StopTrainingDocumentClassifierCommand = functio
4996
5062
  });
4997
5063
  }); };
4998
5064
  var deserializeAws_json1_1StopTrainingDocumentClassifierCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4999
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5065
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5000
5066
  var _c;
5001
5067
  return __generator(this, function (_d) {
5002
5068
  switch (_d.label) {
@@ -5006,7 +5072,6 @@ var deserializeAws_json1_1StopTrainingDocumentClassifierCommandError = function
5006
5072
  return [4, parseBody(output.body, context)];
5007
5073
  case 1:
5008
5074
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5009
- errorCode = "UnknownError";
5010
5075
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5011
5076
  _b = errorCode;
5012
5077
  switch (_b) {
@@ -5030,10 +5095,12 @@ var deserializeAws_json1_1StopTrainingDocumentClassifierCommandError = function
5030
5095
  case 9: throw _d.sent();
5031
5096
  case 10:
5032
5097
  parsedBody = parsedOutput.body;
5098
+ $metadata = deserializeMetadata(output);
5099
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5033
5100
  response = new __BaseException({
5034
- name: parsedBody.code || parsedBody.Code || errorCode,
5101
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5035
5102
  $fault: "client",
5036
- $metadata: deserializeMetadata(output),
5103
+ $metadata: $metadata,
5037
5104
  });
5038
5105
  throw __decorateServiceException(response, parsedBody);
5039
5106
  }
@@ -5058,7 +5125,7 @@ export var deserializeAws_json1_1StopTrainingEntityRecognizerCommand = function
5058
5125
  });
5059
5126
  }); };
5060
5127
  var deserializeAws_json1_1StopTrainingEntityRecognizerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5061
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5128
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5062
5129
  var _c;
5063
5130
  return __generator(this, function (_d) {
5064
5131
  switch (_d.label) {
@@ -5068,7 +5135,6 @@ var deserializeAws_json1_1StopTrainingEntityRecognizerCommandError = function (o
5068
5135
  return [4, parseBody(output.body, context)];
5069
5136
  case 1:
5070
5137
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5071
- errorCode = "UnknownError";
5072
5138
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5073
5139
  _b = errorCode;
5074
5140
  switch (_b) {
@@ -5092,10 +5158,12 @@ var deserializeAws_json1_1StopTrainingEntityRecognizerCommandError = function (o
5092
5158
  case 9: throw _d.sent();
5093
5159
  case 10:
5094
5160
  parsedBody = parsedOutput.body;
5161
+ $metadata = deserializeMetadata(output);
5162
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5095
5163
  response = new __BaseException({
5096
- name: parsedBody.code || parsedBody.Code || errorCode,
5164
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5097
5165
  $fault: "client",
5098
- $metadata: deserializeMetadata(output),
5166
+ $metadata: $metadata,
5099
5167
  });
5100
5168
  throw __decorateServiceException(response, parsedBody);
5101
5169
  }
@@ -5120,7 +5188,7 @@ export var deserializeAws_json1_1TagResourceCommand = function (output, context)
5120
5188
  });
5121
5189
  }); };
5122
5190
  var deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5123
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5191
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5124
5192
  var _c;
5125
5193
  return __generator(this, function (_d) {
5126
5194
  switch (_d.label) {
@@ -5130,7 +5198,6 @@ var deserializeAws_json1_1TagResourceCommandError = function (output, context) {
5130
5198
  return [4, parseBody(output.body, context)];
5131
5199
  case 1:
5132
5200
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5133
- errorCode = "UnknownError";
5134
5201
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5135
5202
  _b = errorCode;
5136
5203
  switch (_b) {
@@ -5158,10 +5225,12 @@ var deserializeAws_json1_1TagResourceCommandError = function (output, context) {
5158
5225
  case 11: throw _d.sent();
5159
5226
  case 12:
5160
5227
  parsedBody = parsedOutput.body;
5228
+ $metadata = deserializeMetadata(output);
5229
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5161
5230
  response = new __BaseException({
5162
- name: parsedBody.code || parsedBody.Code || errorCode,
5231
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5163
5232
  $fault: "client",
5164
- $metadata: deserializeMetadata(output),
5233
+ $metadata: $metadata,
5165
5234
  });
5166
5235
  throw __decorateServiceException(response, parsedBody);
5167
5236
  }
@@ -5186,7 +5255,7 @@ export var deserializeAws_json1_1UntagResourceCommand = function (output, contex
5186
5255
  });
5187
5256
  }); };
5188
5257
  var deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5189
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5258
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5190
5259
  var _c;
5191
5260
  return __generator(this, function (_d) {
5192
5261
  switch (_d.label) {
@@ -5196,7 +5265,6 @@ var deserializeAws_json1_1UntagResourceCommandError = function (output, context)
5196
5265
  return [4, parseBody(output.body, context)];
5197
5266
  case 1:
5198
5267
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5199
- errorCode = "UnknownError";
5200
5268
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5201
5269
  _b = errorCode;
5202
5270
  switch (_b) {
@@ -5224,10 +5292,12 @@ var deserializeAws_json1_1UntagResourceCommandError = function (output, context)
5224
5292
  case 11: throw _d.sent();
5225
5293
  case 12:
5226
5294
  parsedBody = parsedOutput.body;
5295
+ $metadata = deserializeMetadata(output);
5296
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5227
5297
  response = new __BaseException({
5228
- name: parsedBody.code || parsedBody.Code || errorCode,
5298
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5229
5299
  $fault: "client",
5230
- $metadata: deserializeMetadata(output),
5300
+ $metadata: $metadata,
5231
5301
  });
5232
5302
  throw __decorateServiceException(response, parsedBody);
5233
5303
  }
@@ -5252,7 +5322,7 @@ export var deserializeAws_json1_1UpdateEndpointCommand = function (output, conte
5252
5322
  });
5253
5323
  }); };
5254
5324
  var deserializeAws_json1_1UpdateEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5255
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
5325
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
5256
5326
  var _c;
5257
5327
  return __generator(this, function (_d) {
5258
5328
  switch (_d.label) {
@@ -5262,7 +5332,6 @@ var deserializeAws_json1_1UpdateEndpointCommandError = function (output, context
5262
5332
  return [4, parseBody(output.body, context)];
5263
5333
  case 1:
5264
5334
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
5265
- errorCode = "UnknownError";
5266
5335
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5267
5336
  _b = errorCode;
5268
5337
  switch (_b) {
@@ -5298,10 +5367,12 @@ var deserializeAws_json1_1UpdateEndpointCommandError = function (output, context
5298
5367
  case 15: throw _d.sent();
5299
5368
  case 16:
5300
5369
  parsedBody = parsedOutput.body;
5370
+ $metadata = deserializeMetadata(output);
5371
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5301
5372
  response = new __BaseException({
5302
- name: parsedBody.code || parsedBody.Code || errorCode,
5373
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5303
5374
  $fault: "client",
5304
- $metadata: deserializeMetadata(output),
5375
+ $metadata: $metadata,
5305
5376
  });
5306
5377
  throw __decorateServiceException(response, parsedBody);
5307
5378
  }
@@ -5462,69 +5533,48 @@ var serializeAws_json1_1AttributeNamesList = function (input, context) {
5462
5533
  });
5463
5534
  };
5464
5535
  var serializeAws_json1_1AugmentedManifestsListItem = function (input, context) {
5465
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.AnnotationDataS3Uri !== undefined &&
5466
- input.AnnotationDataS3Uri !== null && { AnnotationDataS3Uri: input.AnnotationDataS3Uri })), (input.AttributeNames !== undefined &&
5467
- input.AttributeNames !== null && {
5536
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.AnnotationDataS3Uri != null && { AnnotationDataS3Uri: input.AnnotationDataS3Uri })), (input.AttributeNames != null && {
5468
5537
  AttributeNames: serializeAws_json1_1AttributeNamesList(input.AttributeNames, context),
5469
- })), (input.DocumentType !== undefined && input.DocumentType !== null && { DocumentType: input.DocumentType })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri })), (input.SourceDocumentsS3Uri !== undefined &&
5470
- input.SourceDocumentsS3Uri !== null && { SourceDocumentsS3Uri: input.SourceDocumentsS3Uri })), (input.Split !== undefined && input.Split !== null && { Split: input.Split }));
5538
+ })), (input.DocumentType != null && { DocumentType: input.DocumentType })), (input.S3Uri != null && { S3Uri: input.S3Uri })), (input.SourceDocumentsS3Uri != null && { SourceDocumentsS3Uri: input.SourceDocumentsS3Uri })), (input.Split != null && { Split: input.Split }));
5471
5539
  };
5472
5540
  var serializeAws_json1_1BatchDetectDominantLanguageRequest = function (input, context) {
5473
- return __assign({}, (input.TextList !== undefined &&
5474
- input.TextList !== null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5541
+ return __assign({}, (input.TextList != null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5475
5542
  };
5476
5543
  var serializeAws_json1_1BatchDetectEntitiesRequest = function (input, context) {
5477
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.TextList !== undefined &&
5478
- input.TextList !== null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5544
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.TextList != null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5479
5545
  };
5480
5546
  var serializeAws_json1_1BatchDetectKeyPhrasesRequest = function (input, context) {
5481
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.TextList !== undefined &&
5482
- input.TextList !== null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5547
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.TextList != null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5483
5548
  };
5484
5549
  var serializeAws_json1_1BatchDetectSentimentRequest = function (input, context) {
5485
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.TextList !== undefined &&
5486
- input.TextList !== null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5550
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.TextList != null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5487
5551
  };
5488
5552
  var serializeAws_json1_1BatchDetectSyntaxRequest = function (input, context) {
5489
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.TextList !== undefined &&
5490
- input.TextList !== null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5553
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.TextList != null && { TextList: serializeAws_json1_1CustomerInputStringList(input.TextList, context) }));
5491
5554
  };
5492
5555
  var serializeAws_json1_1ClassifyDocumentRequest = function (input, context) {
5493
- return __assign(__assign({}, (input.EndpointArn !== undefined && input.EndpointArn !== null && { EndpointArn: input.EndpointArn })), (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
5556
+ return __assign(__assign({}, (input.EndpointArn != null && { EndpointArn: input.EndpointArn })), (input.Text != null && { Text: input.Text }));
5494
5557
  };
5495
5558
  var serializeAws_json1_1ContainsPiiEntitiesRequest = function (input, context) {
5496
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
5559
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Text != null && { Text: input.Text }));
5497
5560
  };
5498
5561
  var serializeAws_json1_1CreateDocumentClassifierRequest = function (input, context) {
5499
5562
  var _a;
5500
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5501
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.DocumentClassifierName !== undefined &&
5502
- input.DocumentClassifierName !== null && { DocumentClassifierName: input.DocumentClassifierName })), (input.InputDataConfig !== undefined &&
5503
- input.InputDataConfig !== null && {
5563
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.DocumentClassifierName != null && { DocumentClassifierName: input.DocumentClassifierName })), (input.InputDataConfig != null && {
5504
5564
  InputDataConfig: serializeAws_json1_1DocumentClassifierInputDataConfig(input.InputDataConfig, context),
5505
- })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Mode !== undefined && input.Mode !== null && { Mode: input.Mode })), (input.ModelKmsKeyId !== undefined && input.ModelKmsKeyId !== null && { ModelKmsKeyId: input.ModelKmsKeyId })), (input.ModelPolicy !== undefined && input.ModelPolicy !== null && { ModelPolicy: input.ModelPolicy })), (input.OutputDataConfig !== undefined &&
5506
- input.OutputDataConfig !== null && {
5565
+ })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Mode != null && { Mode: input.Mode })), (input.ModelKmsKeyId != null && { ModelKmsKeyId: input.ModelKmsKeyId })), (input.ModelPolicy != null && { ModelPolicy: input.ModelPolicy })), (input.OutputDataConfig != null && {
5507
5566
  OutputDataConfig: serializeAws_json1_1DocumentClassifierOutputDataConfig(input.OutputDataConfig, context),
5508
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VersionName !== undefined && input.VersionName !== null && { VersionName: input.VersionName })), (input.VolumeKmsKeyId !== undefined &&
5509
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5510
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5567
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VersionName != null && { VersionName: input.VersionName })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5511
5568
  };
5512
5569
  var serializeAws_json1_1CreateEndpointRequest = function (input, context) {
5513
5570
  var _a;
5514
- return __assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5515
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.DesiredInferenceUnits !== undefined &&
5516
- input.DesiredInferenceUnits !== null && { DesiredInferenceUnits: input.DesiredInferenceUnits })), (input.EndpointName !== undefined && input.EndpointName !== null && { EndpointName: input.EndpointName })), (input.ModelArn !== undefined && input.ModelArn !== null && { ModelArn: input.ModelArn })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
5571
+ return __assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.DesiredInferenceUnits != null && { DesiredInferenceUnits: input.DesiredInferenceUnits })), (input.EndpointName != null && { EndpointName: input.EndpointName })), (input.ModelArn != null && { ModelArn: input.ModelArn })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
5517
5572
  };
5518
5573
  var serializeAws_json1_1CreateEntityRecognizerRequest = function (input, context) {
5519
5574
  var _a;
5520
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5521
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
5522
- input.InputDataConfig !== null && {
5575
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
5523
5576
  InputDataConfig: serializeAws_json1_1EntityRecognizerInputDataConfig(input.InputDataConfig, context),
5524
- })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.ModelKmsKeyId !== undefined && input.ModelKmsKeyId !== null && { ModelKmsKeyId: input.ModelKmsKeyId })), (input.ModelPolicy !== undefined && input.ModelPolicy !== null && { ModelPolicy: input.ModelPolicy })), (input.RecognizerName !== undefined &&
5525
- input.RecognizerName !== null && { RecognizerName: input.RecognizerName })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VersionName !== undefined && input.VersionName !== null && { VersionName: input.VersionName })), (input.VolumeKmsKeyId !== undefined &&
5526
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5527
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5577
+ })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.ModelKmsKeyId != null && { ModelKmsKeyId: input.ModelKmsKeyId })), (input.ModelPolicy != null && { ModelPolicy: input.ModelPolicy })), (input.RecognizerName != null && { RecognizerName: input.RecognizerName })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VersionName != null && { VersionName: input.VersionName })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5528
5578
  };
5529
5579
  var serializeAws_json1_1CustomerInputStringList = function (input, context) {
5530
5580
  return input
@@ -5537,83 +5587,76 @@ var serializeAws_json1_1CustomerInputStringList = function (input, context) {
5537
5587
  });
5538
5588
  };
5539
5589
  var serializeAws_json1_1DeleteDocumentClassifierRequest = function (input, context) {
5540
- return __assign({}, (input.DocumentClassifierArn !== undefined &&
5541
- input.DocumentClassifierArn !== null && { DocumentClassifierArn: input.DocumentClassifierArn }));
5590
+ return __assign({}, (input.DocumentClassifierArn != null && { DocumentClassifierArn: input.DocumentClassifierArn }));
5542
5591
  };
5543
5592
  var serializeAws_json1_1DeleteEndpointRequest = function (input, context) {
5544
- return __assign({}, (input.EndpointArn !== undefined && input.EndpointArn !== null && { EndpointArn: input.EndpointArn }));
5593
+ return __assign({}, (input.EndpointArn != null && { EndpointArn: input.EndpointArn }));
5545
5594
  };
5546
5595
  var serializeAws_json1_1DeleteEntityRecognizerRequest = function (input, context) {
5547
- return __assign({}, (input.EntityRecognizerArn !== undefined &&
5548
- input.EntityRecognizerArn !== null && { EntityRecognizerArn: input.EntityRecognizerArn }));
5596
+ return __assign({}, (input.EntityRecognizerArn != null && { EntityRecognizerArn: input.EntityRecognizerArn }));
5549
5597
  };
5550
5598
  var serializeAws_json1_1DeleteResourcePolicyRequest = function (input, context) {
5551
- return __assign(__assign({}, (input.PolicyRevisionId !== undefined &&
5552
- input.PolicyRevisionId !== null && { PolicyRevisionId: input.PolicyRevisionId })), (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }));
5599
+ return __assign(__assign({}, (input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId })), (input.ResourceArn != null && { ResourceArn: input.ResourceArn }));
5553
5600
  };
5554
5601
  var serializeAws_json1_1DescribeDocumentClassificationJobRequest = function (input, context) {
5555
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5602
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5556
5603
  };
5557
5604
  var serializeAws_json1_1DescribeDocumentClassifierRequest = function (input, context) {
5558
- return __assign({}, (input.DocumentClassifierArn !== undefined &&
5559
- input.DocumentClassifierArn !== null && { DocumentClassifierArn: input.DocumentClassifierArn }));
5605
+ return __assign({}, (input.DocumentClassifierArn != null && { DocumentClassifierArn: input.DocumentClassifierArn }));
5560
5606
  };
5561
5607
  var serializeAws_json1_1DescribeDominantLanguageDetectionJobRequest = function (input, context) {
5562
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5608
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5563
5609
  };
5564
5610
  var serializeAws_json1_1DescribeEndpointRequest = function (input, context) {
5565
- return __assign({}, (input.EndpointArn !== undefined && input.EndpointArn !== null && { EndpointArn: input.EndpointArn }));
5611
+ return __assign({}, (input.EndpointArn != null && { EndpointArn: input.EndpointArn }));
5566
5612
  };
5567
5613
  var serializeAws_json1_1DescribeEntitiesDetectionJobRequest = function (input, context) {
5568
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5614
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5569
5615
  };
5570
5616
  var serializeAws_json1_1DescribeEntityRecognizerRequest = function (input, context) {
5571
- return __assign({}, (input.EntityRecognizerArn !== undefined &&
5572
- input.EntityRecognizerArn !== null && { EntityRecognizerArn: input.EntityRecognizerArn }));
5617
+ return __assign({}, (input.EntityRecognizerArn != null && { EntityRecognizerArn: input.EntityRecognizerArn }));
5573
5618
  };
5574
5619
  var serializeAws_json1_1DescribeEventsDetectionJobRequest = function (input, context) {
5575
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5620
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5576
5621
  };
5577
5622
  var serializeAws_json1_1DescribeKeyPhrasesDetectionJobRequest = function (input, context) {
5578
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5623
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5579
5624
  };
5580
5625
  var serializeAws_json1_1DescribePiiEntitiesDetectionJobRequest = function (input, context) {
5581
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5626
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5582
5627
  };
5583
5628
  var serializeAws_json1_1DescribeResourcePolicyRequest = function (input, context) {
5584
- return __assign({}, (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }));
5629
+ return __assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn }));
5585
5630
  };
5586
5631
  var serializeAws_json1_1DescribeSentimentDetectionJobRequest = function (input, context) {
5587
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5632
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5588
5633
  };
5589
5634
  var serializeAws_json1_1DescribeTargetedSentimentDetectionJobRequest = function (input, context) {
5590
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5635
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5591
5636
  };
5592
5637
  var serializeAws_json1_1DescribeTopicsDetectionJobRequest = function (input, context) {
5593
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5638
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5594
5639
  };
5595
5640
  var serializeAws_json1_1DetectDominantLanguageRequest = function (input, context) {
5596
- return __assign({}, (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
5641
+ return __assign({}, (input.Text != null && { Text: input.Text }));
5597
5642
  };
5598
5643
  var serializeAws_json1_1DetectEntitiesRequest = function (input, context) {
5599
- return __assign(__assign(__assign({}, (input.EndpointArn !== undefined && input.EndpointArn !== null && { EndpointArn: input.EndpointArn })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
5644
+ return __assign(__assign(__assign({}, (input.EndpointArn != null && { EndpointArn: input.EndpointArn })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Text != null && { Text: input.Text }));
5600
5645
  };
5601
5646
  var serializeAws_json1_1DetectKeyPhrasesRequest = function (input, context) {
5602
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
5647
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Text != null && { Text: input.Text }));
5603
5648
  };
5604
5649
  var serializeAws_json1_1DetectPiiEntitiesRequest = function (input, context) {
5605
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
5650
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Text != null && { Text: input.Text }));
5606
5651
  };
5607
5652
  var serializeAws_json1_1DetectSentimentRequest = function (input, context) {
5608
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
5653
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Text != null && { Text: input.Text }));
5609
5654
  };
5610
5655
  var serializeAws_json1_1DetectSyntaxRequest = function (input, context) {
5611
- return __assign(__assign({}, (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Text !== undefined && input.Text !== null && { Text: input.Text }));
5656
+ return __assign(__assign({}, (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Text != null && { Text: input.Text }));
5612
5657
  };
5613
5658
  var serializeAws_json1_1DocumentClassificationJobFilter = function (input, context) {
5614
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
5615
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5616
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5659
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5617
5660
  };
5618
5661
  var serializeAws_json1_1DocumentClassifierAugmentedManifestsList = function (input, context) {
5619
5662
  return input
@@ -5626,48 +5669,34 @@ var serializeAws_json1_1DocumentClassifierAugmentedManifestsList = function (inp
5626
5669
  });
5627
5670
  };
5628
5671
  var serializeAws_json1_1DocumentClassifierFilter = function (input, context) {
5629
- return __assign(__assign(__assign(__assign({}, (input.DocumentClassifierName !== undefined &&
5630
- input.DocumentClassifierName !== null && { DocumentClassifierName: input.DocumentClassifierName })), (input.Status !== undefined && input.Status !== null && { Status: input.Status })), (input.SubmitTimeAfter !== undefined &&
5631
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5632
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5672
+ return __assign(__assign(__assign(__assign({}, (input.DocumentClassifierName != null && { DocumentClassifierName: input.DocumentClassifierName })), (input.Status != null && { Status: input.Status })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5633
5673
  };
5634
5674
  var serializeAws_json1_1DocumentClassifierInputDataConfig = function (input, context) {
5635
- return __assign(__assign(__assign(__assign(__assign({}, (input.AugmentedManifests !== undefined &&
5636
- input.AugmentedManifests !== null && {
5675
+ return __assign(__assign(__assign(__assign(__assign({}, (input.AugmentedManifests != null && {
5637
5676
  AugmentedManifests: serializeAws_json1_1DocumentClassifierAugmentedManifestsList(input.AugmentedManifests, context),
5638
- })), (input.DataFormat !== undefined && input.DataFormat !== null && { DataFormat: input.DataFormat })), (input.LabelDelimiter !== undefined &&
5639
- input.LabelDelimiter !== null && { LabelDelimiter: input.LabelDelimiter })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri })), (input.TestS3Uri !== undefined && input.TestS3Uri !== null && { TestS3Uri: input.TestS3Uri }));
5677
+ })), (input.DataFormat != null && { DataFormat: input.DataFormat })), (input.LabelDelimiter != null && { LabelDelimiter: input.LabelDelimiter })), (input.S3Uri != null && { S3Uri: input.S3Uri })), (input.TestS3Uri != null && { TestS3Uri: input.TestS3Uri }));
5640
5678
  };
5641
5679
  var serializeAws_json1_1DocumentClassifierOutputDataConfig = function (input, context) {
5642
- return __assign(__assign({}, (input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
5680
+ return __assign(__assign({}, (input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId })), (input.S3Uri != null && { S3Uri: input.S3Uri }));
5643
5681
  };
5644
5682
  var serializeAws_json1_1DocumentReaderConfig = function (input, context) {
5645
- return __assign(__assign(__assign({}, (input.DocumentReadAction !== undefined &&
5646
- input.DocumentReadAction !== null && { DocumentReadAction: input.DocumentReadAction })), (input.DocumentReadMode !== undefined &&
5647
- input.DocumentReadMode !== null && { DocumentReadMode: input.DocumentReadMode })), (input.FeatureTypes !== undefined &&
5648
- input.FeatureTypes !== null && {
5683
+ return __assign(__assign(__assign({}, (input.DocumentReadAction != null && { DocumentReadAction: input.DocumentReadAction })), (input.DocumentReadMode != null && { DocumentReadMode: input.DocumentReadMode })), (input.FeatureTypes != null && {
5649
5684
  FeatureTypes: serializeAws_json1_1ListOfDocumentReadFeatureTypes(input.FeatureTypes, context),
5650
5685
  }));
5651
5686
  };
5652
5687
  var serializeAws_json1_1DominantLanguageDetectionJobFilter = function (input, context) {
5653
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
5654
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5655
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5688
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5656
5689
  };
5657
5690
  var serializeAws_json1_1EndpointFilter = function (input, context) {
5658
- return __assign(__assign(__assign(__assign({}, (input.CreationTimeAfter !== undefined &&
5659
- input.CreationTimeAfter !== null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) })), (input.CreationTimeBefore !== undefined &&
5660
- input.CreationTimeBefore !== null && {
5691
+ return __assign(__assign(__assign(__assign({}, (input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) })), (input.CreationTimeBefore != null && {
5661
5692
  CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000),
5662
- })), (input.ModelArn !== undefined && input.ModelArn !== null && { ModelArn: input.ModelArn })), (input.Status !== undefined && input.Status !== null && { Status: input.Status }));
5693
+ })), (input.ModelArn != null && { ModelArn: input.ModelArn })), (input.Status != null && { Status: input.Status }));
5663
5694
  };
5664
5695
  var serializeAws_json1_1EntitiesDetectionJobFilter = function (input, context) {
5665
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
5666
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5667
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5696
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5668
5697
  };
5669
5698
  var serializeAws_json1_1EntityRecognizerAnnotations = function (input, context) {
5670
- return __assign(__assign({}, (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri })), (input.TestS3Uri !== undefined && input.TestS3Uri !== null && { TestS3Uri: input.TestS3Uri }));
5699
+ return __assign(__assign({}, (input.S3Uri != null && { S3Uri: input.S3Uri })), (input.TestS3Uri != null && { TestS3Uri: input.TestS3Uri }));
5671
5700
  };
5672
5701
  var serializeAws_json1_1EntityRecognizerAugmentedManifestsList = function (input, context) {
5673
5702
  return input
@@ -5680,32 +5709,24 @@ var serializeAws_json1_1EntityRecognizerAugmentedManifestsList = function (input
5680
5709
  });
5681
5710
  };
5682
5711
  var serializeAws_json1_1EntityRecognizerDocuments = function (input, context) {
5683
- return __assign(__assign(__assign({}, (input.InputFormat !== undefined && input.InputFormat !== null && { InputFormat: input.InputFormat })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri })), (input.TestS3Uri !== undefined && input.TestS3Uri !== null && { TestS3Uri: input.TestS3Uri }));
5712
+ return __assign(__assign(__assign({}, (input.InputFormat != null && { InputFormat: input.InputFormat })), (input.S3Uri != null && { S3Uri: input.S3Uri })), (input.TestS3Uri != null && { TestS3Uri: input.TestS3Uri }));
5684
5713
  };
5685
5714
  var serializeAws_json1_1EntityRecognizerEntityList = function (input, context) {
5686
- return __assign({}, (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
5715
+ return __assign({}, (input.S3Uri != null && { S3Uri: input.S3Uri }));
5687
5716
  };
5688
5717
  var serializeAws_json1_1EntityRecognizerFilter = function (input, context) {
5689
- return __assign(__assign(__assign(__assign({}, (input.RecognizerName !== undefined &&
5690
- input.RecognizerName !== null && { RecognizerName: input.RecognizerName })), (input.Status !== undefined && input.Status !== null && { Status: input.Status })), (input.SubmitTimeAfter !== undefined &&
5691
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5692
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5718
+ return __assign(__assign(__assign(__assign({}, (input.RecognizerName != null && { RecognizerName: input.RecognizerName })), (input.Status != null && { Status: input.Status })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5693
5719
  };
5694
5720
  var serializeAws_json1_1EntityRecognizerInputDataConfig = function (input, context) {
5695
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.Annotations !== undefined &&
5696
- input.Annotations !== null && {
5721
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.Annotations != null && {
5697
5722
  Annotations: serializeAws_json1_1EntityRecognizerAnnotations(input.Annotations, context),
5698
- })), (input.AugmentedManifests !== undefined &&
5699
- input.AugmentedManifests !== null && {
5723
+ })), (input.AugmentedManifests != null && {
5700
5724
  AugmentedManifests: serializeAws_json1_1EntityRecognizerAugmentedManifestsList(input.AugmentedManifests, context),
5701
- })), (input.DataFormat !== undefined && input.DataFormat !== null && { DataFormat: input.DataFormat })), (input.Documents !== undefined &&
5702
- input.Documents !== null && {
5725
+ })), (input.DataFormat != null && { DataFormat: input.DataFormat })), (input.Documents != null && {
5703
5726
  Documents: serializeAws_json1_1EntityRecognizerDocuments(input.Documents, context),
5704
- })), (input.EntityList !== undefined &&
5705
- input.EntityList !== null && {
5727
+ })), (input.EntityList != null && {
5706
5728
  EntityList: serializeAws_json1_1EntityRecognizerEntityList(input.EntityList, context),
5707
- })), (input.EntityTypes !== undefined &&
5708
- input.EntityTypes !== null && { EntityTypes: serializeAws_json1_1EntityTypesList(input.EntityTypes, context) }));
5729
+ })), (input.EntityTypes != null && { EntityTypes: serializeAws_json1_1EntityTypesList(input.EntityTypes, context) }));
5709
5730
  };
5710
5731
  var serializeAws_json1_1EntityTypesList = function (input, context) {
5711
5732
  return input
@@ -5718,68 +5739,53 @@ var serializeAws_json1_1EntityTypesList = function (input, context) {
5718
5739
  });
5719
5740
  };
5720
5741
  var serializeAws_json1_1EntityTypesListItem = function (input, context) {
5721
- return __assign({}, (input.Type !== undefined && input.Type !== null && { Type: input.Type }));
5742
+ return __assign({}, (input.Type != null && { Type: input.Type }));
5722
5743
  };
5723
5744
  var serializeAws_json1_1EventsDetectionJobFilter = function (input, context) {
5724
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
5725
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5726
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5745
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5727
5746
  };
5728
5747
  var serializeAws_json1_1ImportModelRequest = function (input, context) {
5729
- return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.DataAccessRoleArn !== undefined &&
5730
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.ModelKmsKeyId !== undefined && input.ModelKmsKeyId !== null && { ModelKmsKeyId: input.ModelKmsKeyId })), (input.ModelName !== undefined && input.ModelName !== null && { ModelName: input.ModelName })), (input.SourceModelArn !== undefined &&
5731
- input.SourceModelArn !== null && { SourceModelArn: input.SourceModelArn })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VersionName !== undefined && input.VersionName !== null && { VersionName: input.VersionName }));
5748
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.ModelKmsKeyId != null && { ModelKmsKeyId: input.ModelKmsKeyId })), (input.ModelName != null && { ModelName: input.ModelName })), (input.SourceModelArn != null && { SourceModelArn: input.SourceModelArn })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VersionName != null && { VersionName: input.VersionName }));
5732
5749
  };
5733
5750
  var serializeAws_json1_1InputDataConfig = function (input, context) {
5734
- return __assign(__assign(__assign({}, (input.DocumentReaderConfig !== undefined &&
5735
- input.DocumentReaderConfig !== null && {
5751
+ return __assign(__assign(__assign({}, (input.DocumentReaderConfig != null && {
5736
5752
  DocumentReaderConfig: serializeAws_json1_1DocumentReaderConfig(input.DocumentReaderConfig, context),
5737
- })), (input.InputFormat !== undefined && input.InputFormat !== null && { InputFormat: input.InputFormat })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
5753
+ })), (input.InputFormat != null && { InputFormat: input.InputFormat })), (input.S3Uri != null && { S3Uri: input.S3Uri }));
5738
5754
  };
5739
5755
  var serializeAws_json1_1KeyPhrasesDetectionJobFilter = function (input, context) {
5740
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
5741
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5742
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5756
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5743
5757
  };
5744
5758
  var serializeAws_json1_1ListDocumentClassificationJobsRequest = function (input, context) {
5745
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5746
- input.Filter !== null && { Filter: serializeAws_json1_1DocumentClassificationJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5759
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1DocumentClassificationJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5747
5760
  };
5748
5761
  var serializeAws_json1_1ListDocumentClassifiersRequest = function (input, context) {
5749
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5750
- input.Filter !== null && { Filter: serializeAws_json1_1DocumentClassifierFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5762
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1DocumentClassifierFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5751
5763
  };
5752
5764
  var serializeAws_json1_1ListDocumentClassifierSummariesRequest = function (input, context) {
5753
- return __assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5765
+ return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5754
5766
  };
5755
5767
  var serializeAws_json1_1ListDominantLanguageDetectionJobsRequest = function (input, context) {
5756
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5757
- input.Filter !== null && {
5768
+ return __assign(__assign(__assign({}, (input.Filter != null && {
5758
5769
  Filter: serializeAws_json1_1DominantLanguageDetectionJobFilter(input.Filter, context),
5759
- })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5770
+ })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5760
5771
  };
5761
5772
  var serializeAws_json1_1ListEndpointsRequest = function (input, context) {
5762
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5763
- input.Filter !== null && { Filter: serializeAws_json1_1EndpointFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5773
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1EndpointFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5764
5774
  };
5765
5775
  var serializeAws_json1_1ListEntitiesDetectionJobsRequest = function (input, context) {
5766
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5767
- input.Filter !== null && { Filter: serializeAws_json1_1EntitiesDetectionJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5776
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1EntitiesDetectionJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5768
5777
  };
5769
5778
  var serializeAws_json1_1ListEntityRecognizersRequest = function (input, context) {
5770
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5771
- input.Filter !== null && { Filter: serializeAws_json1_1EntityRecognizerFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5779
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1EntityRecognizerFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5772
5780
  };
5773
5781
  var serializeAws_json1_1ListEntityRecognizerSummariesRequest = function (input, context) {
5774
- return __assign(__assign({}, (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5782
+ return __assign(__assign({}, (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5775
5783
  };
5776
5784
  var serializeAws_json1_1ListEventsDetectionJobsRequest = function (input, context) {
5777
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5778
- input.Filter !== null && { Filter: serializeAws_json1_1EventsDetectionJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5785
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1EventsDetectionJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5779
5786
  };
5780
5787
  var serializeAws_json1_1ListKeyPhrasesDetectionJobsRequest = function (input, context) {
5781
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5782
- input.Filter !== null && { Filter: serializeAws_json1_1KeyPhrasesDetectionJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5788
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1KeyPhrasesDetectionJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5783
5789
  };
5784
5790
  var serializeAws_json1_1ListOfDocumentReadFeatureTypes = function (input, context) {
5785
5791
  return input
@@ -5802,42 +5808,33 @@ var serializeAws_json1_1ListOfPiiEntityTypes = function (input, context) {
5802
5808
  });
5803
5809
  };
5804
5810
  var serializeAws_json1_1ListPiiEntitiesDetectionJobsRequest = function (input, context) {
5805
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5806
- input.Filter !== null && { Filter: serializeAws_json1_1PiiEntitiesDetectionJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5811
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1PiiEntitiesDetectionJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5807
5812
  };
5808
5813
  var serializeAws_json1_1ListSentimentDetectionJobsRequest = function (input, context) {
5809
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5810
- input.Filter !== null && { Filter: serializeAws_json1_1SentimentDetectionJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5814
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1SentimentDetectionJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5811
5815
  };
5812
5816
  var serializeAws_json1_1ListTagsForResourceRequest = function (input, context) {
5813
- return __assign({}, (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }));
5817
+ return __assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn }));
5814
5818
  };
5815
5819
  var serializeAws_json1_1ListTargetedSentimentDetectionJobsRequest = function (input, context) {
5816
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5817
- input.Filter !== null && {
5820
+ return __assign(__assign(__assign({}, (input.Filter != null && {
5818
5821
  Filter: serializeAws_json1_1TargetedSentimentDetectionJobFilter(input.Filter, context),
5819
- })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5822
+ })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5820
5823
  };
5821
5824
  var serializeAws_json1_1ListTopicsDetectionJobsRequest = function (input, context) {
5822
- return __assign(__assign(__assign({}, (input.Filter !== undefined &&
5823
- input.Filter !== null && { Filter: serializeAws_json1_1TopicsDetectionJobFilter(input.Filter, context) })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
5825
+ return __assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1TopicsDetectionJobFilter(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken }));
5824
5826
  };
5825
5827
  var serializeAws_json1_1OutputDataConfig = function (input, context) {
5826
- return __assign(__assign({}, (input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId })), (input.S3Uri !== undefined && input.S3Uri !== null && { S3Uri: input.S3Uri }));
5828
+ return __assign(__assign({}, (input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId })), (input.S3Uri != null && { S3Uri: input.S3Uri }));
5827
5829
  };
5828
5830
  var serializeAws_json1_1PiiEntitiesDetectionJobFilter = function (input, context) {
5829
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
5830
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5831
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5831
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5832
5832
  };
5833
5833
  var serializeAws_json1_1PutResourcePolicyRequest = function (input, context) {
5834
- return __assign(__assign(__assign({}, (input.PolicyRevisionId !== undefined &&
5835
- input.PolicyRevisionId !== null && { PolicyRevisionId: input.PolicyRevisionId })), (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn })), (input.ResourcePolicy !== undefined &&
5836
- input.ResourcePolicy !== null && { ResourcePolicy: input.ResourcePolicy }));
5834
+ return __assign(__assign(__assign({}, (input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId })), (input.ResourceArn != null && { ResourceArn: input.ResourceArn })), (input.ResourcePolicy != null && { ResourcePolicy: input.ResourcePolicy }));
5837
5835
  };
5838
5836
  var serializeAws_json1_1RedactionConfig = function (input, context) {
5839
- return __assign(__assign(__assign({}, (input.MaskCharacter !== undefined && input.MaskCharacter !== null && { MaskCharacter: input.MaskCharacter })), (input.MaskMode !== undefined && input.MaskMode !== null && { MaskMode: input.MaskMode })), (input.PiiEntityTypes !== undefined &&
5840
- input.PiiEntityTypes !== null && {
5837
+ return __assign(__assign(__assign({}, (input.MaskCharacter != null && { MaskCharacter: input.MaskCharacter })), (input.MaskMode != null && { MaskMode: input.MaskMode })), (input.PiiEntityTypes != null && {
5841
5838
  PiiEntityTypes: serializeAws_json1_1ListOfPiiEntityTypes(input.PiiEntityTypes, context),
5842
5839
  }));
5843
5840
  };
@@ -5852,160 +5849,110 @@ var serializeAws_json1_1SecurityGroupIds = function (input, context) {
5852
5849
  });
5853
5850
  };
5854
5851
  var serializeAws_json1_1SentimentDetectionJobFilter = function (input, context) {
5855
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
5856
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
5857
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5852
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5858
5853
  };
5859
5854
  var serializeAws_json1_1StartDocumentClassificationJobRequest = function (input, context) {
5860
5855
  var _a;
5861
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5862
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.DocumentClassifierArn !== undefined &&
5863
- input.DocumentClassifierArn !== null && { DocumentClassifierArn: input.DocumentClassifierArn })), (input.InputDataConfig !== undefined &&
5864
- input.InputDataConfig !== null && {
5856
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.DocumentClassifierArn != null && { DocumentClassifierArn: input.DocumentClassifierArn })), (input.InputDataConfig != null && {
5865
5857
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5866
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.OutputDataConfig !== undefined &&
5867
- input.OutputDataConfig !== null && {
5858
+ })), (input.JobName != null && { JobName: input.JobName })), (input.OutputDataConfig != null && {
5868
5859
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5869
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId !== undefined &&
5870
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5871
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5860
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5872
5861
  };
5873
5862
  var serializeAws_json1_1StartDominantLanguageDetectionJobRequest = function (input, context) {
5874
5863
  var _a;
5875
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5876
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
5877
- input.InputDataConfig !== null && {
5864
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
5878
5865
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5879
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.OutputDataConfig !== undefined &&
5880
- input.OutputDataConfig !== null && {
5866
+ })), (input.JobName != null && { JobName: input.JobName })), (input.OutputDataConfig != null && {
5881
5867
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5882
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId !== undefined &&
5883
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5884
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5868
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5885
5869
  };
5886
5870
  var serializeAws_json1_1StartEntitiesDetectionJobRequest = function (input, context) {
5887
5871
  var _a;
5888
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5889
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.EntityRecognizerArn !== undefined &&
5890
- input.EntityRecognizerArn !== null && { EntityRecognizerArn: input.EntityRecognizerArn })), (input.InputDataConfig !== undefined &&
5891
- input.InputDataConfig !== null && {
5872
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.EntityRecognizerArn != null && { EntityRecognizerArn: input.EntityRecognizerArn })), (input.InputDataConfig != null && {
5892
5873
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5893
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig !== undefined &&
5894
- input.OutputDataConfig !== null && {
5874
+ })), (input.JobName != null && { JobName: input.JobName })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig != null && {
5895
5875
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5896
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId !== undefined &&
5897
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5898
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5876
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5899
5877
  };
5900
5878
  var serializeAws_json1_1StartEventsDetectionJobRequest = function (input, context) {
5901
5879
  var _a;
5902
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5903
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
5904
- input.InputDataConfig !== null && {
5880
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
5905
5881
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5906
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig !== undefined &&
5907
- input.OutputDataConfig !== null && {
5882
+ })), (input.JobName != null && { JobName: input.JobName })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig != null && {
5908
5883
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5909
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.TargetEventTypes !== undefined &&
5910
- input.TargetEventTypes !== null && {
5884
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.TargetEventTypes != null && {
5911
5885
  TargetEventTypes: serializeAws_json1_1TargetEventTypes(input.TargetEventTypes, context),
5912
5886
  }));
5913
5887
  };
5914
5888
  var serializeAws_json1_1StartKeyPhrasesDetectionJobRequest = function (input, context) {
5915
5889
  var _a;
5916
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5917
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
5918
- input.InputDataConfig !== null && {
5890
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
5919
5891
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5920
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig !== undefined &&
5921
- input.OutputDataConfig !== null && {
5892
+ })), (input.JobName != null && { JobName: input.JobName })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig != null && {
5922
5893
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5923
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId !== undefined &&
5924
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5925
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5894
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5926
5895
  };
5927
5896
  var serializeAws_json1_1StartPiiEntitiesDetectionJobRequest = function (input, context) {
5928
5897
  var _a;
5929
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5930
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
5931
- input.InputDataConfig !== null && {
5898
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
5932
5899
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5933
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.Mode !== undefined && input.Mode !== null && { Mode: input.Mode })), (input.OutputDataConfig !== undefined &&
5934
- input.OutputDataConfig !== null && {
5900
+ })), (input.JobName != null && { JobName: input.JobName })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.Mode != null && { Mode: input.Mode })), (input.OutputDataConfig != null && {
5935
5901
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5936
- })), (input.RedactionConfig !== undefined &&
5937
- input.RedactionConfig !== null && {
5902
+ })), (input.RedactionConfig != null && {
5938
5903
  RedactionConfig: serializeAws_json1_1RedactionConfig(input.RedactionConfig, context),
5939
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
5904
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
5940
5905
  };
5941
5906
  var serializeAws_json1_1StartSentimentDetectionJobRequest = function (input, context) {
5942
5907
  var _a;
5943
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5944
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
5945
- input.InputDataConfig !== null && {
5908
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
5946
5909
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5947
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig !== undefined &&
5948
- input.OutputDataConfig !== null && {
5910
+ })), (input.JobName != null && { JobName: input.JobName })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig != null && {
5949
5911
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5950
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId !== undefined &&
5951
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5952
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5912
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5953
5913
  };
5954
5914
  var serializeAws_json1_1StartTargetedSentimentDetectionJobRequest = function (input, context) {
5955
5915
  var _a;
5956
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5957
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
5958
- input.InputDataConfig !== null && {
5916
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
5959
5917
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5960
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig !== undefined &&
5961
- input.OutputDataConfig !== null && {
5918
+ })), (input.JobName != null && { JobName: input.JobName })), (input.LanguageCode != null && { LanguageCode: input.LanguageCode })), (input.OutputDataConfig != null && {
5962
5919
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5963
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId !== undefined &&
5964
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5965
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5920
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5966
5921
  };
5967
5922
  var serializeAws_json1_1StartTopicsDetectionJobRequest = function (input, context) {
5968
5923
  var _a;
5969
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn !== undefined &&
5970
- input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig !== undefined &&
5971
- input.InputDataConfig !== null && {
5924
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn })), (input.InputDataConfig != null && {
5972
5925
  InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
5973
- })), (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.NumberOfTopics !== undefined &&
5974
- input.NumberOfTopics !== null && { NumberOfTopics: input.NumberOfTopics })), (input.OutputDataConfig !== undefined &&
5975
- input.OutputDataConfig !== null && {
5926
+ })), (input.JobName != null && { JobName: input.JobName })), (input.NumberOfTopics != null && { NumberOfTopics: input.NumberOfTopics })), (input.OutputDataConfig != null && {
5976
5927
  OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
5977
- })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId !== undefined &&
5978
- input.VolumeKmsKeyId !== null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig !== undefined &&
5979
- input.VpcConfig !== null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5928
+ })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) })), (input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId })), (input.VpcConfig != null && { VpcConfig: serializeAws_json1_1VpcConfig(input.VpcConfig, context) }));
5980
5929
  };
5981
5930
  var serializeAws_json1_1StopDominantLanguageDetectionJobRequest = function (input, context) {
5982
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5931
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5983
5932
  };
5984
5933
  var serializeAws_json1_1StopEntitiesDetectionJobRequest = function (input, context) {
5985
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5934
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5986
5935
  };
5987
5936
  var serializeAws_json1_1StopEventsDetectionJobRequest = function (input, context) {
5988
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5937
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5989
5938
  };
5990
5939
  var serializeAws_json1_1StopKeyPhrasesDetectionJobRequest = function (input, context) {
5991
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5940
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5992
5941
  };
5993
5942
  var serializeAws_json1_1StopPiiEntitiesDetectionJobRequest = function (input, context) {
5994
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5943
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5995
5944
  };
5996
5945
  var serializeAws_json1_1StopSentimentDetectionJobRequest = function (input, context) {
5997
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5946
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
5998
5947
  };
5999
5948
  var serializeAws_json1_1StopTargetedSentimentDetectionJobRequest = function (input, context) {
6000
- return __assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }));
5949
+ return __assign({}, (input.JobId != null && { JobId: input.JobId }));
6001
5950
  };
6002
5951
  var serializeAws_json1_1StopTrainingDocumentClassifierRequest = function (input, context) {
6003
- return __assign({}, (input.DocumentClassifierArn !== undefined &&
6004
- input.DocumentClassifierArn !== null && { DocumentClassifierArn: input.DocumentClassifierArn }));
5952
+ return __assign({}, (input.DocumentClassifierArn != null && { DocumentClassifierArn: input.DocumentClassifierArn }));
6005
5953
  };
6006
5954
  var serializeAws_json1_1StopTrainingEntityRecognizerRequest = function (input, context) {
6007
- return __assign({}, (input.EntityRecognizerArn !== undefined &&
6008
- input.EntityRecognizerArn !== null && { EntityRecognizerArn: input.EntityRecognizerArn }));
5955
+ return __assign({}, (input.EntityRecognizerArn != null && { EntityRecognizerArn: input.EntityRecognizerArn }));
6009
5956
  };
6010
5957
  var serializeAws_json1_1Subnets = function (input, context) {
6011
5958
  return input
@@ -6018,7 +5965,7 @@ var serializeAws_json1_1Subnets = function (input, context) {
6018
5965
  });
6019
5966
  };
6020
5967
  var serializeAws_json1_1Tag = function (input, context) {
6021
- return __assign(__assign({}, (input.Key !== undefined && input.Key !== null && { Key: input.Key })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
5968
+ return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
6022
5969
  };
6023
5970
  var serializeAws_json1_1TagKeyList = function (input, context) {
6024
5971
  return input
@@ -6041,12 +5988,10 @@ var serializeAws_json1_1TagList = function (input, context) {
6041
5988
  });
6042
5989
  };
6043
5990
  var serializeAws_json1_1TagResourceRequest = function (input, context) {
6044
- return __assign(__assign({}, (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn })), (input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
5991
+ return __assign(__assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn })), (input.Tags != null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }));
6045
5992
  };
6046
5993
  var serializeAws_json1_1TargetedSentimentDetectionJobFilter = function (input, context) {
6047
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
6048
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
6049
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
5994
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
6050
5995
  };
6051
5996
  var serializeAws_json1_1TargetEventTypes = function (input, context) {
6052
5997
  return input
@@ -6059,26 +6004,18 @@ var serializeAws_json1_1TargetEventTypes = function (input, context) {
6059
6004
  });
6060
6005
  };
6061
6006
  var serializeAws_json1_1TopicsDetectionJobFilter = function (input, context) {
6062
- return __assign(__assign(__assign(__assign({}, (input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName })), (input.JobStatus !== undefined && input.JobStatus !== null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter !== undefined &&
6063
- input.SubmitTimeAfter !== null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore !== undefined &&
6064
- input.SubmitTimeBefore !== null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
6007
+ return __assign(__assign(__assign(__assign({}, (input.JobName != null && { JobName: input.JobName })), (input.JobStatus != null && { JobStatus: input.JobStatus })), (input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) })), (input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }));
6065
6008
  };
6066
6009
  var serializeAws_json1_1UntagResourceRequest = function (input, context) {
6067
- return __assign(__assign({}, (input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn })), (input.TagKeys !== undefined &&
6068
- input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }));
6010
+ return __assign(__assign({}, (input.ResourceArn != null && { ResourceArn: input.ResourceArn })), (input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }));
6069
6011
  };
6070
6012
  var serializeAws_json1_1UpdateEndpointRequest = function (input, context) {
6071
- return __assign(__assign(__assign(__assign({}, (input.DesiredDataAccessRoleArn !== undefined &&
6072
- input.DesiredDataAccessRoleArn !== null && { DesiredDataAccessRoleArn: input.DesiredDataAccessRoleArn })), (input.DesiredInferenceUnits !== undefined &&
6073
- input.DesiredInferenceUnits !== null && { DesiredInferenceUnits: input.DesiredInferenceUnits })), (input.DesiredModelArn !== undefined &&
6074
- input.DesiredModelArn !== null && { DesiredModelArn: input.DesiredModelArn })), (input.EndpointArn !== undefined && input.EndpointArn !== null && { EndpointArn: input.EndpointArn }));
6013
+ return __assign(__assign(__assign(__assign({}, (input.DesiredDataAccessRoleArn != null && { DesiredDataAccessRoleArn: input.DesiredDataAccessRoleArn })), (input.DesiredInferenceUnits != null && { DesiredInferenceUnits: input.DesiredInferenceUnits })), (input.DesiredModelArn != null && { DesiredModelArn: input.DesiredModelArn })), (input.EndpointArn != null && { EndpointArn: input.EndpointArn }));
6075
6014
  };
6076
6015
  var serializeAws_json1_1VpcConfig = function (input, context) {
6077
- return __assign(__assign({}, (input.SecurityGroupIds !== undefined &&
6078
- input.SecurityGroupIds !== null && {
6016
+ return __assign(__assign({}, (input.SecurityGroupIds != null && {
6079
6017
  SecurityGroupIds: serializeAws_json1_1SecurityGroupIds(input.SecurityGroupIds, context),
6080
- })), (input.Subnets !== undefined &&
6081
- input.Subnets !== null && { Subnets: serializeAws_json1_1Subnets(input.Subnets, context) }));
6018
+ })), (input.Subnets != null && { Subnets: serializeAws_json1_1Subnets(input.Subnets, context) }));
6082
6019
  };
6083
6020
  var deserializeAws_json1_1AttributeNamesList = function (output, context) {
6084
6021
  var retVal = (output || [])
@@ -6094,7 +6031,7 @@ var deserializeAws_json1_1AttributeNamesList = function (output, context) {
6094
6031
  var deserializeAws_json1_1AugmentedManifestsListItem = function (output, context) {
6095
6032
  return {
6096
6033
  AnnotationDataS3Uri: __expectString(output.AnnotationDataS3Uri),
6097
- AttributeNames: output.AttributeNames !== undefined && output.AttributeNames !== null
6034
+ AttributeNames: output.AttributeNames != null
6098
6035
  ? deserializeAws_json1_1AttributeNamesList(output.AttributeNames, context)
6099
6036
  : undefined,
6100
6037
  DocumentType: __expectString(output.DocumentType),
@@ -6106,35 +6043,27 @@ var deserializeAws_json1_1AugmentedManifestsListItem = function (output, context
6106
6043
  var deserializeAws_json1_1BatchDetectDominantLanguageItemResult = function (output, context) {
6107
6044
  return {
6108
6045
  Index: __expectInt32(output.Index),
6109
- Languages: output.Languages !== undefined && output.Languages !== null
6110
- ? deserializeAws_json1_1ListOfDominantLanguages(output.Languages, context)
6111
- : undefined,
6046
+ Languages: output.Languages != null ? deserializeAws_json1_1ListOfDominantLanguages(output.Languages, context) : undefined,
6112
6047
  };
6113
6048
  };
6114
6049
  var deserializeAws_json1_1BatchDetectDominantLanguageResponse = function (output, context) {
6115
6050
  return {
6116
- ErrorList: output.ErrorList !== undefined && output.ErrorList !== null
6117
- ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context)
6118
- : undefined,
6119
- ResultList: output.ResultList !== undefined && output.ResultList !== null
6051
+ ErrorList: output.ErrorList != null ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context) : undefined,
6052
+ ResultList: output.ResultList != null
6120
6053
  ? deserializeAws_json1_1ListOfDetectDominantLanguageResult(output.ResultList, context)
6121
6054
  : undefined,
6122
6055
  };
6123
6056
  };
6124
6057
  var deserializeAws_json1_1BatchDetectEntitiesItemResult = function (output, context) {
6125
6058
  return {
6126
- Entities: output.Entities !== undefined && output.Entities !== null
6127
- ? deserializeAws_json1_1ListOfEntities(output.Entities, context)
6128
- : undefined,
6059
+ Entities: output.Entities != null ? deserializeAws_json1_1ListOfEntities(output.Entities, context) : undefined,
6129
6060
  Index: __expectInt32(output.Index),
6130
6061
  };
6131
6062
  };
6132
6063
  var deserializeAws_json1_1BatchDetectEntitiesResponse = function (output, context) {
6133
6064
  return {
6134
- ErrorList: output.ErrorList !== undefined && output.ErrorList !== null
6135
- ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context)
6136
- : undefined,
6137
- ResultList: output.ResultList !== undefined && output.ResultList !== null
6065
+ ErrorList: output.ErrorList != null ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context) : undefined,
6066
+ ResultList: output.ResultList != null
6138
6067
  ? deserializeAws_json1_1ListOfDetectEntitiesResult(output.ResultList, context)
6139
6068
  : undefined,
6140
6069
  };
@@ -6142,17 +6071,13 @@ var deserializeAws_json1_1BatchDetectEntitiesResponse = function (output, contex
6142
6071
  var deserializeAws_json1_1BatchDetectKeyPhrasesItemResult = function (output, context) {
6143
6072
  return {
6144
6073
  Index: __expectInt32(output.Index),
6145
- KeyPhrases: output.KeyPhrases !== undefined && output.KeyPhrases !== null
6146
- ? deserializeAws_json1_1ListOfKeyPhrases(output.KeyPhrases, context)
6147
- : undefined,
6074
+ KeyPhrases: output.KeyPhrases != null ? deserializeAws_json1_1ListOfKeyPhrases(output.KeyPhrases, context) : undefined,
6148
6075
  };
6149
6076
  };
6150
6077
  var deserializeAws_json1_1BatchDetectKeyPhrasesResponse = function (output, context) {
6151
6078
  return {
6152
- ErrorList: output.ErrorList !== undefined && output.ErrorList !== null
6153
- ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context)
6154
- : undefined,
6155
- ResultList: output.ResultList !== undefined && output.ResultList !== null
6079
+ ErrorList: output.ErrorList != null ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context) : undefined,
6080
+ ResultList: output.ResultList != null
6156
6081
  ? deserializeAws_json1_1ListOfDetectKeyPhrasesResult(output.ResultList, context)
6157
6082
  : undefined,
6158
6083
  };
@@ -6161,17 +6086,13 @@ var deserializeAws_json1_1BatchDetectSentimentItemResult = function (output, con
6161
6086
  return {
6162
6087
  Index: __expectInt32(output.Index),
6163
6088
  Sentiment: __expectString(output.Sentiment),
6164
- SentimentScore: output.SentimentScore !== undefined && output.SentimentScore !== null
6165
- ? deserializeAws_json1_1SentimentScore(output.SentimentScore, context)
6166
- : undefined,
6089
+ SentimentScore: output.SentimentScore != null ? deserializeAws_json1_1SentimentScore(output.SentimentScore, context) : undefined,
6167
6090
  };
6168
6091
  };
6169
6092
  var deserializeAws_json1_1BatchDetectSentimentResponse = function (output, context) {
6170
6093
  return {
6171
- ErrorList: output.ErrorList !== undefined && output.ErrorList !== null
6172
- ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context)
6173
- : undefined,
6174
- ResultList: output.ResultList !== undefined && output.ResultList !== null
6094
+ ErrorList: output.ErrorList != null ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context) : undefined,
6095
+ ResultList: output.ResultList != null
6175
6096
  ? deserializeAws_json1_1ListOfDetectSentimentResult(output.ResultList, context)
6176
6097
  : undefined,
6177
6098
  };
@@ -6179,17 +6100,13 @@ var deserializeAws_json1_1BatchDetectSentimentResponse = function (output, conte
6179
6100
  var deserializeAws_json1_1BatchDetectSyntaxItemResult = function (output, context) {
6180
6101
  return {
6181
6102
  Index: __expectInt32(output.Index),
6182
- SyntaxTokens: output.SyntaxTokens !== undefined && output.SyntaxTokens !== null
6183
- ? deserializeAws_json1_1ListOfSyntaxTokens(output.SyntaxTokens, context)
6184
- : undefined,
6103
+ SyntaxTokens: output.SyntaxTokens != null ? deserializeAws_json1_1ListOfSyntaxTokens(output.SyntaxTokens, context) : undefined,
6185
6104
  };
6186
6105
  };
6187
6106
  var deserializeAws_json1_1BatchDetectSyntaxResponse = function (output, context) {
6188
6107
  return {
6189
- ErrorList: output.ErrorList !== undefined && output.ErrorList !== null
6190
- ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context)
6191
- : undefined,
6192
- ResultList: output.ResultList !== undefined && output.ResultList !== null
6108
+ ErrorList: output.ErrorList != null ? deserializeAws_json1_1BatchItemErrorList(output.ErrorList, context) : undefined,
6109
+ ResultList: output.ResultList != null
6193
6110
  ? deserializeAws_json1_1ListOfDetectSyntaxResult(output.ResultList, context)
6194
6111
  : undefined,
6195
6112
  };
@@ -6231,7 +6148,7 @@ var deserializeAws_json1_1ClassifierEvaluationMetrics = function (output, contex
6231
6148
  };
6232
6149
  var deserializeAws_json1_1ClassifierMetadata = function (output, context) {
6233
6150
  return {
6234
- EvaluationMetrics: output.EvaluationMetrics !== undefined && output.EvaluationMetrics !== null
6151
+ EvaluationMetrics: output.EvaluationMetrics != null
6235
6152
  ? deserializeAws_json1_1ClassifierEvaluationMetrics(output.EvaluationMetrics, context)
6236
6153
  : undefined,
6237
6154
  NumberOfLabels: __expectInt32(output.NumberOfLabels),
@@ -6241,12 +6158,8 @@ var deserializeAws_json1_1ClassifierMetadata = function (output, context) {
6241
6158
  };
6242
6159
  var deserializeAws_json1_1ClassifyDocumentResponse = function (output, context) {
6243
6160
  return {
6244
- Classes: output.Classes !== undefined && output.Classes !== null
6245
- ? deserializeAws_json1_1ListOfClasses(output.Classes, context)
6246
- : undefined,
6247
- Labels: output.Labels !== undefined && output.Labels !== null
6248
- ? deserializeAws_json1_1ListOfLabels(output.Labels, context)
6249
- : undefined,
6161
+ Classes: output.Classes != null ? deserializeAws_json1_1ListOfClasses(output.Classes, context) : undefined,
6162
+ Labels: output.Labels != null ? deserializeAws_json1_1ListOfLabels(output.Labels, context) : undefined,
6250
6163
  };
6251
6164
  };
6252
6165
  var deserializeAws_json1_1ConcurrentModificationException = function (output, context) {
@@ -6256,9 +6169,7 @@ var deserializeAws_json1_1ConcurrentModificationException = function (output, co
6256
6169
  };
6257
6170
  var deserializeAws_json1_1ContainsPiiEntitiesResponse = function (output, context) {
6258
6171
  return {
6259
- Labels: output.Labels !== undefined && output.Labels !== null
6260
- ? deserializeAws_json1_1ListOfEntityLabels(output.Labels, context)
6261
- : undefined,
6172
+ Labels: output.Labels != null ? deserializeAws_json1_1ListOfEntityLabels(output.Labels, context) : undefined,
6262
6173
  };
6263
6174
  };
6264
6175
  var deserializeAws_json1_1CreateDocumentClassifierResponse = function (output, context) {
@@ -6290,74 +6201,73 @@ var deserializeAws_json1_1DeleteResourcePolicyResponse = function (output, conte
6290
6201
  };
6291
6202
  var deserializeAws_json1_1DescribeDocumentClassificationJobResponse = function (output, context) {
6292
6203
  return {
6293
- DocumentClassificationJobProperties: output.DocumentClassificationJobProperties !== undefined && output.DocumentClassificationJobProperties !== null
6204
+ DocumentClassificationJobProperties: output.DocumentClassificationJobProperties != null
6294
6205
  ? deserializeAws_json1_1DocumentClassificationJobProperties(output.DocumentClassificationJobProperties, context)
6295
6206
  : undefined,
6296
6207
  };
6297
6208
  };
6298
6209
  var deserializeAws_json1_1DescribeDocumentClassifierResponse = function (output, context) {
6299
6210
  return {
6300
- DocumentClassifierProperties: output.DocumentClassifierProperties !== undefined && output.DocumentClassifierProperties !== null
6211
+ DocumentClassifierProperties: output.DocumentClassifierProperties != null
6301
6212
  ? deserializeAws_json1_1DocumentClassifierProperties(output.DocumentClassifierProperties, context)
6302
6213
  : undefined,
6303
6214
  };
6304
6215
  };
6305
6216
  var deserializeAws_json1_1DescribeDominantLanguageDetectionJobResponse = function (output, context) {
6306
6217
  return {
6307
- DominantLanguageDetectionJobProperties: output.DominantLanguageDetectionJobProperties !== undefined &&
6308
- output.DominantLanguageDetectionJobProperties !== null
6218
+ DominantLanguageDetectionJobProperties: output.DominantLanguageDetectionJobProperties != null
6309
6219
  ? deserializeAws_json1_1DominantLanguageDetectionJobProperties(output.DominantLanguageDetectionJobProperties, context)
6310
6220
  : undefined,
6311
6221
  };
6312
6222
  };
6313
6223
  var deserializeAws_json1_1DescribeEndpointResponse = function (output, context) {
6314
6224
  return {
6315
- EndpointProperties: output.EndpointProperties !== undefined && output.EndpointProperties !== null
6225
+ EndpointProperties: output.EndpointProperties != null
6316
6226
  ? deserializeAws_json1_1EndpointProperties(output.EndpointProperties, context)
6317
6227
  : undefined,
6318
6228
  };
6319
6229
  };
6320
6230
  var deserializeAws_json1_1DescribeEntitiesDetectionJobResponse = function (output, context) {
6321
6231
  return {
6322
- EntitiesDetectionJobProperties: output.EntitiesDetectionJobProperties !== undefined && output.EntitiesDetectionJobProperties !== null
6232
+ EntitiesDetectionJobProperties: output.EntitiesDetectionJobProperties != null
6323
6233
  ? deserializeAws_json1_1EntitiesDetectionJobProperties(output.EntitiesDetectionJobProperties, context)
6324
6234
  : undefined,
6325
6235
  };
6326
6236
  };
6327
6237
  var deserializeAws_json1_1DescribeEntityRecognizerResponse = function (output, context) {
6328
6238
  return {
6329
- EntityRecognizerProperties: output.EntityRecognizerProperties !== undefined && output.EntityRecognizerProperties !== null
6239
+ EntityRecognizerProperties: output.EntityRecognizerProperties != null
6330
6240
  ? deserializeAws_json1_1EntityRecognizerProperties(output.EntityRecognizerProperties, context)
6331
6241
  : undefined,
6332
6242
  };
6333
6243
  };
6334
6244
  var deserializeAws_json1_1DescribeEventsDetectionJobResponse = function (output, context) {
6335
6245
  return {
6336
- EventsDetectionJobProperties: output.EventsDetectionJobProperties !== undefined && output.EventsDetectionJobProperties !== null
6246
+ EventsDetectionJobProperties: output.EventsDetectionJobProperties != null
6337
6247
  ? deserializeAws_json1_1EventsDetectionJobProperties(output.EventsDetectionJobProperties, context)
6338
6248
  : undefined,
6339
6249
  };
6340
6250
  };
6341
6251
  var deserializeAws_json1_1DescribeKeyPhrasesDetectionJobResponse = function (output, context) {
6342
6252
  return {
6343
- KeyPhrasesDetectionJobProperties: output.KeyPhrasesDetectionJobProperties !== undefined && output.KeyPhrasesDetectionJobProperties !== null
6253
+ KeyPhrasesDetectionJobProperties: output.KeyPhrasesDetectionJobProperties != null
6344
6254
  ? deserializeAws_json1_1KeyPhrasesDetectionJobProperties(output.KeyPhrasesDetectionJobProperties, context)
6345
6255
  : undefined,
6346
6256
  };
6347
6257
  };
6348
6258
  var deserializeAws_json1_1DescribePiiEntitiesDetectionJobResponse = function (output, context) {
6349
6259
  return {
6350
- PiiEntitiesDetectionJobProperties: output.PiiEntitiesDetectionJobProperties !== undefined && output.PiiEntitiesDetectionJobProperties !== null
6260
+ PiiEntitiesDetectionJobProperties: output.PiiEntitiesDetectionJobProperties != null
6351
6261
  ? deserializeAws_json1_1PiiEntitiesDetectionJobProperties(output.PiiEntitiesDetectionJobProperties, context)
6352
6262
  : undefined,
6353
6263
  };
6354
6264
  };
6355
6265
  var deserializeAws_json1_1DescribeResourcePolicyResponse = function (output, context) {
6356
6266
  return {
6357
- CreationTime: output.CreationTime !== undefined && output.CreationTime !== null
6267
+ CreationTime: output.CreationTime != null
6358
6268
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
6359
6269
  : undefined,
6360
- LastModifiedTime: output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
6270
+ LastModifiedTime: output.LastModifiedTime != null
6361
6271
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
6362
6272
  : undefined,
6363
6273
  PolicyRevisionId: __expectString(output.PolicyRevisionId),
@@ -6366,67 +6276,54 @@ var deserializeAws_json1_1DescribeResourcePolicyResponse = function (output, con
6366
6276
  };
6367
6277
  var deserializeAws_json1_1DescribeSentimentDetectionJobResponse = function (output, context) {
6368
6278
  return {
6369
- SentimentDetectionJobProperties: output.SentimentDetectionJobProperties !== undefined && output.SentimentDetectionJobProperties !== null
6279
+ SentimentDetectionJobProperties: output.SentimentDetectionJobProperties != null
6370
6280
  ? deserializeAws_json1_1SentimentDetectionJobProperties(output.SentimentDetectionJobProperties, context)
6371
6281
  : undefined,
6372
6282
  };
6373
6283
  };
6374
6284
  var deserializeAws_json1_1DescribeTargetedSentimentDetectionJobResponse = function (output, context) {
6375
6285
  return {
6376
- TargetedSentimentDetectionJobProperties: output.TargetedSentimentDetectionJobProperties !== undefined &&
6377
- output.TargetedSentimentDetectionJobProperties !== null
6286
+ TargetedSentimentDetectionJobProperties: output.TargetedSentimentDetectionJobProperties != null
6378
6287
  ? deserializeAws_json1_1TargetedSentimentDetectionJobProperties(output.TargetedSentimentDetectionJobProperties, context)
6379
6288
  : undefined,
6380
6289
  };
6381
6290
  };
6382
6291
  var deserializeAws_json1_1DescribeTopicsDetectionJobResponse = function (output, context) {
6383
6292
  return {
6384
- TopicsDetectionJobProperties: output.TopicsDetectionJobProperties !== undefined && output.TopicsDetectionJobProperties !== null
6293
+ TopicsDetectionJobProperties: output.TopicsDetectionJobProperties != null
6385
6294
  ? deserializeAws_json1_1TopicsDetectionJobProperties(output.TopicsDetectionJobProperties, context)
6386
6295
  : undefined,
6387
6296
  };
6388
6297
  };
6389
6298
  var deserializeAws_json1_1DetectDominantLanguageResponse = function (output, context) {
6390
6299
  return {
6391
- Languages: output.Languages !== undefined && output.Languages !== null
6392
- ? deserializeAws_json1_1ListOfDominantLanguages(output.Languages, context)
6393
- : undefined,
6300
+ Languages: output.Languages != null ? deserializeAws_json1_1ListOfDominantLanguages(output.Languages, context) : undefined,
6394
6301
  };
6395
6302
  };
6396
6303
  var deserializeAws_json1_1DetectEntitiesResponse = function (output, context) {
6397
6304
  return {
6398
- Entities: output.Entities !== undefined && output.Entities !== null
6399
- ? deserializeAws_json1_1ListOfEntities(output.Entities, context)
6400
- : undefined,
6305
+ Entities: output.Entities != null ? deserializeAws_json1_1ListOfEntities(output.Entities, context) : undefined,
6401
6306
  };
6402
6307
  };
6403
6308
  var deserializeAws_json1_1DetectKeyPhrasesResponse = function (output, context) {
6404
6309
  return {
6405
- KeyPhrases: output.KeyPhrases !== undefined && output.KeyPhrases !== null
6406
- ? deserializeAws_json1_1ListOfKeyPhrases(output.KeyPhrases, context)
6407
- : undefined,
6310
+ KeyPhrases: output.KeyPhrases != null ? deserializeAws_json1_1ListOfKeyPhrases(output.KeyPhrases, context) : undefined,
6408
6311
  };
6409
6312
  };
6410
6313
  var deserializeAws_json1_1DetectPiiEntitiesResponse = function (output, context) {
6411
6314
  return {
6412
- Entities: output.Entities !== undefined && output.Entities !== null
6413
- ? deserializeAws_json1_1ListOfPiiEntities(output.Entities, context)
6414
- : undefined,
6315
+ Entities: output.Entities != null ? deserializeAws_json1_1ListOfPiiEntities(output.Entities, context) : undefined,
6415
6316
  };
6416
6317
  };
6417
6318
  var deserializeAws_json1_1DetectSentimentResponse = function (output, context) {
6418
6319
  return {
6419
6320
  Sentiment: __expectString(output.Sentiment),
6420
- SentimentScore: output.SentimentScore !== undefined && output.SentimentScore !== null
6421
- ? deserializeAws_json1_1SentimentScore(output.SentimentScore, context)
6422
- : undefined,
6321
+ SentimentScore: output.SentimentScore != null ? deserializeAws_json1_1SentimentScore(output.SentimentScore, context) : undefined,
6423
6322
  };
6424
6323
  };
6425
6324
  var deserializeAws_json1_1DetectSyntaxResponse = function (output, context) {
6426
6325
  return {
6427
- SyntaxTokens: output.SyntaxTokens !== undefined && output.SyntaxTokens !== null
6428
- ? deserializeAws_json1_1ListOfSyntaxTokens(output.SyntaxTokens, context)
6429
- : undefined,
6326
+ SyntaxTokens: output.SyntaxTokens != null ? deserializeAws_json1_1ListOfSyntaxTokens(output.SyntaxTokens, context) : undefined,
6430
6327
  };
6431
6328
  };
6432
6329
  var deserializeAws_json1_1DocumentClass = function (output, context) {
@@ -6439,10 +6336,8 @@ var deserializeAws_json1_1DocumentClassificationJobProperties = function (output
6439
6336
  return {
6440
6337
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6441
6338
  DocumentClassifierArn: __expectString(output.DocumentClassifierArn),
6442
- EndTime: output.EndTime !== undefined && output.EndTime !== null
6443
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6444
- : undefined,
6445
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6339
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
6340
+ InputDataConfig: output.InputDataConfig != null
6446
6341
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
6447
6342
  : undefined,
6448
6343
  JobArn: __expectString(output.JobArn),
@@ -6450,16 +6345,12 @@ var deserializeAws_json1_1DocumentClassificationJobProperties = function (output
6450
6345
  JobName: __expectString(output.JobName),
6451
6346
  JobStatus: __expectString(output.JobStatus),
6452
6347
  Message: __expectString(output.Message),
6453
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
6348
+ OutputDataConfig: output.OutputDataConfig != null
6454
6349
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
6455
6350
  : undefined,
6456
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6457
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6458
- : undefined,
6351
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
6459
6352
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6460
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
6461
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
6462
- : undefined,
6353
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
6463
6354
  };
6464
6355
  };
6465
6356
  var deserializeAws_json1_1DocumentClassificationJobPropertiesList = function (output, context) {
@@ -6486,7 +6377,7 @@ var deserializeAws_json1_1DocumentClassifierAugmentedManifestsList = function (o
6486
6377
  };
6487
6378
  var deserializeAws_json1_1DocumentClassifierInputDataConfig = function (output, context) {
6488
6379
  return {
6489
- AugmentedManifests: output.AugmentedManifests !== undefined && output.AugmentedManifests !== null
6380
+ AugmentedManifests: output.AugmentedManifests != null
6490
6381
  ? deserializeAws_json1_1DocumentClassifierAugmentedManifestsList(output.AugmentedManifests, context)
6491
6382
  : undefined,
6492
6383
  DataFormat: __expectString(output.DataFormat),
@@ -6503,40 +6394,34 @@ var deserializeAws_json1_1DocumentClassifierOutputDataConfig = function (output,
6503
6394
  };
6504
6395
  var deserializeAws_json1_1DocumentClassifierProperties = function (output, context) {
6505
6396
  return {
6506
- ClassifierMetadata: output.ClassifierMetadata !== undefined && output.ClassifierMetadata !== null
6397
+ ClassifierMetadata: output.ClassifierMetadata != null
6507
6398
  ? deserializeAws_json1_1ClassifierMetadata(output.ClassifierMetadata, context)
6508
6399
  : undefined,
6509
6400
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6510
6401
  DocumentClassifierArn: __expectString(output.DocumentClassifierArn),
6511
- EndTime: output.EndTime !== undefined && output.EndTime !== null
6512
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6513
- : undefined,
6514
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6402
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
6403
+ InputDataConfig: output.InputDataConfig != null
6515
6404
  ? deserializeAws_json1_1DocumentClassifierInputDataConfig(output.InputDataConfig, context)
6516
6405
  : undefined,
6517
6406
  LanguageCode: __expectString(output.LanguageCode),
6518
6407
  Message: __expectString(output.Message),
6519
6408
  Mode: __expectString(output.Mode),
6520
6409
  ModelKmsKeyId: __expectString(output.ModelKmsKeyId),
6521
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
6410
+ OutputDataConfig: output.OutputDataConfig != null
6522
6411
  ? deserializeAws_json1_1DocumentClassifierOutputDataConfig(output.OutputDataConfig, context)
6523
6412
  : undefined,
6524
6413
  SourceModelArn: __expectString(output.SourceModelArn),
6525
6414
  Status: __expectString(output.Status),
6526
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6527
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6528
- : undefined,
6529
- TrainingEndTime: output.TrainingEndTime !== undefined && output.TrainingEndTime !== null
6415
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
6416
+ TrainingEndTime: output.TrainingEndTime != null
6530
6417
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime)))
6531
6418
  : undefined,
6532
- TrainingStartTime: output.TrainingStartTime !== undefined && output.TrainingStartTime !== null
6419
+ TrainingStartTime: output.TrainingStartTime != null
6533
6420
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime)))
6534
6421
  : undefined,
6535
6422
  VersionName: __expectString(output.VersionName),
6536
6423
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6537
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
6538
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
6539
- : undefined,
6424
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
6540
6425
  };
6541
6426
  };
6542
6427
  var deserializeAws_json1_1DocumentClassifierPropertiesList = function (output, context) {
@@ -6564,7 +6449,7 @@ var deserializeAws_json1_1DocumentClassifierSummariesList = function (output, co
6564
6449
  var deserializeAws_json1_1DocumentClassifierSummary = function (output, context) {
6565
6450
  return {
6566
6451
  DocumentClassifierName: __expectString(output.DocumentClassifierName),
6567
- LatestVersionCreatedAt: output.LatestVersionCreatedAt !== undefined && output.LatestVersionCreatedAt !== null
6452
+ LatestVersionCreatedAt: output.LatestVersionCreatedAt != null
6568
6453
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestVersionCreatedAt)))
6569
6454
  : undefined,
6570
6455
  LatestVersionName: __expectString(output.LatestVersionName),
@@ -6582,7 +6467,7 @@ var deserializeAws_json1_1DocumentReaderConfig = function (output, context) {
6582
6467
  return {
6583
6468
  DocumentReadAction: __expectString(output.DocumentReadAction),
6584
6469
  DocumentReadMode: __expectString(output.DocumentReadMode),
6585
- FeatureTypes: output.FeatureTypes !== undefined && output.FeatureTypes !== null
6470
+ FeatureTypes: output.FeatureTypes != null
6586
6471
  ? deserializeAws_json1_1ListOfDocumentReadFeatureTypes(output.FeatureTypes, context)
6587
6472
  : undefined,
6588
6473
  };
@@ -6596,10 +6481,8 @@ var deserializeAws_json1_1DominantLanguage = function (output, context) {
6596
6481
  var deserializeAws_json1_1DominantLanguageDetectionJobProperties = function (output, context) {
6597
6482
  return {
6598
6483
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6599
- EndTime: output.EndTime !== undefined && output.EndTime !== null
6600
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6601
- : undefined,
6602
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6484
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
6485
+ InputDataConfig: output.InputDataConfig != null
6603
6486
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
6604
6487
  : undefined,
6605
6488
  JobArn: __expectString(output.JobArn),
@@ -6607,16 +6490,12 @@ var deserializeAws_json1_1DominantLanguageDetectionJobProperties = function (out
6607
6490
  JobName: __expectString(output.JobName),
6608
6491
  JobStatus: __expectString(output.JobStatus),
6609
6492
  Message: __expectString(output.Message),
6610
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
6493
+ OutputDataConfig: output.OutputDataConfig != null
6611
6494
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
6612
6495
  : undefined,
6613
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6614
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6615
- : undefined,
6496
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
6616
6497
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6617
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
6618
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
6619
- : undefined,
6498
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
6620
6499
  };
6621
6500
  };
6622
6501
  var deserializeAws_json1_1DominantLanguageDetectionJobPropertiesList = function (output, context) {
@@ -6632,7 +6511,7 @@ var deserializeAws_json1_1DominantLanguageDetectionJobPropertiesList = function
6632
6511
  };
6633
6512
  var deserializeAws_json1_1EndpointProperties = function (output, context) {
6634
6513
  return {
6635
- CreationTime: output.CreationTime !== undefined && output.CreationTime !== null
6514
+ CreationTime: output.CreationTime != null
6636
6515
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
6637
6516
  : undefined,
6638
6517
  CurrentInferenceUnits: __expectInt32(output.CurrentInferenceUnits),
@@ -6641,7 +6520,7 @@ var deserializeAws_json1_1EndpointProperties = function (output, context) {
6641
6520
  DesiredInferenceUnits: __expectInt32(output.DesiredInferenceUnits),
6642
6521
  DesiredModelArn: __expectString(output.DesiredModelArn),
6643
6522
  EndpointArn: __expectString(output.EndpointArn),
6644
- LastModifiedTime: output.LastModifiedTime !== undefined && output.LastModifiedTime !== null
6523
+ LastModifiedTime: output.LastModifiedTime != null
6645
6524
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime)))
6646
6525
  : undefined,
6647
6526
  Message: __expectString(output.Message),
@@ -6663,11 +6542,9 @@ var deserializeAws_json1_1EndpointPropertiesList = function (output, context) {
6663
6542
  var deserializeAws_json1_1EntitiesDetectionJobProperties = function (output, context) {
6664
6543
  return {
6665
6544
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6666
- EndTime: output.EndTime !== undefined && output.EndTime !== null
6667
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6668
- : undefined,
6545
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
6669
6546
  EntityRecognizerArn: __expectString(output.EntityRecognizerArn),
6670
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6547
+ InputDataConfig: output.InputDataConfig != null
6671
6548
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
6672
6549
  : undefined,
6673
6550
  JobArn: __expectString(output.JobArn),
@@ -6676,16 +6553,12 @@ var deserializeAws_json1_1EntitiesDetectionJobProperties = function (output, con
6676
6553
  JobStatus: __expectString(output.JobStatus),
6677
6554
  LanguageCode: __expectString(output.LanguageCode),
6678
6555
  Message: __expectString(output.Message),
6679
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
6556
+ OutputDataConfig: output.OutputDataConfig != null
6680
6557
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
6681
6558
  : undefined,
6682
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6683
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6684
- : undefined,
6559
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
6685
6560
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6686
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
6687
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
6688
- : undefined,
6561
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
6689
6562
  };
6690
6563
  };
6691
6564
  var deserializeAws_json1_1EntitiesDetectionJobPropertiesList = function (output, context) {
@@ -6752,30 +6625,26 @@ var deserializeAws_json1_1EntityRecognizerEvaluationMetrics = function (output,
6752
6625
  };
6753
6626
  var deserializeAws_json1_1EntityRecognizerInputDataConfig = function (output, context) {
6754
6627
  return {
6755
- Annotations: output.Annotations !== undefined && output.Annotations !== null
6628
+ Annotations: output.Annotations != null
6756
6629
  ? deserializeAws_json1_1EntityRecognizerAnnotations(output.Annotations, context)
6757
6630
  : undefined,
6758
- AugmentedManifests: output.AugmentedManifests !== undefined && output.AugmentedManifests !== null
6631
+ AugmentedManifests: output.AugmentedManifests != null
6759
6632
  ? deserializeAws_json1_1EntityRecognizerAugmentedManifestsList(output.AugmentedManifests, context)
6760
6633
  : undefined,
6761
6634
  DataFormat: __expectString(output.DataFormat),
6762
- Documents: output.Documents !== undefined && output.Documents !== null
6763
- ? deserializeAws_json1_1EntityRecognizerDocuments(output.Documents, context)
6764
- : undefined,
6765
- EntityList: output.EntityList !== undefined && output.EntityList !== null
6635
+ Documents: output.Documents != null ? deserializeAws_json1_1EntityRecognizerDocuments(output.Documents, context) : undefined,
6636
+ EntityList: output.EntityList != null
6766
6637
  ? deserializeAws_json1_1EntityRecognizerEntityList(output.EntityList, context)
6767
6638
  : undefined,
6768
- EntityTypes: output.EntityTypes !== undefined && output.EntityTypes !== null
6769
- ? deserializeAws_json1_1EntityTypesList(output.EntityTypes, context)
6770
- : undefined,
6639
+ EntityTypes: output.EntityTypes != null ? deserializeAws_json1_1EntityTypesList(output.EntityTypes, context) : undefined,
6771
6640
  };
6772
6641
  };
6773
6642
  var deserializeAws_json1_1EntityRecognizerMetadata = function (output, context) {
6774
6643
  return {
6775
- EntityTypes: output.EntityTypes !== undefined && output.EntityTypes !== null
6644
+ EntityTypes: output.EntityTypes != null
6776
6645
  ? deserializeAws_json1_1EntityRecognizerMetadataEntityTypesList(output.EntityTypes, context)
6777
6646
  : undefined,
6778
- EvaluationMetrics: output.EvaluationMetrics !== undefined && output.EvaluationMetrics !== null
6647
+ EvaluationMetrics: output.EvaluationMetrics != null
6779
6648
  ? deserializeAws_json1_1EntityRecognizerEvaluationMetrics(output.EvaluationMetrics, context)
6780
6649
  : undefined,
6781
6650
  NumberOfTestDocuments: __expectInt32(output.NumberOfTestDocuments),
@@ -6795,7 +6664,7 @@ var deserializeAws_json1_1EntityRecognizerMetadataEntityTypesList = function (ou
6795
6664
  };
6796
6665
  var deserializeAws_json1_1EntityRecognizerMetadataEntityTypesListItem = function (output, context) {
6797
6666
  return {
6798
- EvaluationMetrics: output.EvaluationMetrics !== undefined && output.EvaluationMetrics !== null
6667
+ EvaluationMetrics: output.EvaluationMetrics != null
6799
6668
  ? deserializeAws_json1_1EntityTypesEvaluationMetrics(output.EvaluationMetrics, context)
6800
6669
  : undefined,
6801
6670
  NumberOfTrainMentions: __expectInt32(output.NumberOfTrainMentions),
@@ -6805,35 +6674,29 @@ var deserializeAws_json1_1EntityRecognizerMetadataEntityTypesListItem = function
6805
6674
  var deserializeAws_json1_1EntityRecognizerProperties = function (output, context) {
6806
6675
  return {
6807
6676
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6808
- EndTime: output.EndTime !== undefined && output.EndTime !== null
6809
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6810
- : undefined,
6677
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
6811
6678
  EntityRecognizerArn: __expectString(output.EntityRecognizerArn),
6812
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6679
+ InputDataConfig: output.InputDataConfig != null
6813
6680
  ? deserializeAws_json1_1EntityRecognizerInputDataConfig(output.InputDataConfig, context)
6814
6681
  : undefined,
6815
6682
  LanguageCode: __expectString(output.LanguageCode),
6816
6683
  Message: __expectString(output.Message),
6817
6684
  ModelKmsKeyId: __expectString(output.ModelKmsKeyId),
6818
- RecognizerMetadata: output.RecognizerMetadata !== undefined && output.RecognizerMetadata !== null
6685
+ RecognizerMetadata: output.RecognizerMetadata != null
6819
6686
  ? deserializeAws_json1_1EntityRecognizerMetadata(output.RecognizerMetadata, context)
6820
6687
  : undefined,
6821
6688
  SourceModelArn: __expectString(output.SourceModelArn),
6822
6689
  Status: __expectString(output.Status),
6823
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6824
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6825
- : undefined,
6826
- TrainingEndTime: output.TrainingEndTime !== undefined && output.TrainingEndTime !== null
6690
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
6691
+ TrainingEndTime: output.TrainingEndTime != null
6827
6692
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime)))
6828
6693
  : undefined,
6829
- TrainingStartTime: output.TrainingStartTime !== undefined && output.TrainingStartTime !== null
6694
+ TrainingStartTime: output.TrainingStartTime != null
6830
6695
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime)))
6831
6696
  : undefined,
6832
6697
  VersionName: __expectString(output.VersionName),
6833
6698
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6834
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
6835
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
6836
- : undefined,
6699
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
6837
6700
  };
6838
6701
  };
6839
6702
  var deserializeAws_json1_1EntityRecognizerPropertiesList = function (output, context) {
@@ -6860,7 +6723,7 @@ var deserializeAws_json1_1EntityRecognizerSummariesList = function (output, cont
6860
6723
  };
6861
6724
  var deserializeAws_json1_1EntityRecognizerSummary = function (output, context) {
6862
6725
  return {
6863
- LatestVersionCreatedAt: output.LatestVersionCreatedAt !== undefined && output.LatestVersionCreatedAt !== null
6726
+ LatestVersionCreatedAt: output.LatestVersionCreatedAt != null
6864
6727
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestVersionCreatedAt)))
6865
6728
  : undefined,
6866
6729
  LatestVersionName: __expectString(output.LatestVersionName),
@@ -6895,10 +6758,8 @@ var deserializeAws_json1_1EntityTypesListItem = function (output, context) {
6895
6758
  var deserializeAws_json1_1EventsDetectionJobProperties = function (output, context) {
6896
6759
  return {
6897
6760
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6898
- EndTime: output.EndTime !== undefined && output.EndTime !== null
6899
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6900
- : undefined,
6901
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6761
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
6762
+ InputDataConfig: output.InputDataConfig != null
6902
6763
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
6903
6764
  : undefined,
6904
6765
  JobArn: __expectString(output.JobArn),
@@ -6907,13 +6768,11 @@ var deserializeAws_json1_1EventsDetectionJobProperties = function (output, conte
6907
6768
  JobStatus: __expectString(output.JobStatus),
6908
6769
  LanguageCode: __expectString(output.LanguageCode),
6909
6770
  Message: __expectString(output.Message),
6910
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
6771
+ OutputDataConfig: output.OutputDataConfig != null
6911
6772
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
6912
6773
  : undefined,
6913
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6914
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6915
- : undefined,
6916
- TargetEventTypes: output.TargetEventTypes !== undefined && output.TargetEventTypes !== null
6774
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
6775
+ TargetEventTypes: output.TargetEventTypes != null
6917
6776
  ? deserializeAws_json1_1TargetEventTypes(output.TargetEventTypes, context)
6918
6777
  : undefined,
6919
6778
  };
@@ -6936,7 +6795,7 @@ var deserializeAws_json1_1ImportModelResponse = function (output, context) {
6936
6795
  };
6937
6796
  var deserializeAws_json1_1InputDataConfig = function (output, context) {
6938
6797
  return {
6939
- DocumentReaderConfig: output.DocumentReaderConfig !== undefined && output.DocumentReaderConfig !== null
6798
+ DocumentReaderConfig: output.DocumentReaderConfig != null
6940
6799
  ? deserializeAws_json1_1DocumentReaderConfig(output.DocumentReaderConfig, context)
6941
6800
  : undefined,
6942
6801
  InputFormat: __expectString(output.InputFormat),
@@ -6974,10 +6833,8 @@ var deserializeAws_json1_1KeyPhrase = function (output, context) {
6974
6833
  var deserializeAws_json1_1KeyPhrasesDetectionJobProperties = function (output, context) {
6975
6834
  return {
6976
6835
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
6977
- EndTime: output.EndTime !== undefined && output.EndTime !== null
6978
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
6979
- : undefined,
6980
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
6836
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
6837
+ InputDataConfig: output.InputDataConfig != null
6981
6838
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
6982
6839
  : undefined,
6983
6840
  JobArn: __expectString(output.JobArn),
@@ -6986,16 +6843,12 @@ var deserializeAws_json1_1KeyPhrasesDetectionJobProperties = function (output, c
6986
6843
  JobStatus: __expectString(output.JobStatus),
6987
6844
  LanguageCode: __expectString(output.LanguageCode),
6988
6845
  Message: __expectString(output.Message),
6989
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
6846
+ OutputDataConfig: output.OutputDataConfig != null
6990
6847
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
6991
6848
  : undefined,
6992
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
6993
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
6994
- : undefined,
6849
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
6995
6850
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
6996
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
6997
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
6998
- : undefined,
6851
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
6999
6852
  };
7000
6853
  };
7001
6854
  var deserializeAws_json1_1KeyPhrasesDetectionJobPropertiesList = function (output, context) {
@@ -7016,8 +6869,7 @@ var deserializeAws_json1_1KmsKeyValidationException = function (output, context)
7016
6869
  };
7017
6870
  var deserializeAws_json1_1ListDocumentClassificationJobsResponse = function (output, context) {
7018
6871
  return {
7019
- DocumentClassificationJobPropertiesList: output.DocumentClassificationJobPropertiesList !== undefined &&
7020
- output.DocumentClassificationJobPropertiesList !== null
6872
+ DocumentClassificationJobPropertiesList: output.DocumentClassificationJobPropertiesList != null
7021
6873
  ? deserializeAws_json1_1DocumentClassificationJobPropertiesList(output.DocumentClassificationJobPropertiesList, context)
7022
6874
  : undefined,
7023
6875
  NextToken: __expectString(output.NextToken),
@@ -7025,7 +6877,7 @@ var deserializeAws_json1_1ListDocumentClassificationJobsResponse = function (out
7025
6877
  };
7026
6878
  var deserializeAws_json1_1ListDocumentClassifiersResponse = function (output, context) {
7027
6879
  return {
7028
- DocumentClassifierPropertiesList: output.DocumentClassifierPropertiesList !== undefined && output.DocumentClassifierPropertiesList !== null
6880
+ DocumentClassifierPropertiesList: output.DocumentClassifierPropertiesList != null
7029
6881
  ? deserializeAws_json1_1DocumentClassifierPropertiesList(output.DocumentClassifierPropertiesList, context)
7030
6882
  : undefined,
7031
6883
  NextToken: __expectString(output.NextToken),
@@ -7033,7 +6885,7 @@ var deserializeAws_json1_1ListDocumentClassifiersResponse = function (output, co
7033
6885
  };
7034
6886
  var deserializeAws_json1_1ListDocumentClassifierSummariesResponse = function (output, context) {
7035
6887
  return {
7036
- DocumentClassifierSummariesList: output.DocumentClassifierSummariesList !== undefined && output.DocumentClassifierSummariesList !== null
6888
+ DocumentClassifierSummariesList: output.DocumentClassifierSummariesList != null
7037
6889
  ? deserializeAws_json1_1DocumentClassifierSummariesList(output.DocumentClassifierSummariesList, context)
7038
6890
  : undefined,
7039
6891
  NextToken: __expectString(output.NextToken),
@@ -7041,8 +6893,7 @@ var deserializeAws_json1_1ListDocumentClassifierSummariesResponse = function (ou
7041
6893
  };
7042
6894
  var deserializeAws_json1_1ListDominantLanguageDetectionJobsResponse = function (output, context) {
7043
6895
  return {
7044
- DominantLanguageDetectionJobPropertiesList: output.DominantLanguageDetectionJobPropertiesList !== undefined &&
7045
- output.DominantLanguageDetectionJobPropertiesList !== null
6896
+ DominantLanguageDetectionJobPropertiesList: output.DominantLanguageDetectionJobPropertiesList != null
7046
6897
  ? deserializeAws_json1_1DominantLanguageDetectionJobPropertiesList(output.DominantLanguageDetectionJobPropertiesList, context)
7047
6898
  : undefined,
7048
6899
  NextToken: __expectString(output.NextToken),
@@ -7050,7 +6901,7 @@ var deserializeAws_json1_1ListDominantLanguageDetectionJobsResponse = function (
7050
6901
  };
7051
6902
  var deserializeAws_json1_1ListEndpointsResponse = function (output, context) {
7052
6903
  return {
7053
- EndpointPropertiesList: output.EndpointPropertiesList !== undefined && output.EndpointPropertiesList !== null
6904
+ EndpointPropertiesList: output.EndpointPropertiesList != null
7054
6905
  ? deserializeAws_json1_1EndpointPropertiesList(output.EndpointPropertiesList, context)
7055
6906
  : undefined,
7056
6907
  NextToken: __expectString(output.NextToken),
@@ -7058,7 +6909,7 @@ var deserializeAws_json1_1ListEndpointsResponse = function (output, context) {
7058
6909
  };
7059
6910
  var deserializeAws_json1_1ListEntitiesDetectionJobsResponse = function (output, context) {
7060
6911
  return {
7061
- EntitiesDetectionJobPropertiesList: output.EntitiesDetectionJobPropertiesList !== undefined && output.EntitiesDetectionJobPropertiesList !== null
6912
+ EntitiesDetectionJobPropertiesList: output.EntitiesDetectionJobPropertiesList != null
7062
6913
  ? deserializeAws_json1_1EntitiesDetectionJobPropertiesList(output.EntitiesDetectionJobPropertiesList, context)
7063
6914
  : undefined,
7064
6915
  NextToken: __expectString(output.NextToken),
@@ -7066,7 +6917,7 @@ var deserializeAws_json1_1ListEntitiesDetectionJobsResponse = function (output,
7066
6917
  };
7067
6918
  var deserializeAws_json1_1ListEntityRecognizersResponse = function (output, context) {
7068
6919
  return {
7069
- EntityRecognizerPropertiesList: output.EntityRecognizerPropertiesList !== undefined && output.EntityRecognizerPropertiesList !== null
6920
+ EntityRecognizerPropertiesList: output.EntityRecognizerPropertiesList != null
7070
6921
  ? deserializeAws_json1_1EntityRecognizerPropertiesList(output.EntityRecognizerPropertiesList, context)
7071
6922
  : undefined,
7072
6923
  NextToken: __expectString(output.NextToken),
@@ -7074,7 +6925,7 @@ var deserializeAws_json1_1ListEntityRecognizersResponse = function (output, cont
7074
6925
  };
7075
6926
  var deserializeAws_json1_1ListEntityRecognizerSummariesResponse = function (output, context) {
7076
6927
  return {
7077
- EntityRecognizerSummariesList: output.EntityRecognizerSummariesList !== undefined && output.EntityRecognizerSummariesList !== null
6928
+ EntityRecognizerSummariesList: output.EntityRecognizerSummariesList != null
7078
6929
  ? deserializeAws_json1_1EntityRecognizerSummariesList(output.EntityRecognizerSummariesList, context)
7079
6930
  : undefined,
7080
6931
  NextToken: __expectString(output.NextToken),
@@ -7082,7 +6933,7 @@ var deserializeAws_json1_1ListEntityRecognizerSummariesResponse = function (outp
7082
6933
  };
7083
6934
  var deserializeAws_json1_1ListEventsDetectionJobsResponse = function (output, context) {
7084
6935
  return {
7085
- EventsDetectionJobPropertiesList: output.EventsDetectionJobPropertiesList !== undefined && output.EventsDetectionJobPropertiesList !== null
6936
+ EventsDetectionJobPropertiesList: output.EventsDetectionJobPropertiesList != null
7086
6937
  ? deserializeAws_json1_1EventsDetectionJobPropertiesList(output.EventsDetectionJobPropertiesList, context)
7087
6938
  : undefined,
7088
6939
  NextToken: __expectString(output.NextToken),
@@ -7090,7 +6941,7 @@ var deserializeAws_json1_1ListEventsDetectionJobsResponse = function (output, co
7090
6941
  };
7091
6942
  var deserializeAws_json1_1ListKeyPhrasesDetectionJobsResponse = function (output, context) {
7092
6943
  return {
7093
- KeyPhrasesDetectionJobPropertiesList: output.KeyPhrasesDetectionJobPropertiesList !== undefined && output.KeyPhrasesDetectionJobPropertiesList !== null
6944
+ KeyPhrasesDetectionJobPropertiesList: output.KeyPhrasesDetectionJobPropertiesList != null
7094
6945
  ? deserializeAws_json1_1KeyPhrasesDetectionJobPropertiesList(output.KeyPhrasesDetectionJobPropertiesList, context)
7095
6946
  : undefined,
7096
6947
  NextToken: __expectString(output.NextToken),
@@ -7264,8 +7115,7 @@ var deserializeAws_json1_1ListOfSyntaxTokens = function (output, context) {
7264
7115
  var deserializeAws_json1_1ListPiiEntitiesDetectionJobsResponse = function (output, context) {
7265
7116
  return {
7266
7117
  NextToken: __expectString(output.NextToken),
7267
- PiiEntitiesDetectionJobPropertiesList: output.PiiEntitiesDetectionJobPropertiesList !== undefined &&
7268
- output.PiiEntitiesDetectionJobPropertiesList !== null
7118
+ PiiEntitiesDetectionJobPropertiesList: output.PiiEntitiesDetectionJobPropertiesList != null
7269
7119
  ? deserializeAws_json1_1PiiEntitiesDetectionJobPropertiesList(output.PiiEntitiesDetectionJobPropertiesList, context)
7270
7120
  : undefined,
7271
7121
  };
@@ -7273,7 +7123,7 @@ var deserializeAws_json1_1ListPiiEntitiesDetectionJobsResponse = function (outpu
7273
7123
  var deserializeAws_json1_1ListSentimentDetectionJobsResponse = function (output, context) {
7274
7124
  return {
7275
7125
  NextToken: __expectString(output.NextToken),
7276
- SentimentDetectionJobPropertiesList: output.SentimentDetectionJobPropertiesList !== undefined && output.SentimentDetectionJobPropertiesList !== null
7126
+ SentimentDetectionJobPropertiesList: output.SentimentDetectionJobPropertiesList != null
7277
7127
  ? deserializeAws_json1_1SentimentDetectionJobPropertiesList(output.SentimentDetectionJobPropertiesList, context)
7278
7128
  : undefined,
7279
7129
  };
@@ -7281,16 +7131,13 @@ var deserializeAws_json1_1ListSentimentDetectionJobsResponse = function (output,
7281
7131
  var deserializeAws_json1_1ListTagsForResourceResponse = function (output, context) {
7282
7132
  return {
7283
7133
  ResourceArn: __expectString(output.ResourceArn),
7284
- Tags: output.Tags !== undefined && output.Tags !== null
7285
- ? deserializeAws_json1_1TagList(output.Tags, context)
7286
- : undefined,
7134
+ Tags: output.Tags != null ? deserializeAws_json1_1TagList(output.Tags, context) : undefined,
7287
7135
  };
7288
7136
  };
7289
7137
  var deserializeAws_json1_1ListTargetedSentimentDetectionJobsResponse = function (output, context) {
7290
7138
  return {
7291
7139
  NextToken: __expectString(output.NextToken),
7292
- TargetedSentimentDetectionJobPropertiesList: output.TargetedSentimentDetectionJobPropertiesList !== undefined &&
7293
- output.TargetedSentimentDetectionJobPropertiesList !== null
7140
+ TargetedSentimentDetectionJobPropertiesList: output.TargetedSentimentDetectionJobPropertiesList != null
7294
7141
  ? deserializeAws_json1_1TargetedSentimentDetectionJobPropertiesList(output.TargetedSentimentDetectionJobPropertiesList, context)
7295
7142
  : undefined,
7296
7143
  };
@@ -7298,7 +7145,7 @@ var deserializeAws_json1_1ListTargetedSentimentDetectionJobsResponse = function
7298
7145
  var deserializeAws_json1_1ListTopicsDetectionJobsResponse = function (output, context) {
7299
7146
  return {
7300
7147
  NextToken: __expectString(output.NextToken),
7301
- TopicsDetectionJobPropertiesList: output.TopicsDetectionJobPropertiesList !== undefined && output.TopicsDetectionJobPropertiesList !== null
7148
+ TopicsDetectionJobPropertiesList: output.TopicsDetectionJobPropertiesList != null
7302
7149
  ? deserializeAws_json1_1TopicsDetectionJobPropertiesList(output.TopicsDetectionJobPropertiesList, context)
7303
7150
  : undefined,
7304
7151
  };
@@ -7318,10 +7165,8 @@ var deserializeAws_json1_1PartOfSpeechTag = function (output, context) {
7318
7165
  var deserializeAws_json1_1PiiEntitiesDetectionJobProperties = function (output, context) {
7319
7166
  return {
7320
7167
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7321
- EndTime: output.EndTime !== undefined && output.EndTime !== null
7322
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7323
- : undefined,
7324
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7168
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
7169
+ InputDataConfig: output.InputDataConfig != null
7325
7170
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7326
7171
  : undefined,
7327
7172
  JobArn: __expectString(output.JobArn),
@@ -7331,15 +7176,13 @@ var deserializeAws_json1_1PiiEntitiesDetectionJobProperties = function (output,
7331
7176
  LanguageCode: __expectString(output.LanguageCode),
7332
7177
  Message: __expectString(output.Message),
7333
7178
  Mode: __expectString(output.Mode),
7334
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
7179
+ OutputDataConfig: output.OutputDataConfig != null
7335
7180
  ? deserializeAws_json1_1PiiOutputDataConfig(output.OutputDataConfig, context)
7336
7181
  : undefined,
7337
- RedactionConfig: output.RedactionConfig !== undefined && output.RedactionConfig !== null
7182
+ RedactionConfig: output.RedactionConfig != null
7338
7183
  ? deserializeAws_json1_1RedactionConfig(output.RedactionConfig, context)
7339
7184
  : undefined,
7340
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7341
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7342
- : undefined,
7185
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
7343
7186
  };
7344
7187
  };
7345
7188
  var deserializeAws_json1_1PiiEntitiesDetectionJobPropertiesList = function (output, context) {
@@ -7376,7 +7219,7 @@ var deserializeAws_json1_1RedactionConfig = function (output, context) {
7376
7219
  return {
7377
7220
  MaskCharacter: __expectString(output.MaskCharacter),
7378
7221
  MaskMode: __expectString(output.MaskMode),
7379
- PiiEntityTypes: output.PiiEntityTypes !== undefined && output.PiiEntityTypes !== null
7222
+ PiiEntityTypes: output.PiiEntityTypes != null
7380
7223
  ? deserializeAws_json1_1ListOfPiiEntityTypes(output.PiiEntityTypes, context)
7381
7224
  : undefined,
7382
7225
  };
@@ -7415,10 +7258,8 @@ var deserializeAws_json1_1SecurityGroupIds = function (output, context) {
7415
7258
  var deserializeAws_json1_1SentimentDetectionJobProperties = function (output, context) {
7416
7259
  return {
7417
7260
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7418
- EndTime: output.EndTime !== undefined && output.EndTime !== null
7419
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7420
- : undefined,
7421
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7261
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
7262
+ InputDataConfig: output.InputDataConfig != null
7422
7263
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7423
7264
  : undefined,
7424
7265
  JobArn: __expectString(output.JobArn),
@@ -7427,16 +7268,12 @@ var deserializeAws_json1_1SentimentDetectionJobProperties = function (output, co
7427
7268
  JobStatus: __expectString(output.JobStatus),
7428
7269
  LanguageCode: __expectString(output.LanguageCode),
7429
7270
  Message: __expectString(output.Message),
7430
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
7271
+ OutputDataConfig: output.OutputDataConfig != null
7431
7272
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
7432
7273
  : undefined,
7433
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7434
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7435
- : undefined,
7274
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
7436
7275
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
7437
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
7438
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
7439
- : undefined,
7276
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
7440
7277
  };
7441
7278
  };
7442
7279
  var deserializeAws_json1_1SentimentDetectionJobPropertiesList = function (output, context) {
@@ -7584,9 +7421,7 @@ var deserializeAws_json1_1SyntaxToken = function (output, context) {
7584
7421
  return {
7585
7422
  BeginOffset: __expectInt32(output.BeginOffset),
7586
7423
  EndOffset: __expectInt32(output.EndOffset),
7587
- PartOfSpeech: output.PartOfSpeech !== undefined && output.PartOfSpeech !== null
7588
- ? deserializeAws_json1_1PartOfSpeechTag(output.PartOfSpeech, context)
7589
- : undefined,
7424
+ PartOfSpeech: output.PartOfSpeech != null ? deserializeAws_json1_1PartOfSpeechTag(output.PartOfSpeech, context) : undefined,
7590
7425
  Text: __expectString(output.Text),
7591
7426
  TokenId: __expectInt32(output.TokenId),
7592
7427
  };
@@ -7614,10 +7449,8 @@ var deserializeAws_json1_1TagResourceResponse = function (output, context) {
7614
7449
  var deserializeAws_json1_1TargetedSentimentDetectionJobProperties = function (output, context) {
7615
7450
  return {
7616
7451
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7617
- EndTime: output.EndTime !== undefined && output.EndTime !== null
7618
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7619
- : undefined,
7620
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7452
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
7453
+ InputDataConfig: output.InputDataConfig != null
7621
7454
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7622
7455
  : undefined,
7623
7456
  JobArn: __expectString(output.JobArn),
@@ -7626,16 +7459,12 @@ var deserializeAws_json1_1TargetedSentimentDetectionJobProperties = function (ou
7626
7459
  JobStatus: __expectString(output.JobStatus),
7627
7460
  LanguageCode: __expectString(output.LanguageCode),
7628
7461
  Message: __expectString(output.Message),
7629
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
7462
+ OutputDataConfig: output.OutputDataConfig != null
7630
7463
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
7631
7464
  : undefined,
7632
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7633
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7634
- : undefined,
7465
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
7635
7466
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
7636
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
7637
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
7638
- : undefined,
7467
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
7639
7468
  };
7640
7469
  };
7641
7470
  var deserializeAws_json1_1TargetedSentimentDetectionJobPropertiesList = function (output, context) {
@@ -7683,10 +7512,8 @@ var deserializeAws_json1_1TooManyTagsException = function (output, context) {
7683
7512
  var deserializeAws_json1_1TopicsDetectionJobProperties = function (output, context) {
7684
7513
  return {
7685
7514
  DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
7686
- EndTime: output.EndTime !== undefined && output.EndTime !== null
7687
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime)))
7688
- : undefined,
7689
- InputDataConfig: output.InputDataConfig !== undefined && output.InputDataConfig !== null
7515
+ EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
7516
+ InputDataConfig: output.InputDataConfig != null
7690
7517
  ? deserializeAws_json1_1InputDataConfig(output.InputDataConfig, context)
7691
7518
  : undefined,
7692
7519
  JobArn: __expectString(output.JobArn),
@@ -7695,16 +7522,12 @@ var deserializeAws_json1_1TopicsDetectionJobProperties = function (output, conte
7695
7522
  JobStatus: __expectString(output.JobStatus),
7696
7523
  Message: __expectString(output.Message),
7697
7524
  NumberOfTopics: __expectInt32(output.NumberOfTopics),
7698
- OutputDataConfig: output.OutputDataConfig !== undefined && output.OutputDataConfig !== null
7525
+ OutputDataConfig: output.OutputDataConfig != null
7699
7526
  ? deserializeAws_json1_1OutputDataConfig(output.OutputDataConfig, context)
7700
7527
  : undefined,
7701
- SubmitTime: output.SubmitTime !== undefined && output.SubmitTime !== null
7702
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime)))
7703
- : undefined,
7528
+ SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
7704
7529
  VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId),
7705
- VpcConfig: output.VpcConfig !== undefined && output.VpcConfig !== null
7706
- ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context)
7707
- : undefined,
7530
+ VpcConfig: output.VpcConfig != null ? deserializeAws_json1_1VpcConfig(output.VpcConfig, context) : undefined,
7708
7531
  };
7709
7532
  };
7710
7533
  var deserializeAws_json1_1TopicsDetectionJobPropertiesList = function (output, context) {
@@ -7731,12 +7554,10 @@ var deserializeAws_json1_1UpdateEndpointResponse = function (output, context) {
7731
7554
  };
7732
7555
  var deserializeAws_json1_1VpcConfig = function (output, context) {
7733
7556
  return {
7734
- SecurityGroupIds: output.SecurityGroupIds !== undefined && output.SecurityGroupIds !== null
7557
+ SecurityGroupIds: output.SecurityGroupIds != null
7735
7558
  ? deserializeAws_json1_1SecurityGroupIds(output.SecurityGroupIds, context)
7736
7559
  : undefined,
7737
- Subnets: output.Subnets !== undefined && output.Subnets !== null
7738
- ? deserializeAws_json1_1Subnets(output.Subnets, context)
7739
- : undefined,
7560
+ Subnets: output.Subnets != null ? deserializeAws_json1_1Subnets(output.Subnets, context) : undefined,
7740
7561
  };
7741
7562
  };
7742
7563
  var deserializeMetadata = function (output) {
@@ -7813,5 +7634,4 @@ var loadRestJsonErrorCode = function (output, data) {
7813
7634
  if (data["__type"] !== undefined) {
7814
7635
  return sanitizeErrorCode(data["__type"]);
7815
7636
  }
7816
- return "";
7817
7637
  };