@aws-sdk/client-elasticache 3.141.0 → 3.150.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.
@@ -873,7 +873,6 @@ const deserializeAws_queryAddTagsToResourceCommandError = async (output, context
873
873
  ...output,
874
874
  body: await parseBody(output.body, context),
875
875
  };
876
- let response;
877
876
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
878
877
  switch (errorCode) {
879
878
  case "CacheClusterNotFoundFault":
@@ -914,14 +913,12 @@ const deserializeAws_queryAddTagsToResourceCommandError = async (output, context
914
913
  throw await deserializeAws_queryUserNotFoundFaultResponse(parsedOutput, context);
915
914
  default:
916
915
  const parsedBody = parsedOutput.body;
917
- const $metadata = deserializeMetadata(output);
918
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
919
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
920
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
921
- $fault: "client",
922
- $metadata,
916
+ (0, smithy_client_1.throwDefaultError)({
917
+ output,
918
+ parsedBody: parsedBody.Error,
919
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
920
+ errorCode,
923
921
  });
924
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
925
922
  }
926
923
  };
927
924
  const deserializeAws_queryAuthorizeCacheSecurityGroupIngressCommand = async (output, context) => {
@@ -943,7 +940,6 @@ const deserializeAws_queryAuthorizeCacheSecurityGroupIngressCommandError = async
943
940
  ...output,
944
941
  body: await parseBody(output.body, context),
945
942
  };
946
- let response;
947
943
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
948
944
  switch (errorCode) {
949
945
  case "AuthorizationAlreadyExistsFault":
@@ -963,14 +959,12 @@ const deserializeAws_queryAuthorizeCacheSecurityGroupIngressCommandError = async
963
959
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
964
960
  default:
965
961
  const parsedBody = parsedOutput.body;
966
- const $metadata = deserializeMetadata(output);
967
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
968
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
969
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
970
- $fault: "client",
971
- $metadata,
962
+ (0, smithy_client_1.throwDefaultError)({
963
+ output,
964
+ parsedBody: parsedBody.Error,
965
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
966
+ errorCode,
972
967
  });
973
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
974
968
  }
975
969
  };
