@aws-sdk/client-dataexchange 3.118.0 → 3.127.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.
@@ -40,11 +40,10 @@ const serializeAws_restJson1CreateDataSetCommand = async (input, context) => {
40
40
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets";
41
41
  let body;
42
42
  body = JSON.stringify({
43
- ...(input.AssetType !== undefined && input.AssetType !== null && { AssetType: input.AssetType }),
44
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
45
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
46
- ...(input.Tags !== undefined &&
47
- input.Tags !== null && { Tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
43
+ ...(input.AssetType != null && { AssetType: input.AssetType }),
44
+ ...(input.Description != null && { Description: input.Description }),
45
+ ...(input.Name != null && { Name: input.Name }),
46
+ ...(input.Tags != null && { Tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
48
47
  });
49
48
  return new protocol_http_1.HttpRequest({
50
49
  protocol,
@@ -65,10 +64,8 @@ const serializeAws_restJson1CreateEventActionCommand = async (input, context) =>
65
64
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions";
66
65
  let body;
67
66
  body = JSON.stringify({
68
- ...(input.Action !== undefined &&
69
- input.Action !== null && { Action: serializeAws_restJson1Action(input.Action, context) }),
70
- ...(input.Event !== undefined &&
71
- input.Event !== null && { Event: serializeAws_restJson1Event(input.Event, context) }),
67
+ ...(input.Action != null && { Action: serializeAws_restJson1Action(input.Action, context) }),
68
+ ...(input.Event != null && { Event: serializeAws_restJson1Event(input.Event, context) }),
72
69
  });
73
70
  return new protocol_http_1.HttpRequest({
74
71
  protocol,
@@ -89,9 +86,8 @@ const serializeAws_restJson1CreateJobCommand = async (input, context) => {
89
86
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs";
90
87
  let body;
91
88
  body = JSON.stringify({
92
- ...(input.Details !== undefined &&
93
- input.Details !== null && { Details: serializeAws_restJson1RequestDetails(input.Details, context) }),
94
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
89
+ ...(input.Details != null && { Details: serializeAws_restJson1RequestDetails(input.Details, context) }),
90
+ ...(input.Type != null && { Type: input.Type }),
95
91
  });
96
92
  return new protocol_http_1.HttpRequest({
97
93
  protocol,
@@ -122,9 +118,8 @@ const serializeAws_restJson1CreateRevisionCommand = async (input, context) => {
122
118
  }
123
119
  let body;
124
120
  body = JSON.stringify({
125
- ...(input.Comment !== undefined && input.Comment !== null && { Comment: input.Comment }),
126
- ...(input.Tags !== undefined &&
127
- input.Tags !== null && { Tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
121
+ ...(input.Comment != null && { Comment: input.Comment }),
122
+ ...(input.Tags != null && { Tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
128
123
  });
129
124
  return new protocol_http_1.HttpRequest({
130
125
  protocol,
@@ -630,8 +625,7 @@ const serializeAws_restJson1RevokeRevisionCommand = async (input, context) => {
630
625
  }
631
626
  let body;
632
627
  body = JSON.stringify({
633
- ...(input.RevocationComment !== undefined &&
634
- input.RevocationComment !== null && { RevocationComment: input.RevocationComment }),
628
+ ...(input.RevocationComment != null && { RevocationComment: input.RevocationComment }),
635
629
  });
636
630
  return new protocol_http_1.HttpRequest({
637
631
  protocol,
@@ -730,8 +724,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
730
724
  }
731
725
  let body;
732
726
  body = JSON.stringify({
733
- ...(input.Tags !== undefined &&
734
- input.Tags !== null && { tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
727
+ ...(input.Tags != null && { tags: serializeAws_restJson1MapOf__string(input.Tags, context) }),
735
728
  });
736
729
  return new protocol_http_1.HttpRequest({
737
730
  protocol,
@@ -813,7 +806,7 @@ const serializeAws_restJson1UpdateAssetCommand = async (input, context) => {
813
806
  }
814
807
  let body;
815
808
  body = JSON.stringify({
816
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
809
+ ...(input.Name != null && { Name: input.Name }),
817
810
  });
818
811
  return new protocol_http_1.HttpRequest({
819
812
  protocol,
@@ -844,8 +837,8 @@ const serializeAws_restJson1UpdateDataSetCommand = async (input, context) => {
844
837
  }
845
838
  let body;
846
839
  body = JSON.stringify({
847
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
848
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
840
+ ...(input.Description != null && { Description: input.Description }),
841
+ ...(input.Name != null && { Name: input.Name }),
849
842
  });
850
843
  return new protocol_http_1.HttpRequest({
851
844
  protocol,
@@ -876,8 +869,7 @@ const serializeAws_restJson1UpdateEventActionCommand = async (input, context) =>
876
869
  }
877
870
  let body;
878
871
  body = JSON.stringify({
879
- ...(input.Action !== undefined &&
880
- input.Action !== null && { Action: serializeAws_restJson1Action(input.Action, context) }),
872
+ ...(input.Action != null && { Action: serializeAws_restJson1Action(input.Action, context) }),
881
873
  });
882
874
  return new protocol_http_1.HttpRequest({
883
875
  protocol,
@@ -919,8 +911,8 @@ const serializeAws_restJson1UpdateRevisionCommand = async (input, context) => {
919
911
  }
920
912
  let body;
921
913
  body = JSON.stringify({
922
- ...(input.Comment !== undefined && input.Comment !== null && { Comment: input.Comment }),
923
- ...(input.Finalized !== undefined && input.Finalized !== null && { Finalized: input.Finalized }),
914
+ ...(input.Comment != null && { Comment: input.Comment }),
915
+ ...(input.Finalized != null && { Finalized: input.Finalized }),
924
916
  });
925
917
  return new protocol_http_1.HttpRequest({
926
918
  protocol,
@@ -950,8 +942,7 @@ const deserializeAws_restJson1CancelJobCommandError = async (output, context) =>
950
942
  body: await parseBody(output.body, context),
951
943
  };
952
944
  let response;
953
- let errorCode = "UnknownError";
954
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
945
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
955
946
  switch (errorCode) {
956
947
  case "ConflictException":
957
948
  case "com.amazonaws.dataexchange#ConflictException":
@@ -970,10 +961,12 @@ const deserializeAws_restJson1CancelJobCommandError = async (output, context) =>
970
961
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
971
962
  default:
972
963
  const parsedBody = parsedOutput.body;
964
+ const $metadata = deserializeMetadata(output);
965
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
973
966
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
974
- name: parsedBody.code || parsedBody.Code || errorCode,
967
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
975
968
  $fault: "client",
976
- $metadata: deserializeMetadata(output),
969
+ $metadata,
977
970
  });
978
971
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
979
972
  }
@@ -1039,8 +1032,7 @@ const deserializeAws_restJson1CreateDataSetCommandError = async (output, context
1039
1032
  body: await parseBody(output.body, context),
1040
1033
  };
1041
1034
  let response;
1042
- let errorCode = "UnknownError";
1043
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1035
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1044
1036
  switch (errorCode) {
1045
1037
  case "AccessDeniedException":
1046
1038
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -1059,10 +1051,12 @@ const deserializeAws_restJson1CreateDataSetCommandError = async (output, context
1059
1051
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1060
1052
  default:
1061
1053
  const parsedBody = parsedOutput.body;
1054
+ const $metadata = deserializeMetadata(output);
1055
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1062
1056
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1063
- name: parsedBody.code || parsedBody.Code || errorCode,
1057
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1064
1058
  $fault: "client",
1065
- $metadata: deserializeMetadata(output),
1059
+ $metadata,
1066
1060
  });
1067
1061
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1068
1062
  }
@@ -1108,8 +1102,7 @@ const deserializeAws_restJson1CreateEventActionCommandError = async (output, con
1108
1102
  body: await parseBody(output.body, context),
1109
1103
  };
1110
1104
  let response;
1111
- let errorCode = "UnknownError";
1112
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1105
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1113
1106
  switch (errorCode) {
1114
1107
  case "AccessDeniedException":
1115
1108
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -1128,10 +1121,12 @@ const deserializeAws_restJson1CreateEventActionCommandError = async (output, con
1128
1121
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1129
1122
  default:
1130
1123
  const parsedBody = parsedOutput.body;
1124
+ const $metadata = deserializeMetadata(output);
1125
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1131
1126
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1132
- name: parsedBody.code || parsedBody.Code || errorCode,
1127
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1133
1128
  $fault: "client",
1134
- $metadata: deserializeMetadata(output),
1129
+ $metadata,
1135
1130
  });
1136
1131
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1137
1132
  }
@@ -1185,8 +1180,7 @@ const deserializeAws_restJson1CreateJobCommandError = async (output, context) =>
1185
1180
  body: await parseBody(output.body, context),
1186
1181
  };
1187
1182
  let response;
1188
- let errorCode = "UnknownError";
1189
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1183
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1190
1184
  switch (errorCode) {
1191
1185
  case "AccessDeniedException":
1192
1186
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -1208,10 +1202,12 @@ const deserializeAws_restJson1CreateJobCommandError = async (output, context) =>
1208
1202
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1209
1203
  default:
1210
1204
  const parsedBody = parsedOutput.body;
1205
+ const $metadata = deserializeMetadata(output);
1206
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1211
1207
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1212
- name: parsedBody.code || parsedBody.Code || errorCode,
1208
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1213
1209
  $fault: "client",
1214
- $metadata: deserializeMetadata(output),
1210
+ $metadata,
1215
1211
  });
1216
1212
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1217
1213
  }
@@ -1281,8 +1277,7 @@ const deserializeAws_restJson1CreateRevisionCommandError = async (output, contex
1281
1277
  body: await parseBody(output.body, context),
1282
1278
  };
1283
1279
  let response;
1284
- let errorCode = "UnknownError";
1285
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1280
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1286
1281
  switch (errorCode) {
1287
1282
  case "AccessDeniedException":
1288
1283
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -1301,10 +1296,12 @@ const deserializeAws_restJson1CreateRevisionCommandError = async (output, contex
1301
1296
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1302
1297
  default:
1303
1298
  const parsedBody = parsedOutput.body;
1299
+ const $metadata = deserializeMetadata(output);
1300
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1304
1301
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1305
- name: parsedBody.code || parsedBody.Code || errorCode,
1302
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1306
1303
  $fault: "client",
1307
- $metadata: deserializeMetadata(output),
1304
+ $metadata,
1308
1305
  });
1309
1306
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1310
1307
  }
@@ -1326,8 +1323,7 @@ const deserializeAws_restJson1DeleteAssetCommandError = async (output, context)
1326
1323
  body: await parseBody(output.body, context),
1327
1324
  };
1328
1325
  let response;
1329
- let errorCode = "UnknownError";
1330
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1326
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1331
1327
  switch (errorCode) {
1332
1328
  case "AccessDeniedException":
1333
1329
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -1349,10 +1345,12 @@ const deserializeAws_restJson1DeleteAssetCommandError = async (output, context)
1349
1345
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1350
1346
  default:
1351
1347
  const parsedBody = parsedOutput.body;
1348
+ const $metadata = deserializeMetadata(output);
1349
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1352
1350
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1353
- name: parsedBody.code || parsedBody.Code || errorCode,
1351
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1354
1352
  $fault: "client",
1355
- $metadata: deserializeMetadata(output),
1353
+ $metadata,
1356
1354
  });
1357
1355
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1358
1356
  }
@@ -1374,8 +1372,7 @@ const deserializeAws_restJson1DeleteDataSetCommandError = async (output, context
1374
1372
  body: await parseBody(output.body, context),
1375
1373
  };
1376
1374
  let response;
1377
- let errorCode = "UnknownError";
1378
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1375
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1379
1376
  switch (errorCode) {
1380
1377
  case "AccessDeniedException":
1381
1378
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -1397,10 +1394,12 @@ const deserializeAws_restJson1DeleteDataSetCommandError = async (output, context
1397
1394
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1398
1395
  default:
1399
1396
  const parsedBody = parsedOutput.body;
1397
+ const $metadata = deserializeMetadata(output);
1398
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1400
1399
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1401
- name: parsedBody.code || parsedBody.Code || errorCode,
1400
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1402
1401
  $fault: "client",
1403
- $metadata: deserializeMetadata(output),
1402
+ $metadata,
1404
1403
  });
1405
1404
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1406
1405
  }
@@ -1422,8 +1421,7 @@ const deserializeAws_restJson1DeleteEventActionCommandError = async (output, con
1422
1421
  body: await parseBody(output.body, context),
1423
1422
  };
1424
1423
  let response;
1425
- let errorCode = "UnknownError";
1426
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1424
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1427
1425
  switch (errorCode) {
1428
1426
  case "InternalServerException":
1429
1427
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -1439,10 +1437,12 @@ const deserializeAws_restJson1DeleteEventActionCommandError = async (output, con
1439
1437
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1440
1438
  default:
1441
1439
  const parsedBody = parsedOutput.body;
1440
+ const $metadata = deserializeMetadata(output);
1441
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1442
1442
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1443
- name: parsedBody.code || parsedBody.Code || errorCode,
1443
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1444
1444
  $fault: "client",
1445
- $metadata: deserializeMetadata(output),
1445
+ $metadata,
1446
1446
  });
1447
1447
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1448
1448
  }
@@ -1464,8 +1464,7 @@ const deserializeAws_restJson1DeleteRevisionCommandError = async (output, contex
1464
1464
  body: await parseBody(output.body, context),
1465
1465
  };
1466
1466
  let response;
1467
- let errorCode = "UnknownError";
1468
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1467
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1469
1468
  switch (errorCode) {
1470
1469
  case "AccessDeniedException":
1471
1470
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -1487,10 +1486,12 @@ const deserializeAws_restJson1DeleteRevisionCommandError = async (output, contex
1487
1486
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1488
1487
  default:
1489
1488
  const parsedBody = parsedOutput.body;
1489
+ const $metadata = deserializeMetadata(output);
1490
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1490
1491
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1491
- name: parsedBody.code || parsedBody.Code || errorCode,
1492
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1492
1493
  $fault: "client",
1493
- $metadata: deserializeMetadata(output),
1494
+ $metadata,
1494
1495
  });
1495
1496
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1496
1497
  }
@@ -1552,8 +1553,7 @@ const deserializeAws_restJson1GetAssetCommandError = async (output, context) =>
1552
1553
  body: await parseBody(output.body, context),
1553
1554
  };
1554
1555
  let response;
1555
- let errorCode = "UnknownError";
1556
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1556
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1557
1557
  switch (errorCode) {
1558
1558
  case "InternalServerException":
1559
1559
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -1569,10 +1569,12 @@ const deserializeAws_restJson1GetAssetCommandError = async (output, context) =>
1569
1569
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1570
1570
  default:
1571
1571
  const parsedBody = parsedOutput.body;
1572
+ const $metadata = deserializeMetadata(output);
1573
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1572
1574
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1573
- name: parsedBody.code || parsedBody.Code || errorCode,
1575
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1574
1576
  $fault: "client",
1575
- $metadata: deserializeMetadata(output),
1577
+ $metadata,
1576
1578
  });
1577
1579
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1578
1580
  }
@@ -1638,8 +1640,7 @@ const deserializeAws_restJson1GetDataSetCommandError = async (output, context) =
1638
1640
  body: await parseBody(output.body, context),
1639
1641
  };
1640
1642
  let response;
1641
- let errorCode = "UnknownError";
1642
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1643
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1643
1644
  switch (errorCode) {
1644
1645
  case "InternalServerException":
1645
1646
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -1655,10 +1656,12 @@ const deserializeAws_restJson1GetDataSetCommandError = async (output, context) =
1655
1656
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1656
1657
  default:
1657
1658
  const parsedBody = parsedOutput.body;
1659
+ const $metadata = deserializeMetadata(output);
1660
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1658
1661
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1659
- name: parsedBody.code || parsedBody.Code || errorCode,
1662
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1660
1663
  $fault: "client",
1661
- $metadata: deserializeMetadata(output),
1664
+ $metadata,
1662
1665
  });
1663
1666
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1664
1667
  }
@@ -1704,8 +1707,7 @@ const deserializeAws_restJson1GetEventActionCommandError = async (output, contex
1704
1707
  body: await parseBody(output.body, context),
1705
1708
  };
1706
1709
  let response;
1707
- let errorCode = "UnknownError";
1708
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1710
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1709
1711
  switch (errorCode) {
1710
1712
  case "InternalServerException":
1711
1713
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -1721,10 +1723,12 @@ const deserializeAws_restJson1GetEventActionCommandError = async (output, contex
1721
1723
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1722
1724
  default:
1723
1725
  const parsedBody = parsedOutput.body;
1726
+ const $metadata = deserializeMetadata(output);
1727
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1724
1728
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1725
- name: parsedBody.code || parsedBody.Code || errorCode,
1729
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1726
1730
  $fault: "client",
1727
- $metadata: deserializeMetadata(output),
1731
+ $metadata,
1728
1732
  });
1729
1733
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1730
1734
  }
@@ -1778,8 +1782,7 @@ const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
1778
1782
  body: await parseBody(output.body, context),
1779
1783
  };
1780
1784
  let response;
1781
- let errorCode = "UnknownError";
1782
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1785
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1783
1786
  switch (errorCode) {
1784
1787
  case "InternalServerException":
1785
1788
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -1795,10 +1798,12 @@ const deserializeAws_restJson1GetJobCommandError = async (output, context) => {
1795
1798
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1796
1799
  default:
1797
1800
  const parsedBody = parsedOutput.body;
1801
+ const $metadata = deserializeMetadata(output);
1802
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1798
1803
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1799
- name: parsedBody.code || parsedBody.Code || errorCode,
1804
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1800
1805
  $fault: "client",
1801
- $metadata: deserializeMetadata(output),
1806
+ $metadata,
1802
1807
  });
1803
1808
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1804
1809
  }
@@ -1868,8 +1873,7 @@ const deserializeAws_restJson1GetRevisionCommandError = async (output, context)
1868
1873
  body: await parseBody(output.body, context),
1869
1874
  };
1870
1875
  let response;
1871
- let errorCode = "UnknownError";
1872
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1876
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1873
1877
  switch (errorCode) {
1874
1878
  case "InternalServerException":
1875
1879
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -1885,10 +1889,12 @@ const deserializeAws_restJson1GetRevisionCommandError = async (output, context)
1885
1889
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1886
1890
  default:
1887
1891
  const parsedBody = parsedOutput.body;
1892
+ const $metadata = deserializeMetadata(output);
1893
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1888
1894
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1889
- name: parsedBody.code || parsedBody.Code || errorCode,
1895
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1890
1896
  $fault: "client",
1891
- $metadata: deserializeMetadata(output),
1897
+ $metadata,
1892
1898
  });
1893
1899
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1894
1900
  }
@@ -1918,8 +1924,7 @@ const deserializeAws_restJson1ListDataSetRevisionsCommandError = async (output,
1918
1924
  body: await parseBody(output.body, context),
1919
1925
  };
1920
1926
  let response;
1921
- let errorCode = "UnknownError";
1922
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1927
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1923
1928
  switch (errorCode) {
1924
1929
  case "InternalServerException":
1925
1930
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -1935,10 +1940,12 @@ const deserializeAws_restJson1ListDataSetRevisionsCommandError = async (output,
1935
1940
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1936
1941
  default:
1937
1942
  const parsedBody = parsedOutput.body;
1943
+ const $metadata = deserializeMetadata(output);
1944
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1938
1945
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1939
- name: parsedBody.code || parsedBody.Code || errorCode,
1946
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1940
1947
  $fault: "client",
1941
- $metadata: deserializeMetadata(output),
1948
+ $metadata,
1942
1949
  });
1943
1950
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1944
1951
  }
@@ -1968,8 +1975,7 @@ const deserializeAws_restJson1ListDataSetsCommandError = async (output, context)
1968
1975
  body: await parseBody(output.body, context),
1969
1976
  };
1970
1977
  let response;
1971
- let errorCode = "UnknownError";
1972
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1978
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1973
1979
  switch (errorCode) {
1974
1980
  case "InternalServerException":
1975
1981
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -1985,10 +1991,12 @@ const deserializeAws_restJson1ListDataSetsCommandError = async (output, context)
1985
1991
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1986
1992
  default:
1987
1993
  const parsedBody = parsedOutput.body;
1994
+ const $metadata = deserializeMetadata(output);
1995
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1988
1996
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
1989
- name: parsedBody.code || parsedBody.Code || errorCode,
1997
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1990
1998
  $fault: "client",
1991
- $metadata: deserializeMetadata(output),
1999
+ $metadata,
1992
2000
  });
1993
2001
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1994
2002
  }
@@ -2018,8 +2026,7 @@ const deserializeAws_restJson1ListEventActionsCommandError = async (output, cont
2018
2026
  body: await parseBody(output.body, context),
2019
2027
  };
2020
2028
  let response;
2021
- let errorCode = "UnknownError";
2022
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2029
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2023
2030
  switch (errorCode) {
2024
2031
  case "InternalServerException":
2025
2032
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -2035,10 +2042,12 @@ const deserializeAws_restJson1ListEventActionsCommandError = async (output, cont
2035
2042
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2036
2043
  default:
2037
2044
  const parsedBody = parsedOutput.body;
2045
+ const $metadata = deserializeMetadata(output);
2046
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2038
2047
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2039
- name: parsedBody.code || parsedBody.Code || errorCode,
2048
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2040
2049
  $fault: "client",
2041
- $metadata: deserializeMetadata(output),
2050
+ $metadata,
2042
2051
  });
2043
2052
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2044
2053
  }
@@ -2068,8 +2077,7 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
2068
2077
  body: await parseBody(output.body, context),
2069
2078
  };
2070
2079
  let response;
2071
- let errorCode = "UnknownError";
2072
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2080
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2073
2081
  switch (errorCode) {
2074
2082
  case "InternalServerException":
2075
2083
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -2085,10 +2093,12 @@ const deserializeAws_restJson1ListJobsCommandError = async (output, context) =>
2085
2093
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2086
2094
  default:
2087
2095
  const parsedBody = parsedOutput.body;
2096
+ const $metadata = deserializeMetadata(output);
2097
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2088
2098
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2089
- name: parsedBody.code || parsedBody.Code || errorCode,
2099
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2090
2100
  $fault: "client",
2091
- $metadata: deserializeMetadata(output),
2101
+ $metadata,
2092
2102
  });