976
970
  const deserializeAws_queryBatchApplyUpdateActionCommand = async (output, context) => {
@@ -992,7 +986,6 @@ const deserializeAws_queryBatchApplyUpdateActionCommandError = async (output, co
992
986
  ...output,
993
987
  body: await parseBody(output.body, context),
994
988
  };
995
- let response;
996
989
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
997
990
  switch (errorCode) {
998
991
  case "InvalidParameterValueException":
@@ -1003,14 +996,12 @@ const deserializeAws_queryBatchApplyUpdateActionCommandError = async (output, co
1003
996
  throw await deserializeAws_queryServiceUpdateNotFoundFaultResponse(parsedOutput, context);
1004
997
  default:
1005
998
  const parsedBody = parsedOutput.body;
1006
- const $metadata = deserializeMetadata(output);
1007
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1008
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1009
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1010
- $fault: "client",
1011
- $metadata,
999
+ (0, smithy_client_1.throwDefaultError)({
1000
+ output,
1001
+ parsedBody: parsedBody.Error,
1002
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1003
+ errorCode,
1012
1004
  });
1013
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1014
1005
  }
1015
1006
  };
1016
1007
  const deserializeAws_queryBatchStopUpdateActionCommand = async (output, context) => {
@@ -1032,7 +1023,6 @@ const deserializeAws_queryBatchStopUpdateActionCommandError = async (output, con
1032
1023
  ...output,
1033
1024
  body: await parseBody(output.body, context),
1034
1025
  };
1035
- let response;
1036
1026
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1037
1027
  switch (errorCode) {
1038
1028
  case "InvalidParameterValueException":
@@ -1043,14 +1033,12 @@ const deserializeAws_queryBatchStopUpdateActionCommandError = async (output, con
1043
1033
  throw await deserializeAws_queryServiceUpdateNotFoundFaultResponse(parsedOutput, context);
1044
1034
  default:
1045
1035
  const parsedBody = parsedOutput.body;
1046
- const $metadata = deserializeMetadata(output);
1047
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1048
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1049
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1050
- $fault: "client",
1051
- $metadata,
1036
+ (0, smithy_client_1.throwDefaultError)({
1037
+ output,
1038
+ parsedBody: parsedBody.Error,
1039
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1040
+ errorCode,
1052
1041
  });
1053
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1054
1042
  }
1055
1043
  };
1056
1044
  const deserializeAws_queryCompleteMigrationCommand = async (output, context) => {
@@ -1072,7 +1060,6 @@ const deserializeAws_queryCompleteMigrationCommandError = async (output, context
1072
1060
  ...output,
1073
1061
  body: await parseBody(output.body, context),
1074
1062
  };
1075
- let response;
1076
1063
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1077
1064
  switch (errorCode) {
1078
1065
  case "InvalidReplicationGroupStateFault":
@@ -1086,14 +1073,12 @@ const deserializeAws_queryCompleteMigrationCommandError = async (output, context
1086
1073
  throw await deserializeAws_queryReplicationGroupNotUnderMigrationFaultResponse(parsedOutput, context);
1087
1074
  default:
1088
1075
  const parsedBody = parsedOutput.body;
1089
- const $metadata = deserializeMetadata(output);
1090
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1091
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1092
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1093
- $fault: "client",
1094
- $metadata,
1076
+ (0, smithy_client_1.throwDefaultError)({
1077
+ output,
1078
+ parsedBody: parsedBody.Error,
1079
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1080
+ errorCode,
1095
1081
  });
1096
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1097
1082
  }
1098
1083
  };
1099
1084
  const deserializeAws_queryCopySnapshotCommand = async (output, context) => {
@@ -1115,7 +1100,6 @@ const deserializeAws_queryCopySnapshotCommandError = async (output, context) =>
1115
1100
  ...output,
1116
1101
  body: await parseBody(output.body, context),
1117
1102
  };
1118
- let response;
1119
1103
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1120
1104
  switch (errorCode) {
1121
1105
  case "InvalidParameterCombinationException":
@@ -1141,14 +1125,12 @@ const deserializeAws_queryCopySnapshotCommandError = async (output, context) =>
1141
1125
  throw await deserializeAws_queryTagQuotaPerResourceExceededResponse(parsedOutput, context);
1142
1126
  default:
1143
1127
  const parsedBody = parsedOutput.body;
1144
- const $metadata = deserializeMetadata(output);
1145
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1146
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1147
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1148
- $fault: "client",
1149
- $metadata,
1128
+ (0, smithy_client_1.throwDefaultError)({
1129
+ output,
1130
+ parsedBody: parsedBody.Error,
1131
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1132
+ errorCode,
1150
1133
  });
1151
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1152
1134
  }
1153
1135
  };
1154
1136
  const deserializeAws_queryCreateCacheClusterCommand = async (output, context) => {
@@ -1170,7 +1152,6 @@ const deserializeAws_queryCreateCacheClusterCommandError = async (output, contex
1170
1152
  ...output,
1171
1153
  body: await parseBody(output.body, context),
1172
1154
  };
1173
- let response;
1174
1155
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1175
1156
  switch (errorCode) {
1176
1157
  case "CacheClusterAlreadyExistsFault":
@@ -1217,14 +1198,12 @@ const deserializeAws_queryCreateCacheClusterCommandError = async (output, contex
1217
1198
  throw await deserializeAws_queryTagQuotaPerResourceExceededResponse(parsedOutput, context);
1218
1199
  default:
1219
1200
  const parsedBody = parsedOutput.body;
1220
- const $metadata = deserializeMetadata(output);
1221
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1222
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1223
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1224
- $fault: "client",
1225
- $metadata,
1201
+ (0, smithy_client_1.throwDefaultError)({
1202
+ output,
1203
+ parsedBody: parsedBody.Error,
1204
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1205
+ errorCode,
1226
1206
  });
1227
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1228
1207
  }
1229
1208
  };
1230
1209
  const deserializeAws_queryCreateCacheParameterGroupCommand = async (output, context) => {
@@ -1246,7 +1225,6 @@ const deserializeAws_queryCreateCacheParameterGroupCommandError = async (output,
1246
1225
  ...output,
1247
1226
  body: await parseBody(output.body, context),
1248
1227
  };
1249
- let response;
1250
1228
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1251
1229
  switch (errorCode) {
1252
1230
  case "CacheParameterGroupAlreadyExistsFault":
@@ -1269,14 +1247,12 @@ const deserializeAws_queryCreateCacheParameterGroupCommandError = async (output,
1269
1247
  throw await deserializeAws_queryTagQuotaPerResourceExceededResponse(parsedOutput, context);
1270
1248
  default:
1271
1249
  const parsedBody = parsedOutput.body;
1272
- const $metadata = deserializeMetadata(output);
1273
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1274
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1275
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1276
- $fault: "client",
1277
- $metadata,
1250
+ (0, smithy_client_1.throwDefaultError)({
1251
+ output,
1252
+ parsedBody: parsedBody.Error,
1253
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1254
+ errorCode,
1278
1255
  });
1279
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1280
1256
  }
1281
1257
  };
1282
1258
  const deserializeAws_queryCreateCacheSecurityGroupCommand = async (output, context) => {
@@ -1298,7 +1274,6 @@ const deserializeAws_queryCreateCacheSecurityGroupCommandError = async (output,
1298
1274
  ...output,
1299
1275
  body: await parseBody(output.body, context),
1300
1276
  };
1301
- let response;
1302
1277
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1303
1278
  switch (errorCode) {
1304
1279
  case "CacheSecurityGroupAlreadyExistsFault":
@@ -1318,14 +1293,12 @@ const deserializeAws_queryCreateCacheSecurityGroupCommandError = async (output,
1318
1293
  throw await deserializeAws_queryTagQuotaPerResourceExceededResponse(parsedOutput, context);
1319
1294
  default:
1320
1295
  const parsedBody = parsedOutput.body;
1321
- const $metadata = deserializeMetadata(output);
1322
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1323
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1324
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1325
- $fault: "client",
1326
- $metadata,
1296
+ (0, smithy_client_1.throwDefaultError)({
1297
+ output,
1298
+ parsedBody: parsedBody.Error,
1299
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1300
+ errorCode,
1327
1301
  });
1328
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1329
1302
  }
1330
1303
  };
1331
1304
  const deserializeAws_queryCreateCacheSubnetGroupCommand = async (output, context) => {
@@ -1347,7 +1320,6 @@ const deserializeAws_queryCreateCacheSubnetGroupCommandError = async (output, co
1347
1320
  ...output,
1348
1321
  body: await parseBody(output.body, context),
1349
1322
  };
1350
- let response;
1351
1323
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1352
1324
  switch (errorCode) {
1353
1325
  case "CacheSubnetGroupAlreadyExistsFault":
@@ -1370,14 +1342,12 @@ const deserializeAws_queryCreateCacheSubnetGroupCommandError = async (output, co
1370
1342
  throw await deserializeAws_queryTagQuotaPerResourceExceededResponse(parsedOutput, context);
1371
1343
  default:
1372
1344
  const parsedBody = parsedOutput.body;
1373
- const $metadata = deserializeMetadata(output);
1374
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1375
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1376
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1377
- $fault: "client",
1378
- $metadata,
1345
+ (0, smithy_client_1.throwDefaultError)({
1346
+ output,
1347
+ parsedBody: parsedBody.Error,
1348
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1349
+ errorCode,
1379
1350
  });
1380
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1381
1351
  }
1382
1352
  };
1383
1353
  const deserializeAws_queryCreateGlobalReplicationGroupCommand = async (output, context) => {
@@ -1399,7 +1369,6 @@ const deserializeAws_queryCreateGlobalReplicationGroupCommandError = async (outp
1399
1369
  ...output,
1400
1370
  body: await parseBody(output.body, context),
1401
1371
  };
1402
- let response;
1403
1372
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1404
1373
  switch (errorCode) {
1405
1374
  case "GlobalReplicationGroupAlreadyExistsFault":
@@ -1419,14 +1388,12 @@ const deserializeAws_queryCreateGlobalReplicationGroupCommandError = async (outp
1419
1388
  throw await deserializeAws_queryServiceLinkedRoleNotFoundFaultResponse(parsedOutput, context);
1420
1389
  default:
1421
1390
  const parsedBody = parsedOutput.body;
1422
- const $metadata = deserializeMetadata(output);
1423
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1424
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1425
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1426
- $fault: "client",
1427
- $metadata,
1391
+ (0, smithy_client_1.throwDefaultError)({
1392
+ output,
1393
+ parsedBody: parsedBody.Error,
1394
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1395
+ errorCode,
1428
1396
  });
1429
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1430
1397
  }
1431
1398
  };
1432
1399
  const deserializeAws_queryCreateReplicationGroupCommand = async (output, context) => {
@@ -1448,7 +1415,6 @@ const deserializeAws_queryCreateReplicationGroupCommandError = async (output, co
1448
1415
  ...output,
1449
1416
  body: await parseBody(output.body, context),
1450
1417
  };
1451
- let response;
1452
1418
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1453
1419
  switch (errorCode) {
1454
1420
  case "CacheClusterNotFoundFault":
@@ -1510,14 +1476,12 @@ const deserializeAws_queryCreateReplicationGroupCommandError = async (output, co
1510
1476
  throw await deserializeAws_queryUserGroupNotFoundFaultResponse(parsedOutput, context);
1511
1477
  default:
1512
1478
  const parsedBody = parsedOutput.body;
1513
- const $metadata = deserializeMetadata(output);
1514
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1515
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1516
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1517
- $fault: "client",
1518
- $metadata,
1479
+ (0, smithy_client_1.throwDefaultError)({
1480
+ output,
1481
+ parsedBody: parsedBody.Error,
1482
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1483
+ errorCode,
1519
1484
  });
1520
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1521
1485
  }
1522
1486
  };
1523
1487
  const deserializeAws_queryCreateSnapshotCommand = async (output, context) => {
@@ -1539,7 +1503,6 @@ const deserializeAws_queryCreateSnapshotCommandError = async (output, context) =
1539
1503
  ...output,
1540
1504
  body: await parseBody(output.body, context),
1541
1505
  };
1542
- let response;
1543
1506
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1544
1507
  switch (errorCode) {
1545
1508
  case "CacheClusterNotFoundFault":
@@ -1574,14 +1537,12 @@ const deserializeAws_queryCreateSnapshotCommandError = async (output, context) =
1574
1537
  throw await deserializeAws_queryTagQuotaPerResourceExceededResponse(parsedOutput, context);
1575
1538
  default:
1576
1539
  const parsedBody = parsedOutput.body;
1577
- const $metadata = deserializeMetadata(output);
1578
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1579
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1580
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1581
- $fault: "client",
1582
- $metadata,
1540
+ (0, smithy_client_1.throwDefaultError)({
1541
+ output,
1542
+ parsedBody: parsedBody.Error,
1543
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1544
+ errorCode,
1583
1545
  });
1584
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1585
1546
  }
1586
1547
  };
1587
1548
  const deserializeAws_queryCreateUserCommand = async (output, context) => {
@@ -1603,7 +1564,6 @@ const deserializeAws_queryCreateUserCommandError = async (output, context) => {
1603
1564
  ...output,
1604
1565
  body: await parseBody(output.body, context),
1605
1566
  };
1606
- let response;
1607
1567
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1608
1568
  switch (errorCode) {
1609
1569
  case "DuplicateUserNameFault":
@@ -1629,14 +1589,12 @@ const deserializeAws_queryCreateUserCommandError = async (output, context) => {
1629
1589
  throw await deserializeAws_queryUserQuotaExceededFaultResponse(parsedOutput, context);
1630
1590
  default:
1631
1591
  const parsedBody = parsedOutput.body;
1632
- const $metadata = deserializeMetadata(output);
1633
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1634
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1635
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1636
- $fault: "client",
1637
- $metadata,
1592
+ (0, smithy_client_1.throwDefaultError)({
1593
+ output,
1594
+ parsedBody: parsedBody.Error,
1595
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1596
+ errorCode,
1638
1597
  });
1639
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1640
1598
  }
1641
1599
  };
1642
1600
  const deserializeAws_queryCreateUserGroupCommand = async (output, context) => {
@@ -1658,7 +1616,6 @@ const deserializeAws_queryCreateUserGroupCommandError = async (output, context)
1658
1616
  ...output,
1659
1617
  body: await parseBody(output.body, context),
1660
1618
  };
1661
- let response;
1662
1619
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1663
1620
  switch (errorCode) {
1664
1621
  case "DefaultUserRequired":
@@ -1687,14 +1644,12 @@ const deserializeAws_queryCreateUserGroupCommandError = async (output, context)
1687
1644
  throw await deserializeAws_queryUserNotFoundFaultResponse(parsedOutput, context);
1688
1645
  default:
1689
1646
  const parsedBody = parsedOutput.body;
1690
- const $metadata = deserializeMetadata(output);
1691
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1692
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1693
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1694
- $fault: "client",
1695
- $metadata,
1647
+ (0, smithy_client_1.throwDefaultError)({
1648
+ output,
1649
+ parsedBody: parsedBody.Error,
1650
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1651
+ errorCode,
1696
1652
  });
1697
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1698
1653
  }
1699
1654
  };
1700
1655
  const deserializeAws_queryDecreaseNodeGroupsInGlobalReplicationGroupCommand = async (output, context) => {
@@ -1716,7 +1671,6 @@ const deserializeAws_queryDecreaseNodeGroupsInGlobalReplicationGroupCommandError
1716
1671
  ...output,
1717
1672
  body: await parseBody(output.body, context),
1718
1673
  };
1719
- let response;
1720
1674
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1721
1675
  switch (errorCode) {
1722
1676
  case "GlobalReplicationGroupNotFoundFault":
@@ -1733,14 +1687,12 @@ const deserializeAws_queryDecreaseNodeGroupsInGlobalReplicationGroupCommandError
1733
1687
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
1734
1688
  default:
1735
1689
  const parsedBody = parsedOutput.body;
1736
- const $metadata = deserializeMetadata(output);
1737
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1738
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1739
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1740
- $fault: "client",
1741
- $metadata,
1690
+ (0, smithy_client_1.throwDefaultError)({
1691
+ output,
1692
+ parsedBody: parsedBody.Error,
1693
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1694
+ errorCode,
1742
1695
  });
1743
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1744
1696
  }
1745
1697
  };
1746
1698
  const deserializeAws_queryDecreaseReplicaCountCommand = async (output, context) => {
@@ -1762,7 +1714,6 @@ const deserializeAws_queryDecreaseReplicaCountCommandError = async (output, cont
1762
1714
  ...output,
1763
1715
  body: await parseBody(output.body, context),
1764
1716
  };
1765
- let response;
1766
1717
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1767
1718
  switch (errorCode) {
1768
1719
  case "ClusterQuotaForCustomerExceededFault":
@@ -1803,14 +1754,12 @@ const deserializeAws_queryDecreaseReplicaCountCommandError = async (output, cont
1803
1754
  throw await deserializeAws_queryServiceLinkedRoleNotFoundFaultResponse(parsedOutput, context);
1804
1755
  default:
1805
1756
  const parsedBody = parsedOutput.body;
1806
- const $metadata = deserializeMetadata(output);
1807
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1808
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1809
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1810
- $fault: "client",
1811
- $metadata,
1757
+ (0, smithy_client_1.throwDefaultError)({
1758
+ output,
1759
+ parsedBody: parsedBody.Error,
1760
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1761
+ errorCode,
1812
1762
  });
1813
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1814
1763
  }
1815
1764
  };
1816
1765
  const deserializeAws_queryDeleteCacheClusterCommand = async (output, context) => {
@@ -1832,7 +1781,6 @@ const deserializeAws_queryDeleteCacheClusterCommandError = async (output, contex
1832
1781
  ...output,
1833
1782
  body: await parseBody(output.body, context),
1834
1783
  };
1835
- let response;
1836
1784
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1837
1785
  switch (errorCode) {
1838
1786
  case "CacheClusterNotFoundFault":
@@ -1858,14 +1806,12 @@ const deserializeAws_queryDeleteCacheClusterCommandError = async (output, contex
1858
1806
  throw await deserializeAws_querySnapshotQuotaExceededFaultResponse(parsedOutput, context);
1859
1807
  default:
1860
1808
  const parsedBody = parsedOutput.body;
1861
- const $metadata = deserializeMetadata(output);
1862
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1863
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1864
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1865
- $fault: "client",
1866
- $metadata,
1809
+ (0, smithy_client_1.throwDefaultError)({
1810
+ output,
1811
+ parsedBody: parsedBody.Error,
1812
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1813
+ errorCode,
1867
1814
  });
1868
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1869
1815
  }
1870
1816
  };
1871
1817
  const deserializeAws_queryDeleteCacheParameterGroupCommand = async (output, context) => {
@@ -1884,7 +1830,6 @@ const deserializeAws_queryDeleteCacheParameterGroupCommandError = async (output,
1884
1830
  ...output,
1885
1831
  body: await parseBody(output.body, context),
1886
1832
  };
1887
- let response;
1888
1833
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1889
1834
  switch (errorCode) {
1890
1835
  case "CacheParameterGroupNotFoundFault":
@@ -1901,14 +1846,12 @@ const deserializeAws_queryDeleteCacheParameterGroupCommandError = async (output,
1901
1846
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
1902
1847
  default:
1903
1848
  const parsedBody = parsedOutput.body;
1904
- const $metadata = deserializeMetadata(output);
1905
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1906
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1907
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1908
- $fault: "client",
1909
- $metadata,
1849
+ (0, smithy_client_1.throwDefaultError)({
1850
+ output,
1851
+ parsedBody: parsedBody.Error,
1852
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1853
+ errorCode,
1910
1854
  });
1911
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1912
1855
  }
1913
1856
  };
1914
1857
  const deserializeAws_queryDeleteCacheSecurityGroupCommand = async (output, context) => {
@@ -1927,7 +1870,6 @@ const deserializeAws_queryDeleteCacheSecurityGroupCommandError = async (output,
1927
1870
  ...output,
1928
1871
  body: await parseBody(output.body, context),
1929
1872
  };
1930
- let response;
1931
1873
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1932
1874
  switch (errorCode) {
1933
1875
  case "CacheSecurityGroupNotFoundFault":
@@ -1944,14 +1886,12 @@ const deserializeAws_queryDeleteCacheSecurityGroupCommandError = async (output,
1944
1886
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
1945
1887
  default:
1946
1888
  const parsedBody = parsedOutput.body;
1947
- const $metadata = deserializeMetadata(output);
1948
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1949
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1950
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1951
- $fault: "client",
1952
- $metadata,
1889
+ (0, smithy_client_1.throwDefaultError)({
1890
+ output,
1891
+ parsedBody: parsedBody.Error,
1892
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1893
+ errorCode,
1953
1894
  });
1954
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1955
1895
  }
1956
1896
  };
1957
1897
  const deserializeAws_queryDeleteCacheSubnetGroupCommand = async (output, context) => {
@@ -1970,7 +1910,6 @@ const deserializeAws_queryDeleteCacheSubnetGroupCommandError = async (output, co
1970
1910
  ...output,
1971
1911
  body: await parseBody(output.body, context),
1972
1912
  };
1973
- let response;
1974
1913
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1975
1914
  switch (errorCode) {
1976
1915
  case "CacheSubnetGroupInUse":
@@ -1981,14 +1920,12 @@ const deserializeAws_queryDeleteCacheSubnetGroupCommandError = async (output, co
1981
1920
  throw await deserializeAws_queryCacheSubnetGroupNotFoundFaultResponse(parsedOutput, context);
1982
1921
  default:
1983
1922
  const parsedBody = parsedOutput.body;
1984
- const $metadata = deserializeMetadata(output);
1985
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1986
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
1987
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
1988
- $fault: "client",
1989
- $metadata,
1923
+ (0, smithy_client_1.throwDefaultError)({
1924
+ output,
1925
+ parsedBody: parsedBody.Error,
1926
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1927
+ errorCode,
1990
1928
  });
1991
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
1992
1929
  }
1993
1930
  };
1994
1931
  const deserializeAws_queryDeleteGlobalReplicationGroupCommand = async (output, context) => {
@@ -2010,7 +1947,6 @@ const deserializeAws_queryDeleteGlobalReplicationGroupCommandError = async (outp
2010
1947
  ...output,
2011
1948
  body: await parseBody(output.body, context),
2012
1949
  };
2013
- let response;
2014
1950
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2015
1951
  switch (errorCode) {
2016
1952
  case "GlobalReplicationGroupNotFoundFault":
@@ -2024,14 +1960,12 @@ const deserializeAws_queryDeleteGlobalReplicationGroupCommandError = async (outp
2024
1960
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2025
1961
  default:
2026
1962
  const parsedBody = parsedOutput.body;
2027
- const $metadata = deserializeMetadata(output);
2028
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2029
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2030
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2031
- $fault: "client",
2032
- $metadata,
1963
+ (0, smithy_client_1.throwDefaultError)({
1964
+ output,
1965
+ parsedBody: parsedBody.Error,
1966
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
1967
+ errorCode,
2033
1968
  });
2034
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2035
1969
  }
2036
1970
  };
2037
1971
  const deserializeAws_queryDeleteReplicationGroupCommand = async (output, context) => {
@@ -2053,7 +1987,6 @@ const deserializeAws_queryDeleteReplicationGroupCommandError = async (output, co
2053
1987
  ...output,
2054
1988
  body: await parseBody(output.body, context),
2055
1989
  };
2056
- let response;
2057
1990
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2058
1991
  switch (errorCode) {
2059
1992
  case "InvalidParameterCombinationException":
@@ -2079,14 +2012,12 @@ const deserializeAws_queryDeleteReplicationGroupCommandError = async (output, co
2079
2012
  throw await deserializeAws_querySnapshotQuotaExceededFaultResponse(parsedOutput, context);
2080
2013
  default:
2081
2014
  const parsedBody = parsedOutput.body;
2082
- const $metadata = deserializeMetadata(output);
2083
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2084
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2085
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2086
- $fault: "client",
2087
- $metadata,
2015
+ (0, smithy_client_1.throwDefaultError)({
2016
+ output,
2017
+ parsedBody: parsedBody.Error,
2018
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2019
+ errorCode,
2088
2020
  });
2089
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2090
2021
  }
2091
2022
  };
2092
2023
  const deserializeAws_queryDeleteSnapshotCommand = async (output, context) => {
@@ -2108,7 +2039,6 @@ const deserializeAws_queryDeleteSnapshotCommandError = async (output, context) =
2108
2039
  ...output,
2109
2040
  body: await parseBody(output.body, context),
2110
2041
  };
2111
- let response;
2112
2042
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2113
2043
  switch (errorCode) {
2114
2044
  case "InvalidParameterCombinationException":
@@ -2125,14 +2055,12 @@ const deserializeAws_queryDeleteSnapshotCommandError = async (output, context) =
2125
2055
  throw await deserializeAws_querySnapshotNotFoundFaultResponse(parsedOutput, context);
2126
2056
  default:
2127
2057
  const parsedBody = parsedOutput.body;
2128
- const $metadata = deserializeMetadata(output);
2129
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2130
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2131
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2132
- $fault: "client",
2133
- $metadata,
2058
+ (0, smithy_client_1.throwDefaultError)({
2059
+ output,
2060
+ parsedBody: parsedBody.Error,
2061
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2062
+ errorCode,
2134
2063
  });
2135
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2136
2064
  }
2137
2065
  };
2138
2066
  const deserializeAws_queryDeleteUserCommand = async (output, context) => {
@@ -2154,7 +2082,6 @@ const deserializeAws_queryDeleteUserCommandError = async (output, context) => {
2154
2082
  ...output,
2155
2083
  body: await parseBody(output.body, context),
2156
2084
  };
2157
- let response;
2158
2085
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2159
2086
  switch (errorCode) {
2160
2087
  case "DefaultUserAssociatedToUserGroupFault":
@@ -2174,14 +2101,12 @@ const deserializeAws_queryDeleteUserCommandError = async (output, context) => {
2174
2101
  throw await deserializeAws_queryUserNotFoundFaultResponse(parsedOutput, context);
2175
2102
  default:
2176
2103
  const parsedBody = parsedOutput.body;
2177
- const $metadata = deserializeMetadata(output);
2178
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2179
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2180
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2181
- $fault: "client",
2182
- $metadata,
2104
+ (0, smithy_client_1.throwDefaultError)({
2105
+ output,
2106
+ parsedBody: parsedBody.Error,
2107
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2108
+ errorCode,
2183
2109
  });
2184
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2185
2110
  }
2186
2111
  };
2187
2112
  const deserializeAws_queryDeleteUserGroupCommand = async (output, context) => {
@@ -2203,7 +2128,6 @@ const deserializeAws_queryDeleteUserGroupCommandError = async (output, context)
2203
2128
  ...output,
2204
2129
  body: await parseBody(output.body, context),
2205
2130
  };
2206
- let response;
2207
2131
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2208
2132
  switch (errorCode) {
2209
2133
  case "InvalidParameterValueException":
@@ -2220,14 +2144,12 @@ const deserializeAws_queryDeleteUserGroupCommandError = async (output, context)
2220
2144
  throw await deserializeAws_queryUserGroupNotFoundFaultResponse(parsedOutput, context);
2221
2145
  default:
2222
2146
  const parsedBody = parsedOutput.body;
2223
- const $metadata = deserializeMetadata(output);
2224
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2225
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2226
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2227
- $fault: "client",
2228
- $metadata,
2147
+ (0, smithy_client_1.throwDefaultError)({
2148
+ output,
2149
+ parsedBody: parsedBody.Error,
2150
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2151
+ errorCode,
2229
2152
  });
2230
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2231
2153
  }
2232
2154
  };
2233
2155
  const deserializeAws_queryDescribeCacheClustersCommand = async (output, context) => {
@@ -2249,7 +2171,6 @@ const deserializeAws_queryDescribeCacheClustersCommandError = async (output, con
2249
2171
  ...output,
2250
2172
  body: await parseBody(output.body, context),
2251
2173
  };
2252
- let response;
2253
2174
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2254
2175
  switch (errorCode) {
2255
2176
  case "CacheClusterNotFoundFault":
@@ -2263,14 +2184,12 @@ const deserializeAws_queryDescribeCacheClustersCommandError = async (output, con
2263
2184
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2264
2185
  default:
2265
2186
  const parsedBody = parsedOutput.body;
2266
- const $metadata = deserializeMetadata(output);
2267
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2268
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2269
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2270
- $fault: "client",
2271
- $metadata,
2187
+ (0, smithy_client_1.throwDefaultError)({
2188
+ output,
2189
+ parsedBody: parsedBody.Error,
2190
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2191
+ errorCode,
2272
2192
  });
2273
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2274
2193
  }
2275
2194
  };
2276
2195
  const deserializeAws_queryDescribeCacheEngineVersionsCommand = async (output, context) => {
@@ -2292,20 +2211,14 @@ const deserializeAws_queryDescribeCacheEngineVersionsCommandError = async (outpu
2292
2211
  ...output,
2293
2212
  body: await parseBody(output.body, context),
2294
2213
  };
2295
- let response;
2296
2214
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2297
- switch (errorCode) {
2298
- default:
2299
- const parsedBody = parsedOutput.body;
2300
- const $metadata = deserializeMetadata(output);
2301
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2302
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2303
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2304
- $fault: "client",
2305
- $metadata,
2306
- });
2307
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2308
- }
2215
+ const parsedBody = parsedOutput.body;
2216
+ (0, smithy_client_1.throwDefaultError)({
2217
+ output,
2218
+ parsedBody: parsedBody.Error,
2219
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2220
+ errorCode,
2221
+ });
2309
2222
  };
2310
2223
  const deserializeAws_queryDescribeCacheParameterGroupsCommand = async (output, context) => {
2311
2224
  if (output.statusCode >= 300) {
@@ -2326,7 +2239,6 @@ const deserializeAws_queryDescribeCacheParameterGroupsCommandError = async (outp
2326
2239
  ...output,
2327
2240
  body: await parseBody(output.body, context),
2328
2241
  };
2329
- let response;
2330
2242
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2331
2243
  switch (errorCode) {
2332
2244
  case "CacheParameterGroupNotFoundFault":
@@ -2340,14 +2252,12 @@ const deserializeAws_queryDescribeCacheParameterGroupsCommandError = async (outp
2340
2252
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2341
2253
  default:
2342
2254
  const parsedBody = parsedOutput.body;
2343
- const $metadata = deserializeMetadata(output);
2344
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2345
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2346
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2347
- $fault: "client",
2348
- $metadata,
2255
+ (0, smithy_client_1.throwDefaultError)({
2256
+ output,
2257
+ parsedBody: parsedBody.Error,
2258
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2259
+ errorCode,
2349
2260
  });
2350
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2351
2261
  }
2352
2262
  };
2353
2263
  const deserializeAws_queryDescribeCacheParametersCommand = async (output, context) => {
@@ -2369,7 +2279,6 @@ const deserializeAws_queryDescribeCacheParametersCommandError = async (output, c
2369
2279
  ...output,
2370
2280
  body: await parseBody(output.body, context),
2371
2281
  };
2372
- let response;
2373
2282
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2374
2283
  switch (errorCode) {
2375
2284
  case "CacheParameterGroupNotFoundFault":
@@ -2383,14 +2292,12 @@ const deserializeAws_queryDescribeCacheParametersCommandError = async (output, c
2383
2292
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2384
2293
  default:
2385
2294
  const parsedBody = parsedOutput.body;
2386
- const $metadata = deserializeMetadata(output);
2387
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2388
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2389
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2390
- $fault: "client",
2391
- $metadata,
2295
+ (0, smithy_client_1.throwDefaultError)({
2296
+ output,
2297
+ parsedBody: parsedBody.Error,
2298
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2299
+ errorCode,
2392
2300
  });
2393
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2394
2301
  }
2395
2302
  };
2396
2303
  const deserializeAws_queryDescribeCacheSecurityGroupsCommand = async (output, context) => {
@@ -2412,7 +2319,6 @@ const deserializeAws_queryDescribeCacheSecurityGroupsCommandError = async (outpu
2412
2319
  ...output,
2413
2320
  body: await parseBody(output.body, context),
2414
2321
  };
2415
- let response;
2416
2322
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2417
2323
  switch (errorCode) {
2418
2324
  case "CacheSecurityGroupNotFoundFault":
@@ -2426,14 +2332,12 @@ const deserializeAws_queryDescribeCacheSecurityGroupsCommandError = async (outpu
2426
2332
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2427
2333
  default:
2428
2334
  const parsedBody = parsedOutput.body;
2429
- const $metadata = deserializeMetadata(output);
2430
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2431
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2432
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2433
- $fault: "client",
2434
- $metadata,
2335
+ (0, smithy_client_1.throwDefaultError)({
2336
+ output,
2337
+ parsedBody: parsedBody.Error,
2338
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2339
+ errorCode,
2435
2340
  });
2436
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2437
2341
  }
2438
2342
  };
2439
2343
  const deserializeAws_queryDescribeCacheSubnetGroupsCommand = async (output, context) => {
@@ -2455,7 +2359,6 @@ const deserializeAws_queryDescribeCacheSubnetGroupsCommandError = async (output,
2455
2359
  ...output,
2456
2360
  body: await parseBody(output.body, context),
2457
2361
  };
2458
- let response;
2459
2362
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2460
2363
  switch (errorCode) {
2461
2364
  case "CacheSubnetGroupNotFoundFault":
@@ -2463,14 +2366,12 @@ const deserializeAws_queryDescribeCacheSubnetGroupsCommandError = async (output,
2463
2366
  throw await deserializeAws_queryCacheSubnetGroupNotFoundFaultResponse(parsedOutput, context);
2464
2367
  default:
2465
2368
  const parsedBody = parsedOutput.body;
2466
- const $metadata = deserializeMetadata(output);
2467
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2468
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2469
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2470
- $fault: "client",
2471
- $metadata,
2369
+ (0, smithy_client_1.throwDefaultError)({
2370
+ output,
2371
+ parsedBody: parsedBody.Error,
2372
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2373
+ errorCode,
2472
2374
  });
2473
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2474
2375
  }
2475
2376
  };
2476
2377
  const deserializeAws_queryDescribeEngineDefaultParametersCommand = async (output, context) => {
@@ -2492,7 +2393,6 @@ const deserializeAws_queryDescribeEngineDefaultParametersCommandError = async (o
2492
2393
  ...output,
2493
2394
  body: await parseBody(output.body, context),
2494
2395
  };
2495
- let response;
2496
2396
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2497
2397
  switch (errorCode) {
2498
2398
  case "InvalidParameterCombinationException":
@@ -2503,14 +2403,12 @@ const deserializeAws_queryDescribeEngineDefaultParametersCommandError = async (o
2503
2403
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2504
2404
  default:
2505
2405
  const parsedBody = parsedOutput.body;
2506
- const $metadata = deserializeMetadata(output);
2507
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2508
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2509
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2510
- $fault: "client",
2511
- $metadata,
2406
+ (0, smithy_client_1.throwDefaultError)({
2407
+ output,
2408
+ parsedBody: parsedBody.Error,
2409
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2410
+ errorCode,
2512
2411
  });
2513
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2514
2412
  }
2515
2413
  };
2516
2414
  const deserializeAws_queryDescribeEventsCommand = async (output, context) => {
@@ -2532,7 +2430,6 @@ const deserializeAws_queryDescribeEventsCommandError = async (output, context) =
2532
2430
  ...output,
2533
2431
  body: await parseBody(output.body, context),
2534
2432
  };
2535
- let response;
2536
2433
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2537
2434
  switch (errorCode) {
2538
2435
  case "InvalidParameterCombinationException":
@@ -2543,14 +2440,12 @@ const deserializeAws_queryDescribeEventsCommandError = async (output, context) =
2543
2440
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2544
2441
  default:
2545
2442
  const parsedBody = parsedOutput.body;
2546
- const $metadata = deserializeMetadata(output);
2547
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2548
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2549
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2550
- $fault: "client",
2551
- $metadata,
2443
+ (0, smithy_client_1.throwDefaultError)({
2444
+ output,
2445
+ parsedBody: parsedBody.Error,
2446
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2447
+ errorCode,
2552
2448
  });
2553
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2554
2449
  }
2555
2450
  };
2556
2451
  const deserializeAws_queryDescribeGlobalReplicationGroupsCommand = async (output, context) => {
@@ -2572,7 +2467,6 @@ const deserializeAws_queryDescribeGlobalReplicationGroupsCommandError = async (o
2572
2467
  ...output,
2573
2468
  body: await parseBody(output.body, context),
2574
2469
  };
2575
- let response;
2576
2470
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2577
2471
  switch (errorCode) {
2578
2472
  case "GlobalReplicationGroupNotFoundFault":
@@ -2586,14 +2480,12 @@ const deserializeAws_queryDescribeGlobalReplicationGroupsCommandError = async (o
2586
2480
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2587
2481
  default:
2588
2482
  const parsedBody = parsedOutput.body;
2589
- const $metadata = deserializeMetadata(output);
2590
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2591
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2592
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2593
- $fault: "client",
2594
- $metadata,
2483
+ (0, smithy_client_1.throwDefaultError)({
2484
+ output,
2485
+ parsedBody: parsedBody.Error,
2486
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2487
+ errorCode,
2595
2488
  });
2596
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2597
2489
  }
2598
2490
  };
2599
2491
  const deserializeAws_queryDescribeReplicationGroupsCommand = async (output, context) => {
@@ -2615,7 +2507,6 @@ const deserializeAws_queryDescribeReplicationGroupsCommandError = async (output,
2615
2507
  ...output,
2616
2508
  body: await parseBody(output.body, context),
2617
2509
  };
2618
- let response;
2619
2510
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2620
2511
  switch (errorCode) {
2621
2512
  case "InvalidParameterCombinationException":
@@ -2629,14 +2520,12 @@ const deserializeAws_queryDescribeReplicationGroupsCommandError = async (output,
2629
2520
  throw await deserializeAws_queryReplicationGroupNotFoundFaultResponse(parsedOutput, context);
2630
2521
  default:
2631
2522
  const parsedBody = parsedOutput.body;
2632
- const $metadata = deserializeMetadata(output);
2633
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2634
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2635
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2636
- $fault: "client",
2637
- $metadata,
2523
+ (0, smithy_client_1.throwDefaultError)({
2524
+ output,
2525
+ parsedBody: parsedBody.Error,
2526
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2527
+ errorCode,
2638
2528
  });
2639
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2640
2529
  }
2641
2530
  };
2642
2531
  const deserializeAws_queryDescribeReservedCacheNodesCommand = async (output, context) => {
@@ -2658,7 +2547,6 @@ const deserializeAws_queryDescribeReservedCacheNodesCommandError = async (output
2658
2547
  ...output,
2659
2548
  body: await parseBody(output.body, context),
2660
2549
  };
2661
- let response;
2662
2550
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2663
2551
  switch (errorCode) {
2664
2552
  case "InvalidParameterCombinationException":
@@ -2672,14 +2560,12 @@ const deserializeAws_queryDescribeReservedCacheNodesCommandError = async (output
2672
2560
  throw await deserializeAws_queryReservedCacheNodeNotFoundFaultResponse(parsedOutput, context);
2673
2561
  default:
2674
2562
  const parsedBody = parsedOutput.body;
2675
- const $metadata = deserializeMetadata(output);
2676
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2677
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2678
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2679
- $fault: "client",
2680
- $metadata,
2563
+ (0, smithy_client_1.throwDefaultError)({
2564
+ output,
2565
+ parsedBody: parsedBody.Error,
2566
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2567
+ errorCode,
2681
2568
  });
2682
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2683
2569
  }
2684
2570
  };
2685
2571
  const deserializeAws_queryDescribeReservedCacheNodesOfferingsCommand = async (output, context) => {
@@ -2701,7 +2587,6 @@ const deserializeAws_queryDescribeReservedCacheNodesOfferingsCommandError = asyn
2701
2587
  ...output,
2702
2588
  body: await parseBody(output.body, context),
2703
2589
  };
2704
- let response;
2705
2590
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2706
2591
  switch (errorCode) {
2707
2592
  case "InvalidParameterCombinationException":
@@ -2715,14 +2600,12 @@ const deserializeAws_queryDescribeReservedCacheNodesOfferingsCommandError = asyn
2715
2600
  throw await deserializeAws_queryReservedCacheNodesOfferingNotFoundFaultResponse(parsedOutput, context);
2716
2601
  default:
2717
2602
  const parsedBody = parsedOutput.body;
2718
- const $metadata = deserializeMetadata(output);
2719
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2720
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2721
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2722
- $fault: "client",
2723
- $metadata,
2603
+ (0, smithy_client_1.throwDefaultError)({
2604
+ output,
2605
+ parsedBody: parsedBody.Error,
2606
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2607
+ errorCode,
2724
2608
  });
2725
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2726
2609
  }
2727
2610
  };
2728
2611
  const deserializeAws_queryDescribeServiceUpdatesCommand = async (output, context) => {
@@ -2744,7 +2627,6 @@ const deserializeAws_queryDescribeServiceUpdatesCommandError = async (output, co
2744
2627
  ...output,
2745
2628
  body: await parseBody(output.body, context),
2746
2629
  };
2747
- let response;
2748
2630
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2749
2631
  switch (errorCode) {
2750
2632
  case "InvalidParameterCombinationException":
@@ -2758,14 +2640,12 @@ const deserializeAws_queryDescribeServiceUpdatesCommandError = async (output, co
2758
2640
  throw await deserializeAws_queryServiceUpdateNotFoundFaultResponse(parsedOutput, context);
2759
2641
  default:
2760
2642
  const parsedBody = parsedOutput.body;
2761
- const $metadata = deserializeMetadata(output);
2762
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2763
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2764
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2765
- $fault: "client",
2766
- $metadata,
2643
+ (0, smithy_client_1.throwDefaultError)({
2644
+ output,
2645
+ parsedBody: parsedBody.Error,
2646
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2647
+ errorCode,
2767
2648
  });
2768
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2769
2649
  }
2770
2650
  };
2771
2651
  const deserializeAws_queryDescribeSnapshotsCommand = async (output, context) => {
@@ -2787,7 +2667,6 @@ const deserializeAws_queryDescribeSnapshotsCommandError = async (output, context
2787
2667
  ...output,
2788
2668
  body: await parseBody(output.body, context),
2789
2669
  };
2790
- let response;
2791
2670
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2792
2671
  switch (errorCode) {
2793
2672
  case "CacheClusterNotFoundFault":
@@ -2804,14 +2683,12 @@ const deserializeAws_queryDescribeSnapshotsCommandError = async (output, context
2804
2683
  throw await deserializeAws_querySnapshotNotFoundFaultResponse(parsedOutput, context);
2805
2684
  default:
2806
2685
  const parsedBody = parsedOutput.body;
2807
- const $metadata = deserializeMetadata(output);
2808
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2809
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2810
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2811
- $fault: "client",
2812
- $metadata,
2686
+ (0, smithy_client_1.throwDefaultError)({
2687
+ output,
2688
+ parsedBody: parsedBody.Error,
2689
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2690
+ errorCode,
2813
2691
  });
2814
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2815
2692
  }
2816
2693
  };
2817
2694
  const deserializeAws_queryDescribeUpdateActionsCommand = async (output, context) => {
@@ -2833,7 +2710,6 @@ const deserializeAws_queryDescribeUpdateActionsCommandError = async (output, con
2833
2710
  ...output,
2834
2711
  body: await parseBody(output.body, context),
2835
2712
  };
2836
- let response;
2837
2713
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2838
2714
  switch (errorCode) {
2839
2715
  case "InvalidParameterCombinationException":
@@ -2844,14 +2720,12 @@ const deserializeAws_queryDescribeUpdateActionsCommandError = async (output, con
2844
2720
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2845
2721
  default:
2846
2722
  const parsedBody = parsedOutput.body;
2847
- const $metadata = deserializeMetadata(output);
2848
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2849
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2850
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2851
- $fault: "client",
2852
- $metadata,
2723
+ (0, smithy_client_1.throwDefaultError)({
2724
+ output,
2725
+ parsedBody: parsedBody.Error,
2726
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2727
+ errorCode,
2853
2728
  });
2854
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2855
2729
  }
2856
2730
  };
2857
2731
  const deserializeAws_queryDescribeUserGroupsCommand = async (output, context) => {
@@ -2873,7 +2747,6 @@ const deserializeAws_queryDescribeUserGroupsCommandError = async (output, contex
2873
2747
  ...output,
2874
2748
  body: await parseBody(output.body, context),
2875
2749
  };
2876
- let response;
2877
2750
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2878
2751
  switch (errorCode) {
2879
2752
  case "InvalidParameterCombinationException":
@@ -2887,14 +2760,12 @@ const deserializeAws_queryDescribeUserGroupsCommandError = async (output, contex
2887
2760
  throw await deserializeAws_queryUserGroupNotFoundFaultResponse(parsedOutput, context);
2888
2761
  default:
2889
2762
  const parsedBody = parsedOutput.body;
2890
- const $metadata = deserializeMetadata(output);
2891
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2892
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2893
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2894
- $fault: "client",
2895
- $metadata,
2763
+ (0, smithy_client_1.throwDefaultError)({
2764
+ output,
2765
+ parsedBody: parsedBody.Error,
2766
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2767
+ errorCode,
2896
2768
  });
2897
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2898
2769
  }
2899
2770
  };
2900
2771
  const deserializeAws_queryDescribeUsersCommand = async (output, context) => {
@@ -2916,7 +2787,6 @@ const deserializeAws_queryDescribeUsersCommandError = async (output, context) =>
2916
2787
  ...output,
2917
2788
  body: await parseBody(output.body, context),
2918
2789
  };
2919
- let response;
2920
2790
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2921
2791
  switch (errorCode) {
2922
2792
  case "InvalidParameterCombinationException":
@@ -2930,14 +2800,12 @@ const deserializeAws_queryDescribeUsersCommandError = async (output, context) =>
2930
2800
  throw await deserializeAws_queryUserNotFoundFaultResponse(parsedOutput, context);
2931
2801
  default:
2932
2802
  const parsedBody = parsedOutput.body;
2933
- const $metadata = deserializeMetadata(output);
2934
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2935
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2936
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2937
- $fault: "client",
2938
- $metadata,
2803
+ (0, smithy_client_1.throwDefaultError)({
2804
+ output,
2805
+ parsedBody: parsedBody.Error,
2806
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2807
+ errorCode,
2939
2808
  });
2940
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2941
2809
  }
2942
2810
  };
2943
2811
  const deserializeAws_queryDisassociateGlobalReplicationGroupCommand = async (output, context) => {
@@ -2959,7 +2827,6 @@ const deserializeAws_queryDisassociateGlobalReplicationGroupCommandError = async
2959
2827
  ...output,
2960
2828
  body: await parseBody(output.body, context),
2961
2829
  };
2962
- let response;
2963
2830
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
2964
2831
  switch (errorCode) {
2965
2832
  case "GlobalReplicationGroupNotFoundFault":
@@ -2976,14 +2843,12 @@ const deserializeAws_queryDisassociateGlobalReplicationGroupCommandError = async
2976
2843
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
2977
2844
  default:
2978
2845
  const parsedBody = parsedOutput.body;
2979
- const $metadata = deserializeMetadata(output);
2980
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2981
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
2982
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
2983
- $fault: "client",
2984
- $metadata,
2846
+ (0, smithy_client_1.throwDefaultError)({
2847
+ output,
2848
+ parsedBody: parsedBody.Error,
2849
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2850
+ errorCode,
2985
2851
  });
2986
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
2987
2852
  }
2988
2853
  };
2989
2854
  const deserializeAws_queryFailoverGlobalReplicationGroupCommand = async (output, context) => {
@@ -3005,7 +2870,6 @@ const deserializeAws_queryFailoverGlobalReplicationGroupCommandError = async (ou
3005
2870
  ...output,
3006
2871
  body: await parseBody(output.body, context),
3007
2872
  };
3008
- let response;
3009
2873
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3010
2874
  switch (errorCode) {
3011
2875
  case "GlobalReplicationGroupNotFoundFault":
@@ -3022,14 +2886,12 @@ const deserializeAws_queryFailoverGlobalReplicationGroupCommandError = async (ou
3022
2886
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
3023
2887
  default:
3024
2888
  const parsedBody = parsedOutput.body;
3025
- const $metadata = deserializeMetadata(output);
3026
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3027
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3028
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3029
- $fault: "client",
3030
- $metadata,
2889
+ (0, smithy_client_1.throwDefaultError)({
2890
+ output,
2891
+ parsedBody: parsedBody.Error,
2892
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2893
+ errorCode,
3031
2894
  });
3032
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3033
2895
  }
3034
2896
  };
3035
2897
  const deserializeAws_queryIncreaseNodeGroupsInGlobalReplicationGroupCommand = async (output, context) => {
@@ -3051,7 +2913,6 @@ const deserializeAws_queryIncreaseNodeGroupsInGlobalReplicationGroupCommandError
3051
2913
  ...output,
3052
2914
  body: await parseBody(output.body, context),
3053
2915
  };
3054
- let response;
3055
2916
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3056
2917
  switch (errorCode) {
3057
2918
  case "GlobalReplicationGroupNotFoundFault":
@@ -3065,14 +2926,12 @@ const deserializeAws_queryIncreaseNodeGroupsInGlobalReplicationGroupCommandError
3065
2926
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
3066
2927
  default:
3067
2928
  const parsedBody = parsedOutput.body;
3068
- const $metadata = deserializeMetadata(output);
3069
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3070
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3071
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3072
- $fault: "client",
3073
- $metadata,
2929
+ (0, smithy_client_1.throwDefaultError)({
2930
+ output,
2931
+ parsedBody: parsedBody.Error,
2932
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
2933
+ errorCode,
3074
2934
  });
3075
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3076
2935
  }
3077
2936
  };
3078
2937
  const deserializeAws_queryIncreaseReplicaCountCommand = async (output, context) => {
@@ -3094,7 +2953,6 @@ const deserializeAws_queryIncreaseReplicaCountCommandError = async (output, cont
3094
2953
  ...output,
3095
2954
  body: await parseBody(output.body, context),
3096
2955
  };
3097
- let response;
3098
2956
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3099
2957
  switch (errorCode) {
3100
2958
  case "ClusterQuotaForCustomerExceededFault":
@@ -3135,14 +2993,12 @@ const deserializeAws_queryIncreaseReplicaCountCommandError = async (output, cont
3135
2993
  throw await deserializeAws_queryReplicationGroupNotFoundFaultResponse(parsedOutput, context);
3136
2994
  default:
3137
2995
  const parsedBody = parsedOutput.body;
3138
- const $metadata = deserializeMetadata(output);
3139
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3140
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3141
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3142
- $fault: "client",
3143
- $metadata,
2996
+ (0, smithy_client_1.throwDefaultError)({
2997
+ output,
2998
+ parsedBody: parsedBody.Error,
2999
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3000
+ errorCode,
3144
3001
  });
3145
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3146
3002
  }
3147
3003
  };
3148
3004
  const deserializeAws_queryListAllowedNodeTypeModificationsCommand = async (output, context) => {
@@ -3164,7 +3020,6 @@ const deserializeAws_queryListAllowedNodeTypeModificationsCommandError = async (
3164
3020
  ...output,
3165
3021
  body: await parseBody(output.body, context),
3166
3022
  };
3167
- let response;
3168
3023
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3169
3024
  switch (errorCode) {
3170
3025
  case "CacheClusterNotFoundFault":
@@ -3181,14 +3036,12 @@ const deserializeAws_queryListAllowedNodeTypeModificationsCommandError = async (
3181
3036
  throw await deserializeAws_queryReplicationGroupNotFoundFaultResponse(parsedOutput, context);
3182
3037
  default:
3183
3038
  const parsedBody = parsedOutput.body;
3184
- const $metadata = deserializeMetadata(output);
3185
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3186
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3187
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3188
- $fault: "client",
3189
- $metadata,
3039
+ (0, smithy_client_1.throwDefaultError)({
3040
+ output,
3041
+ parsedBody: parsedBody.Error,
3042
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3043
+ errorCode,
3190
3044
  });
3191
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3192
3045
  }
3193
3046
  };
3194
3047
  const deserializeAws_queryListTagsForResourceCommand = async (output, context) => {
@@ -3210,7 +3063,6 @@ const deserializeAws_queryListTagsForResourceCommandError = async (output, conte
3210
3063
  ...output,
3211
3064
  body: await parseBody(output.body, context),
3212
3065
  };
3213
- let response;
3214
3066
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3215
3067
  switch (errorCode) {
3216
3068
  case "CacheClusterNotFoundFault":
@@ -3248,14 +3100,12 @@ const deserializeAws_queryListTagsForResourceCommandError = async (output, conte
3248
3100
  throw await deserializeAws_queryUserNotFoundFaultResponse(parsedOutput, context);
3249
3101
  default:
3250
3102
  const parsedBody = parsedOutput.body;
3251
- const $metadata = deserializeMetadata(output);
3252
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3253
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3254
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3255
- $fault: "client",
3256
- $metadata,
3103
+ (0, smithy_client_1.throwDefaultError)({
3104
+ output,
3105
+ parsedBody: parsedBody.Error,
3106
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3107
+ errorCode,
3257
3108
  });
3258
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3259
3109
  }
3260
3110
  };
3261
3111
  const deserializeAws_queryModifyCacheClusterCommand = async (output, context) => {
@@ -3277,7 +3127,6 @@ const deserializeAws_queryModifyCacheClusterCommandError = async (output, contex
3277
3127
  ...output,
3278
3128
  body: await parseBody(output.body, context),
3279
3129
  };
3280
- let response;
3281
3130
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3282
3131
  switch (errorCode) {
3283
3132
  case "CacheClusterNotFoundFault":
@@ -3315,14 +3164,12 @@ const deserializeAws_queryModifyCacheClusterCommandError = async (output, contex
3315
3164
  throw await deserializeAws_queryNodeQuotaForCustomerExceededFaultResponse(parsedOutput, context);
3316
3165
  default:
3317
3166
  const parsedBody = parsedOutput.body;
3318
- const $metadata = deserializeMetadata(output);
3319
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3320
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3321
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3322
- $fault: "client",
3323
- $metadata,
3167
+ (0, smithy_client_1.throwDefaultError)({
3168
+ output,
3169
+ parsedBody: parsedBody.Error,
3170
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3171
+ errorCode,
3324
3172
  });
3325
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3326
3173
  }
3327
3174
  };
3328
3175
  const deserializeAws_queryModifyCacheParameterGroupCommand = async (output, context) => {
@@ -3344,7 +3191,6 @@ const deserializeAws_queryModifyCacheParameterGroupCommandError = async (output,
3344
3191
  ...output,
3345
3192
  body: await parseBody(output.body, context),
3346
3193
  };
3347
- let response;
3348
3194
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3349
3195
  switch (errorCode) {
3350
3196
  case "CacheParameterGroupNotFoundFault":
@@ -3364,14 +3210,12 @@ const deserializeAws_queryModifyCacheParameterGroupCommandError = async (output,
3364
3210
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
3365
3211
  default:
3366
3212
  const parsedBody = parsedOutput.body;
3367
- const $metadata = deserializeMetadata(output);
3368
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3369
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3370
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3371
- $fault: "client",
3372
- $metadata,
3213
+ (0, smithy_client_1.throwDefaultError)({
3214
+ output,
3215
+ parsedBody: parsedBody.Error,
3216
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3217
+ errorCode,
3373
3218
  });
3374
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3375
3219
  }
3376
3220
  };
3377
3221
  const deserializeAws_queryModifyCacheSubnetGroupCommand = async (output, context) => {
@@ -3393,7 +3237,6 @@ const deserializeAws_queryModifyCacheSubnetGroupCommandError = async (output, co
3393
3237
  ...output,
3394
3238
  body: await parseBody(output.body, context),
3395
3239
  };
3396
- let response;
3397
3240
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3398
3241
  switch (errorCode) {
3399
3242
  case "CacheSubnetGroupNotFoundFault":
@@ -3413,14 +3256,12 @@ const deserializeAws_queryModifyCacheSubnetGroupCommandError = async (output, co
3413
3256
  throw await deserializeAws_querySubnetNotAllowedFaultResponse(parsedOutput, context);
3414
3257
  default:
3415
3258
  const parsedBody = parsedOutput.body;
3416
- const $metadata = deserializeMetadata(output);
3417
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3418
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3419
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3420
- $fault: "client",
3421
- $metadata,
3259
+ (0, smithy_client_1.throwDefaultError)({
3260
+ output,
3261
+ parsedBody: parsedBody.Error,
3262
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3263
+ errorCode,
3422
3264
  });
3423
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3424
3265
  }
3425
3266
  };
3426
3267
  const deserializeAws_queryModifyGlobalReplicationGroupCommand = async (output, context) => {
@@ -3442,7 +3283,6 @@ const deserializeAws_queryModifyGlobalReplicationGroupCommandError = async (outp
3442
3283
  ...output,
3443
3284
  body: await parseBody(output.body, context),
3444
3285
  };
3445
- let response;
3446
3286
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3447
3287
  switch (errorCode) {
3448
3288
  case "GlobalReplicationGroupNotFoundFault":
@@ -3456,14 +3296,12 @@ const deserializeAws_queryModifyGlobalReplicationGroupCommandError = async (outp
3456
3296
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
3457
3297
  default:
3458
3298
  const parsedBody = parsedOutput.body;
3459
- const $metadata = deserializeMetadata(output);
3460
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3461
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3462
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3463
- $fault: "client",
3464
- $metadata,
3299
+ (0, smithy_client_1.throwDefaultError)({
3300
+ output,
3301
+ parsedBody: parsedBody.Error,
3302
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3303
+ errorCode,
3465
3304
  });
3466
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3467
3305
  }
3468
3306
  };
3469
3307
  const deserializeAws_queryModifyReplicationGroupCommand = async (output, context) => {
@@ -3485,7 +3323,6 @@ const deserializeAws_queryModifyReplicationGroupCommandError = async (output, co
3485
3323
  ...output,
3486
3324
  body: await parseBody(output.body, context),
3487
3325
  };
3488
- let response;
3489
3326
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3490
3327
  switch (errorCode) {
3491
3328
  case "CacheClusterNotFoundFault":
@@ -3538,14 +3375,12 @@ const deserializeAws_queryModifyReplicationGroupCommandError = async (output, co
3538
3375
  throw await deserializeAws_queryUserGroupNotFoundFaultResponse(parsedOutput, context);
3539
3376
  default:
3540
3377
  const parsedBody = parsedOutput.body;
3541
- const $metadata = deserializeMetadata(output);
3542
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3543
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3544
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3545
- $fault: "client",
3546
- $metadata,
3378
+ (0, smithy_client_1.throwDefaultError)({
3379
+ output,
3380
+ parsedBody: parsedBody.Error,
3381
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3382
+ errorCode,
3547
3383
  });
3548
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3549
3384
  }
3550
3385
  };
3551
3386
  const deserializeAws_queryModifyReplicationGroupShardConfigurationCommand = async (output, context) => {
@@ -3567,7 +3402,6 @@ const deserializeAws_queryModifyReplicationGroupShardConfigurationCommandError =
3567
3402
  ...output,
3568
3403
  body: await parseBody(output.body, context),
3569
3404
  };
3570
- let response;
3571
3405
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3572
3406
  switch (errorCode) {
3573
3407
  case "InsufficientCacheClusterCapacityFault":
@@ -3602,14 +3436,12 @@ const deserializeAws_queryModifyReplicationGroupShardConfigurationCommandError =
3602
3436
  throw await deserializeAws_queryReplicationGroupNotFoundFaultResponse(parsedOutput, context);
3603
3437
  default:
3604
3438
  const parsedBody = parsedOutput.body;
3605
- const $metadata = deserializeMetadata(output);
3606
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3607
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3608
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3609
- $fault: "client",
3610
- $metadata,
3439
+ (0, smithy_client_1.throwDefaultError)({
3440
+ output,
3441
+ parsedBody: parsedBody.Error,
3442
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3443
+ errorCode,
3611
3444
  });
3612
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3613
3445
  }
3614
3446
  };
3615
3447
  const deserializeAws_queryModifyUserCommand = async (output, context) => {
@@ -3631,7 +3463,6 @@ const deserializeAws_queryModifyUserCommandError = async (output, context) => {
3631
3463
  ...output,
3632
3464
  body: await parseBody(output.body, context),
3633
3465
  };
3634
- let response;
3635
3466
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3636
3467
  switch (errorCode) {
3637
3468
  case "InvalidParameterCombinationException":
@@ -3651,14 +3482,12 @@ const deserializeAws_queryModifyUserCommandError = async (output, context) => {
3651
3482
  throw await deserializeAws_queryUserNotFoundFaultResponse(parsedOutput, context);
3652
3483
  default:
3653
3484
  const parsedBody = parsedOutput.body;
3654
- const $metadata = deserializeMetadata(output);
3655
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3656
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3657
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3658
- $fault: "client",
3659
- $metadata,
3485
+ (0, smithy_client_1.throwDefaultError)({
3486
+ output,
3487
+ parsedBody: parsedBody.Error,
3488
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3489
+ errorCode,
3660
3490
  });
3661
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3662
3491
  }
3663
3492
  };
3664
3493
  const deserializeAws_queryModifyUserGroupCommand = async (output, context) => {
@@ -3680,7 +3509,6 @@ const deserializeAws_queryModifyUserGroupCommandError = async (output, context)
3680
3509
  ...output,
3681
3510
  body: await parseBody(output.body, context),
3682
3511
  };
3683
- let response;
3684
3512
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3685
3513
  switch (errorCode) {
3686
3514
  case "DefaultUserRequired":
@@ -3709,14 +3537,12 @@ const deserializeAws_queryModifyUserGroupCommandError = async (output, context)
3709
3537
  throw await deserializeAws_queryUserNotFoundFaultResponse(parsedOutput, context);
3710
3538
  default:
3711
3539
  const parsedBody = parsedOutput.body;
3712
- const $metadata = deserializeMetadata(output);
3713
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3714
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3715
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3716
- $fault: "client",
3717
- $metadata,
3540
+ (0, smithy_client_1.throwDefaultError)({
3541
+ output,
3542
+ parsedBody: parsedBody.Error,
3543
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3544
+ errorCode,
3718
3545
  });
3719
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3720
3546
  }
3721
3547
  };
3722
3548
  const deserializeAws_queryPurchaseReservedCacheNodesOfferingCommand = async (output, context) => {
@@ -3738,7 +3564,6 @@ const deserializeAws_queryPurchaseReservedCacheNodesOfferingCommandError = async
3738
3564
  ...output,
3739
3565
  body: await parseBody(output.body, context),
3740
3566
  };
3741
- let response;
3742
3567
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3743
3568
  switch (errorCode) {
3744
3569
  case "InvalidParameterCombinationException":
@@ -3761,14 +3586,12 @@ const deserializeAws_queryPurchaseReservedCacheNodesOfferingCommandError = async
3761
3586
  throw await deserializeAws_queryTagQuotaPerResourceExceededResponse(parsedOutput, context);
3762
3587
  default:
3763
3588
  const parsedBody = parsedOutput.body;
3764
- const $metadata = deserializeMetadata(output);
3765
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3766
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3767
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3768
- $fault: "client",
3769
- $metadata,
3589
+ (0, smithy_client_1.throwDefaultError)({
3590
+ output,
3591
+ parsedBody: parsedBody.Error,
3592
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3593
+ errorCode,
3770
3594
  });
3771
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3772
3595
  }
3773
3596
  };
3774
3597
  const deserializeAws_queryRebalanceSlotsInGlobalReplicationGroupCommand = async (output, context) => {
@@ -3790,7 +3613,6 @@ const deserializeAws_queryRebalanceSlotsInGlobalReplicationGroupCommandError = a
3790
3613
  ...output,
3791
3614
  body: await parseBody(output.body, context),
3792
3615
  };
3793
- let response;
3794
3616
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3795
3617
  switch (errorCode) {
3796
3618
  case "GlobalReplicationGroupNotFoundFault":
@@ -3804,14 +3626,12 @@ const deserializeAws_queryRebalanceSlotsInGlobalReplicationGroupCommandError = a
3804
3626
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
3805
3627
  default:
3806
3628
  const parsedBody = parsedOutput.body;
3807
- const $metadata = deserializeMetadata(output);
3808
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3809
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3810
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3811
- $fault: "client",
3812
- $metadata,
3629
+ (0, smithy_client_1.throwDefaultError)({
3630
+ output,
3631
+ parsedBody: parsedBody.Error,
3632
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3633
+ errorCode,
3813
3634
  });
3814
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3815
3635
  }
3816
3636
  };
3817
3637
  const deserializeAws_queryRebootCacheClusterCommand = async (output, context) => {
@@ -3833,7 +3653,6 @@ const deserializeAws_queryRebootCacheClusterCommandError = async (output, contex
3833
3653
  ...output,
3834
3654
  body: await parseBody(output.body, context),
3835
3655
  };
3836
- let response;
3837
3656
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3838
3657
  switch (errorCode) {
3839
3658
  case "CacheClusterNotFoundFault":
@@ -3844,14 +3663,12 @@ const deserializeAws_queryRebootCacheClusterCommandError = async (output, contex
3844
3663
  throw await deserializeAws_queryInvalidCacheClusterStateFaultResponse(parsedOutput, context);
3845
3664
  default:
3846
3665
  const parsedBody = parsedOutput.body;
3847
- const $metadata = deserializeMetadata(output);
3848
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3849
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3850
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3851
- $fault: "client",
3852
- $metadata,
3666
+ (0, smithy_client_1.throwDefaultError)({
3667
+ output,
3668
+ parsedBody: parsedBody.Error,
3669
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3670
+ errorCode,
3853
3671
  });
3854
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3855
3672
  }
3856
3673
  };
3857
3674
  const deserializeAws_queryRemoveTagsFromResourceCommand = async (output, context) => {
@@ -3873,7 +3690,6 @@ const deserializeAws_queryRemoveTagsFromResourceCommandError = async (output, co
3873
3690
  ...output,
3874
3691
  body: await parseBody(output.body, context),
3875
3692
  };
3876
- let response;
3877
3693
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3878
3694
  switch (errorCode) {
3879
3695
  case "CacheClusterNotFoundFault":
@@ -3914,14 +3730,12 @@ const deserializeAws_queryRemoveTagsFromResourceCommandError = async (output, co
3914
3730
  throw await deserializeAws_queryUserNotFoundFaultResponse(parsedOutput, context);
3915
3731
  default:
3916
3732
  const parsedBody = parsedOutput.body;
3917
- const $metadata = deserializeMetadata(output);
3918
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3919
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3920
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3921
- $fault: "client",
3922
- $metadata,
3733
+ (0, smithy_client_1.throwDefaultError)({
3734
+ output,
3735
+ parsedBody: parsedBody.Error,
3736
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3737
+ errorCode,
3923
3738
  });
3924
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3925
3739
  }
3926
3740
  };
3927
3741
  const deserializeAws_queryResetCacheParameterGroupCommand = async (output, context) => {
@@ -3943,7 +3757,6 @@ const deserializeAws_queryResetCacheParameterGroupCommandError = async (output,
3943
3757
  ...output,
3944
3758
  body: await parseBody(output.body, context),
3945
3759
  };
3946
- let response;
3947
3760
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3948
3761
  switch (errorCode) {
3949
3762
  case "CacheParameterGroupNotFoundFault":
@@ -3963,14 +3776,12 @@ const deserializeAws_queryResetCacheParameterGroupCommandError = async (output,
3963
3776
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
3964
3777
  default:
3965
3778
  const parsedBody = parsedOutput.body;
3966
- const $metadata = deserializeMetadata(output);
3967
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3968
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
3969
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
3970
- $fault: "client",
3971
- $metadata,
3779
+ (0, smithy_client_1.throwDefaultError)({
3780
+ output,
3781
+ parsedBody: parsedBody.Error,
3782
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3783
+ errorCode,
3972
3784
  });
3973
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
3974
3785
  }
3975
3786
  };
3976
3787
  const deserializeAws_queryRevokeCacheSecurityGroupIngressCommand = async (output, context) => {
@@ -3992,7 +3803,6 @@ const deserializeAws_queryRevokeCacheSecurityGroupIngressCommandError = async (o
3992
3803
  ...output,
3993
3804
  body: await parseBody(output.body, context),
3994
3805
  };
3995
- let response;
3996
3806
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
3997
3807
  switch (errorCode) {
3998
3808
  case "AuthorizationNotFoundFault":
@@ -4012,14 +3822,12 @@ const deserializeAws_queryRevokeCacheSecurityGroupIngressCommandError = async (o
4012
3822
  throw await deserializeAws_queryInvalidParameterValueExceptionResponse(parsedOutput, context);
4013
3823
  default:
4014
3824
  const parsedBody = parsedOutput.body;
4015
- const $metadata = deserializeMetadata(output);
4016
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4017
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
4018
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
4019
- $fault: "client",
4020
- $metadata,
3825
+ (0, smithy_client_1.throwDefaultError)({
3826
+ output,
3827
+ parsedBody: parsedBody.Error,
3828
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3829
+ errorCode,
4021
3830
  });
4022
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
4023
3831
  }
4024
3832
  };
4025
3833
  const deserializeAws_queryStartMigrationCommand = async (output, context) => {
@@ -4041,7 +3849,6 @@ const deserializeAws_queryStartMigrationCommandError = async (output, context) =
4041
3849
  ...output,
4042
3850
  body: await parseBody(output.body, context),
4043
3851
  };
4044
- let response;
4045
3852
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
4046
3853
  switch (errorCode) {
4047
3854
  case "InvalidParameterValueException":
@@ -4058,14 +3865,12 @@ const deserializeAws_queryStartMigrationCommandError = async (output, context) =
4058
3865
  throw await deserializeAws_queryReplicationGroupNotFoundFaultResponse(parsedOutput, context);
4059
3866
  default:
4060
3867
  const parsedBody = parsedOutput.body;
4061
- const $metadata = deserializeMetadata(output);
4062
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4063
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
4064
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
4065
- $fault: "client",
4066
- $metadata,
3868
+ (0, smithy_client_1.throwDefaultError)({
3869
+ output,
3870
+ parsedBody: parsedBody.Error,
3871
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3872
+ errorCode,
4067
3873
  });
4068
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
4069
3874
  }
4070
3875
  };
4071
3876
  const deserializeAws_queryTestFailoverCommand = async (output, context) => {
@@ -4087,7 +3892,6 @@ const deserializeAws_queryTestFailoverCommandError = async (output, context) =>
4087
3892
  ...output,
4088
3893
  body: await parseBody(output.body, context),
4089
3894
  };
4090
- let response;
4091
3895
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
4092
3896
  switch (errorCode) {
4093
3897
  case "APICallRateForCustomerExceededFault":
@@ -4119,14 +3923,12 @@ const deserializeAws_queryTestFailoverCommandError = async (output, context) =>
4119
3923
  throw await deserializeAws_queryTestFailoverNotAvailableFaultResponse(parsedOutput, context);
4120
3924
  default:
4121
3925
  const parsedBody = parsedOutput.body;
4122
- const $metadata = deserializeMetadata(output);
4123
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4124
- response = new ElastiCacheServiceException_1.ElastiCacheServiceException({
4125
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
4126
- $fault: "client",
4127
- $metadata,
3926
+ (0, smithy_client_1.throwDefaultError)({
3927
+ output,
3928
+ parsedBody: parsedBody.Error,
3929
+ exceptionCtor: ElastiCacheServiceException_1.ElastiCacheServiceException,
3930
+ errorCode,
4128
3931
  });
4129
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
4130
3932
  }
4131
3933
  };
4132
3934
  const deserializeAws_queryAPICallRateForCustomerExceededFaultResponse = async (parsedOutput, context) => {
@@ -4734,10 +4536,10 @@ const deserializeAws_queryUserQuotaExceededFaultResponse = async (parsedOutput,
4734
4536
  };
4735
4537
  const serializeAws_queryAddTagsToResourceMessage = (input, context) => {
4736
4538
  const entries = {};
4737
- if (input.ResourceName !== undefined && input.ResourceName !== null) {
4539
+ if (input.ResourceName != null) {
4738
4540
  entries["ResourceName"] = input.ResourceName;
4739
4541
  }
4740
- if (input.Tags !== undefined && input.Tags !== null) {
4542
+ if (input.Tags != null) {
4741
4543
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
4742
4544
  Object.entries(memberEntries).forEach(([key, value]) => {
4743
4545
  const loc = `Tags.${key}`;
@@ -4748,13 +4550,13 @@ const serializeAws_queryAddTagsToResourceMessage = (input, context) => {
4748
4550
  };
4749
4551
  const serializeAws_queryAuthorizeCacheSecurityGroupIngressMessage = (input, context) => {
4750
4552
  const entries = {};
4751
- if (input.CacheSecurityGroupName !== undefined && input.CacheSecurityGroupName !== null) {
4553
+ if (input.CacheSecurityGroupName != null) {
4752
4554
  entries["CacheSecurityGroupName"] = input.CacheSecurityGroupName;
4753
4555
  }
4754
- if (input.EC2SecurityGroupName !== undefined && input.EC2SecurityGroupName !== null) {
4556
+ if (input.EC2SecurityGroupName != null) {
4755
4557
  entries["EC2SecurityGroupName"] = input.EC2SecurityGroupName;
4756
4558
  }
4757
- if (input.EC2SecurityGroupOwnerId !== undefined && input.EC2SecurityGroupOwnerId !== null) {
4559
+ if (input.EC2SecurityGroupOwnerId != null) {
4758
4560
  entries["EC2SecurityGroupOwnerId"] = input.EC2SecurityGroupOwnerId;
4759
4561
  }
4760
4562
  return entries;
@@ -4773,42 +4575,42 @@ const serializeAws_queryAvailabilityZonesList = (input, context) => {
4773
4575
  };
4774
4576
  const serializeAws_queryBatchApplyUpdateActionMessage = (input, context) => {
4775
4577
  const entries = {};
4776
- if (input.ReplicationGroupIds !== undefined && input.ReplicationGroupIds !== null) {
4578
+ if (input.ReplicationGroupIds != null) {
4777
4579
  const memberEntries = serializeAws_queryReplicationGroupIdList(input.ReplicationGroupIds, context);
4778
4580
  Object.entries(memberEntries).forEach(([key, value]) => {
4779
4581
  const loc = `ReplicationGroupIds.${key}`;
4780
4582
  entries[loc] = value;
4781
4583
  });
4782
4584
  }
4783
- if (input.CacheClusterIds !== undefined && input.CacheClusterIds !== null) {
4585
+ if (input.CacheClusterIds != null) {
4784
4586
  const memberEntries = serializeAws_queryCacheClusterIdList(input.CacheClusterIds, context);
4785
4587
  Object.entries(memberEntries).forEach(([key, value]) => {
4786
4588
  const loc = `CacheClusterIds.${key}`;
4787
4589
  entries[loc] = value;
4788
4590
  });
4789
4591
  }
4790
- if (input.ServiceUpdateName !== undefined && input.ServiceUpdateName !== null) {
4592
+ if (input.ServiceUpdateName != null) {
4791
4593
  entries["ServiceUpdateName"] = input.ServiceUpdateName;
4792
4594
  }
4793
4595
  return entries;
4794
4596
  };
4795
4597
  const serializeAws_queryBatchStopUpdateActionMessage = (input, context) => {
4796
4598
  const entries = {};
4797
- if (input.ReplicationGroupIds !== undefined && input.ReplicationGroupIds !== null) {
4599
+ if (input.ReplicationGroupIds != null) {
4798
4600
  const memberEntries = serializeAws_queryReplicationGroupIdList(input.ReplicationGroupIds, context);
4799
4601
  Object.entries(memberEntries).forEach(([key, value]) => {
4800
4602
  const loc = `ReplicationGroupIds.${key}`;
4801
4603
  entries[loc] = value;
4802
4604
  });
4803
4605
  }
4804
- if (input.CacheClusterIds !== undefined && input.CacheClusterIds !== null) {
4606
+ if (input.CacheClusterIds != null) {
4805
4607
  const memberEntries = serializeAws_queryCacheClusterIdList(input.CacheClusterIds, context);
4806
4608
  Object.entries(memberEntries).forEach(([key, value]) => {
4807
4609
  const loc = `CacheClusterIds.${key}`;
4808
4610
  entries[loc] = value;
4809
4611
  });
4810
4612
  }
4811
- if (input.ServiceUpdateName !== undefined && input.ServiceUpdateName !== null) {
4613
+ if (input.ServiceUpdateName != null) {
4812
4614
  entries["ServiceUpdateName"] = input.ServiceUpdateName;
4813
4615
  }
4814
4616
  return entries;
@@ -4851,37 +4653,37 @@ const serializeAws_queryCacheSecurityGroupNameList = (input, context) => {
4851
4653
  };
4852
4654
  const serializeAws_queryCloudWatchLogsDestinationDetails = (input, context) => {
4853
4655
  const entries = {};
4854
- if (input.LogGroup !== undefined && input.LogGroup !== null) {
4656
+ if (input.LogGroup != null) {
4855
4657
  entries["LogGroup"] = input.LogGroup;
4856
4658
  }
4857
4659
  return entries;
4858
4660
  };
4859
4661
  const serializeAws_queryCompleteMigrationMessage = (input, context) => {
4860
4662
  const entries = {};
4861
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
4663
+ if (input.ReplicationGroupId != null) {
4862
4664
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
4863
4665
  }
4864
- if (input.Force !== undefined && input.Force !== null) {
4666
+ if (input.Force != null) {
4865
4667
  entries["Force"] = input.Force;
4866
4668
  }
4867
4669
  return entries;
4868
4670
  };
4869
4671
  const serializeAws_queryConfigureShard = (input, context) => {
4870
4672
  const entries = {};
4871
- if (input.NodeGroupId !== undefined && input.NodeGroupId !== null) {
4673
+ if (input.NodeGroupId != null) {
4872
4674
  entries["NodeGroupId"] = input.NodeGroupId;
4873
4675
  }
4874
- if (input.NewReplicaCount !== undefined && input.NewReplicaCount !== null) {
4676
+ if (input.NewReplicaCount != null) {
4875
4677
  entries["NewReplicaCount"] = input.NewReplicaCount;
4876
4678
  }
4877
- if (input.PreferredAvailabilityZones !== undefined && input.PreferredAvailabilityZones !== null) {
4679
+ if (input.PreferredAvailabilityZones != null) {
4878
4680
  const memberEntries = serializeAws_queryPreferredAvailabilityZoneList(input.PreferredAvailabilityZones, context);
4879
4681
  Object.entries(memberEntries).forEach(([key, value]) => {
4880
4682
  const loc = `PreferredAvailabilityZones.${key}`;
4881
4683
  entries[loc] = value;
4882
4684
  });
4883
4685
  }
4884
- if (input.PreferredOutpostArns !== undefined && input.PreferredOutpostArns !== null) {
4686
+ if (input.PreferredOutpostArns != null) {
4885
4687
  const memberEntries = serializeAws_queryPreferredOutpostArnList(input.PreferredOutpostArns, context);
4886
4688
  Object.entries(memberEntries).forEach(([key, value]) => {
4887
4689
  const loc = `PreferredOutpostArns.${key}`;
@@ -4892,19 +4694,19 @@ const serializeAws_queryConfigureShard = (input, context) => {
4892
4694
  };
4893
4695
  const serializeAws_queryCopySnapshotMessage = (input, context) => {
4894
4696
  const entries = {};
4895
- if (input.SourceSnapshotName !== undefined && input.SourceSnapshotName !== null) {
4697
+ if (input.SourceSnapshotName != null) {
4896
4698
  entries["SourceSnapshotName"] = input.SourceSnapshotName;
4897
4699
  }
4898
- if (input.TargetSnapshotName !== undefined && input.TargetSnapshotName !== null) {
4700
+ if (input.TargetSnapshotName != null) {
4899
4701
  entries["TargetSnapshotName"] = input.TargetSnapshotName;
4900
4702
  }
4901
- if (input.TargetBucket !== undefined && input.TargetBucket !== null) {
4703
+ if (input.TargetBucket != null) {
4902
4704
  entries["TargetBucket"] = input.TargetBucket;
4903
4705
  }
4904
- if (input.KmsKeyId !== undefined && input.KmsKeyId !== null) {
4706
+ if (input.KmsKeyId != null) {
4905
4707
  entries["KmsKeyId"] = input.KmsKeyId;
4906
4708
  }
4907
- if (input.Tags !== undefined && input.Tags !== null) {
4709
+ if (input.Tags != null) {
4908
4710
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
4909
4711
  Object.entries(memberEntries).forEach(([key, value]) => {
4910
4712
  const loc = `Tags.${key}`;
@@ -4915,132 +4717,132 @@ const serializeAws_queryCopySnapshotMessage = (input, context) => {
4915
4717
  };
4916
4718
  const serializeAws_queryCreateCacheClusterMessage = (input, context) => {
4917
4719
  const entries = {};
4918
- if (input.CacheClusterId !== undefined && input.CacheClusterId !== null) {
4720
+ if (input.CacheClusterId != null) {
4919
4721
  entries["CacheClusterId"] = input.CacheClusterId;
4920
4722
  }
4921
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
4723
+ if (input.ReplicationGroupId != null) {
4922
4724
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
4923
4725
  }
4924
- if (input.AZMode !== undefined && input.AZMode !== null) {
4726
+ if (input.AZMode != null) {
4925
4727
  entries["AZMode"] = input.AZMode;
4926
4728
  }
4927
- if (input.PreferredAvailabilityZone !== undefined && input.PreferredAvailabilityZone !== null) {
4729
+ if (input.PreferredAvailabilityZone != null) {
4928
4730
  entries["PreferredAvailabilityZone"] = input.PreferredAvailabilityZone;
4929
4731
  }
4930
- if (input.PreferredAvailabilityZones !== undefined && input.PreferredAvailabilityZones !== null) {
4732
+ if (input.PreferredAvailabilityZones != null) {
4931
4733
  const memberEntries = serializeAws_queryPreferredAvailabilityZoneList(input.PreferredAvailabilityZones, context);
4932
4734
  Object.entries(memberEntries).forEach(([key, value]) => {
4933
4735
  const loc = `PreferredAvailabilityZones.${key}`;
4934
4736
  entries[loc] = value;
4935
4737
  });
4936
4738
  }
4937
- if (input.NumCacheNodes !== undefined && input.NumCacheNodes !== null) {
4739
+ if (input.NumCacheNodes != null) {
4938
4740
  entries["NumCacheNodes"] = input.NumCacheNodes;
4939
4741
  }
4940
- if (input.CacheNodeType !== undefined && input.CacheNodeType !== null) {
4742
+ if (input.CacheNodeType != null) {
4941
4743
  entries["CacheNodeType"] = input.CacheNodeType;
4942
4744
  }
4943
- if (input.Engine !== undefined && input.Engine !== null) {
4745
+ if (input.Engine != null) {
4944
4746
  entries["Engine"] = input.Engine;
4945
4747
  }
4946
- if (input.EngineVersion !== undefined && input.EngineVersion !== null) {
4748
+ if (input.EngineVersion != null) {
4947
4749
  entries["EngineVersion"] = input.EngineVersion;
4948
4750
  }
4949
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
4751
+ if (input.CacheParameterGroupName != null) {
4950
4752
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
4951
4753
  }
4952
- if (input.CacheSubnetGroupName !== undefined && input.CacheSubnetGroupName !== null) {
4754
+ if (input.CacheSubnetGroupName != null) {
4953
4755
  entries["CacheSubnetGroupName"] = input.CacheSubnetGroupName;
4954
4756
  }
4955
- if (input.CacheSecurityGroupNames !== undefined && input.CacheSecurityGroupNames !== null) {
4757
+ if (input.CacheSecurityGroupNames != null) {
4956
4758
  const memberEntries = serializeAws_queryCacheSecurityGroupNameList(input.CacheSecurityGroupNames, context);
4957
4759
  Object.entries(memberEntries).forEach(([key, value]) => {
4958
4760
  const loc = `CacheSecurityGroupNames.${key}`;
4959
4761
  entries[loc] = value;
4960
4762
  });
4961
4763
  }
4962
- if (input.SecurityGroupIds !== undefined && input.SecurityGroupIds !== null) {
4764
+ if (input.SecurityGroupIds != null) {
4963
4765
  const memberEntries = serializeAws_querySecurityGroupIdsList(input.SecurityGroupIds, context);
4964
4766
  Object.entries(memberEntries).forEach(([key, value]) => {
4965
4767
  const loc = `SecurityGroupIds.${key}`;
4966
4768
  entries[loc] = value;
4967
4769
  });
4968
4770
  }
4969
- if (input.Tags !== undefined && input.Tags !== null) {
4771
+ if (input.Tags != null) {
4970
4772
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
4971
4773
  Object.entries(memberEntries).forEach(([key, value]) => {
4972
4774
  const loc = `Tags.${key}`;
4973
4775
  entries[loc] = value;
4974
4776
  });
4975
4777
  }
4976
- if (input.SnapshotArns !== undefined && input.SnapshotArns !== null) {
4778
+ if (input.SnapshotArns != null) {
4977
4779
  const memberEntries = serializeAws_querySnapshotArnsList(input.SnapshotArns, context);
4978
4780
  Object.entries(memberEntries).forEach(([key, value]) => {
4979
4781
  const loc = `SnapshotArns.${key}`;
4980
4782
  entries[loc] = value;
4981
4783
  });
4982
4784
  }
4983
- if (input.SnapshotName !== undefined && input.SnapshotName !== null) {
4785
+ if (input.SnapshotName != null) {
4984
4786
  entries["SnapshotName"] = input.SnapshotName;
4985
4787
  }
4986
- if (input.PreferredMaintenanceWindow !== undefined && input.PreferredMaintenanceWindow !== null) {
4788
+ if (input.PreferredMaintenanceWindow != null) {
4987
4789
  entries["PreferredMaintenanceWindow"] = input.PreferredMaintenanceWindow;
4988
4790
  }
4989
- if (input.Port !== undefined && input.Port !== null) {
4791
+ if (input.Port != null) {
4990
4792
  entries["Port"] = input.Port;
4991
4793
  }
4992
- if (input.NotificationTopicArn !== undefined && input.NotificationTopicArn !== null) {
4794
+ if (input.NotificationTopicArn != null) {
4993
4795
  entries["NotificationTopicArn"] = input.NotificationTopicArn;
4994
4796
  }
4995
- if (input.AutoMinorVersionUpgrade !== undefined && input.AutoMinorVersionUpgrade !== null) {
4797
+ if (input.AutoMinorVersionUpgrade != null) {
4996
4798
  entries["AutoMinorVersionUpgrade"] = input.AutoMinorVersionUpgrade;
4997
4799
  }
4998
- if (input.SnapshotRetentionLimit !== undefined && input.SnapshotRetentionLimit !== null) {
4800
+ if (input.SnapshotRetentionLimit != null) {
4999
4801
  entries["SnapshotRetentionLimit"] = input.SnapshotRetentionLimit;
5000
4802
  }
5001
- if (input.SnapshotWindow !== undefined && input.SnapshotWindow !== null) {
4803
+ if (input.SnapshotWindow != null) {
5002
4804
  entries["SnapshotWindow"] = input.SnapshotWindow;
5003
4805
  }
5004
- if (input.AuthToken !== undefined && input.AuthToken !== null) {
4806
+ if (input.AuthToken != null) {
5005
4807
  entries["AuthToken"] = input.AuthToken;
5006
4808
  }
5007
- if (input.OutpostMode !== undefined && input.OutpostMode !== null) {
4809
+ if (input.OutpostMode != null) {
5008
4810
  entries["OutpostMode"] = input.OutpostMode;
5009
4811
  }
5010
- if (input.PreferredOutpostArn !== undefined && input.PreferredOutpostArn !== null) {
4812
+ if (input.PreferredOutpostArn != null) {
5011
4813
  entries["PreferredOutpostArn"] = input.PreferredOutpostArn;
5012
4814
  }
5013
- if (input.PreferredOutpostArns !== undefined && input.PreferredOutpostArns !== null) {
4815
+ if (input.PreferredOutpostArns != null) {
5014
4816
  const memberEntries = serializeAws_queryPreferredOutpostArnList(input.PreferredOutpostArns, context);
5015
4817
  Object.entries(memberEntries).forEach(([key, value]) => {
5016
4818
  const loc = `PreferredOutpostArns.${key}`;
5017
4819
  entries[loc] = value;
5018
4820
  });
5019
4821
  }
5020
- if (input.LogDeliveryConfigurations !== undefined && input.LogDeliveryConfigurations !== null) {
4822
+ if (input.LogDeliveryConfigurations != null) {
5021
4823
  const memberEntries = serializeAws_queryLogDeliveryConfigurationRequestList(input.LogDeliveryConfigurations, context);
5022
4824
  Object.entries(memberEntries).forEach(([key, value]) => {
5023
4825
  const loc = `LogDeliveryConfigurations.${key}`;
5024
4826
  entries[loc] = value;
5025
4827
  });
5026
4828
  }
5027
- if (input.TransitEncryptionEnabled !== undefined && input.TransitEncryptionEnabled !== null) {
4829
+ if (input.TransitEncryptionEnabled != null) {
5028
4830
  entries["TransitEncryptionEnabled"] = input.TransitEncryptionEnabled;
5029
4831
  }
5030
4832
  return entries;
5031
4833
  };
5032
4834
  const serializeAws_queryCreateCacheParameterGroupMessage = (input, context) => {
5033
4835
  const entries = {};
5034
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
4836
+ if (input.CacheParameterGroupName != null) {
5035
4837
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
5036
4838
  }
5037
- if (input.CacheParameterGroupFamily !== undefined && input.CacheParameterGroupFamily !== null) {
4839
+ if (input.CacheParameterGroupFamily != null) {
5038
4840
  entries["CacheParameterGroupFamily"] = input.CacheParameterGroupFamily;
5039
4841
  }
5040
- if (input.Description !== undefined && input.Description !== null) {
4842
+ if (input.Description != null) {
5041
4843
  entries["Description"] = input.Description;
5042
4844
  }
5043
- if (input.Tags !== undefined && input.Tags !== null) {
4845
+ if (input.Tags != null) {
5044
4846
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
5045
4847
  Object.entries(memberEntries).forEach(([key, value]) => {
5046
4848
  const loc = `Tags.${key}`;
@@ -5051,13 +4853,13 @@ const serializeAws_queryCreateCacheParameterGroupMessage = (input, context) => {
5051
4853
  };
5052
4854
  const serializeAws_queryCreateCacheSecurityGroupMessage = (input, context) => {
5053
4855
  const entries = {};
5054
- if (input.CacheSecurityGroupName !== undefined && input.CacheSecurityGroupName !== null) {
4856
+ if (input.CacheSecurityGroupName != null) {
5055
4857
  entries["CacheSecurityGroupName"] = input.CacheSecurityGroupName;
5056
4858
  }
5057
- if (input.Description !== undefined && input.Description !== null) {
4859
+ if (input.Description != null) {
5058
4860
  entries["Description"] = input.Description;
5059
4861
  }
5060
- if (input.Tags !== undefined && input.Tags !== null) {
4862
+ if (input.Tags != null) {
5061
4863
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
5062
4864
  Object.entries(memberEntries).forEach(([key, value]) => {
5063
4865
  const loc = `Tags.${key}`;
@@ -5068,20 +4870,20 @@ const serializeAws_queryCreateCacheSecurityGroupMessage = (input, context) => {
5068
4870
  };
5069
4871
  const serializeAws_queryCreateCacheSubnetGroupMessage = (input, context) => {
5070
4872
  const entries = {};
5071
- if (input.CacheSubnetGroupName !== undefined && input.CacheSubnetGroupName !== null) {
4873
+ if (input.CacheSubnetGroupName != null) {
5072
4874
  entries["CacheSubnetGroupName"] = input.CacheSubnetGroupName;
5073
4875
  }
5074
- if (input.CacheSubnetGroupDescription !== undefined && input.CacheSubnetGroupDescription !== null) {
4876
+ if (input.CacheSubnetGroupDescription != null) {
5075
4877
  entries["CacheSubnetGroupDescription"] = input.CacheSubnetGroupDescription;
5076
4878
  }
5077
- if (input.SubnetIds !== undefined && input.SubnetIds !== null) {
4879
+ if (input.SubnetIds != null) {
5078
4880
  const memberEntries = serializeAws_querySubnetIdentifierList(input.SubnetIds, context);
5079
4881
  Object.entries(memberEntries).forEach(([key, value]) => {
5080
4882
  const loc = `SubnetIds.${key}`;
5081
4883
  entries[loc] = value;
5082
4884
  });
5083
4885
  }
5084
- if (input.Tags !== undefined && input.Tags !== null) {
4886
+ if (input.Tags != null) {
5085
4887
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
5086
4888
  Object.entries(memberEntries).forEach(([key, value]) => {
5087
4889
  const loc = `Tags.${key}`;
@@ -5092,170 +4894,170 @@ const serializeAws_queryCreateCacheSubnetGroupMessage = (input, context) => {
5092
4894
  };
5093
4895
  const serializeAws_queryCreateGlobalReplicationGroupMessage = (input, context) => {
5094
4896
  const entries = {};
5095
- if (input.GlobalReplicationGroupIdSuffix !== undefined && input.GlobalReplicationGroupIdSuffix !== null) {
4897
+ if (input.GlobalReplicationGroupIdSuffix != null) {
5096
4898
  entries["GlobalReplicationGroupIdSuffix"] = input.GlobalReplicationGroupIdSuffix;
5097
4899
  }
5098
- if (input.GlobalReplicationGroupDescription !== undefined && input.GlobalReplicationGroupDescription !== null) {
4900
+ if (input.GlobalReplicationGroupDescription != null) {
5099
4901
  entries["GlobalReplicationGroupDescription"] = input.GlobalReplicationGroupDescription;
5100
4902
  }
5101
- if (input.PrimaryReplicationGroupId !== undefined && input.PrimaryReplicationGroupId !== null) {
4903
+ if (input.PrimaryReplicationGroupId != null) {
5102
4904
  entries["PrimaryReplicationGroupId"] = input.PrimaryReplicationGroupId;
5103
4905
  }
5104
4906
  return entries;
5105
4907
  };
5106
4908
  const serializeAws_queryCreateReplicationGroupMessage = (input, context) => {
5107
4909
  const entries = {};
5108
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
4910
+ if (input.ReplicationGroupId != null) {
5109
4911
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5110
4912
  }
5111
- if (input.ReplicationGroupDescription !== undefined && input.ReplicationGroupDescription !== null) {
4913
+ if (input.ReplicationGroupDescription != null) {
5112
4914
  entries["ReplicationGroupDescription"] = input.ReplicationGroupDescription;
5113
4915
  }
5114
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
4916
+ if (input.GlobalReplicationGroupId != null) {
5115
4917
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
5116
4918
  }
5117
- if (input.PrimaryClusterId !== undefined && input.PrimaryClusterId !== null) {
4919
+ if (input.PrimaryClusterId != null) {
5118
4920
  entries["PrimaryClusterId"] = input.PrimaryClusterId;
5119
4921
  }
5120
- if (input.AutomaticFailoverEnabled !== undefined && input.AutomaticFailoverEnabled !== null) {
4922
+ if (input.AutomaticFailoverEnabled != null) {
5121
4923
  entries["AutomaticFailoverEnabled"] = input.AutomaticFailoverEnabled;
5122
4924
  }
5123
- if (input.MultiAZEnabled !== undefined && input.MultiAZEnabled !== null) {
4925
+ if (input.MultiAZEnabled != null) {
5124
4926
  entries["MultiAZEnabled"] = input.MultiAZEnabled;
5125
4927
  }
5126
- if (input.NumCacheClusters !== undefined && input.NumCacheClusters !== null) {
4928
+ if (input.NumCacheClusters != null) {
5127
4929
  entries["NumCacheClusters"] = input.NumCacheClusters;
5128
4930
  }
5129
- if (input.PreferredCacheClusterAZs !== undefined && input.PreferredCacheClusterAZs !== null) {
4931
+ if (input.PreferredCacheClusterAZs != null) {
5130
4932
  const memberEntries = serializeAws_queryAvailabilityZonesList(input.PreferredCacheClusterAZs, context);
5131
4933
  Object.entries(memberEntries).forEach(([key, value]) => {
5132
4934
  const loc = `PreferredCacheClusterAZs.${key}`;
5133
4935
  entries[loc] = value;
5134
4936
  });
5135
4937
  }
5136
- if (input.NumNodeGroups !== undefined && input.NumNodeGroups !== null) {
4938
+ if (input.NumNodeGroups != null) {
5137
4939
  entries["NumNodeGroups"] = input.NumNodeGroups;
5138
4940
  }
5139
- if (input.ReplicasPerNodeGroup !== undefined && input.ReplicasPerNodeGroup !== null) {
4941
+ if (input.ReplicasPerNodeGroup != null) {
5140
4942
  entries["ReplicasPerNodeGroup"] = input.ReplicasPerNodeGroup;
5141
4943
  }
5142
- if (input.NodeGroupConfiguration !== undefined && input.NodeGroupConfiguration !== null) {
4944
+ if (input.NodeGroupConfiguration != null) {
5143
4945
  const memberEntries = serializeAws_queryNodeGroupConfigurationList(input.NodeGroupConfiguration, context);
5144
4946
  Object.entries(memberEntries).forEach(([key, value]) => {
5145
4947
  const loc = `NodeGroupConfiguration.${key}`;
5146
4948
  entries[loc] = value;
5147
4949
  });
5148
4950
  }
5149
- if (input.CacheNodeType !== undefined && input.CacheNodeType !== null) {
4951
+ if (input.CacheNodeType != null) {
5150
4952
  entries["CacheNodeType"] = input.CacheNodeType;
5151
4953
  }
5152
- if (input.Engine !== undefined && input.Engine !== null) {
4954
+ if (input.Engine != null) {
5153
4955
  entries["Engine"] = input.Engine;
5154
4956
  }
5155
- if (input.EngineVersion !== undefined && input.EngineVersion !== null) {
4957
+ if (input.EngineVersion != null) {
5156
4958
  entries["EngineVersion"] = input.EngineVersion;
5157
4959
  }
5158
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
4960
+ if (input.CacheParameterGroupName != null) {
5159
4961
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
5160
4962
  }
5161
- if (input.CacheSubnetGroupName !== undefined && input.CacheSubnetGroupName !== null) {
4963
+ if (input.CacheSubnetGroupName != null) {
5162
4964
  entries["CacheSubnetGroupName"] = input.CacheSubnetGroupName;
5163
4965
  }
5164
- if (input.CacheSecurityGroupNames !== undefined && input.CacheSecurityGroupNames !== null) {
4966
+ if (input.CacheSecurityGroupNames != null) {
5165
4967
  const memberEntries = serializeAws_queryCacheSecurityGroupNameList(input.CacheSecurityGroupNames, context);
5166
4968
  Object.entries(memberEntries).forEach(([key, value]) => {
5167
4969
  const loc = `CacheSecurityGroupNames.${key}`;
5168
4970
  entries[loc] = value;
5169
4971
  });
5170
4972
  }
5171
- if (input.SecurityGroupIds !== undefined && input.SecurityGroupIds !== null) {
4973
+ if (input.SecurityGroupIds != null) {
5172
4974
  const memberEntries = serializeAws_querySecurityGroupIdsList(input.SecurityGroupIds, context);
5173
4975
  Object.entries(memberEntries).forEach(([key, value]) => {
5174
4976
  const loc = `SecurityGroupIds.${key}`;
5175
4977
  entries[loc] = value;
5176
4978
  });
5177
4979
  }
5178
- if (input.Tags !== undefined && input.Tags !== null) {
4980
+ if (input.Tags != null) {
5179
4981
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
5180
4982
  Object.entries(memberEntries).forEach(([key, value]) => {
5181
4983
  const loc = `Tags.${key}`;
5182
4984
  entries[loc] = value;
5183
4985
  });
5184
4986
  }
5185
- if (input.SnapshotArns !== undefined && input.SnapshotArns !== null) {
4987
+ if (input.SnapshotArns != null) {
5186
4988
  const memberEntries = serializeAws_querySnapshotArnsList(input.SnapshotArns, context);
5187
4989
  Object.entries(memberEntries).forEach(([key, value]) => {
5188
4990
  const loc = `SnapshotArns.${key}`;
5189
4991
  entries[loc] = value;
5190
4992
  });
5191
4993
  }
5192
- if (input.SnapshotName !== undefined && input.SnapshotName !== null) {
4994
+ if (input.SnapshotName != null) {
5193
4995
  entries["SnapshotName"] = input.SnapshotName;
5194
4996
  }
5195
- if (input.PreferredMaintenanceWindow !== undefined && input.PreferredMaintenanceWindow !== null) {
4997
+ if (input.PreferredMaintenanceWindow != null) {
5196
4998
  entries["PreferredMaintenanceWindow"] = input.PreferredMaintenanceWindow;
5197
4999
  }
5198
- if (input.Port !== undefined && input.Port !== null) {
5000
+ if (input.Port != null) {
5199
5001
  entries["Port"] = input.Port;
5200
5002
  }
5201
- if (input.NotificationTopicArn !== undefined && input.NotificationTopicArn !== null) {
5003
+ if (input.NotificationTopicArn != null) {
5202
5004
  entries["NotificationTopicArn"] = input.NotificationTopicArn;
5203
5005
  }
5204
- if (input.AutoMinorVersionUpgrade !== undefined && input.AutoMinorVersionUpgrade !== null) {
5006
+ if (input.AutoMinorVersionUpgrade != null) {
5205
5007
  entries["AutoMinorVersionUpgrade"] = input.AutoMinorVersionUpgrade;
5206
5008
  }
5207
- if (input.SnapshotRetentionLimit !== undefined && input.SnapshotRetentionLimit !== null) {
5009
+ if (input.SnapshotRetentionLimit != null) {
5208
5010
  entries["SnapshotRetentionLimit"] = input.SnapshotRetentionLimit;
5209
5011
  }
5210
- if (input.SnapshotWindow !== undefined && input.SnapshotWindow !== null) {
5012
+ if (input.SnapshotWindow != null) {
5211
5013
  entries["SnapshotWindow"] = input.SnapshotWindow;
5212
5014
  }
5213
- if (input.AuthToken !== undefined && input.AuthToken !== null) {
5015
+ if (input.AuthToken != null) {
5214
5016
  entries["AuthToken"] = input.AuthToken;
5215
5017
  }
5216
- if (input.TransitEncryptionEnabled !== undefined && input.TransitEncryptionEnabled !== null) {
5018
+ if (input.TransitEncryptionEnabled != null) {
5217
5019
  entries["TransitEncryptionEnabled"] = input.TransitEncryptionEnabled;
5218
5020
  }
5219
- if (input.AtRestEncryptionEnabled !== undefined && input.AtRestEncryptionEnabled !== null) {
5021
+ if (input.AtRestEncryptionEnabled != null) {
5220
5022
  entries["AtRestEncryptionEnabled"] = input.AtRestEncryptionEnabled;
5221
5023
  }
5222
- if (input.KmsKeyId !== undefined && input.KmsKeyId !== null) {
5024
+ if (input.KmsKeyId != null) {
5223
5025
  entries["KmsKeyId"] = input.KmsKeyId;
5224
5026
  }
5225
- if (input.UserGroupIds !== undefined && input.UserGroupIds !== null) {
5027
+ if (input.UserGroupIds != null) {
5226
5028
  const memberEntries = serializeAws_queryUserGroupIdListInput(input.UserGroupIds, context);
5227
5029
  Object.entries(memberEntries).forEach(([key, value]) => {
5228
5030
  const loc = `UserGroupIds.${key}`;
5229
5031
  entries[loc] = value;
5230
5032
  });
5231
5033
  }
5232
- if (input.LogDeliveryConfigurations !== undefined && input.LogDeliveryConfigurations !== null) {
5034
+ if (input.LogDeliveryConfigurations != null) {
5233
5035
  const memberEntries = serializeAws_queryLogDeliveryConfigurationRequestList(input.LogDeliveryConfigurations, context);
5234
5036
  Object.entries(memberEntries).forEach(([key, value]) => {
5235
5037
  const loc = `LogDeliveryConfigurations.${key}`;
5236
5038
  entries[loc] = value;
5237
5039
  });
5238
5040
  }
5239
- if (input.DataTieringEnabled !== undefined && input.DataTieringEnabled !== null) {
5041
+ if (input.DataTieringEnabled != null) {
5240
5042
  entries["DataTieringEnabled"] = input.DataTieringEnabled;
5241
5043
  }
5242
5044
  return entries;
5243
5045
  };
5244
5046
  const serializeAws_queryCreateSnapshotMessage = (input, context) => {
5245
5047
  const entries = {};
5246
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5048
+ if (input.ReplicationGroupId != null) {
5247
5049
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5248
5050
  }
5249
- if (input.CacheClusterId !== undefined && input.CacheClusterId !== null) {
5051
+ if (input.CacheClusterId != null) {
5250
5052
  entries["CacheClusterId"] = input.CacheClusterId;
5251
5053
  }
5252
- if (input.SnapshotName !== undefined && input.SnapshotName !== null) {
5054
+ if (input.SnapshotName != null) {
5253
5055
  entries["SnapshotName"] = input.SnapshotName;
5254
5056
  }
5255
- if (input.KmsKeyId !== undefined && input.KmsKeyId !== null) {
5057
+ if (input.KmsKeyId != null) {
5256
5058
  entries["KmsKeyId"] = input.KmsKeyId;
5257
5059
  }
5258
- if (input.Tags !== undefined && input.Tags !== null) {
5060
+ if (input.Tags != null) {
5259
5061
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
5260
5062
  Object.entries(memberEntries).forEach(([key, value]) => {
5261
5063
  const loc = `Tags.${key}`;
@@ -5266,20 +5068,20 @@ const serializeAws_queryCreateSnapshotMessage = (input, context) => {
5266
5068
  };
5267
5069
  const serializeAws_queryCreateUserGroupMessage = (input, context) => {
5268
5070
  const entries = {};
5269
- if (input.UserGroupId !== undefined && input.UserGroupId !== null) {
5071
+ if (input.UserGroupId != null) {
5270
5072
  entries["UserGroupId"] = input.UserGroupId;
5271
5073
  }
5272
- if (input.Engine !== undefined && input.Engine !== null) {
5074
+ if (input.Engine != null) {
5273
5075
  entries["Engine"] = input.Engine;
5274
5076
  }
5275
- if (input.UserIds !== undefined && input.UserIds !== null) {
5077
+ if (input.UserIds != null) {
5276
5078
  const memberEntries = serializeAws_queryUserIdListInput(input.UserIds, context);
5277
5079
  Object.entries(memberEntries).forEach(([key, value]) => {
5278
5080
  const loc = `UserIds.${key}`;
5279
5081
  entries[loc] = value;
5280
5082
  });
5281
5083
  }
5282
- if (input.Tags !== undefined && input.Tags !== null) {
5084
+ if (input.Tags != null) {
5283
5085
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
5284
5086
  Object.entries(memberEntries).forEach(([key, value]) => {
5285
5087
  const loc = `Tags.${key}`;
@@ -5290,29 +5092,29 @@ const serializeAws_queryCreateUserGroupMessage = (input, context) => {
5290
5092
  };
5291
5093
  const serializeAws_queryCreateUserMessage = (input, context) => {
5292
5094
  const entries = {};
5293
- if (input.UserId !== undefined && input.UserId !== null) {
5095
+ if (input.UserId != null) {
5294
5096
  entries["UserId"] = input.UserId;
5295
5097
  }
5296
- if (input.UserName !== undefined && input.UserName !== null) {
5098
+ if (input.UserName != null) {
5297
5099
  entries["UserName"] = input.UserName;
5298
5100
  }
5299
- if (input.Engine !== undefined && input.Engine !== null) {
5101
+ if (input.Engine != null) {
5300
5102
  entries["Engine"] = input.Engine;
5301
5103
  }
5302
- if (input.Passwords !== undefined && input.Passwords !== null) {
5104
+ if (input.Passwords != null) {
5303
5105
  const memberEntries = serializeAws_queryPasswordListInput(input.Passwords, context);
5304
5106
  Object.entries(memberEntries).forEach(([key, value]) => {
5305
5107
  const loc = `Passwords.${key}`;
5306
5108
  entries[loc] = value;
5307
5109
  });
5308
5110
  }
5309
- if (input.AccessString !== undefined && input.AccessString !== null) {
5111
+ if (input.AccessString != null) {
5310
5112
  entries["AccessString"] = input.AccessString;
5311
5113
  }
5312
- if (input.NoPasswordRequired !== undefined && input.NoPasswordRequired !== null) {
5114
+ if (input.NoPasswordRequired != null) {
5313
5115
  entries["NoPasswordRequired"] = input.NoPasswordRequired;
5314
5116
  }
5315
- if (input.Tags !== undefined && input.Tags !== null) {
5117
+ if (input.Tags != null) {
5316
5118
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
5317
5119
  Object.entries(memberEntries).forEach(([key, value]) => {
5318
5120
  const loc = `Tags.${key}`;
@@ -5323,10 +5125,10 @@ const serializeAws_queryCreateUserMessage = (input, context) => {
5323
5125
  };
5324
5126
  const serializeAws_queryCustomerNodeEndpoint = (input, context) => {
5325
5127
  const entries = {};
5326
- if (input.Address !== undefined && input.Address !== null) {
5128
+ if (input.Address != null) {
5327
5129
  entries["Address"] = input.Address;
5328
5130
  }
5329
- if (input.Port !== undefined && input.Port !== null) {
5131
+ if (input.Port != null) {
5330
5132
  entries["Port"] = input.Port;
5331
5133
  }
5332
5134
  return entries;
@@ -5348,495 +5150,494 @@ const serializeAws_queryCustomerNodeEndpointList = (input, context) => {
5348
5150
  };
5349
5151
  const serializeAws_queryDecreaseNodeGroupsInGlobalReplicationGroupMessage = (input, context) => {
5350
5152
  const entries = {};
5351
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
5153
+ if (input.GlobalReplicationGroupId != null) {
5352
5154
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
5353
5155
  }
5354
- if (input.NodeGroupCount !== undefined && input.NodeGroupCount !== null) {
5156
+ if (input.NodeGroupCount != null) {
5355
5157
  entries["NodeGroupCount"] = input.NodeGroupCount;
5356
5158
  }
5357
- if (input.GlobalNodeGroupsToRemove !== undefined && input.GlobalNodeGroupsToRemove !== null) {
5159
+ if (input.GlobalNodeGroupsToRemove != null) {
5358
5160
  const memberEntries = serializeAws_queryGlobalNodeGroupIdList(input.GlobalNodeGroupsToRemove, context);
5359
5161
  Object.entries(memberEntries).forEach(([key, value]) => {
5360
5162
  const loc = `GlobalNodeGroupsToRemove.${key}`;
5361
5163
  entries[loc] = value;
5362
5164
  });
5363
5165
  }
5364
- if (input.GlobalNodeGroupsToRetain !== undefined && input.GlobalNodeGroupsToRetain !== null) {
5166
+ if (input.GlobalNodeGroupsToRetain != null) {
5365
5167
  const memberEntries = serializeAws_queryGlobalNodeGroupIdList(input.GlobalNodeGroupsToRetain, context);
5366
5168
  Object.entries(memberEntries).forEach(([key, value]) => {
5367
5169
  const loc = `GlobalNodeGroupsToRetain.${key}`;
5368
5170
  entries[loc] = value;
5369
5171
  });
5370
5172
  }
5371
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
5173
+ if (input.ApplyImmediately != null) {
5372
5174
  entries["ApplyImmediately"] = input.ApplyImmediately;
5373
5175
  }
5374
5176
  return entries;
5375
5177
  };
5376
5178
  const serializeAws_queryDecreaseReplicaCountMessage = (input, context) => {
5377
5179
  const entries = {};
5378
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5180
+ if (input.ReplicationGroupId != null) {
5379
5181
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5380
5182
  }
5381
- if (input.NewReplicaCount !== undefined && input.NewReplicaCount !== null) {
5183
+ if (input.NewReplicaCount != null) {
5382
5184
  entries["NewReplicaCount"] = input.NewReplicaCount;
5383
5185
  }
5384
- if (input.ReplicaConfiguration !== undefined && input.ReplicaConfiguration !== null) {
5186
+ if (input.ReplicaConfiguration != null) {
5385
5187
  const memberEntries = serializeAws_queryReplicaConfigurationList(input.ReplicaConfiguration, context);
5386
5188
  Object.entries(memberEntries).forEach(([key, value]) => {
5387
5189
  const loc = `ReplicaConfiguration.${key}`;
5388
5190
  entries[loc] = value;
5389
5191
  });
5390
5192
  }
5391
- if (input.ReplicasToRemove !== undefined && input.ReplicasToRemove !== null) {
5193
+ if (input.ReplicasToRemove != null) {
5392
5194
  const memberEntries = serializeAws_queryRemoveReplicasList(input.ReplicasToRemove, context);
5393
5195
  Object.entries(memberEntries).forEach(([key, value]) => {
5394
5196
  const loc = `ReplicasToRemove.${key}`;
5395
5197
  entries[loc] = value;
5396
5198
  });
5397
5199
  }
5398
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
5200
+ if (input.ApplyImmediately != null) {
5399
5201
  entries["ApplyImmediately"] = input.ApplyImmediately;
5400
5202
  }
5401
5203
  return entries;
5402
5204
  };
5403
5205
  const serializeAws_queryDeleteCacheClusterMessage = (input, context) => {
5404
5206
  const entries = {};
5405
- if (input.CacheClusterId !== undefined && input.CacheClusterId !== null) {
5207
+ if (input.CacheClusterId != null) {
5406
5208
  entries["CacheClusterId"] = input.CacheClusterId;
5407
5209
  }
5408
- if (input.FinalSnapshotIdentifier !== undefined && input.FinalSnapshotIdentifier !== null) {
5210
+ if (input.FinalSnapshotIdentifier != null) {
5409
5211
  entries["FinalSnapshotIdentifier"] = input.FinalSnapshotIdentifier;
5410
5212
  }
5411
5213
  return entries;
5412
5214
  };
5413
5215
  const serializeAws_queryDeleteCacheParameterGroupMessage = (input, context) => {
5414
5216
  const entries = {};
5415
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
5217
+ if (input.CacheParameterGroupName != null) {
5416
5218
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
5417
5219
  }
5418
5220
  return entries;
5419
5221
  };
5420
5222
  const serializeAws_queryDeleteCacheSecurityGroupMessage = (input, context) => {
5421
5223
  const entries = {};
5422
- if (input.CacheSecurityGroupName !== undefined && input.CacheSecurityGroupName !== null) {
5224
+ if (input.CacheSecurityGroupName != null) {
5423
5225
  entries["CacheSecurityGroupName"] = input.CacheSecurityGroupName;
5424
5226
  }
5425
5227
  return entries;
5426
5228
  };
5427
5229
  const serializeAws_queryDeleteCacheSubnetGroupMessage = (input, context) => {
5428
5230
  const entries = {};
5429
- if (input.CacheSubnetGroupName !== undefined && input.CacheSubnetGroupName !== null) {
5231
+ if (input.CacheSubnetGroupName != null) {
5430
5232
  entries["CacheSubnetGroupName"] = input.CacheSubnetGroupName;
5431
5233
  }
5432
5234
  return entries;
5433
5235
  };
5434
5236
  const serializeAws_queryDeleteGlobalReplicationGroupMessage = (input, context) => {
5435
5237
  const entries = {};
5436
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
5238
+ if (input.GlobalReplicationGroupId != null) {
5437
5239
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
5438
5240
  }
5439
- if (input.RetainPrimaryReplicationGroup !== undefined && input.RetainPrimaryReplicationGroup !== null) {
5241
+ if (input.RetainPrimaryReplicationGroup != null) {
5440
5242
  entries["RetainPrimaryReplicationGroup"] = input.RetainPrimaryReplicationGroup;
5441
5243
  }
5442
5244
  return entries;
5443
5245
  };
5444
5246
  const serializeAws_queryDeleteReplicationGroupMessage = (input, context) => {
5445
5247
  const entries = {};
5446
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5248
+ if (input.ReplicationGroupId != null) {
5447
5249
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5448
5250
  }
5449
- if (input.RetainPrimaryCluster !== undefined && input.RetainPrimaryCluster !== null) {
5251
+ if (input.RetainPrimaryCluster != null) {
5450
5252
  entries["RetainPrimaryCluster"] = input.RetainPrimaryCluster;
5451
5253
  }
5452
- if (input.FinalSnapshotIdentifier !== undefined && input.FinalSnapshotIdentifier !== null) {
5254
+ if (input.FinalSnapshotIdentifier != null) {
5453
5255
  entries["FinalSnapshotIdentifier"] = input.FinalSnapshotIdentifier;
5454
5256
  }
5455
5257
  return entries;
5456
5258
  };
5457
5259
  const serializeAws_queryDeleteSnapshotMessage = (input, context) => {
5458
5260
  const entries = {};
5459
- if (input.SnapshotName !== undefined && input.SnapshotName !== null) {
5261
+ if (input.SnapshotName != null) {
5460
5262
  entries["SnapshotName"] = input.SnapshotName;
5461
5263
  }
5462
5264
  return entries;
5463
5265
  };
5464
5266
  const serializeAws_queryDeleteUserGroupMessage = (input, context) => {
5465
5267
  const entries = {};
5466
- if (input.UserGroupId !== undefined && input.UserGroupId !== null) {
5268
+ if (input.UserGroupId != null) {
5467
5269
  entries["UserGroupId"] = input.UserGroupId;
5468
5270
  }
5469
5271
  return entries;
5470
5272
  };
5471
5273
  const serializeAws_queryDeleteUserMessage = (input, context) => {
5472
5274
  const entries = {};
5473
- if (input.UserId !== undefined && input.UserId !== null) {
5275
+ if (input.UserId != null) {
5474
5276
  entries["UserId"] = input.UserId;
5475
5277
  }
5476
5278
  return entries;
5477
5279
  };
5478
5280
  const serializeAws_queryDescribeCacheClustersMessage = (input, context) => {
5479
5281
  const entries = {};
5480
- if (input.CacheClusterId !== undefined && input.CacheClusterId !== null) {
5282
+ if (input.CacheClusterId != null) {
5481
5283
  entries["CacheClusterId"] = input.CacheClusterId;
5482
5284
  }
5483
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5285
+ if (input.MaxRecords != null) {
5484
5286
  entries["MaxRecords"] = input.MaxRecords;
5485
5287
  }
5486
- if (input.Marker !== undefined && input.Marker !== null) {
5288
+ if (input.Marker != null) {
5487
5289
  entries["Marker"] = input.Marker;
5488
5290
  }
5489
- if (input.ShowCacheNodeInfo !== undefined && input.ShowCacheNodeInfo !== null) {
5291
+ if (input.ShowCacheNodeInfo != null) {
5490
5292
  entries["ShowCacheNodeInfo"] = input.ShowCacheNodeInfo;
5491
5293
  }
5492
- if (input.ShowCacheClustersNotInReplicationGroups !== undefined &&
5493
- input.ShowCacheClustersNotInReplicationGroups !== null) {
5294
+ if (input.ShowCacheClustersNotInReplicationGroups != null) {
5494
5295
  entries["ShowCacheClustersNotInReplicationGroups"] = input.ShowCacheClustersNotInReplicationGroups;
5495
5296
  }
5496
5297
  return entries;
5497
5298
  };
5498
5299
  const serializeAws_queryDescribeCacheEngineVersionsMessage = (input, context) => {
5499
5300
  const entries = {};
5500
- if (input.Engine !== undefined && input.Engine !== null) {
5301
+ if (input.Engine != null) {
5501
5302
  entries["Engine"] = input.Engine;
5502
5303
  }
5503
- if (input.EngineVersion !== undefined && input.EngineVersion !== null) {
5304
+ if (input.EngineVersion != null) {
5504
5305
  entries["EngineVersion"] = input.EngineVersion;
5505
5306
  }
5506
- if (input.CacheParameterGroupFamily !== undefined && input.CacheParameterGroupFamily !== null) {
5307
+ if (input.CacheParameterGroupFamily != null) {
5507
5308
  entries["CacheParameterGroupFamily"] = input.CacheParameterGroupFamily;
5508
5309
  }
5509
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5310
+ if (input.MaxRecords != null) {
5510
5311
  entries["MaxRecords"] = input.MaxRecords;
5511
5312
  }
5512
- if (input.Marker !== undefined && input.Marker !== null) {
5313
+ if (input.Marker != null) {
5513
5314
  entries["Marker"] = input.Marker;
5514
5315
  }
5515
- if (input.DefaultOnly !== undefined && input.DefaultOnly !== null) {
5316
+ if (input.DefaultOnly != null) {
5516
5317
  entries["DefaultOnly"] = input.DefaultOnly;
5517
5318
  }
5518
5319
  return entries;
5519
5320
  };
5520
5321
  const serializeAws_queryDescribeCacheParameterGroupsMessage = (input, context) => {
5521
5322
  const entries = {};
5522
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
5323
+ if (input.CacheParameterGroupName != null) {
5523
5324
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
5524
5325
  }
5525
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5326
+ if (input.MaxRecords != null) {
5526
5327
  entries["MaxRecords"] = input.MaxRecords;
5527
5328
  }
5528
- if (input.Marker !== undefined && input.Marker !== null) {
5329
+ if (input.Marker != null) {
5529
5330
  entries["Marker"] = input.Marker;
5530
5331
  }
5531
5332
  return entries;
5532
5333
  };
5533
5334
  const serializeAws_queryDescribeCacheParametersMessage = (input, context) => {
5534
5335
  const entries = {};
5535
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
5336
+ if (input.CacheParameterGroupName != null) {
5536
5337
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
5537
5338
  }
5538
- if (input.Source !== undefined && input.Source !== null) {
5339
+ if (input.Source != null) {
5539
5340
  entries["Source"] = input.Source;
5540
5341
  }
5541
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5342
+ if (input.MaxRecords != null) {
5542
5343
  entries["MaxRecords"] = input.MaxRecords;
5543
5344
  }
5544
- if (input.Marker !== undefined && input.Marker !== null) {
5345
+ if (input.Marker != null) {
5545
5346
  entries["Marker"] = input.Marker;
5546
5347
  }
5547
5348
  return entries;
5548
5349
  };
5549
5350
  const serializeAws_queryDescribeCacheSecurityGroupsMessage = (input, context) => {
5550
5351
  const entries = {};
5551
- if (input.CacheSecurityGroupName !== undefined && input.CacheSecurityGroupName !== null) {
5352
+ if (input.CacheSecurityGroupName != null) {
5552
5353
  entries["CacheSecurityGroupName"] = input.CacheSecurityGroupName;
5553
5354
  }
5554
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5355
+ if (input.MaxRecords != null) {
5555
5356
  entries["MaxRecords"] = input.MaxRecords;
5556
5357
  }
5557
- if (input.Marker !== undefined && input.Marker !== null) {
5358
+ if (input.Marker != null) {
5558
5359
  entries["Marker"] = input.Marker;
5559
5360
  }
5560
5361
  return entries;
5561
5362
  };
5562
5363
  const serializeAws_queryDescribeCacheSubnetGroupsMessage = (input, context) => {
5563
5364
  const entries = {};
5564
- if (input.CacheSubnetGroupName !== undefined && input.CacheSubnetGroupName !== null) {
5365
+ if (input.CacheSubnetGroupName != null) {
5565
5366
  entries["CacheSubnetGroupName"] = input.CacheSubnetGroupName;
5566
5367
  }
5567
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5368
+ if (input.MaxRecords != null) {
5568
5369
  entries["MaxRecords"] = input.MaxRecords;
5569
5370
  }
5570
- if (input.Marker !== undefined && input.Marker !== null) {
5371
+ if (input.Marker != null) {
5571
5372
  entries["Marker"] = input.Marker;
5572
5373
  }
5573
5374
  return entries;
5574
5375
  };
5575
5376
  const serializeAws_queryDescribeEngineDefaultParametersMessage = (input, context) => {
5576
5377
  const entries = {};
5577
- if (input.CacheParameterGroupFamily !== undefined && input.CacheParameterGroupFamily !== null) {
5378
+ if (input.CacheParameterGroupFamily != null) {
5578
5379
  entries["CacheParameterGroupFamily"] = input.CacheParameterGroupFamily;
5579
5380
  }
5580
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5381
+ if (input.MaxRecords != null) {
5581
5382
  entries["MaxRecords"] = input.MaxRecords;
5582
5383
  }
5583
- if (input.Marker !== undefined && input.Marker !== null) {
5384
+ if (input.Marker != null) {
5584
5385
  entries["Marker"] = input.Marker;
5585
5386
  }
5586
5387
  return entries;
5587
5388
  };
5588
5389
  const serializeAws_queryDescribeEventsMessage = (input, context) => {
5589
5390
  const entries = {};
5590
- if (input.SourceIdentifier !== undefined && input.SourceIdentifier !== null) {
5391
+ if (input.SourceIdentifier != null) {
5591
5392
  entries["SourceIdentifier"] = input.SourceIdentifier;
5592
5393
  }
5593
- if (input.SourceType !== undefined && input.SourceType !== null) {
5394
+ if (input.SourceType != null) {
5594
5395
  entries["SourceType"] = input.SourceType;
5595
5396
  }
5596
- if (input.StartTime !== undefined && input.StartTime !== null) {
5397
+ if (input.StartTime != null) {
5597
5398
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
5598
5399
  }
5599
- if (input.EndTime !== undefined && input.EndTime !== null) {
5400
+ if (input.EndTime != null) {
5600
5401
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
5601
5402
  }
5602
- if (input.Duration !== undefined && input.Duration !== null) {
5403
+ if (input.Duration != null) {
5603
5404
  entries["Duration"] = input.Duration;
5604
5405
  }
5605
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5406
+ if (input.MaxRecords != null) {
5606
5407
  entries["MaxRecords"] = input.MaxRecords;
5607
5408
  }
5608
- if (input.Marker !== undefined && input.Marker !== null) {
5409
+ if (input.Marker != null) {
5609
5410
  entries["Marker"] = input.Marker;
5610
5411
  }
5611
5412
  return entries;
5612
5413
  };
5613
5414
  const serializeAws_queryDescribeGlobalReplicationGroupsMessage = (input, context) => {
5614
5415
  const entries = {};
5615
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
5416
+ if (input.GlobalReplicationGroupId != null) {
5616
5417
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
5617
5418
  }
5618
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5419
+ if (input.MaxRecords != null) {
5619
5420
  entries["MaxRecords"] = input.MaxRecords;
5620
5421
  }
5621
- if (input.Marker !== undefined && input.Marker !== null) {
5422
+ if (input.Marker != null) {
5622
5423
  entries["Marker"] = input.Marker;
5623
5424
  }
5624
- if (input.ShowMemberInfo !== undefined && input.ShowMemberInfo !== null) {
5425
+ if (input.ShowMemberInfo != null) {
5625
5426
  entries["ShowMemberInfo"] = input.ShowMemberInfo;
5626
5427
  }
5627
5428
  return entries;
5628
5429
  };
5629
5430
  const serializeAws_queryDescribeReplicationGroupsMessage = (input, context) => {
5630
5431
  const entries = {};
5631
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5432
+ if (input.ReplicationGroupId != null) {
5632
5433
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5633
5434
  }
5634
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5435
+ if (input.MaxRecords != null) {
5635
5436
  entries["MaxRecords"] = input.MaxRecords;
5636
5437
  }
5637
- if (input.Marker !== undefined && input.Marker !== null) {
5438
+ if (input.Marker != null) {
5638
5439
  entries["Marker"] = input.Marker;
5639
5440
  }
5640
5441
  return entries;
5641
5442
  };
5642
5443
  const serializeAws_queryDescribeReservedCacheNodesMessage = (input, context) => {
5643
5444
  const entries = {};
5644
- if (input.ReservedCacheNodeId !== undefined && input.ReservedCacheNodeId !== null) {
5445
+ if (input.ReservedCacheNodeId != null) {
5645
5446
  entries["ReservedCacheNodeId"] = input.ReservedCacheNodeId;
5646
5447
  }
5647
- if (input.ReservedCacheNodesOfferingId !== undefined && input.ReservedCacheNodesOfferingId !== null) {
5448
+ if (input.ReservedCacheNodesOfferingId != null) {
5648
5449
  entries["ReservedCacheNodesOfferingId"] = input.ReservedCacheNodesOfferingId;
5649
5450
  }
5650
- if (input.CacheNodeType !== undefined && input.CacheNodeType !== null) {
5451
+ if (input.CacheNodeType != null) {
5651
5452
  entries["CacheNodeType"] = input.CacheNodeType;
5652
5453
  }
5653
- if (input.Duration !== undefined && input.Duration !== null) {
5454
+ if (input.Duration != null) {
5654
5455
  entries["Duration"] = input.Duration;
5655
5456
  }
5656
- if (input.ProductDescription !== undefined && input.ProductDescription !== null) {
5457
+ if (input.ProductDescription != null) {
5657
5458
  entries["ProductDescription"] = input.ProductDescription;
5658
5459
  }
5659
- if (input.OfferingType !== undefined && input.OfferingType !== null) {
5460
+ if (input.OfferingType != null) {
5660
5461
  entries["OfferingType"] = input.OfferingType;
5661
5462
  }
5662
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5463
+ if (input.MaxRecords != null) {
5663
5464
  entries["MaxRecords"] = input.MaxRecords;
5664
5465
  }
5665
- if (input.Marker !== undefined && input.Marker !== null) {
5466
+ if (input.Marker != null) {
5666
5467
  entries["Marker"] = input.Marker;
5667
5468
  }
5668
5469
  return entries;
5669
5470
  };
5670
5471
  const serializeAws_queryDescribeReservedCacheNodesOfferingsMessage = (input, context) => {
5671
5472
  const entries = {};
5672
- if (input.ReservedCacheNodesOfferingId !== undefined && input.ReservedCacheNodesOfferingId !== null) {
5473
+ if (input.ReservedCacheNodesOfferingId != null) {
5673
5474
  entries["ReservedCacheNodesOfferingId"] = input.ReservedCacheNodesOfferingId;
5674
5475
  }
5675
- if (input.CacheNodeType !== undefined && input.CacheNodeType !== null) {
5476
+ if (input.CacheNodeType != null) {
5676
5477
  entries["CacheNodeType"] = input.CacheNodeType;
5677
5478
  }
5678
- if (input.Duration !== undefined && input.Duration !== null) {
5479
+ if (input.Duration != null) {
5679
5480
  entries["Duration"] = input.Duration;
5680
5481
  }
5681
- if (input.ProductDescription !== undefined && input.ProductDescription !== null) {
5482
+ if (input.ProductDescription != null) {
5682
5483
  entries["ProductDescription"] = input.ProductDescription;
5683
5484
  }
5684
- if (input.OfferingType !== undefined && input.OfferingType !== null) {
5485
+ if (input.OfferingType != null) {
5685
5486
  entries["OfferingType"] = input.OfferingType;
5686
5487
  }
5687
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5488
+ if (input.MaxRecords != null) {
5688
5489
  entries["MaxRecords"] = input.MaxRecords;
5689
5490
  }
5690
- if (input.Marker !== undefined && input.Marker !== null) {
5491
+ if (input.Marker != null) {
5691
5492
  entries["Marker"] = input.Marker;
5692
5493
  }
5693
5494
  return entries;
5694
5495
  };
5695
5496
  const serializeAws_queryDescribeServiceUpdatesMessage = (input, context) => {
5696
5497
  const entries = {};
5697
- if (input.ServiceUpdateName !== undefined && input.ServiceUpdateName !== null) {
5498
+ if (input.ServiceUpdateName != null) {
5698
5499
  entries["ServiceUpdateName"] = input.ServiceUpdateName;
5699
5500
  }
5700
- if (input.ServiceUpdateStatus !== undefined && input.ServiceUpdateStatus !== null) {
5501
+ if (input.ServiceUpdateStatus != null) {
5701
5502
  const memberEntries = serializeAws_queryServiceUpdateStatusList(input.ServiceUpdateStatus, context);
5702
5503
  Object.entries(memberEntries).forEach(([key, value]) => {
5703
5504
  const loc = `ServiceUpdateStatus.${key}`;
5704
5505
  entries[loc] = value;
5705
5506
  });
5706
5507
  }
5707
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5508
+ if (input.MaxRecords != null) {
5708
5509
  entries["MaxRecords"] = input.MaxRecords;
5709
5510
  }
5710
- if (input.Marker !== undefined && input.Marker !== null) {
5511
+ if (input.Marker != null) {
5711
5512
  entries["Marker"] = input.Marker;
5712
5513
  }
5713
5514
  return entries;
5714
5515
  };
5715
5516
  const serializeAws_queryDescribeSnapshotsMessage = (input, context) => {
5716
5517
  const entries = {};
5717
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5518
+ if (input.ReplicationGroupId != null) {
5718
5519
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5719
5520
  }
5720
- if (input.CacheClusterId !== undefined && input.CacheClusterId !== null) {
5521
+ if (input.CacheClusterId != null) {
5721
5522
  entries["CacheClusterId"] = input.CacheClusterId;
5722
5523
  }
5723
- if (input.SnapshotName !== undefined && input.SnapshotName !== null) {
5524
+ if (input.SnapshotName != null) {
5724
5525
  entries["SnapshotName"] = input.SnapshotName;
5725
5526
  }
5726
- if (input.SnapshotSource !== undefined && input.SnapshotSource !== null) {
5527
+ if (input.SnapshotSource != null) {
5727
5528
  entries["SnapshotSource"] = input.SnapshotSource;
5728
5529
  }
5729
- if (input.Marker !== undefined && input.Marker !== null) {
5530
+ if (input.Marker != null) {
5730
5531
  entries["Marker"] = input.Marker;
5731
5532
  }
5732
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5533
+ if (input.MaxRecords != null) {
5733
5534
  entries["MaxRecords"] = input.MaxRecords;
5734
5535
  }
5735
- if (input.ShowNodeGroupConfig !== undefined && input.ShowNodeGroupConfig !== null) {
5536
+ if (input.ShowNodeGroupConfig != null) {
5736
5537
  entries["ShowNodeGroupConfig"] = input.ShowNodeGroupConfig;
5737
5538
  }
5738
5539
  return entries;
5739
5540
  };
5740
5541
  const serializeAws_queryDescribeUpdateActionsMessage = (input, context) => {
5741
5542
  const entries = {};
5742
- if (input.ServiceUpdateName !== undefined && input.ServiceUpdateName !== null) {
5543
+ if (input.ServiceUpdateName != null) {
5743
5544
  entries["ServiceUpdateName"] = input.ServiceUpdateName;
5744
5545
  }
5745
- if (input.ReplicationGroupIds !== undefined && input.ReplicationGroupIds !== null) {
5546
+ if (input.ReplicationGroupIds != null) {
5746
5547
  const memberEntries = serializeAws_queryReplicationGroupIdList(input.ReplicationGroupIds, context);
5747
5548
  Object.entries(memberEntries).forEach(([key, value]) => {
5748
5549
  const loc = `ReplicationGroupIds.${key}`;
5749
5550
  entries[loc] = value;
5750
5551
  });
5751
5552
  }
5752
- if (input.CacheClusterIds !== undefined && input.CacheClusterIds !== null) {
5553
+ if (input.CacheClusterIds != null) {
5753
5554
  const memberEntries = serializeAws_queryCacheClusterIdList(input.CacheClusterIds, context);
5754
5555
  Object.entries(memberEntries).forEach(([key, value]) => {
5755
5556
  const loc = `CacheClusterIds.${key}`;
5756
5557
  entries[loc] = value;
5757
5558
  });
5758
5559
  }
5759
- if (input.Engine !== undefined && input.Engine !== null) {
5560
+ if (input.Engine != null) {
5760
5561
  entries["Engine"] = input.Engine;
5761
5562
  }
5762
- if (input.ServiceUpdateStatus !== undefined && input.ServiceUpdateStatus !== null) {
5563
+ if (input.ServiceUpdateStatus != null) {
5763
5564
  const memberEntries = serializeAws_queryServiceUpdateStatusList(input.ServiceUpdateStatus, context);
5764
5565
  Object.entries(memberEntries).forEach(([key, value]) => {
5765
5566
  const loc = `ServiceUpdateStatus.${key}`;
5766
5567
  entries[loc] = value;
5767
5568
  });
5768
5569
  }
5769
- if (input.ServiceUpdateTimeRange !== undefined && input.ServiceUpdateTimeRange !== null) {
5570
+ if (input.ServiceUpdateTimeRange != null) {
5770
5571
  const memberEntries = serializeAws_queryTimeRangeFilter(input.ServiceUpdateTimeRange, context);
5771
5572
  Object.entries(memberEntries).forEach(([key, value]) => {
5772
5573
  const loc = `ServiceUpdateTimeRange.${key}`;
5773
5574
  entries[loc] = value;
5774
5575
  });
5775
5576
  }
5776
- if (input.UpdateActionStatus !== undefined && input.UpdateActionStatus !== null) {
5577
+ if (input.UpdateActionStatus != null) {
5777
5578
  const memberEntries = serializeAws_queryUpdateActionStatusList(input.UpdateActionStatus, context);
5778
5579
  Object.entries(memberEntries).forEach(([key, value]) => {
5779
5580
  const loc = `UpdateActionStatus.${key}`;
5780
5581
  entries[loc] = value;
5781
5582
  });
5782
5583
  }
5783
- if (input.ShowNodeLevelUpdateStatus !== undefined && input.ShowNodeLevelUpdateStatus !== null) {
5584
+ if (input.ShowNodeLevelUpdateStatus != null) {
5784
5585
  entries["ShowNodeLevelUpdateStatus"] = input.ShowNodeLevelUpdateStatus;
5785
5586
  }
5786
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5587
+ if (input.MaxRecords != null) {
5787
5588
  entries["MaxRecords"] = input.MaxRecords;
5788
5589
  }
5789
- if (input.Marker !== undefined && input.Marker !== null) {
5590
+ if (input.Marker != null) {
5790
5591
  entries["Marker"] = input.Marker;
5791
5592
  }
5792
5593
  return entries;
5793
5594
  };
5794
5595
  const serializeAws_queryDescribeUserGroupsMessage = (input, context) => {
5795
5596
  const entries = {};
5796
- if (input.UserGroupId !== undefined && input.UserGroupId !== null) {
5597
+ if (input.UserGroupId != null) {
5797
5598
  entries["UserGroupId"] = input.UserGroupId;
5798
5599
  }
5799
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5600
+ if (input.MaxRecords != null) {
5800
5601
  entries["MaxRecords"] = input.MaxRecords;
5801
5602
  }
5802
- if (input.Marker !== undefined && input.Marker !== null) {
5603
+ if (input.Marker != null) {
5803
5604
  entries["Marker"] = input.Marker;
5804
5605
  }
5805
5606
  return entries;
5806
5607
  };
5807
5608
  const serializeAws_queryDescribeUsersMessage = (input, context) => {
5808
5609
  const entries = {};
5809
- if (input.Engine !== undefined && input.Engine !== null) {
5610
+ if (input.Engine != null) {
5810
5611
  entries["Engine"] = input.Engine;
5811
5612
  }
5812
- if (input.UserId !== undefined && input.UserId !== null) {
5613
+ if (input.UserId != null) {
5813
5614
  entries["UserId"] = input.UserId;
5814
5615
  }
5815
- if (input.Filters !== undefined && input.Filters !== null) {
5616
+ if (input.Filters != null) {
5816
5617
  const memberEntries = serializeAws_queryFilterList(input.Filters, context);
5817
5618
  Object.entries(memberEntries).forEach(([key, value]) => {
5818
5619
  const loc = `Filters.${key}`;
5819
5620
  entries[loc] = value;
5820
5621
  });
5821
5622
  }
5822
- if (input.MaxRecords !== undefined && input.MaxRecords !== null) {
5623
+ if (input.MaxRecords != null) {
5823
5624
  entries["MaxRecords"] = input.MaxRecords;
5824
5625
  }
5825
- if (input.Marker !== undefined && input.Marker !== null) {
5626
+ if (input.Marker != null) {
5826
5627
  entries["Marker"] = input.Marker;
5827
5628
  }
5828
5629
  return entries;
5829
5630
  };
5830
5631
  const serializeAws_queryDestinationDetails = (input, context) => {
5831
5632
  const entries = {};
5832
- if (input.CloudWatchLogsDetails !== undefined && input.CloudWatchLogsDetails !== null) {
5633
+ if (input.CloudWatchLogsDetails != null) {
5833
5634
  const memberEntries = serializeAws_queryCloudWatchLogsDestinationDetails(input.CloudWatchLogsDetails, context);
5834
5635
  Object.entries(memberEntries).forEach(([key, value]) => {
5835
5636
  const loc = `CloudWatchLogsDetails.${key}`;
5836
5637
  entries[loc] = value;
5837
5638
  });
5838
5639
  }
5839
- if (input.KinesisFirehoseDetails !== undefined && input.KinesisFirehoseDetails !== null) {
5640
+ if (input.KinesisFirehoseDetails != null) {
5840
5641
  const memberEntries = serializeAws_queryKinesisFirehoseDestinationDetails(input.KinesisFirehoseDetails, context);
5841
5642
  Object.entries(memberEntries).forEach(([key, value]) => {
5842
5643
  const loc = `KinesisFirehoseDetails.${key}`;
@@ -5847,36 +5648,36 @@ const serializeAws_queryDestinationDetails = (input, context) => {
5847
5648
  };
5848
5649
  const serializeAws_queryDisassociateGlobalReplicationGroupMessage = (input, context) => {
5849
5650
  const entries = {};
5850
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
5651
+ if (input.GlobalReplicationGroupId != null) {
5851
5652
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
5852
5653
  }
5853
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5654
+ if (input.ReplicationGroupId != null) {
5854
5655
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5855
5656
  }
5856
- if (input.ReplicationGroupRegion !== undefined && input.ReplicationGroupRegion !== null) {
5657
+ if (input.ReplicationGroupRegion != null) {
5857
5658
  entries["ReplicationGroupRegion"] = input.ReplicationGroupRegion;
5858
5659
  }
5859
5660
  return entries;
5860
5661
  };
5861
5662
  const serializeAws_queryFailoverGlobalReplicationGroupMessage = (input, context) => {
5862
5663
  const entries = {};
5863
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
5664
+ if (input.GlobalReplicationGroupId != null) {
5864
5665
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
5865
5666
  }
5866
- if (input.PrimaryRegion !== undefined && input.PrimaryRegion !== null) {
5667
+ if (input.PrimaryRegion != null) {
5867
5668
  entries["PrimaryRegion"] = input.PrimaryRegion;
5868
5669
  }
5869
- if (input.PrimaryReplicationGroupId !== undefined && input.PrimaryReplicationGroupId !== null) {
5670
+ if (input.PrimaryReplicationGroupId != null) {
5870
5671
  entries["PrimaryReplicationGroupId"] = input.PrimaryReplicationGroupId;
5871
5672
  }
5872
5673
  return entries;
5873
5674
  };
5874
5675
  const serializeAws_queryFilter = (input, context) => {
5875
5676
  const entries = {};
5876
- if (input.Name !== undefined && input.Name !== null) {
5677
+ if (input.Name != null) {
5877
5678
  entries["Name"] = input.Name;
5878
5679
  }
5879
- if (input.Values !== undefined && input.Values !== null) {
5680
+ if (input.Values != null) {
5880
5681
  const memberEntries = serializeAws_queryFilterValueList(input.Values, context);
5881
5682
  Object.entries(memberEntries).forEach(([key, value]) => {
5882
5683
  const loc = `Values.${key}`;
@@ -5926,40 +5727,40 @@ const serializeAws_queryGlobalNodeGroupIdList = (input, context) => {
5926
5727
  };
5927
5728
  const serializeAws_queryIncreaseNodeGroupsInGlobalReplicationGroupMessage = (input, context) => {
5928
5729
  const entries = {};
5929
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
5730
+ if (input.GlobalReplicationGroupId != null) {
5930
5731
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
5931
5732
  }
5932
- if (input.NodeGroupCount !== undefined && input.NodeGroupCount !== null) {
5733
+ if (input.NodeGroupCount != null) {
5933
5734
  entries["NodeGroupCount"] = input.NodeGroupCount;
5934
5735
  }
5935
- if (input.RegionalConfigurations !== undefined && input.RegionalConfigurations !== null) {
5736
+ if (input.RegionalConfigurations != null) {
5936
5737
  const memberEntries = serializeAws_queryRegionalConfigurationList(input.RegionalConfigurations, context);
5937
5738
  Object.entries(memberEntries).forEach(([key, value]) => {
5938
5739
  const loc = `RegionalConfigurations.${key}`;
5939
5740
  entries[loc] = value;
5940
5741
  });
5941
5742
  }
5942
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
5743
+ if (input.ApplyImmediately != null) {
5943
5744
  entries["ApplyImmediately"] = input.ApplyImmediately;
5944
5745
  }
5945
5746
  return entries;
5946
5747
  };
5947
5748
  const serializeAws_queryIncreaseReplicaCountMessage = (input, context) => {
5948
5749
  const entries = {};
5949
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5750
+ if (input.ReplicationGroupId != null) {
5950
5751
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5951
5752
  }
5952
- if (input.NewReplicaCount !== undefined && input.NewReplicaCount !== null) {
5753
+ if (input.NewReplicaCount != null) {
5953
5754
  entries["NewReplicaCount"] = input.NewReplicaCount;
5954
5755
  }
5955
- if (input.ReplicaConfiguration !== undefined && input.ReplicaConfiguration !== null) {
5756
+ if (input.ReplicaConfiguration != null) {
5956
5757
  const memberEntries = serializeAws_queryReplicaConfigurationList(input.ReplicaConfiguration, context);
5957
5758
  Object.entries(memberEntries).forEach(([key, value]) => {
5958
5759
  const loc = `ReplicaConfiguration.${key}`;
5959
5760
  entries[loc] = value;
5960
5761
  });
5961
5762
  }
5962
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
5763
+ if (input.ApplyImmediately != null) {
5963
5764
  entries["ApplyImmediately"] = input.ApplyImmediately;
5964
5765
  }
5965
5766
  return entries;
@@ -5978,47 +5779,47 @@ const serializeAws_queryKeyList = (input, context) => {
5978
5779
  };
5979
5780
  const serializeAws_queryKinesisFirehoseDestinationDetails = (input, context) => {
5980
5781
  const entries = {};
5981
- if (input.DeliveryStream !== undefined && input.DeliveryStream !== null) {
5782
+ if (input.DeliveryStream != null) {
5982
5783
  entries["DeliveryStream"] = input.DeliveryStream;
5983
5784
  }
5984
5785
  return entries;
5985
5786
  };
5986
5787
  const serializeAws_queryListAllowedNodeTypeModificationsMessage = (input, context) => {
5987
5788
  const entries = {};
5988
- if (input.CacheClusterId !== undefined && input.CacheClusterId !== null) {
5789
+ if (input.CacheClusterId != null) {
5989
5790
  entries["CacheClusterId"] = input.CacheClusterId;
5990
5791
  }
5991
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5792
+ if (input.ReplicationGroupId != null) {
5992
5793
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
5993
5794
  }
5994
5795
  return entries;
5995
5796
  };
5996
5797
  const serializeAws_queryListTagsForResourceMessage = (input, context) => {
5997
5798
  const entries = {};
5998
- if (input.ResourceName !== undefined && input.ResourceName !== null) {
5799
+ if (input.ResourceName != null) {
5999
5800
  entries["ResourceName"] = input.ResourceName;
6000
5801
  }
6001
5802
  return entries;
6002
5803
  };
6003
5804
  const serializeAws_queryLogDeliveryConfigurationRequest = (input, context) => {
6004
5805
  const entries = {};
6005
- if (input.LogType !== undefined && input.LogType !== null) {
5806
+ if (input.LogType != null) {
6006
5807
  entries["LogType"] = input.LogType;
6007
5808
  }
6008
- if (input.DestinationType !== undefined && input.DestinationType !== null) {
5809
+ if (input.DestinationType != null) {
6009
5810
  entries["DestinationType"] = input.DestinationType;
6010
5811
  }
6011
- if (input.DestinationDetails !== undefined && input.DestinationDetails !== null) {
5812
+ if (input.DestinationDetails != null) {
6012
5813
  const memberEntries = serializeAws_queryDestinationDetails(input.DestinationDetails, context);
6013
5814
  Object.entries(memberEntries).forEach(([key, value]) => {
6014
5815
  const loc = `DestinationDetails.${key}`;
6015
5816
  entries[loc] = value;
6016
5817
  });
6017
5818
  }
6018
- if (input.LogFormat !== undefined && input.LogFormat !== null) {
5819
+ if (input.LogFormat != null) {
6019
5820
  entries["LogFormat"] = input.LogFormat;
6020
5821
  }
6021
- if (input.Enabled !== undefined && input.Enabled !== null) {
5822
+ if (input.Enabled != null) {
6022
5823
  entries["Enabled"] = input.Enabled;
6023
5824
  }
6024
5825
  return entries;
@@ -6040,80 +5841,80 @@ const serializeAws_queryLogDeliveryConfigurationRequestList = (input, context) =
6040
5841
  };
6041
5842
  const serializeAws_queryModifyCacheClusterMessage = (input, context) => {
6042
5843
  const entries = {};
6043
- if (input.CacheClusterId !== undefined && input.CacheClusterId !== null) {
5844
+ if (input.CacheClusterId != null) {
6044
5845
  entries["CacheClusterId"] = input.CacheClusterId;
6045
5846
  }
6046
- if (input.NumCacheNodes !== undefined && input.NumCacheNodes !== null) {
5847
+ if (input.NumCacheNodes != null) {
6047
5848
  entries["NumCacheNodes"] = input.NumCacheNodes;
6048
5849
  }
6049
- if (input.CacheNodeIdsToRemove !== undefined && input.CacheNodeIdsToRemove !== null) {
5850
+ if (input.CacheNodeIdsToRemove != null) {
6050
5851
  const memberEntries = serializeAws_queryCacheNodeIdsList(input.CacheNodeIdsToRemove, context);
6051
5852
  Object.entries(memberEntries).forEach(([key, value]) => {
6052
5853
  const loc = `CacheNodeIdsToRemove.${key}`;
6053
5854
  entries[loc] = value;
6054
5855
  });
6055
5856
  }
6056
- if (input.AZMode !== undefined && input.AZMode !== null) {
5857
+ if (input.AZMode != null) {
6057
5858
  entries["AZMode"] = input.AZMode;
6058
5859
  }
6059
- if (input.NewAvailabilityZones !== undefined && input.NewAvailabilityZones !== null) {
5860
+ if (input.NewAvailabilityZones != null) {
6060
5861
  const memberEntries = serializeAws_queryPreferredAvailabilityZoneList(input.NewAvailabilityZones, context);
6061
5862
  Object.entries(memberEntries).forEach(([key, value]) => {
6062
5863
  const loc = `NewAvailabilityZones.${key}`;
6063
5864
  entries[loc] = value;
6064
5865
  });
6065
5866
  }
6066
- if (input.CacheSecurityGroupNames !== undefined && input.CacheSecurityGroupNames !== null) {
5867
+ if (input.CacheSecurityGroupNames != null) {
6067
5868
  const memberEntries = serializeAws_queryCacheSecurityGroupNameList(input.CacheSecurityGroupNames, context);
6068
5869
  Object.entries(memberEntries).forEach(([key, value]) => {
6069
5870
  const loc = `CacheSecurityGroupNames.${key}`;
6070
5871
  entries[loc] = value;
6071
5872
  });
6072
5873
  }
6073
- if (input.SecurityGroupIds !== undefined && input.SecurityGroupIds !== null) {
5874
+ if (input.SecurityGroupIds != null) {
6074
5875
  const memberEntries = serializeAws_querySecurityGroupIdsList(input.SecurityGroupIds, context);
6075
5876
  Object.entries(memberEntries).forEach(([key, value]) => {
6076
5877
  const loc = `SecurityGroupIds.${key}`;
6077
5878
  entries[loc] = value;
6078
5879
  });
6079
5880
  }
6080
- if (input.PreferredMaintenanceWindow !== undefined && input.PreferredMaintenanceWindow !== null) {
5881
+ if (input.PreferredMaintenanceWindow != null) {
6081
5882
  entries["PreferredMaintenanceWindow"] = input.PreferredMaintenanceWindow;
6082
5883
  }
6083
- if (input.NotificationTopicArn !== undefined && input.NotificationTopicArn !== null) {
5884
+ if (input.NotificationTopicArn != null) {
6084
5885
  entries["NotificationTopicArn"] = input.NotificationTopicArn;
6085
5886
  }
6086
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
5887
+ if (input.CacheParameterGroupName != null) {
6087
5888
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
6088
5889
  }
6089
- if (input.NotificationTopicStatus !== undefined && input.NotificationTopicStatus !== null) {
5890
+ if (input.NotificationTopicStatus != null) {
6090
5891
  entries["NotificationTopicStatus"] = input.NotificationTopicStatus;
6091
5892
  }
6092
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
5893
+ if (input.ApplyImmediately != null) {
6093
5894
  entries["ApplyImmediately"] = input.ApplyImmediately;
6094
5895
  }
6095
- if (input.EngineVersion !== undefined && input.EngineVersion !== null) {
5896
+ if (input.EngineVersion != null) {
6096
5897
  entries["EngineVersion"] = input.EngineVersion;
6097
5898
  }
6098
- if (input.AutoMinorVersionUpgrade !== undefined && input.AutoMinorVersionUpgrade !== null) {
5899
+ if (input.AutoMinorVersionUpgrade != null) {
6099
5900
  entries["AutoMinorVersionUpgrade"] = input.AutoMinorVersionUpgrade;
6100
5901
  }
6101
- if (input.SnapshotRetentionLimit !== undefined && input.SnapshotRetentionLimit !== null) {
5902
+ if (input.SnapshotRetentionLimit != null) {
6102
5903
  entries["SnapshotRetentionLimit"] = input.SnapshotRetentionLimit;
6103
5904
  }
6104
- if (input.SnapshotWindow !== undefined && input.SnapshotWindow !== null) {
5905
+ if (input.SnapshotWindow != null) {
6105
5906
  entries["SnapshotWindow"] = input.SnapshotWindow;
6106
5907
  }
6107
- if (input.CacheNodeType !== undefined && input.CacheNodeType !== null) {
5908
+ if (input.CacheNodeType != null) {
6108
5909
  entries["CacheNodeType"] = input.CacheNodeType;
6109
5910
  }
6110
- if (input.AuthToken !== undefined && input.AuthToken !== null) {
5911
+ if (input.AuthToken != null) {
6111
5912
  entries["AuthToken"] = input.AuthToken;
6112
5913
  }
6113
- if (input.AuthTokenUpdateStrategy !== undefined && input.AuthTokenUpdateStrategy !== null) {
5914
+ if (input.AuthTokenUpdateStrategy != null) {
6114
5915
  entries["AuthTokenUpdateStrategy"] = input.AuthTokenUpdateStrategy;
6115
5916
  }
6116
- if (input.LogDeliveryConfigurations !== undefined && input.LogDeliveryConfigurations !== null) {
5917
+ if (input.LogDeliveryConfigurations != null) {
6117
5918
  const memberEntries = serializeAws_queryLogDeliveryConfigurationRequestList(input.LogDeliveryConfigurations, context);
6118
5919
  Object.entries(memberEntries).forEach(([key, value]) => {
6119
5920
  const loc = `LogDeliveryConfigurations.${key}`;
@@ -6124,10 +5925,10 @@ const serializeAws_queryModifyCacheClusterMessage = (input, context) => {
6124
5925
  };
6125
5926
  const serializeAws_queryModifyCacheParameterGroupMessage = (input, context) => {
6126
5927
  const entries = {};
6127
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
5928
+ if (input.CacheParameterGroupName != null) {
6128
5929
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
6129
5930
  }
6130
- if (input.ParameterNameValues !== undefined && input.ParameterNameValues !== null) {
5931
+ if (input.ParameterNameValues != null) {
6131
5932
  const memberEntries = serializeAws_queryParameterNameValueList(input.ParameterNameValues, context);
6132
5933
  Object.entries(memberEntries).forEach(([key, value]) => {
6133
5934
  const loc = `ParameterNameValues.${key}`;
@@ -6138,13 +5939,13 @@ const serializeAws_queryModifyCacheParameterGroupMessage = (input, context) => {
6138
5939
  };
6139
5940
  const serializeAws_queryModifyCacheSubnetGroupMessage = (input, context) => {
6140
5941
  const entries = {};
6141
- if (input.CacheSubnetGroupName !== undefined && input.CacheSubnetGroupName !== null) {
5942
+ if (input.CacheSubnetGroupName != null) {
6142
5943
  entries["CacheSubnetGroupName"] = input.CacheSubnetGroupName;
6143
5944
  }
6144
- if (input.CacheSubnetGroupDescription !== undefined && input.CacheSubnetGroupDescription !== null) {
5945
+ if (input.CacheSubnetGroupDescription != null) {
6145
5946
  entries["CacheSubnetGroupDescription"] = input.CacheSubnetGroupDescription;
6146
5947
  }
6147
- if (input.SubnetIds !== undefined && input.SubnetIds !== null) {
5948
+ if (input.SubnetIds != null) {
6148
5949
  const memberEntries = serializeAws_querySubnetIdentifierList(input.SubnetIds, context);
6149
5950
  Object.entries(memberEntries).forEach(([key, value]) => {
6150
5951
  const loc = `SubnetIds.${key}`;
@@ -6155,120 +5956,120 @@ const serializeAws_queryModifyCacheSubnetGroupMessage = (input, context) => {
6155
5956
  };
6156
5957
  const serializeAws_queryModifyGlobalReplicationGroupMessage = (input, context) => {
6157
5958
  const entries = {};
6158
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
5959
+ if (input.GlobalReplicationGroupId != null) {
6159
5960
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
6160
5961
  }
6161
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
5962
+ if (input.ApplyImmediately != null) {
6162
5963
  entries["ApplyImmediately"] = input.ApplyImmediately;
6163
5964
  }
6164
- if (input.CacheNodeType !== undefined && input.CacheNodeType !== null) {
5965
+ if (input.CacheNodeType != null) {
6165
5966
  entries["CacheNodeType"] = input.CacheNodeType;
6166
5967
  }
6167
- if (input.EngineVersion !== undefined && input.EngineVersion !== null) {
5968
+ if (input.EngineVersion != null) {
6168
5969
  entries["EngineVersion"] = input.EngineVersion;
6169
5970
  }
6170
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
5971
+ if (input.CacheParameterGroupName != null) {
6171
5972
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
6172
5973
  }
6173
- if (input.GlobalReplicationGroupDescription !== undefined && input.GlobalReplicationGroupDescription !== null) {
5974
+ if (input.GlobalReplicationGroupDescription != null) {
6174
5975
  entries["GlobalReplicationGroupDescription"] = input.GlobalReplicationGroupDescription;
6175
5976
  }
6176
- if (input.AutomaticFailoverEnabled !== undefined && input.AutomaticFailoverEnabled !== null) {
5977
+ if (input.AutomaticFailoverEnabled != null) {
6177
5978
  entries["AutomaticFailoverEnabled"] = input.AutomaticFailoverEnabled;
6178
5979
  }
6179
5980
  return entries;
6180
5981
  };
6181
5982
  const serializeAws_queryModifyReplicationGroupMessage = (input, context) => {
6182
5983
  const entries = {};
6183
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
5984
+ if (input.ReplicationGroupId != null) {
6184
5985
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
6185
5986
  }
6186
- if (input.ReplicationGroupDescription !== undefined && input.ReplicationGroupDescription !== null) {
5987
+ if (input.ReplicationGroupDescription != null) {
6187
5988
  entries["ReplicationGroupDescription"] = input.ReplicationGroupDescription;
6188
5989
  }
6189
- if (input.PrimaryClusterId !== undefined && input.PrimaryClusterId !== null) {
5990
+ if (input.PrimaryClusterId != null) {
6190
5991
  entries["PrimaryClusterId"] = input.PrimaryClusterId;
6191
5992
  }
6192
- if (input.SnapshottingClusterId !== undefined && input.SnapshottingClusterId !== null) {
5993
+ if (input.SnapshottingClusterId != null) {
6193
5994
  entries["SnapshottingClusterId"] = input.SnapshottingClusterId;
6194
5995
  }
6195
- if (input.AutomaticFailoverEnabled !== undefined && input.AutomaticFailoverEnabled !== null) {
5996
+ if (input.AutomaticFailoverEnabled != null) {
6196
5997
  entries["AutomaticFailoverEnabled"] = input.AutomaticFailoverEnabled;
6197
5998
  }
6198
- if (input.MultiAZEnabled !== undefined && input.MultiAZEnabled !== null) {
5999
+ if (input.MultiAZEnabled != null) {
6199
6000
  entries["MultiAZEnabled"] = input.MultiAZEnabled;
6200
6001
  }
6201
- if (input.NodeGroupId !== undefined && input.NodeGroupId !== null) {
6002
+ if (input.NodeGroupId != null) {
6202
6003
  entries["NodeGroupId"] = input.NodeGroupId;
6203
6004
  }
6204
- if (input.CacheSecurityGroupNames !== undefined && input.CacheSecurityGroupNames !== null) {
6005
+ if (input.CacheSecurityGroupNames != null) {
6205
6006
  const memberEntries = serializeAws_queryCacheSecurityGroupNameList(input.CacheSecurityGroupNames, context);
6206
6007
  Object.entries(memberEntries).forEach(([key, value]) => {
6207
6008
  const loc = `CacheSecurityGroupNames.${key}`;
6208
6009
  entries[loc] = value;
6209
6010
  });
6210
6011
  }
6211
- if (input.SecurityGroupIds !== undefined && input.SecurityGroupIds !== null) {
6012
+ if (input.SecurityGroupIds != null) {
6212
6013
  const memberEntries = serializeAws_querySecurityGroupIdsList(input.SecurityGroupIds, context);
6213
6014
  Object.entries(memberEntries).forEach(([key, value]) => {
6214
6015
  const loc = `SecurityGroupIds.${key}`;
6215
6016
  entries[loc] = value;
6216
6017
  });
6217
6018
  }
6218
- if (input.PreferredMaintenanceWindow !== undefined && input.PreferredMaintenanceWindow !== null) {
6019
+ if (input.PreferredMaintenanceWindow != null) {
6219
6020
  entries["PreferredMaintenanceWindow"] = input.PreferredMaintenanceWindow;
6220
6021
  }
6221
- if (input.NotificationTopicArn !== undefined && input.NotificationTopicArn !== null) {
6022
+ if (input.NotificationTopicArn != null) {
6222
6023
  entries["NotificationTopicArn"] = input.NotificationTopicArn;
6223
6024
  }
6224
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
6025
+ if (input.CacheParameterGroupName != null) {
6225
6026
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
6226
6027
  }
6227
- if (input.NotificationTopicStatus !== undefined && input.NotificationTopicStatus !== null) {
6028
+ if (input.NotificationTopicStatus != null) {
6228
6029
  entries["NotificationTopicStatus"] = input.NotificationTopicStatus;
6229
6030
  }
6230
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
6031
+ if (input.ApplyImmediately != null) {
6231
6032
  entries["ApplyImmediately"] = input.ApplyImmediately;
6232
6033
  }
6233
- if (input.EngineVersion !== undefined && input.EngineVersion !== null) {
6034
+ if (input.EngineVersion != null) {
6234
6035
  entries["EngineVersion"] = input.EngineVersion;
6235
6036
  }
6236
- if (input.AutoMinorVersionUpgrade !== undefined && input.AutoMinorVersionUpgrade !== null) {
6037
+ if (input.AutoMinorVersionUpgrade != null) {
6237
6038
  entries["AutoMinorVersionUpgrade"] = input.AutoMinorVersionUpgrade;
6238
6039
  }
6239
- if (input.SnapshotRetentionLimit !== undefined && input.SnapshotRetentionLimit !== null) {
6040
+ if (input.SnapshotRetentionLimit != null) {
6240
6041
  entries["SnapshotRetentionLimit"] = input.SnapshotRetentionLimit;
6241
6042
  }
6242
- if (input.SnapshotWindow !== undefined && input.SnapshotWindow !== null) {
6043
+ if (input.SnapshotWindow != null) {
6243
6044
  entries["SnapshotWindow"] = input.SnapshotWindow;
6244
6045
  }
6245
- if (input.CacheNodeType !== undefined && input.CacheNodeType !== null) {
6046
+ if (input.CacheNodeType != null) {
6246
6047
  entries["CacheNodeType"] = input.CacheNodeType;
6247
6048
  }
6248
- if (input.AuthToken !== undefined && input.AuthToken !== null) {
6049
+ if (input.AuthToken != null) {
6249
6050
  entries["AuthToken"] = input.AuthToken;
6250
6051
  }
6251
- if (input.AuthTokenUpdateStrategy !== undefined && input.AuthTokenUpdateStrategy !== null) {
6052
+ if (input.AuthTokenUpdateStrategy != null) {
6252
6053
  entries["AuthTokenUpdateStrategy"] = input.AuthTokenUpdateStrategy;
6253
6054
  }
6254
- if (input.UserGroupIdsToAdd !== undefined && input.UserGroupIdsToAdd !== null) {
6055
+ if (input.UserGroupIdsToAdd != null) {
6255
6056
  const memberEntries = serializeAws_queryUserGroupIdList(input.UserGroupIdsToAdd, context);
6256
6057
  Object.entries(memberEntries).forEach(([key, value]) => {
6257
6058
  const loc = `UserGroupIdsToAdd.${key}`;
6258
6059
  entries[loc] = value;
6259
6060
  });
6260
6061
  }
6261
- if (input.UserGroupIdsToRemove !== undefined && input.UserGroupIdsToRemove !== null) {
6062
+ if (input.UserGroupIdsToRemove != null) {
6262
6063
  const memberEntries = serializeAws_queryUserGroupIdList(input.UserGroupIdsToRemove, context);
6263
6064
  Object.entries(memberEntries).forEach(([key, value]) => {
6264
6065
  const loc = `UserGroupIdsToRemove.${key}`;
6265
6066
  entries[loc] = value;
6266
6067
  });
6267
6068
  }
6268
- if (input.RemoveUserGroups !== undefined && input.RemoveUserGroups !== null) {
6069
+ if (input.RemoveUserGroups != null) {
6269
6070
  entries["RemoveUserGroups"] = input.RemoveUserGroups;
6270
6071
  }
6271
- if (input.LogDeliveryConfigurations !== undefined && input.LogDeliveryConfigurations !== null) {
6072
+ if (input.LogDeliveryConfigurations != null) {
6272
6073
  const memberEntries = serializeAws_queryLogDeliveryConfigurationRequestList(input.LogDeliveryConfigurations, context);
6273
6074
  Object.entries(memberEntries).forEach(([key, value]) => {
6274
6075
  const loc = `LogDeliveryConfigurations.${key}`;
@@ -6279,30 +6080,30 @@ const serializeAws_queryModifyReplicationGroupMessage = (input, context) => {
6279
6080
  };
6280
6081
  const serializeAws_queryModifyReplicationGroupShardConfigurationMessage = (input, context) => {
6281
6082
  const entries = {};
6282
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
6083
+ if (input.ReplicationGroupId != null) {
6283
6084
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
6284
6085
  }
6285
- if (input.NodeGroupCount !== undefined && input.NodeGroupCount !== null) {
6086
+ if (input.NodeGroupCount != null) {
6286
6087
  entries["NodeGroupCount"] = input.NodeGroupCount;
6287
6088
  }
6288
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
6089
+ if (input.ApplyImmediately != null) {
6289
6090
  entries["ApplyImmediately"] = input.ApplyImmediately;
6290
6091
  }
6291
- if (input.ReshardingConfiguration !== undefined && input.ReshardingConfiguration !== null) {
6092
+ if (input.ReshardingConfiguration != null) {
6292
6093
  const memberEntries = serializeAws_queryReshardingConfigurationList(input.ReshardingConfiguration, context);
6293
6094
  Object.entries(memberEntries).forEach(([key, value]) => {
6294
6095
  const loc = `ReshardingConfiguration.${key}`;
6295
6096
  entries[loc] = value;
6296
6097
  });
6297
6098
  }
6298
- if (input.NodeGroupsToRemove !== undefined && input.NodeGroupsToRemove !== null) {
6099
+ if (input.NodeGroupsToRemove != null) {
6299
6100
  const memberEntries = serializeAws_queryNodeGroupsToRemoveList(input.NodeGroupsToRemove, context);
6300
6101
  Object.entries(memberEntries).forEach(([key, value]) => {
6301
6102
  const loc = `NodeGroupsToRemove.${key}`;
6302
6103
  entries[loc] = value;
6303
6104
  });
6304
6105
  }
6305
- if (input.NodeGroupsToRetain !== undefined && input.NodeGroupsToRetain !== null) {
6106
+ if (input.NodeGroupsToRetain != null) {
6306
6107
  const memberEntries = serializeAws_queryNodeGroupsToRetainList(input.NodeGroupsToRetain, context);
6307
6108
  Object.entries(memberEntries).forEach(([key, value]) => {
6308
6109
  const loc = `NodeGroupsToRetain.${key}`;
@@ -6313,17 +6114,17 @@ const serializeAws_queryModifyReplicationGroupShardConfigurationMessage = (input
6313
6114
  };
6314
6115
  const serializeAws_queryModifyUserGroupMessage = (input, context) => {
6315
6116
  const entries = {};
6316
- if (input.UserGroupId !== undefined && input.UserGroupId !== null) {
6117
+ if (input.UserGroupId != null) {
6317
6118
  entries["UserGroupId"] = input.UserGroupId;
6318
6119
  }
6319
- if (input.UserIdsToAdd !== undefined && input.UserIdsToAdd !== null) {
6120
+ if (input.UserIdsToAdd != null) {
6320
6121
  const memberEntries = serializeAws_queryUserIdListInput(input.UserIdsToAdd, context);
6321
6122
  Object.entries(memberEntries).forEach(([key, value]) => {
6322
6123
  const loc = `UserIdsToAdd.${key}`;
6323
6124
  entries[loc] = value;
6324
6125
  });
6325
6126
  }
6326
- if (input.UserIdsToRemove !== undefined && input.UserIdsToRemove !== null) {
6127
+ if (input.UserIdsToRemove != null) {
6327
6128
  const memberEntries = serializeAws_queryUserIdListInput(input.UserIdsToRemove, context);
6328
6129
  Object.entries(memberEntries).forEach(([key, value]) => {
6329
6130
  const loc = `UserIdsToRemove.${key}`;
@@ -6334,52 +6135,52 @@ const serializeAws_queryModifyUserGroupMessage = (input, context) => {
6334
6135
  };
6335
6136
  const serializeAws_queryModifyUserMessage = (input, context) => {
6336
6137
  const entries = {};
6337
- if (input.UserId !== undefined && input.UserId !== null) {
6138
+ if (input.UserId != null) {
6338
6139
  entries["UserId"] = input.UserId;
6339
6140
  }
6340
- if (input.AccessString !== undefined && input.AccessString !== null) {
6141
+ if (input.AccessString != null) {
6341
6142
  entries["AccessString"] = input.AccessString;
6342
6143
  }
6343
- if (input.AppendAccessString !== undefined && input.AppendAccessString !== null) {
6144
+ if (input.AppendAccessString != null) {
6344
6145
  entries["AppendAccessString"] = input.AppendAccessString;
6345
6146
  }
6346
- if (input.Passwords !== undefined && input.Passwords !== null) {
6147
+ if (input.Passwords != null) {
6347
6148
  const memberEntries = serializeAws_queryPasswordListInput(input.Passwords, context);
6348
6149
  Object.entries(memberEntries).forEach(([key, value]) => {
6349
6150
  const loc = `Passwords.${key}`;
6350
6151
  entries[loc] = value;
6351
6152
  });
6352
6153
  }
6353
- if (input.NoPasswordRequired !== undefined && input.NoPasswordRequired !== null) {
6154
+ if (input.NoPasswordRequired != null) {
6354
6155
  entries["NoPasswordRequired"] = input.NoPasswordRequired;
6355
6156
  }
6356
6157
  return entries;
6357
6158
  };
6358
6159
  const serializeAws_queryNodeGroupConfiguration = (input, context) => {
6359
6160
  const entries = {};
6360
- if (input.NodeGroupId !== undefined && input.NodeGroupId !== null) {
6161
+ if (input.NodeGroupId != null) {
6361
6162
  entries["NodeGroupId"] = input.NodeGroupId;
6362
6163
  }
6363
- if (input.Slots !== undefined && input.Slots !== null) {
6164
+ if (input.Slots != null) {
6364
6165
  entries["Slots"] = input.Slots;
6365
6166
  }
6366
- if (input.ReplicaCount !== undefined && input.ReplicaCount !== null) {
6167
+ if (input.ReplicaCount != null) {
6367
6168
  entries["ReplicaCount"] = input.ReplicaCount;
6368
6169
  }
6369
- if (input.PrimaryAvailabilityZone !== undefined && input.PrimaryAvailabilityZone !== null) {
6170
+ if (input.PrimaryAvailabilityZone != null) {
6370
6171
  entries["PrimaryAvailabilityZone"] = input.PrimaryAvailabilityZone;
6371
6172
  }
6372
- if (input.ReplicaAvailabilityZones !== undefined && input.ReplicaAvailabilityZones !== null) {
6173
+ if (input.ReplicaAvailabilityZones != null) {
6373
6174
  const memberEntries = serializeAws_queryAvailabilityZonesList(input.ReplicaAvailabilityZones, context);
6374
6175
  Object.entries(memberEntries).forEach(([key, value]) => {
6375
6176
  const loc = `ReplicaAvailabilityZones.${key}`;
6376
6177
  entries[loc] = value;
6377
6178
  });
6378
6179
  }
6379
- if (input.PrimaryOutpostArn !== undefined && input.PrimaryOutpostArn !== null) {
6180
+ if (input.PrimaryOutpostArn != null) {
6380
6181
  entries["PrimaryOutpostArn"] = input.PrimaryOutpostArn;
6381
6182
  }
6382
- if (input.ReplicaOutpostArns !== undefined && input.ReplicaOutpostArns !== null) {
6183
+ if (input.ReplicaOutpostArns != null) {
6383
6184
  const memberEntries = serializeAws_queryOutpostArnsList(input.ReplicaOutpostArns, context);
6384
6185
  Object.entries(memberEntries).forEach(([key, value]) => {
6385
6186
  const loc = `ReplicaOutpostArns.${key}`;
@@ -6441,10 +6242,10 @@ const serializeAws_queryOutpostArnsList = (input, context) => {
6441
6242
  };
6442
6243
  const serializeAws_queryParameterNameValue = (input, context) => {
6443
6244
  const entries = {};
6444
- if (input.ParameterName !== undefined && input.ParameterName !== null) {
6245
+ if (input.ParameterName != null) {
6445
6246
  entries["ParameterName"] = input.ParameterName;
6446
6247
  }
6447
- if (input.ParameterValue !== undefined && input.ParameterValue !== null) {
6248
+ if (input.ParameterValue != null) {
6448
6249
  entries["ParameterValue"] = input.ParameterValue;
6449
6250
  }
6450
6251
  return entries;
@@ -6502,16 +6303,16 @@ const serializeAws_queryPreferredOutpostArnList = (input, context) => {
6502
6303
  };
6503
6304
  const serializeAws_queryPurchaseReservedCacheNodesOfferingMessage = (input, context) => {
6504
6305
  const entries = {};
6505
- if (input.ReservedCacheNodesOfferingId !== undefined && input.ReservedCacheNodesOfferingId !== null) {
6306
+ if (input.ReservedCacheNodesOfferingId != null) {
6506
6307
  entries["ReservedCacheNodesOfferingId"] = input.ReservedCacheNodesOfferingId;
6507
6308
  }
6508
- if (input.ReservedCacheNodeId !== undefined && input.ReservedCacheNodeId !== null) {
6309
+ if (input.ReservedCacheNodeId != null) {
6509
6310
  entries["ReservedCacheNodeId"] = input.ReservedCacheNodeId;
6510
6311
  }
6511
- if (input.CacheNodeCount !== undefined && input.CacheNodeCount !== null) {
6312
+ if (input.CacheNodeCount != null) {
6512
6313
  entries["CacheNodeCount"] = input.CacheNodeCount;
6513
6314
  }
6514
- if (input.Tags !== undefined && input.Tags !== null) {
6315
+ if (input.Tags != null) {
6515
6316
  const memberEntries = serializeAws_queryTagList(input.Tags, context);
6516
6317
  Object.entries(memberEntries).forEach(([key, value]) => {
6517
6318
  const loc = `Tags.${key}`;
@@ -6522,20 +6323,20 @@ const serializeAws_queryPurchaseReservedCacheNodesOfferingMessage = (input, cont
6522
6323
  };
6523
6324
  const serializeAws_queryRebalanceSlotsInGlobalReplicationGroupMessage = (input, context) => {
6524
6325
  const entries = {};
6525
- if (input.GlobalReplicationGroupId !== undefined && input.GlobalReplicationGroupId !== null) {
6326
+ if (input.GlobalReplicationGroupId != null) {
6526
6327
  entries["GlobalReplicationGroupId"] = input.GlobalReplicationGroupId;
6527
6328
  }
6528
- if (input.ApplyImmediately !== undefined && input.ApplyImmediately !== null) {
6329
+ if (input.ApplyImmediately != null) {
6529
6330
  entries["ApplyImmediately"] = input.ApplyImmediately;
6530
6331
  }
6531
6332
  return entries;
6532
6333
  };
6533
6334
  const serializeAws_queryRebootCacheClusterMessage = (input, context) => {
6534
6335
  const entries = {};
6535
- if (input.CacheClusterId !== undefined && input.CacheClusterId !== null) {
6336
+ if (input.CacheClusterId != null) {
6536
6337
  entries["CacheClusterId"] = input.CacheClusterId;
6537
6338
  }
6538
- if (input.CacheNodeIdsToReboot !== undefined && input.CacheNodeIdsToReboot !== null) {
6339
+ if (input.CacheNodeIdsToReboot != null) {
6539
6340
  const memberEntries = serializeAws_queryCacheNodeIdsList(input.CacheNodeIdsToReboot, context);
6540
6341
  Object.entries(memberEntries).forEach(([key, value]) => {
6541
6342
  const loc = `CacheNodeIdsToReboot.${key}`;
@@ -6546,13 +6347,13 @@ const serializeAws_queryRebootCacheClusterMessage = (input, context) => {
6546
6347
  };
6547
6348
  const serializeAws_queryRegionalConfiguration = (input, context) => {
6548
6349
  const entries = {};
6549
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
6350
+ if (input.ReplicationGroupId != null) {
6550
6351
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
6551
6352
  }
6552
- if (input.ReplicationGroupRegion !== undefined && input.ReplicationGroupRegion !== null) {
6353
+ if (input.ReplicationGroupRegion != null) {
6553
6354
  entries["ReplicationGroupRegion"] = input.ReplicationGroupRegion;
6554
6355
  }
6555
- if (input.ReshardingConfiguration !== undefined && input.ReshardingConfiguration !== null) {
6356
+ if (input.ReshardingConfiguration != null) {
6556
6357
  const memberEntries = serializeAws_queryReshardingConfigurationList(input.ReshardingConfiguration, context);
6557
6358
  Object.entries(memberEntries).forEach(([key, value]) => {
6558
6359
  const loc = `ReshardingConfiguration.${key}`;
@@ -6590,10 +6391,10 @@ const serializeAws_queryRemoveReplicasList = (input, context) => {
6590
6391
  };
6591
6392
  const serializeAws_queryRemoveTagsFromResourceMessage = (input, context) => {
6592
6393
  const entries = {};
6593
- if (input.ResourceName !== undefined && input.ResourceName !== null) {
6394
+ if (input.ResourceName != null) {
6594
6395
  entries["ResourceName"] = input.ResourceName;
6595
6396
  }
6596
- if (input.TagKeys !== undefined && input.TagKeys !== null) {
6397
+ if (input.TagKeys != null) {
6597
6398
  const memberEntries = serializeAws_queryKeyList(input.TagKeys, context);
6598
6399
  Object.entries(memberEntries).forEach(([key, value]) => {
6599
6400
  const loc = `TagKeys.${key}`;
@@ -6631,13 +6432,13 @@ const serializeAws_queryReplicationGroupIdList = (input, context) => {
6631
6432
  };
6632
6433
  const serializeAws_queryResetCacheParameterGroupMessage = (input, context) => {
6633
6434
  const entries = {};
6634
- if (input.CacheParameterGroupName !== undefined && input.CacheParameterGroupName !== null) {
6435
+ if (input.CacheParameterGroupName != null) {
6635
6436
  entries["CacheParameterGroupName"] = input.CacheParameterGroupName;
6636
6437
  }
6637
- if (input.ResetAllParameters !== undefined && input.ResetAllParameters !== null) {
6438
+ if (input.ResetAllParameters != null) {
6638
6439
  entries["ResetAllParameters"] = input.ResetAllParameters;
6639
6440
  }
6640
- if (input.ParameterNameValues !== undefined && input.ParameterNameValues !== null) {
6441
+ if (input.ParameterNameValues != null) {
6641
6442
  const memberEntries = serializeAws_queryParameterNameValueList(input.ParameterNameValues, context);
6642
6443
  Object.entries(memberEntries).forEach(([key, value]) => {
6643
6444
  const loc = `ParameterNameValues.${key}`;
@@ -6648,10 +6449,10 @@ const serializeAws_queryResetCacheParameterGroupMessage = (input, context) => {
6648
6449
  };
6649
6450
  const serializeAws_queryReshardingConfiguration = (input, context) => {
6650
6451
  const entries = {};
6651
- if (input.NodeGroupId !== undefined && input.NodeGroupId !== null) {
6452
+ if (input.NodeGroupId != null) {
6652
6453
  entries["NodeGroupId"] = input.NodeGroupId;
6653
6454
  }
6654
- if (input.PreferredAvailabilityZones !== undefined && input.PreferredAvailabilityZones !== null) {
6455
+ if (input.PreferredAvailabilityZones != null) {
6655
6456
  const memberEntries = serializeAws_queryAvailabilityZonesList(input.PreferredAvailabilityZones, context);
6656
6457
  Object.entries(memberEntries).forEach(([key, value]) => {
6657
6458
  const loc = `PreferredAvailabilityZones.${key}`;
@@ -6677,13 +6478,13 @@ const serializeAws_queryReshardingConfigurationList = (input, context) => {
6677
6478
  };
6678
6479
  const serializeAws_queryRevokeCacheSecurityGroupIngressMessage = (input, context) => {
6679
6480
  const entries = {};
6680
- if (input.CacheSecurityGroupName !== undefined && input.CacheSecurityGroupName !== null) {
6481
+ if (input.CacheSecurityGroupName != null) {
6681
6482
  entries["CacheSecurityGroupName"] = input.CacheSecurityGroupName;
6682
6483
  }
6683
- if (input.EC2SecurityGroupName !== undefined && input.EC2SecurityGroupName !== null) {
6484
+ if (input.EC2SecurityGroupName != null) {
6684
6485
  entries["EC2SecurityGroupName"] = input.EC2SecurityGroupName;
6685
6486
  }
6686
- if (input.EC2SecurityGroupOwnerId !== undefined && input.EC2SecurityGroupOwnerId !== null) {
6487
+ if (input.EC2SecurityGroupOwnerId != null) {
6687
6488
  entries["EC2SecurityGroupOwnerId"] = input.EC2SecurityGroupOwnerId;
6688
6489
  }
6689
6490
  return entries;
@@ -6726,10 +6527,10 @@ const serializeAws_querySnapshotArnsList = (input, context) => {
6726
6527
  };
6727
6528
  const serializeAws_queryStartMigrationMessage = (input, context) => {
6728
6529
  const entries = {};
6729
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
6530
+ if (input.ReplicationGroupId != null) {
6730
6531
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
6731
6532
  }
6732
- if (input.CustomerNodeEndpointList !== undefined && input.CustomerNodeEndpointList !== null) {
6533
+ if (input.CustomerNodeEndpointList != null) {
6733
6534
  const memberEntries = serializeAws_queryCustomerNodeEndpointList(input.CustomerNodeEndpointList, context);
6734
6535
  Object.entries(memberEntries).forEach(([key, value]) => {
6735
6536
  const loc = `CustomerNodeEndpointList.${key}`;
@@ -6752,10 +6553,10 @@ const serializeAws_querySubnetIdentifierList = (input, context) => {
6752
6553
  };
6753
6554
  const serializeAws_queryTag = (input, context) => {
6754
6555
  const entries = {};
6755
- if (input.Key !== undefined && input.Key !== null) {
6556
+ if (input.Key != null) {
6756
6557
  entries["Key"] = input.Key;
6757
6558
  }
6758
- if (input.Value !== undefined && input.Value !== null) {
6559
+ if (input.Value != null) {
6759
6560
  entries["Value"] = input.Value;
6760
6561
  }
6761
6562
  return entries;
@@ -6777,20 +6578,20 @@ const serializeAws_queryTagList = (input, context) => {
6777
6578
  };
6778
6579
  const serializeAws_queryTestFailoverMessage = (input, context) => {
6779
6580
  const entries = {};
6780
- if (input.ReplicationGroupId !== undefined && input.ReplicationGroupId !== null) {
6581
+ if (input.ReplicationGroupId != null) {
6781
6582
  entries["ReplicationGroupId"] = input.ReplicationGroupId;
6782
6583
  }
6783
- if (input.NodeGroupId !== undefined && input.NodeGroupId !== null) {
6584
+ if (input.NodeGroupId != null) {
6784
6585
  entries["NodeGroupId"] = input.NodeGroupId;
6785
6586
  }
6786
6587
  return entries;
6787
6588
  };
6788
6589
  const serializeAws_queryTimeRangeFilter = (input, context) => {
6789
6590
  const entries = {};
6790
- if (input.StartTime !== undefined && input.StartTime !== null) {
6591
+ if (input.StartTime != null) {
6791
6592
  entries["StartTime"] = input.StartTime.toISOString().split(".")[0] + "Z";
6792
6593
  }
6793
- if (input.EndTime !== undefined && input.EndTime !== null) {
6594
+ if (input.EndTime != null) {
6794
6595
  entries["EndTime"] = input.EndTime.toISOString().split(".")[0] + "Z";
6795
6596
  }
6796
6597
  return entries;
@@ -6925,9 +6726,6 @@ const deserializeAws_queryAvailabilityZonesList = (output, context) => {
6925
6726
  return (output || [])
6926
6727
  .filter((e) => e != null)
6927
6728
  .map((entry) => {
6928
- if (entry === null) {
6929
- return null;
6930
- }
6931
6729
  return (0, smithy_client_1.expectString)(entry);
6932
6730
  });
6933
6731
  };
@@ -7083,9 +6881,6 @@ const deserializeAws_queryCacheClusterList = (output, context) => {
7083
6881
  return (output || [])
7084
6882
  .filter((e) => e != null)
7085
6883
  .map((entry) => {
7086
- if (entry === null) {
7087
- return null;
7088
- }
7089
6884
  return deserializeAws_queryCacheCluster(entry, context);
7090
6885
  });
7091
6886
  };
@@ -7143,9 +6938,6 @@ const deserializeAws_queryCacheEngineVersionList = (output, context) => {
7143
6938
  return (output || [])
7144
6939
  .filter((e) => e != null)
7145
6940
  .map((entry) => {
7146
- if (entry === null) {
7147
- return null;
7148
- }
7149
6941
  return deserializeAws_queryCacheEngineVersion(entry, context);
7150
6942
  });
7151
6943
  };
@@ -7207,9 +6999,6 @@ const deserializeAws_queryCacheNodeIdsList = (output, context) => {
7207
6999
  return (output || [])
7208
7000
  .filter((e) => e != null)
7209
7001
  .map((entry) => {
7210
- if (entry === null) {
7211
- return null;
7212
- }
7213
7002
  return (0, smithy_client_1.expectString)(entry);
7214
7003
  });
7215
7004
  };
@@ -7217,9 +7006,6 @@ const deserializeAws_queryCacheNodeList = (output, context) => {
7217
7006
  return (output || [])
7218
7007
  .filter((e) => e != null)
7219
7008
  .map((entry) => {
7220
- if (entry === null) {
7221
- return null;
7222
- }
7223
7009
  return deserializeAws_queryCacheNode(entry, context);
7224
7010
  });
7225
7011
  };
@@ -7272,9 +7058,6 @@ const deserializeAws_queryCacheNodeTypeSpecificParametersList = (output, context
7272
7058
  return (output || [])
7273
7059
  .filter((e) => e != null)
7274
7060
  .map((entry) => {
7275
- if (entry === null) {
7276
- return null;
7277
- }
7278
7061
  return deserializeAws_queryCacheNodeTypeSpecificParameter(entry, context);
7279
7062
  });
7280
7063
  };
@@ -7295,9 +7078,6 @@ const deserializeAws_queryCacheNodeTypeSpecificValueList = (output, context) =>
7295
7078
  return (output || [])
7296
7079
  .filter((e) => e != null)
7297
7080
  .map((entry) => {
7298
- if (entry === null) {
7299
- return null;
7300
- }
7301
7081
  return deserializeAws_queryCacheNodeTypeSpecificValue(entry, context);
7302
7082
  });
7303
7083
  };
@@ -7342,9 +7122,6 @@ const deserializeAws_queryCacheNodeUpdateStatusList = (output, context) => {
7342
7122
  return (output || [])
7343
7123
  .filter((e) => e != null)
7344
7124
  .map((entry) => {
7345
- if (entry === null) {
7346
- return null;
7347
- }
7348
7125
  return deserializeAws_queryCacheNodeUpdateStatus(entry, context);
7349
7126
  });
7350
7127
  };
@@ -7410,9 +7187,6 @@ const deserializeAws_queryCacheParameterGroupList = (output, context) => {
7410
7187
  return (output || [])
7411
7188
  .filter((e) => e != null)
7412
7189
  .map((entry) => {
7413
- if (entry === null) {
7414
- return null;
7415
- }
7416
7190
  return deserializeAws_queryCacheParameterGroup(entry, context);
7417
7191
  });
7418
7192
  };
@@ -7536,9 +7310,6 @@ const deserializeAws_queryCacheSecurityGroupMembershipList = (output, context) =
7536
7310
  return (output || [])
7537
7311
  .filter((e) => e != null)
7538
7312
  .map((entry) => {
7539
- if (entry === null) {
7540
- return null;
7541
- }
7542
7313
  return deserializeAws_queryCacheSecurityGroupMembership(entry, context);
7543
7314
  });
7544
7315
  };
@@ -7581,9 +7352,6 @@ const deserializeAws_queryCacheSecurityGroups = (output, context) => {
7581
7352
  return (output || [])
7582
7353
  .filter((e) => e != null)
7583
7354
  .map((entry) => {
7584
- if (entry === null) {
7585
- return null;
7586
- }
7587
7355
  return deserializeAws_queryCacheSecurityGroup(entry, context);
7588
7356
  });
7589
7357
  };
@@ -7672,9 +7440,6 @@ const deserializeAws_queryCacheSubnetGroups = (output, context) => {
7672
7440
  return (output || [])
7673
7441
  .filter((e) => e != null)
7674
7442
  .map((entry) => {
7675
- if (entry === null) {
7676
- return null;
7677
- }
7678
7443
  return deserializeAws_queryCacheSubnetGroup(entry, context);
7679
7444
  });
7680
7445
  };
@@ -7700,9 +7465,6 @@ const deserializeAws_queryClusterIdList = (output, context) => {
7700
7465
  return (output || [])
7701
7466
  .filter((e) => e != null)
7702
7467
  .map((entry) => {
7703
- if (entry === null) {
7704
- return null;
7705
- }
7706
7468
  return (0, smithy_client_1.expectString)(entry);
7707
7469
  });
7708
7470
  };
@@ -7994,9 +7756,6 @@ const deserializeAws_queryEC2SecurityGroupList = (output, context) => {
7994
7756
  return (output || [])
7995
7757
  .filter((e) => e != null)
7996
7758
  .map((entry) => {
7997
- if (entry === null) {
7998
- return null;
7999
- }
8000
7759
  return deserializeAws_queryEC2SecurityGroup(entry, context);
8001
7760
  });
8002
7761
  };
@@ -8066,9 +7825,6 @@ const deserializeAws_queryEventList = (output, context) => {
8066
7825
  return (output || [])
8067
7826
  .filter((e) => e != null)
8068
7827
  .map((entry) => {
8069
- if (entry === null) {
8070
- return null;
8071
- }
8072
7828
  return deserializeAws_queryEvent(entry, context);
8073
7829
  });
8074
7830
  };
@@ -8114,9 +7870,6 @@ const deserializeAws_queryGlobalNodeGroupList = (output, context) => {
8114
7870
  return (output || [])
8115
7871
  .filter((e) => e != null)
8116
7872
  .map((entry) => {
8117
- if (entry === null) {
8118
- return null;
8119
- }
8120
7873
  return deserializeAws_queryGlobalNodeGroup(entry, context);
8121
7874
  });
8122
7875
  };
@@ -8209,9 +7962,6 @@ const deserializeAws_queryGlobalReplicationGroupList = (output, context) => {
8209
7962
  return (output || [])
8210
7963
  .filter((e) => e != null)
8211
7964
  .map((entry) => {
8212
- if (entry === null) {
8213
- return null;
8214
- }
8215
7965
  return deserializeAws_queryGlobalReplicationGroup(entry, context);
8216
7966
  });
8217
7967
  };
@@ -8244,9 +7994,6 @@ const deserializeAws_queryGlobalReplicationGroupMemberList = (output, context) =
8244
7994
  return (output || [])
8245
7995
  .filter((e) => e != null)
8246
7996
  .map((entry) => {
8247
- if (entry === null) {
8248
- return null;
8249
- }
8250
7997
  return deserializeAws_queryGlobalReplicationGroupMember(entry, context);
8251
7998
  });
8252
7999
  };
@@ -8454,9 +8201,6 @@ const deserializeAws_queryLogDeliveryConfigurationList = (output, context) => {
8454
8201
  return (output || [])
8455
8202
  .filter((e) => e != null)
8456
8203
  .map((entry) => {
8457
- if (entry === null) {
8458
- return null;
8459
- }
8460
8204
  return deserializeAws_queryLogDeliveryConfiguration(entry, context);
8461
8205
  });
8462
8206
  };
@@ -8581,9 +8325,6 @@ const deserializeAws_queryNodeGroupList = (output, context) => {
8581
8325
  return (output || [])
8582
8326
  .filter((e) => e != null)
8583
8327
  .map((entry) => {
8584
- if (entry === null) {
8585
- return null;
8586
- }
8587
8328
  return deserializeAws_queryNodeGroup(entry, context);
8588
8329
  });
8589
8330
  };
@@ -8620,9 +8361,6 @@ const deserializeAws_queryNodeGroupMemberList = (output, context) => {
8620
8361
  return (output || [])
8621
8362
  .filter((e) => e != null)
8622
8363
  .map((entry) => {
8623
- if (entry === null) {
8624
- return null;
8625
- }
8626
8364
  return deserializeAws_queryNodeGroupMember(entry, context);
8627
8365
  });
8628
8366
  };
@@ -8671,9 +8409,6 @@ const deserializeAws_queryNodeGroupMemberUpdateStatusList = (output, context) =>
8671
8409
  return (output || [])
8672
8410
  .filter((e) => e != null)
8673
8411
  .map((entry) => {
8674
- if (entry === null) {
8675
- return null;
8676
- }
8677
8412
  return deserializeAws_queryNodeGroupMemberUpdateStatus(entry, context);
8678
8413
  });
8679
8414
  };
@@ -8716,9 +8451,6 @@ const deserializeAws_queryNodeGroupUpdateStatusList = (output, context) => {
8716
8451
  return (output || [])
8717
8452
  .filter((e) => e != null)
8718
8453
  .map((entry) => {
8719
- if (entry === null) {
8720
- return null;
8721
- }
8722
8454
  return deserializeAws_queryNodeGroupUpdateStatus(entry, context);
8723
8455
  });
8724
8456
  };
@@ -8777,9 +8509,6 @@ const deserializeAws_queryNodeSnapshotList = (output, context) => {
8777
8509
  return (output || [])
8778
8510
  .filter((e) => e != null)
8779
8511
  .map((entry) => {
8780
- if (entry === null) {
8781
- return null;
8782
- }
8783
8512
  return deserializeAws_queryNodeSnapshot(entry, context);
8784
8513
  });
8785
8514
  };
@@ -8787,9 +8516,6 @@ const deserializeAws_queryNodeTypeList = (output, context) => {
8787
8516
  return (output || [])
8788
8517
  .filter((e) => e != null)
8789
8518
  .map((entry) => {
8790
- if (entry === null) {
8791
- return null;
8792
- }
8793
8519
  return (0, smithy_client_1.expectString)(entry);
8794
8520
  });
8795
8521
  };
@@ -8819,9 +8545,6 @@ const deserializeAws_queryOutpostArnsList = (output, context) => {
8819
8545
  return (output || [])
8820
8546
  .filter((e) => e != null)
8821
8547
  .map((entry) => {
8822
- if (entry === null) {
8823
- return null;
8824
- }
8825
8548
  return (0, smithy_client_1.expectString)(entry);
8826
8549
  });
8827
8550
  };
@@ -8870,9 +8593,6 @@ const deserializeAws_queryParametersList = (output, context) => {
8870
8593
  return (output || [])
8871
8594
  .filter((e) => e != null)
8872
8595
  .map((entry) => {
8873
- if (entry === null) {
8874
- return null;
8875
- }
8876
8596
  return deserializeAws_queryParameter(entry, context);
8877
8597
  });
8878
8598
  };
@@ -8901,9 +8621,6 @@ const deserializeAws_queryPendingLogDeliveryConfigurationList = (output, context
8901
8621
  return (output || [])
8902
8622
  .filter((e) => e != null)
8903
8623
  .map((entry) => {
8904
- if (entry === null) {
8905
- return null;
8906
- }
8907
8624
  return deserializeAws_queryPendingLogDeliveryConfiguration(entry, context);
8908
8625
  });
8909
8626
  };
@@ -8969,9 +8686,6 @@ const deserializeAws_queryProcessedUpdateActionList = (output, context) => {
8969
8686
  return (output || [])
8970
8687
  .filter((e) => e != null)
8971
8688
  .map((entry) => {
8972
- if (entry === null) {
8973
- return null;
8974
- }
8975
8689
  return deserializeAws_queryProcessedUpdateAction(entry, context);
8976
8690
  });
8977
8691
  };
@@ -9019,9 +8733,6 @@ const deserializeAws_queryRecurringChargeList = (output, context) => {
9019
8733
  return (output || [])
9020
8734
  .filter((e) => e != null)
9021
8735
  .map((entry) => {
9022
- if (entry === null) {
9023
- return null;
9024
- }
9025
8736
  return deserializeAws_queryRecurringCharge(entry, context);
9026
8737
  });
9027
8738
  };
@@ -9177,9 +8888,6 @@ const deserializeAws_queryReplicationGroupList = (output, context) => {
9177
8888
  return (output || [])
9178
8889
  .filter((e) => e != null)
9179
8890
  .map((entry) => {
9180
- if (entry === null) {
9181
- return null;
9182
- }
9183
8891
  return deserializeAws_queryReplicationGroup(entry, context);
9184
8892
  });
9185
8893
  };
@@ -9222,9 +8930,6 @@ const deserializeAws_queryReplicationGroupOutpostArnList = (output, context) =>
9222
8930
  return (output || [])
9223
8931
  .filter((e) => e != null)
9224
8932
  .map((entry) => {
9225
- if (entry === null) {
9226
- return null;
9227
- }
9228
8933
  return (0, smithy_client_1.expectString)(entry);
9229
8934
  });
9230
8935
  };
@@ -9334,9 +9039,6 @@ const deserializeAws_queryReservedCacheNodeList = (output, context) => {
9334
9039
  return (output || [])
9335
9040
  .filter((e) => e != null)
9336
9041
  .map((entry) => {
9337
- if (entry === null) {
9338
- return null;
9339
- }
9340
9042
  return deserializeAws_queryReservedCacheNode(entry, context);
9341
9043
  });
9342
9044
  };
@@ -9419,9 +9121,6 @@ const deserializeAws_queryReservedCacheNodesOfferingList = (output, context) =>
9419
9121
  return (output || [])
9420
9122
  .filter((e) => e != null)
9421
9123
  .map((entry) => {
9422
- if (entry === null) {
9423
- return null;
9424
- }
9425
9124
  return deserializeAws_queryReservedCacheNodesOffering(entry, context);
9426
9125
  });
9427
9126
  };
@@ -9486,9 +9185,6 @@ const deserializeAws_querySecurityGroupMembershipList = (output, context) => {
9486
9185
  return (output || [])
9487
9186
  .filter((e) => e != null)
9488
9187
  .map((entry) => {
9489
- if (entry === null) {
9490
- return null;
9491
- }
9492
9188
  return deserializeAws_querySecurityGroupMembership(entry, context);
9493
9189
  });
9494
9190
  };
@@ -9558,9 +9254,6 @@ const deserializeAws_queryServiceUpdateList = (output, context) => {
9558
9254
  return (output || [])
9559
9255
  .filter((e) => e != null)
9560
9256
  .map((entry) => {
9561
- if (entry === null) {
9562
- return null;
9563
- }
9564
9257
  return deserializeAws_queryServiceUpdate(entry, context);
9565
9258
  });
9566
9259
  };
@@ -9740,9 +9433,6 @@ const deserializeAws_querySnapshotList = (output, context) => {
9740
9433
  return (output || [])
9741
9434
  .filter((e) => e != null)
9742
9435
  .map((entry) => {
9743
- if (entry === null) {
9744
- return null;
9745
- }
9746
9436
  return deserializeAws_querySnapshot(entry, context);
9747
9437
  });
9748
9438
  };
@@ -9803,9 +9493,6 @@ const deserializeAws_querySubnetList = (output, context) => {
9803
9493
  return (output || [])
9804
9494
  .filter((e) => e != null)
9805
9495
  .map((entry) => {
9806
- if (entry === null) {
9807
- return null;
9808
- }
9809
9496
  return deserializeAws_querySubnet(entry, context);
9810
9497
  });
9811
9498
  };
@@ -9844,9 +9531,6 @@ const deserializeAws_queryTagList = (output, context) => {
9844
9531
  return (output || [])
9845
9532
  .filter((e) => e != null)
9846
9533
  .map((entry) => {
9847
- if (entry === null) {
9848
- return null;
9849
- }
9850
9534
  return deserializeAws_queryTag(entry, context);
9851
9535
  });
9852
9536
  };
@@ -9902,9 +9586,6 @@ const deserializeAws_queryUGReplicationGroupIdList = (output, context) => {
9902
9586
  return (output || [])
9903
9587
  .filter((e) => e != null)
9904
9588
  .map((entry) => {
9905
- if (entry === null) {
9906
- return null;
9907
- }
9908
9589
  return (0, smithy_client_1.expectString)(entry);
9909
9590
  });
9910
9591
  };
@@ -9937,9 +9618,6 @@ const deserializeAws_queryUnprocessedUpdateActionList = (output, context) => {
9937
9618
  return (output || [])
9938
9619
  .filter((e) => e != null)
9939
9620
  .map((entry) => {
9940
- if (entry === null) {
9941
- return null;
9942
- }
9943
9621
  return deserializeAws_queryUnprocessedUpdateAction(entry, context);
9944
9622
  });
9945
9623
  };
@@ -10028,9 +9706,6 @@ const deserializeAws_queryUpdateActionList = (output, context) => {
10028
9706
  return (output || [])
10029
9707
  .filter((e) => e != null)
10030
9708
  .map((entry) => {
10031
- if (entry === null) {
10032
- return null;
10033
- }
10034
9709
  return deserializeAws_queryUpdateAction(entry, context);
10035
9710
  });
10036
9711
  };
@@ -10180,9 +9855,6 @@ const deserializeAws_queryUserGroupIdList = (output, context) => {
10180
9855
  return (output || [])
10181
9856
  .filter((e) => e != null)
10182
9857
  .map((entry) => {
10183
- if (entry === null) {
10184
- return null;
10185
- }
10186
9858
  return (0, smithy_client_1.expectString)(entry);
10187
9859
  });
10188
9860
  };
@@ -10190,9 +9862,6 @@ const deserializeAws_queryUserGroupList = (output, context) => {
10190
9862
  return (output || [])
10191
9863
  .filter((e) => e != null)
10192
9864
  .map((entry) => {
10193
- if (entry === null) {
10194
- return null;
10195
- }
10196
9865
  return deserializeAws_queryUserGroup(entry, context);
10197
9866
  });
10198
9867
  };
@@ -10256,9 +9925,6 @@ const deserializeAws_queryUserIdList = (output, context) => {
10256
9925
  return (output || [])
10257
9926
  .filter((e) => e != null)
10258
9927
  .map((entry) => {
10259
- if (entry === null) {
10260
- return null;
10261
- }
10262
9928
  return (0, smithy_client_1.expectString)(entry);
10263
9929
  });
10264
9930
  };
@@ -10266,9 +9932,6 @@ const deserializeAws_queryUserList = (output, context) => {
10266
9932
  return (output || [])
10267
9933
  .filter((e) => e != null)
10268
9934
  .map((entry) => {
10269
- if (entry === null) {
10270
- return null;
10271
- }
10272
9935
  return deserializeAws_queryUser(entry, context);
10273
9936
  });
10274
9937
  };