2093
2103
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2094
2104
  }
@@ -2118,8 +2128,7 @@ const deserializeAws_restJson1ListRevisionAssetsCommandError = async (output, co
2118
2128
  body: await parseBody(output.body, context),
2119
2129
  };
2120
2130
  let response;
2121
- let errorCode = "UnknownError";
2122
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2131
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2123
2132
  switch (errorCode) {
2124
2133
  case "InternalServerException":
2125
2134
  case "com.amazonaws.dataexchange#InternalServerException":
@@ -2135,10 +2144,12 @@ const deserializeAws_restJson1ListRevisionAssetsCommandError = async (output, co
2135
2144
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2136
2145
  default:
2137
2146
  const parsedBody = parsedOutput.body;
2147
+ const $metadata = deserializeMetadata(output);
2148
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2138
2149
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2139
- name: parsedBody.code || parsedBody.Code || errorCode,
2150
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2140
2151
  $fault: "client",
2141
- $metadata: deserializeMetadata(output),
2152
+ $metadata,
2142
2153
  });
2143
2154
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2144
2155
  }
@@ -2164,15 +2175,16 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2164
2175
  body: await parseBody(output.body, context),
2165
2176
  };
2166
2177
  let response;
2167
- let errorCode = "UnknownError";
2168
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2178
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2169
2179
  switch (errorCode) {
2170
2180
  default:
2171
2181
  const parsedBody = parsedOutput.body;
2182
+ const $metadata = deserializeMetadata(output);
2183
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2172
2184
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2173
- name: parsedBody.code || parsedBody.Code || errorCode,
2185
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2174
2186
  $fault: "client",
2175
- $metadata: deserializeMetadata(output),
2187
+ $metadata,
2176
2188
  });
2177
2189
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2178
2190
  }
@@ -2238,8 +2250,7 @@ const deserializeAws_restJson1RevokeRevisionCommandError = async (output, contex
2238
2250
  body: await parseBody(output.body, context),
2239
2251
  };
2240
2252
  let response;
2241
- let errorCode = "UnknownError";
2242
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2253
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2243
2254
  switch (errorCode) {
2244
2255
  case "AccessDeniedException":
2245
2256
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -2261,10 +2272,12 @@ const deserializeAws_restJson1RevokeRevisionCommandError = async (output, contex
2261
2272
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2262
2273
  default:
2263
2274
  const parsedBody = parsedOutput.body;
2275
+ const $metadata = deserializeMetadata(output);
2276
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2264
2277
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2265
- name: parsedBody.code || parsedBody.Code || errorCode,
2278
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2266
2279
  $fault: "client",
2267
- $metadata: deserializeMetadata(output),
2280
+ $metadata,
2268
2281
  });
2269
2282
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2270
2283
  }
@@ -2297,8 +2310,7 @@ const deserializeAws_restJson1SendApiAssetCommandError = async (output, context)
2297
2310
  body: await parseBody(output.body, context),
2298
2311
  };
2299
2312
  let response;
2300
- let errorCode = "UnknownError";
2301
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2313
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2302
2314
  switch (errorCode) {
2303
2315
  case "AccessDeniedException":
2304
2316
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -2317,10 +2329,12 @@ const deserializeAws_restJson1SendApiAssetCommandError = async (output, context)
2317
2329
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2318
2330
  default:
2319
2331
  const parsedBody = parsedOutput.body;
2332
+ const $metadata = deserializeMetadata(output);
2333
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2320
2334
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2321
- name: parsedBody.code || parsedBody.Code || errorCode,
2335
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2322
2336
  $fault: "client",
2323
- $metadata: deserializeMetadata(output),
2337
+ $metadata,
2324
2338
  });
2325
2339
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2326
2340
  }
@@ -2342,8 +2356,7 @@ const deserializeAws_restJson1StartJobCommandError = async (output, context) =>
2342
2356
  body: await parseBody(output.body, context),
2343
2357
  };
2344
2358
  let response;
2345
- let errorCode = "UnknownError";
2346
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2359
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2347
2360
  switch (errorCode) {
2348
2361
  case "AccessDeniedException":
2349
2362
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -2365,10 +2378,12 @@ const deserializeAws_restJson1StartJobCommandError = async (output, context) =>
2365
2378
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2366
2379
  default:
2367
2380
  const parsedBody = parsedOutput.body;
2381
+ const $metadata = deserializeMetadata(output);
2382
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2368
2383
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2369
- name: parsedBody.code || parsedBody.Code || errorCode,
2384
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2370
2385
  $fault: "client",
2371
- $metadata: deserializeMetadata(output),
2386
+ $metadata,
2372
2387
  });
2373
2388
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2374
2389
  }
@@ -2390,15 +2405,16 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2390
2405
  body: await parseBody(output.body, context),
2391
2406
  };
2392
2407
  let response;
2393
- let errorCode = "UnknownError";
2394
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2408
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2395
2409
  switch (errorCode) {
2396
2410
  default:
2397
2411
  const parsedBody = parsedOutput.body;
2412
+ const $metadata = deserializeMetadata(output);
2413
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2398
2414
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2399
- name: parsedBody.code || parsedBody.Code || errorCode,
2415
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2400
2416
  $fault: "client",
2401
- $metadata: deserializeMetadata(output),
2417
+ $metadata,
2402
2418
  });
2403
2419
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2404
2420
  }
@@ -2420,15 +2436,16 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
2420
2436
  body: await parseBody(output.body, context),
2421
2437
  };
2422
2438
  let response;
2423
- let errorCode = "UnknownError";
2424
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2439
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2425
2440
  switch (errorCode) {
2426
2441
  default:
2427
2442
  const parsedBody = parsedOutput.body;
2443
+ const $metadata = deserializeMetadata(output);
2444
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2428
2445
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2429
- name: parsedBody.code || parsedBody.Code || errorCode,
2446
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2430
2447
  $fault: "client",
2431
- $metadata: deserializeMetadata(output),
2448
+ $metadata,
2432
2449
  });
2433
2450
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2434
2451
  }
@@ -2490,8 +2507,7 @@ const deserializeAws_restJson1UpdateAssetCommandError = async (output, context)
2490
2507
  body: await parseBody(output.body, context),
2491
2508
  };
2492
2509
  let response;
2493
- let errorCode = "UnknownError";
2494
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2510
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2495
2511
  switch (errorCode) {
2496
2512
  case "AccessDeniedException":
2497
2513
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -2513,10 +2529,12 @@ const deserializeAws_restJson1UpdateAssetCommandError = async (output, context)
2513
2529
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2514
2530
  default:
2515
2531
  const parsedBody = parsedOutput.body;
2532
+ const $metadata = deserializeMetadata(output);
2533
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2516
2534
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2517
- name: parsedBody.code || parsedBody.Code || errorCode,
2535
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2518
2536
  $fault: "client",
2519
- $metadata: deserializeMetadata(output),
2537
+ $metadata,
2520
2538
  });
2521
2539
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2522
2540
  }
@@ -2578,8 +2596,7 @@ const deserializeAws_restJson1UpdateDataSetCommandError = async (output, context
2578
2596
  body: await parseBody(output.body, context),
2579
2597
  };
2580
2598
  let response;
2581
- let errorCode = "UnknownError";
2582
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2599
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2583
2600
  switch (errorCode) {
2584
2601
  case "AccessDeniedException":
2585
2602
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -2598,10 +2615,12 @@ const deserializeAws_restJson1UpdateDataSetCommandError = async (output, context
2598
2615
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2599
2616
  default:
2600
2617
  const parsedBody = parsedOutput.body;
2618
+ const $metadata = deserializeMetadata(output);
2619
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2601
2620
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2602
- name: parsedBody.code || parsedBody.Code || errorCode,
2621
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2603
2622
  $fault: "client",
2604
- $metadata: deserializeMetadata(output),
2623
+ $metadata,
2605
2624
  });
2606
2625
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2607
2626
  }
@@ -2647,8 +2666,7 @@ const deserializeAws_restJson1UpdateEventActionCommandError = async (output, con
2647
2666
  body: await parseBody(output.body, context),
2648
2667
  };
2649
2668
  let response;
2650
- let errorCode = "UnknownError";
2651
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2669
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2652
2670
  switch (errorCode) {
2653
2671
  case "AccessDeniedException":
2654
2672
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -2667,10 +2685,12 @@ const deserializeAws_restJson1UpdateEventActionCommandError = async (output, con
2667
2685
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2668
2686
  default:
2669
2687
  const parsedBody = parsedOutput.body;
2688
+ const $metadata = deserializeMetadata(output);
2689
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2670
2690
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2671
- name: parsedBody.code || parsedBody.Code || errorCode,
2691
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2672
2692
  $fault: "client",
2673
- $metadata: deserializeMetadata(output),
2693
+ $metadata,
2674
2694
  });
2675
2695
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2676
2696
  }
@@ -2736,8 +2756,7 @@ const deserializeAws_restJson1UpdateRevisionCommandError = async (output, contex
2736
2756
  body: await parseBody(output.body, context),
2737
2757
  };
2738
2758
  let response;
2739
- let errorCode = "UnknownError";
2740
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2759
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2741
2760
  switch (errorCode) {
2742
2761
  case "AccessDeniedException":
2743
2762
  case "com.amazonaws.dataexchange#AccessDeniedException":
@@ -2759,10 +2778,12 @@ const deserializeAws_restJson1UpdateRevisionCommandError = async (output, contex
2759
2778
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2760
2779
  default:
2761
2780
  const parsedBody = parsedOutput.body;
2781
+ const $metadata = deserializeMetadata(output);
2782
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2762
2783
  response = new DataExchangeServiceException_1.DataExchangeServiceException({
2763
- name: parsedBody.code || parsedBody.Code || errorCode,
2784
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2764
2785
  $fault: "client",
2765
- $metadata: deserializeMetadata(output),
2786
+ $metadata,
2766
2787
  });
2767
2788
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2768
2789
  }
@@ -2874,132 +2895,120 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
2874
2895
  };
2875
2896
  const serializeAws_restJson1Action = (input, context) => {
2876
2897
  return {
2877
- ...(input.ExportRevisionToS3 !== undefined &&
2878
- input.ExportRevisionToS3 !== null && {
2898
+ ...(input.ExportRevisionToS3 != null && {
2879
2899
  ExportRevisionToS3: serializeAws_restJson1AutoExportRevisionToS3RequestDetails(input.ExportRevisionToS3, context),
2880
2900
  }),
2881
2901
  };
2882
2902
  };
2883
2903
  const serializeAws_restJson1AssetDestinationEntry = (input, context) => {
2884
2904
  return {
2885
- ...(input.AssetId !== undefined && input.AssetId !== null && { AssetId: input.AssetId }),
2886
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
2887
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
2905
+ ...(input.AssetId != null && { AssetId: input.AssetId }),
2906
+ ...(input.Bucket != null && { Bucket: input.Bucket }),
2907
+ ...(input.Key != null && { Key: input.Key }),
2888
2908
  };
2889
2909
  };
2890
2910
  const serializeAws_restJson1AssetSourceEntry = (input, context) => {
2891
2911
  return {
2892
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
2893
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
2912
+ ...(input.Bucket != null && { Bucket: input.Bucket }),
2913
+ ...(input.Key != null && { Key: input.Key }),
2894
2914
  };
2895
2915
  };
2896
2916
  const serializeAws_restJson1AutoExportRevisionDestinationEntry = (input, context) => {
2897
2917
  return {
2898
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
2899
- ...(input.KeyPattern !== undefined && input.KeyPattern !== null && { KeyPattern: input.KeyPattern }),
2918
+ ...(input.Bucket != null && { Bucket: input.Bucket }),
2919
+ ...(input.KeyPattern != null && { KeyPattern: input.KeyPattern }),
2900
2920
  };
2901
2921
  };
2902
2922
  const serializeAws_restJson1AutoExportRevisionToS3RequestDetails = (input, context) => {
2903
2923
  return {
2904
- ...(input.Encryption !== undefined &&
2905
- input.Encryption !== null && {
2924
+ ...(input.Encryption != null && {
2906
2925
  Encryption: serializeAws_restJson1ExportServerSideEncryption(input.Encryption, context),
2907
2926
  }),
2908
- ...(input.RevisionDestination !== undefined &&
2909
- input.RevisionDestination !== null && {
2927
+ ...(input.RevisionDestination != null && {
2910
2928
  RevisionDestination: serializeAws_restJson1AutoExportRevisionDestinationEntry(input.RevisionDestination, context),
2911
2929
  }),
2912
2930
  };
2913
2931
  };
2914
2932
  const serializeAws_restJson1Event = (input, context) => {
2915
2933
  return {
2916
- ...(input.RevisionPublished !== undefined &&
2917
- input.RevisionPublished !== null && {
2934
+ ...(input.RevisionPublished != null && {
2918
2935
  RevisionPublished: serializeAws_restJson1RevisionPublished(input.RevisionPublished, context),
2919
2936
  }),
2920
2937
  };
2921
2938
  };
2922
2939
  const serializeAws_restJson1ExportAssetsToS3RequestDetails = (input, context) => {
2923
2940
  return {
2924
- ...(input.AssetDestinations !== undefined &&
2925
- input.AssetDestinations !== null && {
2941
+ ...(input.AssetDestinations != null && {
2926
2942
  AssetDestinations: serializeAws_restJson1ListOfAssetDestinationEntry(input.AssetDestinations, context),
2927
2943
  }),
2928
- ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
2929
- ...(input.Encryption !== undefined &&
2930
- input.Encryption !== null && {
2944
+ ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2945
+ ...(input.Encryption != null && {
2931
2946
  Encryption: serializeAws_restJson1ExportServerSideEncryption(input.Encryption, context),
2932
2947
  }),
2933
- ...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
2948
+ ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2934
2949
  };
2935
2950
  };
2936
2951
  const serializeAws_restJson1ExportAssetToSignedUrlRequestDetails = (input, context) => {
2937
2952
  return {
2938
- ...(input.AssetId !== undefined && input.AssetId !== null && { AssetId: input.AssetId }),
2939
- ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
2940
- ...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
2953
+ ...(input.AssetId != null && { AssetId: input.AssetId }),
2954
+ ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2955
+ ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2941
2956
  };
2942
2957
  };
2943
2958
  const serializeAws_restJson1ExportRevisionsToS3RequestDetails = (input, context) => {
2944
2959
  return {
2945
- ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
2946
- ...(input.Encryption !== undefined &&
2947
- input.Encryption !== null && {
2960
+ ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2961
+ ...(input.Encryption != null && {
2948
2962
  Encryption: serializeAws_restJson1ExportServerSideEncryption(input.Encryption, context),
2949
2963
  }),
2950
- ...(input.RevisionDestinations !== undefined &&
2951
- input.RevisionDestinations !== null && {
2964
+ ...(input.RevisionDestinations != null && {
2952
2965
  RevisionDestinations: serializeAws_restJson1ListOfRevisionDestinationEntry(input.RevisionDestinations, context),
2953
2966
  }),
2954
2967
  };
2955
2968
  };
2956
2969
  const serializeAws_restJson1ExportServerSideEncryption = (input, context) => {
2957
2970
  return {
2958
- ...(input.KmsKeyArn !== undefined && input.KmsKeyArn !== null && { KmsKeyArn: input.KmsKeyArn }),
2959
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
2971
+ ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
2972
+ ...(input.Type != null && { Type: input.Type }),
2960
2973
  };
2961
2974
  };
2962
2975
  const serializeAws_restJson1ImportAssetFromApiGatewayApiRequestDetails = (input, context) => {
2963
2976
  return {
2964
- ...(input.ApiDescription !== undefined &&
2965
- input.ApiDescription !== null && { ApiDescription: input.ApiDescription }),
2966
- ...(input.ApiId !== undefined && input.ApiId !== null && { ApiId: input.ApiId }),
2967
- ...(input.ApiKey !== undefined && input.ApiKey !== null && { ApiKey: input.ApiKey }),
2968
- ...(input.ApiName !== undefined && input.ApiName !== null && { ApiName: input.ApiName }),
2969
- ...(input.ApiSpecificationMd5Hash !== undefined &&
2970
- input.ApiSpecificationMd5Hash !== null && { ApiSpecificationMd5Hash: input.ApiSpecificationMd5Hash }),
2971
- ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
2972
- ...(input.ProtocolType !== undefined && input.ProtocolType !== null && { ProtocolType: input.ProtocolType }),
2973
- ...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
2974
- ...(input.Stage !== undefined && input.Stage !== null && { Stage: input.Stage }),
2977
+ ...(input.ApiDescription != null && { ApiDescription: input.ApiDescription }),
2978
+ ...(input.ApiId != null && { ApiId: input.ApiId }),
2979
+ ...(input.ApiKey != null && { ApiKey: input.ApiKey }),
2980
+ ...(input.ApiName != null && { ApiName: input.ApiName }),
2981
+ ...(input.ApiSpecificationMd5Hash != null && { ApiSpecificationMd5Hash: input.ApiSpecificationMd5Hash }),
2982
+ ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2983
+ ...(input.ProtocolType != null && { ProtocolType: input.ProtocolType }),
2984
+ ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2985
+ ...(input.Stage != null && { Stage: input.Stage }),
2975
2986
  };
2976
2987
  };
2977
2988
  const serializeAws_restJson1ImportAssetFromSignedUrlRequestDetails = (input, context) => {
2978
2989
  return {
2979
- ...(input.AssetName !== undefined && input.AssetName !== null && { AssetName: input.AssetName }),
2980
- ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
2981
- ...(input.Md5Hash !== undefined && input.Md5Hash !== null && { Md5Hash: input.Md5Hash }),
2982
- ...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
2990
+ ...(input.AssetName != null && { AssetName: input.AssetName }),
2991
+ ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
2992
+ ...(input.Md5Hash != null && { Md5Hash: input.Md5Hash }),
2993
+ ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2983
2994
  };
2984
2995
  };
2985
2996
  const serializeAws_restJson1ImportAssetsFromRedshiftDataSharesRequestDetails = (input, context) => {
2986
2997
  return {
2987
- ...(input.AssetSources !== undefined &&
2988
- input.AssetSources !== null && {
2998
+ ...(input.AssetSources != null && {
2989
2999
  AssetSources: serializeAws_restJson1ListOfRedshiftDataShareAssetSourceEntry(input.AssetSources, context),
2990
3000
  }),
2991
- ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
2992
- ...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
3001
+ ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
3002
+ ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
2993
3003
  };
2994
3004
  };
2995
3005
  const serializeAws_restJson1ImportAssetsFromS3RequestDetails = (input, context) => {
2996
3006
  return {
2997
- ...(input.AssetSources !== undefined &&
2998
- input.AssetSources !== null && {
3007
+ ...(input.AssetSources != null && {
2999
3008
  AssetSources: serializeAws_restJson1ListOfAssetSourceEntry(input.AssetSources, context),
3000
3009
  }),
3001
- ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
3002
- ...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
3010
+ ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
3011
+ ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
3003
3012
  };
3004
3013
  };
3005
3014
  const serializeAws_restJson1ListOfAssetDestinationEntry = (input, context) => {
@@ -3055,56 +3064,49 @@ const serializeAws_restJson1MapOf__string = (input, context) => {
3055
3064
  };
3056
3065
  const serializeAws_restJson1RedshiftDataShareAssetSourceEntry = (input, context) => {
3057
3066
  return {
3058
- ...(input.DataShareArn !== undefined && input.DataShareArn !== null && { DataShareArn: input.DataShareArn }),
3067
+ ...(input.DataShareArn != null && { DataShareArn: input.DataShareArn }),
3059
3068
  };
3060
3069
  };
3061
3070
  const serializeAws_restJson1RequestDetails = (input, context) => {
3062
3071
  return {
3063
- ...(input.ExportAssetToSignedUrl !== undefined &&
3064
- input.ExportAssetToSignedUrl !== null && {
3072
+ ...(input.ExportAssetToSignedUrl != null && {
3065
3073
  ExportAssetToSignedUrl: serializeAws_restJson1ExportAssetToSignedUrlRequestDetails(input.ExportAssetToSignedUrl, context),
3066
3074
  }),
3067
- ...(input.ExportAssetsToS3 !== undefined &&
3068
- input.ExportAssetsToS3 !== null && {
3075
+ ...(input.ExportAssetsToS3 != null && {
3069
3076
  ExportAssetsToS3: serializeAws_restJson1ExportAssetsToS3RequestDetails(input.ExportAssetsToS3, context),
3070
3077
  }),
3071
- ...(input.ExportRevisionsToS3 !== undefined &&
3072
- input.ExportRevisionsToS3 !== null && {
3078
+ ...(input.ExportRevisionsToS3 != null && {
3073
3079
  ExportRevisionsToS3: serializeAws_restJson1ExportRevisionsToS3RequestDetails(input.ExportRevisionsToS3, context),
3074
3080
  }),
3075
- ...(input.ImportAssetFromApiGatewayApi !== undefined &&
3076
- input.ImportAssetFromApiGatewayApi !== null && {
3081
+ ...(input.ImportAssetFromApiGatewayApi != null && {
3077
3082
  ImportAssetFromApiGatewayApi: serializeAws_restJson1ImportAssetFromApiGatewayApiRequestDetails(input.ImportAssetFromApiGatewayApi, context),
3078
3083
  }),
3079
- ...(input.ImportAssetFromSignedUrl !== undefined &&
3080
- input.ImportAssetFromSignedUrl !== null && {
3084
+ ...(input.ImportAssetFromSignedUrl != null && {
3081
3085
  ImportAssetFromSignedUrl: serializeAws_restJson1ImportAssetFromSignedUrlRequestDetails(input.ImportAssetFromSignedUrl, context),
3082
3086
  }),
3083
- ...(input.ImportAssetsFromRedshiftDataShares !== undefined &&
3084
- input.ImportAssetsFromRedshiftDataShares !== null && {
3087
+ ...(input.ImportAssetsFromRedshiftDataShares != null && {
3085
3088
  ImportAssetsFromRedshiftDataShares: serializeAws_restJson1ImportAssetsFromRedshiftDataSharesRequestDetails(input.ImportAssetsFromRedshiftDataShares, context),
3086
3089
  }),
3087
- ...(input.ImportAssetsFromS3 !== undefined &&
3088
- input.ImportAssetsFromS3 !== null && {
3090
+ ...(input.ImportAssetsFromS3 != null && {
3089
3091
  ImportAssetsFromS3: serializeAws_restJson1ImportAssetsFromS3RequestDetails(input.ImportAssetsFromS3, context),
3090
3092
  }),
3091
3093
  };
3092
3094
  };
3093
3095
  const serializeAws_restJson1RevisionDestinationEntry = (input, context) => {
3094
3096
  return {
3095
- ...(input.Bucket !== undefined && input.Bucket !== null && { Bucket: input.Bucket }),
3096
- ...(input.KeyPattern !== undefined && input.KeyPattern !== null && { KeyPattern: input.KeyPattern }),
3097
- ...(input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }),
3097
+ ...(input.Bucket != null && { Bucket: input.Bucket }),
3098
+ ...(input.KeyPattern != null && { KeyPattern: input.KeyPattern }),
3099
+ ...(input.RevisionId != null && { RevisionId: input.RevisionId }),
3098
3100
  };
3099
3101
  };
3100
3102
  const serializeAws_restJson1RevisionPublished = (input, context) => {
3101
3103
  return {
3102
- ...(input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId }),
3104
+ ...(input.DataSetId != null && { DataSetId: input.DataSetId }),
3103
3105
  };
3104
3106
  };
3105
3107
  const deserializeAws_restJson1Action = (output, context) => {
3106
3108
  return {
3107
- ExportRevisionToS3: output.ExportRevisionToS3 !== undefined && output.ExportRevisionToS3 !== null
3109
+ ExportRevisionToS3: output.ExportRevisionToS3 != null
3108
3110
  ? deserializeAws_restJson1AutoExportRevisionToS3RequestDetails(output.ExportRevisionToS3, context)
3109
3111
  : undefined,
3110
3112
  };
@@ -3117,7 +3119,7 @@ const deserializeAws_restJson1ApiGatewayApiAsset = (output, context) => {
3117
3119
  ApiKey: (0, smithy_client_1.expectString)(output.ApiKey),
3118
3120
  ApiName: (0, smithy_client_1.expectString)(output.ApiName),
3119
3121
  ApiSpecificationDownloadUrl: (0, smithy_client_1.expectString)(output.ApiSpecificationDownloadUrl),
3120
- ApiSpecificationDownloadUrlExpiresAt: output.ApiSpecificationDownloadUrlExpiresAt !== undefined && output.ApiSpecificationDownloadUrlExpiresAt !== null
3122
+ ApiSpecificationDownloadUrlExpiresAt: output.ApiSpecificationDownloadUrlExpiresAt != null
3121
3123
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.ApiSpecificationDownloadUrlExpiresAt))
3122
3124
  : undefined,
3123
3125
  ProtocolType: (0, smithy_client_1.expectString)(output.ProtocolType),
@@ -3133,13 +3135,13 @@ const deserializeAws_restJson1AssetDestinationEntry = (output, context) => {
3133
3135
  };
3134
3136
  const deserializeAws_restJson1AssetDetails = (output, context) => {
3135
3137
  return {
3136
- ApiGatewayApiAsset: output.ApiGatewayApiAsset !== undefined && output.ApiGatewayApiAsset !== null
3138
+ ApiGatewayApiAsset: output.ApiGatewayApiAsset != null
3137
3139
  ? deserializeAws_restJson1ApiGatewayApiAsset(output.ApiGatewayApiAsset, context)
3138
3140
  : undefined,
3139
- RedshiftDataShareAsset: output.RedshiftDataShareAsset !== undefined && output.RedshiftDataShareAsset !== null
3141
+ RedshiftDataShareAsset: output.RedshiftDataShareAsset != null
3140
3142
  ? deserializeAws_restJson1RedshiftDataShareAsset(output.RedshiftDataShareAsset, context)
3141
3143
  : undefined,
3142
- S3SnapshotAsset: output.S3SnapshotAsset !== undefined && output.S3SnapshotAsset !== null
3144
+ S3SnapshotAsset: output.S3SnapshotAsset != null
3143
3145
  ? deserializeAws_restJson1S3SnapshotAsset(output.S3SnapshotAsset, context)
3144
3146
  : undefined,
3145
3147
  };
@@ -3147,21 +3149,15 @@ const deserializeAws_restJson1AssetDetails = (output, context) => {
3147
3149
  const deserializeAws_restJson1AssetEntry = (output, context) => {
3148
3150
  return {
3149
3151
  Arn: (0, smithy_client_1.expectString)(output.Arn),
3150
- AssetDetails: output.AssetDetails !== undefined && output.AssetDetails !== null
3151
- ? deserializeAws_restJson1AssetDetails(output.AssetDetails, context)
3152
- : undefined,
3152
+ AssetDetails: output.AssetDetails != null ? deserializeAws_restJson1AssetDetails(output.AssetDetails, context) : undefined,
3153
3153
  AssetType: (0, smithy_client_1.expectString)(output.AssetType),
3154
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
3155
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt))
3156
- : undefined,
3154
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt)) : undefined,
3157
3155
  DataSetId: (0, smithy_client_1.expectString)(output.DataSetId),
3158
3156
  Id: (0, smithy_client_1.expectString)(output.Id),
3159
3157
  Name: (0, smithy_client_1.expectString)(output.Name),
3160
3158
  RevisionId: (0, smithy_client_1.expectString)(output.RevisionId),
3161
3159
  SourceId: (0, smithy_client_1.expectString)(output.SourceId),
3162
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
3163
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt))
3164
- : undefined,
3160
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt)) : undefined,
3165
3161
  };
3166
3162
  };
3167
3163
  const deserializeAws_restJson1AssetSourceEntry = (output, context) => {
@@ -3178,10 +3174,10 @@ const deserializeAws_restJson1AutoExportRevisionDestinationEntry = (output, cont
3178
3174
  };
3179
3175
  const deserializeAws_restJson1AutoExportRevisionToS3RequestDetails = (output, context) => {
3180
3176
  return {
3181
- Encryption: output.Encryption !== undefined && output.Encryption !== null
3177
+ Encryption: output.Encryption != null
3182
3178
  ? deserializeAws_restJson1ExportServerSideEncryption(output.Encryption, context)
3183
3179
  : undefined,
3184
- RevisionDestination: output.RevisionDestination !== undefined && output.RevisionDestination !== null
3180
+ RevisionDestination: output.RevisionDestination != null
3185
3181
  ? deserializeAws_restJson1AutoExportRevisionDestinationEntry(output.RevisionDestination, context)
3186
3182
  : undefined,
3187
3183
  };
@@ -3190,65 +3186,50 @@ const deserializeAws_restJson1DataSetEntry = (output, context) => {
3190
3186
  return {
3191
3187
  Arn: (0, smithy_client_1.expectString)(output.Arn),
3192
3188
  AssetType: (0, smithy_client_1.expectString)(output.AssetType),
3193
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
3194
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt))
3195
- : undefined,
3189
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt)) : undefined,
3196
3190
  Description: (0, smithy_client_1.expectString)(output.Description),
3197
3191
  Id: (0, smithy_client_1.expectString)(output.Id),
3198
3192
  Name: (0, smithy_client_1.expectString)(output.Name),
3199
3193
  Origin: (0, smithy_client_1.expectString)(output.Origin),
3200
- OriginDetails: output.OriginDetails !== undefined && output.OriginDetails !== null
3201
- ? deserializeAws_restJson1OriginDetails(output.OriginDetails, context)
3202
- : undefined,
3194
+ OriginDetails: output.OriginDetails != null ? deserializeAws_restJson1OriginDetails(output.OriginDetails, context) : undefined,
3203
3195
  SourceId: (0, smithy_client_1.expectString)(output.SourceId),
3204
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
3205
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt))
3206
- : undefined,
3196
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt)) : undefined,
3207
3197
  };
3208
3198
  };
3209
3199
  const deserializeAws_restJson1Details = (output, context) => {
3210
3200
  return {
3211
- ImportAssetFromSignedUrlJobErrorDetails: output.ImportAssetFromSignedUrlJobErrorDetails !== undefined &&
3212
- output.ImportAssetFromSignedUrlJobErrorDetails !== null
3201
+ ImportAssetFromSignedUrlJobErrorDetails: output.ImportAssetFromSignedUrlJobErrorDetails != null
3213
3202
  ? deserializeAws_restJson1ImportAssetFromSignedUrlJobErrorDetails(output.ImportAssetFromSignedUrlJobErrorDetails, context)
3214
3203
  : undefined,
3215
- ImportAssetsFromS3JobErrorDetails: output.ImportAssetsFromS3JobErrorDetails !== undefined && output.ImportAssetsFromS3JobErrorDetails !== null
3204
+ ImportAssetsFromS3JobErrorDetails: output.ImportAssetsFromS3JobErrorDetails != null
3216
3205
  ? deserializeAws_restJson1ListOfAssetSourceEntry(output.ImportAssetsFromS3JobErrorDetails, context)
3217
3206
  : undefined,
3218
3207
  };
3219
3208
  };
3220
3209
  const deserializeAws_restJson1Event = (output, context) => {
3221
3210
  return {
3222
- RevisionPublished: output.RevisionPublished !== undefined && output.RevisionPublished !== null
3211
+ RevisionPublished: output.RevisionPublished != null
3223
3212
  ? deserializeAws_restJson1RevisionPublished(output.RevisionPublished, context)
3224
3213
  : undefined,
3225
3214
  };
3226
3215
  };
3227
3216
  const deserializeAws_restJson1EventActionEntry = (output, context) => {
3228
3217
  return {
3229
- Action: output.Action !== undefined && output.Action !== null
3230
- ? deserializeAws_restJson1Action(output.Action, context)
3231
- : undefined,
3218
+ Action: output.Action != null ? deserializeAws_restJson1Action(output.Action, context) : undefined,
3232
3219
  Arn: (0, smithy_client_1.expectString)(output.Arn),
3233
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
3234
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt))
3235
- : undefined,
3236
- Event: output.Event !== undefined && output.Event !== null
3237
- ? deserializeAws_restJson1Event(output.Event, context)
3238
- : undefined,
3220
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt)) : undefined,
3221
+ Event: output.Event != null ? deserializeAws_restJson1Event(output.Event, context) : undefined,
3239
3222
  Id: (0, smithy_client_1.expectString)(output.Id),
3240
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
3241
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt))
3242
- : undefined,
3223
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt)) : undefined,
3243
3224
  };
3244
3225
  };
3245
3226
  const deserializeAws_restJson1ExportAssetsToS3ResponseDetails = (output, context) => {
3246
3227
  return {
3247
- AssetDestinations: output.AssetDestinations !== undefined && output.AssetDestinations !== null
3228
+ AssetDestinations: output.AssetDestinations != null
3248
3229
  ? deserializeAws_restJson1ListOfAssetDestinationEntry(output.AssetDestinations, context)
3249
3230
  : undefined,
3250
3231
  DataSetId: (0, smithy_client_1.expectString)(output.DataSetId),
3251
- Encryption: output.Encryption !== undefined && output.Encryption !== null
3232
+ Encryption: output.Encryption != null
3252
3233
  ? deserializeAws_restJson1ExportServerSideEncryption(output.Encryption, context)
3253
3234
  : undefined,
3254
3235
  RevisionId: (0, smithy_client_1.expectString)(output.RevisionId),
@@ -3260,7 +3241,7 @@ const deserializeAws_restJson1ExportAssetToSignedUrlResponseDetails = (output, c
3260
3241
  DataSetId: (0, smithy_client_1.expectString)(output.DataSetId),
3261
3242
  RevisionId: (0, smithy_client_1.expectString)(output.RevisionId),
3262
3243
  SignedUrl: (0, smithy_client_1.expectString)(output.SignedUrl),
3263
- SignedUrlExpiresAt: output.SignedUrlExpiresAt !== undefined && output.SignedUrlExpiresAt !== null
3244
+ SignedUrlExpiresAt: output.SignedUrlExpiresAt != null
3264
3245
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.SignedUrlExpiresAt))
3265
3246
  : undefined,
3266
3247
  };
@@ -3268,11 +3249,11 @@ const deserializeAws_restJson1ExportAssetToSignedUrlResponseDetails = (output, c
3268
3249
  const deserializeAws_restJson1ExportRevisionsToS3ResponseDetails = (output, context) => {
3269
3250
  return {
3270
3251
  DataSetId: (0, smithy_client_1.expectString)(output.DataSetId),
3271
- Encryption: output.Encryption !== undefined && output.Encryption !== null
3252
+ Encryption: output.Encryption != null
3272
3253
  ? deserializeAws_restJson1ExportServerSideEncryption(output.Encryption, context)
3273
3254
  : undefined,
3274
3255
  EventActionArn: (0, smithy_client_1.expectString)(output.EventActionArn),
3275
- RevisionDestinations: output.RevisionDestinations !== undefined && output.RevisionDestinations !== null
3256
+ RevisionDestinations: output.RevisionDestinations != null
3276
3257
  ? deserializeAws_restJson1ListOfRevisionDestinationEntry(output.RevisionDestinations, context)
3277
3258
  : undefined,
3278
3259
  };
@@ -3291,7 +3272,7 @@ const deserializeAws_restJson1ImportAssetFromApiGatewayApiResponseDetails = (out
3291
3272
  ApiName: (0, smithy_client_1.expectString)(output.ApiName),
3292
3273
  ApiSpecificationMd5Hash: (0, smithy_client_1.expectString)(output.ApiSpecificationMd5Hash),
3293
3274
  ApiSpecificationUploadUrl: (0, smithy_client_1.expectString)(output.ApiSpecificationUploadUrl),
3294
- ApiSpecificationUploadUrlExpiresAt: output.ApiSpecificationUploadUrlExpiresAt !== undefined && output.ApiSpecificationUploadUrlExpiresAt !== null
3275
+ ApiSpecificationUploadUrlExpiresAt: output.ApiSpecificationUploadUrlExpiresAt != null
3295
3276
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.ApiSpecificationUploadUrlExpiresAt))
3296
3277
  : undefined,
3297
3278
  DataSetId: (0, smithy_client_1.expectString)(output.DataSetId),
@@ -3312,14 +3293,14 @@ const deserializeAws_restJson1ImportAssetFromSignedUrlResponseDetails = (output,
3312
3293
  Md5Hash: (0, smithy_client_1.expectString)(output.Md5Hash),
3313
3294
  RevisionId: (0, smithy_client_1.expectString)(output.RevisionId),
3314
3295
  SignedUrl: (0, smithy_client_1.expectString)(output.SignedUrl),
3315
- SignedUrlExpiresAt: output.SignedUrlExpiresAt !== undefined && output.SignedUrlExpiresAt !== null
3296
+ SignedUrlExpiresAt: output.SignedUrlExpiresAt != null
3316
3297
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.SignedUrlExpiresAt))
3317
3298
  : undefined,
3318
3299
  };
3319
3300
  };
3320
3301
  const deserializeAws_restJson1ImportAssetsFromRedshiftDataSharesResponseDetails = (output, context) => {
3321
3302
  return {
3322
- AssetSources: output.AssetSources !== undefined && output.AssetSources !== null
3303
+ AssetSources: output.AssetSources != null
3323
3304
  ? deserializeAws_restJson1ListOfRedshiftDataShareAssetSourceEntry(output.AssetSources, context)
3324
3305
  : undefined,
3325
3306
  DataSetId: (0, smithy_client_1.expectString)(output.DataSetId),
@@ -3328,7 +3309,7 @@ const deserializeAws_restJson1ImportAssetsFromRedshiftDataSharesResponseDetails
3328
3309
  };
3329
3310
  const deserializeAws_restJson1ImportAssetsFromS3ResponseDetails = (output, context) => {
3330
3311
  return {
3331
- AssetSources: output.AssetSources !== undefined && output.AssetSources !== null
3312
+ AssetSources: output.AssetSources != null
3332
3313
  ? deserializeAws_restJson1ListOfAssetSourceEntry(output.AssetSources, context)
3333
3314
  : undefined,
3334
3315
  DataSetId: (0, smithy_client_1.expectString)(output.DataSetId),
@@ -3338,29 +3319,19 @@ const deserializeAws_restJson1ImportAssetsFromS3ResponseDetails = (output, conte
3338
3319
  const deserializeAws_restJson1JobEntry = (output, context) => {
3339
3320
  return {
3340
3321
  Arn: (0, smithy_client_1.expectString)(output.Arn),
3341
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
3342
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt))
3343
- : undefined,
3344
- Details: output.Details !== undefined && output.Details !== null
3345
- ? deserializeAws_restJson1ResponseDetails(output.Details, context)
3346
- : undefined,
3347
- Errors: output.Errors !== undefined && output.Errors !== null
3348
- ? deserializeAws_restJson1ListOfJobError(output.Errors, context)
3349
- : undefined,
3322
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt)) : undefined,
3323
+ Details: output.Details != null ? deserializeAws_restJson1ResponseDetails(output.Details, context) : undefined,
3324
+ Errors: output.Errors != null ? deserializeAws_restJson1ListOfJobError(output.Errors, context) : undefined,
3350
3325
  Id: (0, smithy_client_1.expectString)(output.Id),
3351
3326
  State: (0, smithy_client_1.expectString)(output.State),
3352
3327
  Type: (0, smithy_client_1.expectString)(output.Type),
3353
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
3354
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt))
3355
- : undefined,
3328
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt)) : undefined,
3356
3329
  };
3357
3330
  };
3358
3331
  const deserializeAws_restJson1JobError = (output, context) => {
3359
3332
  return {
3360
3333
  Code: (0, smithy_client_1.expectString)(output.Code),
3361
- Details: output.Details !== undefined && output.Details !== null
3362
- ? deserializeAws_restJson1Details(output.Details, context)
3363
- : undefined,
3334
+ Details: output.Details != null ? deserializeAws_restJson1Details(output.Details, context) : undefined,
3364
3335
  LimitName: (0, smithy_client_1.expectString)(output.LimitName),
3365
3336
  LimitValue: (0, smithy_client_1.limitedParseDouble)(output.LimitValue),
3366
3337
  Message: (0, smithy_client_1.expectString)(output.Message),
@@ -3506,25 +3477,25 @@ const deserializeAws_restJson1RedshiftDataShareAssetSourceEntry = (output, conte
3506
3477
  };
3507
3478
  const deserializeAws_restJson1ResponseDetails = (output, context) => {
3508
3479
  return {
3509
- ExportAssetToSignedUrl: output.ExportAssetToSignedUrl !== undefined && output.ExportAssetToSignedUrl !== null
3480
+ ExportAssetToSignedUrl: output.ExportAssetToSignedUrl != null
3510
3481
  ? deserializeAws_restJson1ExportAssetToSignedUrlResponseDetails(output.ExportAssetToSignedUrl, context)
3511
3482
  : undefined,
3512
- ExportAssetsToS3: output.ExportAssetsToS3 !== undefined && output.ExportAssetsToS3 !== null
3483
+ ExportAssetsToS3: output.ExportAssetsToS3 != null
3513
3484
  ? deserializeAws_restJson1ExportAssetsToS3ResponseDetails(output.ExportAssetsToS3, context)
3514
3485
  : undefined,
3515
- ExportRevisionsToS3: output.ExportRevisionsToS3 !== undefined && output.ExportRevisionsToS3 !== null
3486
+ ExportRevisionsToS3: output.ExportRevisionsToS3 != null
3516
3487
  ? deserializeAws_restJson1ExportRevisionsToS3ResponseDetails(output.ExportRevisionsToS3, context)
3517
3488
  : undefined,
3518
- ImportAssetFromApiGatewayApi: output.ImportAssetFromApiGatewayApi !== undefined && output.ImportAssetFromApiGatewayApi !== null
3489
+ ImportAssetFromApiGatewayApi: output.ImportAssetFromApiGatewayApi != null
3519
3490
  ? deserializeAws_restJson1ImportAssetFromApiGatewayApiResponseDetails(output.ImportAssetFromApiGatewayApi, context)
3520
3491
  : undefined,
3521
- ImportAssetFromSignedUrl: output.ImportAssetFromSignedUrl !== undefined && output.ImportAssetFromSignedUrl !== null
3492
+ ImportAssetFromSignedUrl: output.ImportAssetFromSignedUrl != null
3522
3493
  ? deserializeAws_restJson1ImportAssetFromSignedUrlResponseDetails(output.ImportAssetFromSignedUrl, context)
3523
3494
  : undefined,
3524
- ImportAssetsFromRedshiftDataShares: output.ImportAssetsFromRedshiftDataShares !== undefined && output.ImportAssetsFromRedshiftDataShares !== null
3495
+ ImportAssetsFromRedshiftDataShares: output.ImportAssetsFromRedshiftDataShares != null
3525
3496
  ? deserializeAws_restJson1ImportAssetsFromRedshiftDataSharesResponseDetails(output.ImportAssetsFromRedshiftDataShares, context)
3526
3497
  : undefined,
3527
- ImportAssetsFromS3: output.ImportAssetsFromS3 !== undefined && output.ImportAssetsFromS3 !== null
3498
+ ImportAssetsFromS3: output.ImportAssetsFromS3 != null
3528
3499
  ? deserializeAws_restJson1ImportAssetsFromS3ResponseDetails(output.ImportAssetsFromS3, context)
3529
3500
  : undefined,
3530
3501
  };
@@ -3540,21 +3511,15 @@ const deserializeAws_restJson1RevisionEntry = (output, context) => {
3540
3511
  return {
3541
3512
  Arn: (0, smithy_client_1.expectString)(output.Arn),
3542
3513
  Comment: (0, smithy_client_1.expectString)(output.Comment),
3543
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
3544
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt))
3545
- : undefined,
3514
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.CreatedAt)) : undefined,
3546
3515
  DataSetId: (0, smithy_client_1.expectString)(output.DataSetId),
3547
3516
  Finalized: (0, smithy_client_1.expectBoolean)(output.Finalized),
3548
3517
  Id: (0, smithy_client_1.expectString)(output.Id),
3549
3518
  RevocationComment: (0, smithy_client_1.expectString)(output.RevocationComment),
3550
3519
  Revoked: (0, smithy_client_1.expectBoolean)(output.Revoked),
3551
- RevokedAt: output.RevokedAt !== undefined && output.RevokedAt !== null
3552
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.RevokedAt))
3553
- : undefined,
3520
+ RevokedAt: output.RevokedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.RevokedAt)) : undefined,
3554
3521
  SourceId: (0, smithy_client_1.expectString)(output.SourceId),
3555
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
3556
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt))
3557
- : undefined,
3522
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.UpdatedAt)) : undefined,
3558
3523
  };
3559
3524
  };
3560
3525
  const deserializeAws_restJson1RevisionPublished = (output, context) => {
@@ -3616,5 +3581,4 @@ const loadRestJsonErrorCode = (output, data) => {
3616
3581
  if (data["__type"] !== undefined) {
3617
3582
  return sanitizeErrorCode(data["__type"]);
3618
3583
  }
3619
- return "";
3620
3584
  };