@aws-sdk/client-pinpoint-email 3.118.0 → 3.127.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,24 +14,18 @@ const serializeAws_restJson1CreateConfigurationSetCommand = async (input, contex
14
14
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/configuration-sets";
15
15
  let body;
16
16
  body = JSON.stringify({
17
- ...(input.ConfigurationSetName !== undefined &&
18
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
19
- ...(input.DeliveryOptions !== undefined &&
20
- input.DeliveryOptions !== null && {
17
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
18
+ ...(input.DeliveryOptions != null && {
21
19
  DeliveryOptions: serializeAws_restJson1DeliveryOptions(input.DeliveryOptions, context),
22
20
  }),
23
- ...(input.ReputationOptions !== undefined &&
24
- input.ReputationOptions !== null && {
21
+ ...(input.ReputationOptions != null && {
25
22
  ReputationOptions: serializeAws_restJson1ReputationOptions(input.ReputationOptions, context),
26
23
  }),
27
- ...(input.SendingOptions !== undefined &&
28
- input.SendingOptions !== null && {
24
+ ...(input.SendingOptions != null && {
29
25
  SendingOptions: serializeAws_restJson1SendingOptions(input.SendingOptions, context),
30
26
  }),
31
- ...(input.Tags !== undefined &&
32
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
33
- ...(input.TrackingOptions !== undefined &&
34
- input.TrackingOptions !== null && {
27
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
28
+ ...(input.TrackingOptions != null && {
35
29
  TrackingOptions: serializeAws_restJson1TrackingOptions(input.TrackingOptions, context),
36
30
  }),
37
31
  });
@@ -65,12 +59,10 @@ const serializeAws_restJson1CreateConfigurationSetEventDestinationCommand = asyn
65
59
  }
66
60
  let body;
67
61
  body = JSON.stringify({
68
- ...(input.EventDestination !== undefined &&
69
- input.EventDestination !== null && {
62
+ ...(input.EventDestination != null && {
70
63
  EventDestination: serializeAws_restJson1EventDestinationDefinition(input.EventDestination, context),
71
64
  }),
72
- ...(input.EventDestinationName !== undefined &&
73
- input.EventDestinationName !== null && { EventDestinationName: input.EventDestinationName }),
65
+ ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }),
74
66
  });
75
67
  return new protocol_http_1.HttpRequest({
76
68
  protocol,
@@ -91,9 +83,8 @@ const serializeAws_restJson1CreateDedicatedIpPoolCommand = async (input, context
91
83
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/dedicated-ip-pools";
92
84
  let body;
93
85
  body = JSON.stringify({
94
- ...(input.PoolName !== undefined && input.PoolName !== null && { PoolName: input.PoolName }),
95
- ...(input.Tags !== undefined &&
96
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
86
+ ...(input.PoolName != null && { PoolName: input.PoolName }),
87
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
97
88
  });
98
89
  return new protocol_http_1.HttpRequest({
99
90
  protocol,
@@ -114,13 +105,10 @@ const serializeAws_restJson1CreateDeliverabilityTestReportCommand = async (input
114
105
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/deliverability-dashboard/test";
115
106
  let body;
116
107
  body = JSON.stringify({
117
- ...(input.Content !== undefined &&
118
- input.Content !== null && { Content: serializeAws_restJson1EmailContent(input.Content, context) }),
119
- ...(input.FromEmailAddress !== undefined &&
120
- input.FromEmailAddress !== null && { FromEmailAddress: input.FromEmailAddress }),
121
- ...(input.ReportName !== undefined && input.ReportName !== null && { ReportName: input.ReportName }),
122
- ...(input.Tags !== undefined &&
123
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
108
+ ...(input.Content != null && { Content: serializeAws_restJson1EmailContent(input.Content, context) }),
109
+ ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }),
110
+ ...(input.ReportName != null && { ReportName: input.ReportName }),
111
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
124
112
  });
125
113
  return new protocol_http_1.HttpRequest({
126
114
  protocol,
@@ -141,9 +129,8 @@ const serializeAws_restJson1CreateEmailIdentityCommand = async (input, context)
141
129
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/identities";
142
130
  let body;
143
131
  body = JSON.stringify({
144
- ...(input.EmailIdentity !== undefined && input.EmailIdentity !== null && { EmailIdentity: input.EmailIdentity }),
145
- ...(input.Tags !== undefined &&
146
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
132
+ ...(input.EmailIdentity != null && { EmailIdentity: input.EmailIdentity }),
133
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
147
134
  });
148
135
  return new protocol_http_1.HttpRequest({
149
136
  protocol,
@@ -694,8 +681,7 @@ const serializeAws_restJson1PutAccountDedicatedIpWarmupAttributesCommand = async
694
681
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/account/dedicated-ips/warmup";
695
682
  let body;
696
683
  body = JSON.stringify({
697
- ...(input.AutoWarmupEnabled !== undefined &&
698
- input.AutoWarmupEnabled !== null && { AutoWarmupEnabled: input.AutoWarmupEnabled }),
684
+ ...(input.AutoWarmupEnabled != null && { AutoWarmupEnabled: input.AutoWarmupEnabled }),
699
685
  });
700
686
  return new protocol_http_1.HttpRequest({
701
687
  protocol,
@@ -716,8 +702,7 @@ const serializeAws_restJson1PutAccountSendingAttributesCommand = async (input, c
716
702
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/account/sending";
717
703
  let body;
718
704
  body = JSON.stringify({
719
- ...(input.SendingEnabled !== undefined &&
720
- input.SendingEnabled !== null && { SendingEnabled: input.SendingEnabled }),
705
+ ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }),
721
706
  });
722
707
  return new protocol_http_1.HttpRequest({
723
708
  protocol,
@@ -749,9 +734,8 @@ const serializeAws_restJson1PutConfigurationSetDeliveryOptionsCommand = async (i
749
734
  }
750
735
  let body;
751
736
  body = JSON.stringify({
752
- ...(input.SendingPoolName !== undefined &&
753
- input.SendingPoolName !== null && { SendingPoolName: input.SendingPoolName }),
754
- ...(input.TlsPolicy !== undefined && input.TlsPolicy !== null && { TlsPolicy: input.TlsPolicy }),
737
+ ...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }),
738
+ ...(input.TlsPolicy != null && { TlsPolicy: input.TlsPolicy }),
755
739
  });
756
740
  return new protocol_http_1.HttpRequest({
757
741
  protocol,
@@ -783,8 +767,7 @@ const serializeAws_restJson1PutConfigurationSetReputationOptionsCommand = async
783
767
  }
784
768
  let body;
785
769
  body = JSON.stringify({
786
- ...(input.ReputationMetricsEnabled !== undefined &&
787
- input.ReputationMetricsEnabled !== null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }),
770
+ ...(input.ReputationMetricsEnabled != null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }),
788
771
  });
789
772
  return new protocol_http_1.HttpRequest({
790
773
  protocol,
@@ -816,8 +799,7 @@ const serializeAws_restJson1PutConfigurationSetSendingOptionsCommand = async (in
816
799
  }
817
800
  let body;
818
801
  body = JSON.stringify({
819
- ...(input.SendingEnabled !== undefined &&
820
- input.SendingEnabled !== null && { SendingEnabled: input.SendingEnabled }),
802
+ ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }),
821
803
  });
822
804
  return new protocol_http_1.HttpRequest({
823
805
  protocol,
@@ -849,8 +831,7 @@ const serializeAws_restJson1PutConfigurationSetTrackingOptionsCommand = async (i
849
831
  }
850
832
  let body;
851
833
  body = JSON.stringify({
852
- ...(input.CustomRedirectDomain !== undefined &&
853
- input.CustomRedirectDomain !== null && { CustomRedirectDomain: input.CustomRedirectDomain }),
834
+ ...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }),
854
835
  });
855
836
  return new protocol_http_1.HttpRequest({
856
837
  protocol,
@@ -881,8 +862,7 @@ const serializeAws_restJson1PutDedicatedIpInPoolCommand = async (input, context)
881
862
  }
882
863
  let body;
883
864
  body = JSON.stringify({
884
- ...(input.DestinationPoolName !== undefined &&
885
- input.DestinationPoolName !== null && { DestinationPoolName: input.DestinationPoolName }),
865
+ ...(input.DestinationPoolName != null && { DestinationPoolName: input.DestinationPoolName }),
886
866
  });
887
867
  return new protocol_http_1.HttpRequest({
888
868
  protocol,
@@ -913,8 +893,7 @@ const serializeAws_restJson1PutDedicatedIpWarmupAttributesCommand = async (input
913
893
  }
914
894
  let body;
915
895
  body = JSON.stringify({
916
- ...(input.WarmupPercentage !== undefined &&
917
- input.WarmupPercentage !== null && { WarmupPercentage: input.WarmupPercentage }),
896
+ ...(input.WarmupPercentage != null && { WarmupPercentage: input.WarmupPercentage }),
918
897
  });
919
898
  return new protocol_http_1.HttpRequest({
920
899
  protocol,
@@ -935,10 +914,8 @@ const serializeAws_restJson1PutDeliverabilityDashboardOptionCommand = async (inp
935
914
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/deliverability-dashboard";
936
915
  let body;
937
916
  body = JSON.stringify({
938
- ...(input.DashboardEnabled !== undefined &&
939
- input.DashboardEnabled !== null && { DashboardEnabled: input.DashboardEnabled }),
940
- ...(input.SubscribedDomains !== undefined &&
941
- input.SubscribedDomains !== null && {
917
+ ...(input.DashboardEnabled != null && { DashboardEnabled: input.DashboardEnabled }),
918
+ ...(input.SubscribedDomains != null && {
942
919
  SubscribedDomains: serializeAws_restJson1DomainDeliverabilityTrackingOptions(input.SubscribedDomains, context),
943
920
  }),
944
921
  });
@@ -971,8 +948,7 @@ const serializeAws_restJson1PutEmailIdentityDkimAttributesCommand = async (input
971
948
  }
972
949
  let body;
973
950
  body = JSON.stringify({
974
- ...(input.SigningEnabled !== undefined &&
975
- input.SigningEnabled !== null && { SigningEnabled: input.SigningEnabled }),
951
+ ...(input.SigningEnabled != null && { SigningEnabled: input.SigningEnabled }),
976
952
  });
977
953
  return new protocol_http_1.HttpRequest({
978
954
  protocol,
@@ -1004,8 +980,7 @@ const serializeAws_restJson1PutEmailIdentityFeedbackAttributesCommand = async (i
1004
980
  }
1005
981
  let body;
1006
982
  body = JSON.stringify({
1007
- ...(input.EmailForwardingEnabled !== undefined &&
1008
- input.EmailForwardingEnabled !== null && { EmailForwardingEnabled: input.EmailForwardingEnabled }),
983
+ ...(input.EmailForwardingEnabled != null && { EmailForwardingEnabled: input.EmailForwardingEnabled }),
1009
984
  });
1010
985
  return new protocol_http_1.HttpRequest({
1011
986
  protocol,
@@ -1037,10 +1012,8 @@ const serializeAws_restJson1PutEmailIdentityMailFromAttributesCommand = async (i
1037
1012
  }
1038
1013
  let body;
1039
1014
  body = JSON.stringify({
1040
- ...(input.BehaviorOnMxFailure !== undefined &&
1041
- input.BehaviorOnMxFailure !== null && { BehaviorOnMxFailure: input.BehaviorOnMxFailure }),
1042
- ...(input.MailFromDomain !== undefined &&
1043
- input.MailFromDomain !== null && { MailFromDomain: input.MailFromDomain }),
1015
+ ...(input.BehaviorOnMxFailure != null && { BehaviorOnMxFailure: input.BehaviorOnMxFailure }),
1016
+ ...(input.MailFromDomain != null && { MailFromDomain: input.MailFromDomain }),
1044
1017
  });
1045
1018
  return new protocol_http_1.HttpRequest({
1046
1019
  protocol,
@@ -1061,22 +1034,15 @@ const serializeAws_restJson1SendEmailCommand = async (input, context) => {
1061
1034
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/outbound-emails";
1062
1035
  let body;
1063
1036
  body = JSON.stringify({
1064
- ...(input.ConfigurationSetName !== undefined &&
1065
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
1066
- ...(input.Content !== undefined &&
1067
- input.Content !== null && { Content: serializeAws_restJson1EmailContent(input.Content, context) }),
1068
- ...(input.Destination !== undefined &&
1069
- input.Destination !== null && { Destination: serializeAws_restJson1Destination(input.Destination, context) }),
1070
- ...(input.EmailTags !== undefined &&
1071
- input.EmailTags !== null && { EmailTags: serializeAws_restJson1MessageTagList(input.EmailTags, context) }),
1072
- ...(input.FeedbackForwardingEmailAddress !== undefined &&
1073
- input.FeedbackForwardingEmailAddress !== null && {
1037
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
1038
+ ...(input.Content != null && { Content: serializeAws_restJson1EmailContent(input.Content, context) }),
1039
+ ...(input.Destination != null && { Destination: serializeAws_restJson1Destination(input.Destination, context) }),
1040
+ ...(input.EmailTags != null && { EmailTags: serializeAws_restJson1MessageTagList(input.EmailTags, context) }),
1041
+ ...(input.FeedbackForwardingEmailAddress != null && {
1074
1042
  FeedbackForwardingEmailAddress: input.FeedbackForwardingEmailAddress,
1075
1043
  }),
1076
- ...(input.FromEmailAddress !== undefined &&
1077
- input.FromEmailAddress !== null && { FromEmailAddress: input.FromEmailAddress }),
1078
- ...(input.ReplyToAddresses !== undefined &&
1079
- input.ReplyToAddresses !== null && {
1044
+ ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }),
1045
+ ...(input.ReplyToAddresses != null && {
1080
1046
  ReplyToAddresses: serializeAws_restJson1EmailAddressList(input.ReplyToAddresses, context),
1081
1047
  }),
1082
1048
  });
@@ -1099,9 +1065,8 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1099
1065
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/tags";
1100
1066
  let body;
1101
1067
  body = JSON.stringify({
1102
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
1103
- ...(input.Tags !== undefined &&
1104
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
1068
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1069
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
1105
1070
  });
1106
1071
  return new protocol_http_1.HttpRequest({
1107
1072
  protocol,
@@ -1164,8 +1129,7 @@ const serializeAws_restJson1UpdateConfigurationSetEventDestinationCommand = asyn
1164
1129
  }
1165
1130
  let body;
1166
1131
  body = JSON.stringify({
1167
- ...(input.EventDestination !== undefined &&
1168
- input.EventDestination !== null && {
1132
+ ...(input.EventDestination != null && {
1169
1133
  EventDestination: serializeAws_restJson1EventDestinationDefinition(input.EventDestination, context),
1170
1134
  }),
1171
1135
  });
@@ -1197,8 +1161,7 @@ const deserializeAws_restJson1CreateConfigurationSetCommandError = async (output
1197
1161
  body: await parseBody(output.body, context),
1198
1162
  };
1199
1163
  let response;
1200
- let errorCode = "UnknownError";
1201
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1164
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1202
1165
  switch (errorCode) {
1203
1166
  case "AlreadyExistsException":
1204
1167
  case "com.amazonaws.pinpointemail#AlreadyExistsException":
@@ -1220,10 +1183,12 @@ const deserializeAws_restJson1CreateConfigurationSetCommandError = async (output
1220
1183
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1221
1184
  default:
1222
1185
  const parsedBody = parsedOutput.body;
1186
+ const $metadata = deserializeMetadata(output);
1187
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1223
1188
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1224
- name: parsedBody.code || parsedBody.Code || errorCode,
1189
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1225
1190
  $fault: "client",
1226
- $metadata: deserializeMetadata(output),
1191
+ $metadata,
1227
1192
  });
1228
1193
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1229
1194
  }
@@ -1245,8 +1210,7 @@ const deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError
1245
1210
  body: await parseBody(output.body, context),
1246
1211
  };
1247
1212
  let response;
1248
- let errorCode = "UnknownError";
1249
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1213
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1250
1214
  switch (errorCode) {
1251
1215
  case "AlreadyExistsException":
1252
1216
  case "com.amazonaws.pinpointemail#AlreadyExistsException":
@@ -1265,10 +1229,12 @@ const deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError
1265
1229
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1266
1230
  default:
1267
1231
  const parsedBody = parsedOutput.body;
1232
+ const $metadata = deserializeMetadata(output);
1233
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1268
1234
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1269
- name: parsedBody.code || parsedBody.Code || errorCode,
1235
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1270
1236
  $fault: "client",
1271
- $metadata: deserializeMetadata(output),
1237
+ $metadata,
1272
1238
  });
1273
1239
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1274
1240
  }
@@ -1290,8 +1256,7 @@ const deserializeAws_restJson1CreateDedicatedIpPoolCommandError = async (output,
1290
1256
  body: await parseBody(output.body, context),
1291
1257
  };
1292
1258
  let response;
1293
- let errorCode = "UnknownError";
1294
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1259
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1295
1260
  switch (errorCode) {
1296
1261
  case "AlreadyExistsException":
1297
1262
  case "com.amazonaws.pinpointemail#AlreadyExistsException":
@@ -1310,10 +1275,12 @@ const deserializeAws_restJson1CreateDedicatedIpPoolCommandError = async (output,
1310
1275
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1311
1276
  default:
1312
1277
  const parsedBody = parsedOutput.body;
1278
+ const $metadata = deserializeMetadata(output);
1279
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1313
1280
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1314
- name: parsedBody.code || parsedBody.Code || errorCode,
1281
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1315
1282
  $fault: "client",
1316
- $metadata: deserializeMetadata(output),
1283
+ $metadata,
1317
1284
  });
1318
1285
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1319
1286
  }
@@ -1343,8 +1310,7 @@ const deserializeAws_restJson1CreateDeliverabilityTestReportCommandError = async
1343
1310
  body: await parseBody(output.body, context),
1344
1311
  };
1345
1312
  let response;
1346
- let errorCode = "UnknownError";
1347
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1313
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1348
1314
  switch (errorCode) {
1349
1315
  case "AccountSuspendedException":
1350
1316
  case "com.amazonaws.pinpointemail#AccountSuspendedException":
@@ -1375,10 +1341,12 @@ const deserializeAws_restJson1CreateDeliverabilityTestReportCommandError = async
1375
1341
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1376
1342
  default:
1377
1343
  const parsedBody = parsedOutput.body;
1344
+ const $metadata = deserializeMetadata(output);
1345
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1378
1346
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1379
- name: parsedBody.code || parsedBody.Code || errorCode,
1347
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1380
1348
  $fault: "client",
1381
- $metadata: deserializeMetadata(output),
1349
+ $metadata,
1382
1350
  });
1383
1351
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1384
1352
  }
@@ -1412,8 +1380,7 @@ const deserializeAws_restJson1CreateEmailIdentityCommandError = async (output, c
1412
1380
  body: await parseBody(output.body, context),
1413
1381
  };
1414
1382
  let response;
1415
- let errorCode = "UnknownError";
1416
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1383
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1417
1384
  switch (errorCode) {
1418
1385
  case "BadRequestException":
1419
1386
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1429,10 +1396,12 @@ const deserializeAws_restJson1CreateEmailIdentityCommandError = async (output, c
1429
1396
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1430
1397
  default:
1431
1398
  const parsedBody = parsedOutput.body;
1399
+ const $metadata = deserializeMetadata(output);
1400
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1432
1401
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1433
- name: parsedBody.code || parsedBody.Code || errorCode,
1402
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1434
1403
  $fault: "client",
1435
- $metadata: deserializeMetadata(output),
1404
+ $metadata,
1436
1405
  });
1437
1406
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1438
1407
  }
@@ -1454,8 +1423,7 @@ const deserializeAws_restJson1DeleteConfigurationSetCommandError = async (output
1454
1423
  body: await parseBody(output.body, context),
1455
1424
  };
1456
1425
  let response;
1457
- let errorCode = "UnknownError";
1458
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1426
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1459
1427
  switch (errorCode) {
1460
1428
  case "BadRequestException":
1461
1429
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1471,10 +1439,12 @@ const deserializeAws_restJson1DeleteConfigurationSetCommandError = async (output
1471
1439
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1472
1440
  default:
1473
1441
  const parsedBody = parsedOutput.body;
1442
+ const $metadata = deserializeMetadata(output);
1443
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1474
1444
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1475
- name: parsedBody.code || parsedBody.Code || errorCode,
1445
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1476
1446
  $fault: "client",
1477
- $metadata: deserializeMetadata(output),
1447
+ $metadata,
1478
1448
  });
1479
1449
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1480
1450
  }
@@ -1496,8 +1466,7 @@ const deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError
1496
1466
  body: await parseBody(output.body, context),
1497
1467
  };
1498
1468
  let response;
1499
- let errorCode = "UnknownError";
1500
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1469
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1501
1470
  switch (errorCode) {
1502
1471
  case "BadRequestException":
1503
1472
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1510,10 +1479,12 @@ const deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError
1510
1479
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1511
1480
  default:
1512
1481
  const parsedBody = parsedOutput.body;
1482
+ const $metadata = deserializeMetadata(output);
1483
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1513
1484
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1514
- name: parsedBody.code || parsedBody.Code || errorCode,
1485
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1515
1486
  $fault: "client",
1516
- $metadata: deserializeMetadata(output),
1487
+ $metadata,
1517
1488
  });
1518
1489
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1519
1490
  }
@@ -1535,8 +1506,7 @@ const deserializeAws_restJson1DeleteDedicatedIpPoolCommandError = async (output,
1535
1506
  body: await parseBody(output.body, context),
1536
1507
  };
1537
1508
  let response;
1538
- let errorCode = "UnknownError";
1539
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1509
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1540
1510
  switch (errorCode) {
1541
1511
  case "BadRequestException":
1542
1512
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1552,10 +1522,12 @@ const deserializeAws_restJson1DeleteDedicatedIpPoolCommandError = async (output,
1552
1522
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1553
1523
  default:
1554
1524
  const parsedBody = parsedOutput.body;
1525
+ const $metadata = deserializeMetadata(output);
1526
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1555
1527
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1556
- name: parsedBody.code || parsedBody.Code || errorCode,
1528
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1557
1529
  $fault: "client",
1558
- $metadata: deserializeMetadata(output),
1530
+ $metadata,
1559
1531
  });
1560
1532
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1561
1533
  }
@@ -1577,8 +1549,7 @@ const deserializeAws_restJson1DeleteEmailIdentityCommandError = async (output, c
1577
1549
  body: await parseBody(output.body, context),
1578
1550
  };
1579
1551
  let response;
1580
- let errorCode = "UnknownError";
1581
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1552
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1582
1553
  switch (errorCode) {
1583
1554
  case "BadRequestException":
1584
1555
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1594,10 +1565,12 @@ const deserializeAws_restJson1DeleteEmailIdentityCommandError = async (output, c
1594
1565
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1595
1566
  default:
1596
1567
  const parsedBody = parsedOutput.body;
1568
+ const $metadata = deserializeMetadata(output);
1569
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1597
1570
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1598
- name: parsedBody.code || parsedBody.Code || errorCode,
1571
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1599
1572
  $fault: "client",
1600
- $metadata: deserializeMetadata(output),
1573
+ $metadata,
1601
1574
  });
1602
1575
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1603
1576
  }
@@ -1639,8 +1612,7 @@ const deserializeAws_restJson1GetAccountCommandError = async (output, context) =
1639
1612
  body: await parseBody(output.body, context),
1640
1613
  };
1641
1614
  let response;
1642
- let errorCode = "UnknownError";
1643
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1615
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1644
1616
  switch (errorCode) {
1645
1617
  case "BadRequestException":
1646
1618
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1650,10 +1622,12 @@ const deserializeAws_restJson1GetAccountCommandError = async (output, context) =
1650
1622
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1651
1623
  default:
1652
1624
  const parsedBody = parsedOutput.body;
1625
+ const $metadata = deserializeMetadata(output);
1626
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1653
1627
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1654
- name: parsedBody.code || parsedBody.Code || errorCode,
1628
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1655
1629
  $fault: "client",
1656
- $metadata: deserializeMetadata(output),
1630
+ $metadata,
1657
1631
  });
1658
1632
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1659
1633
  }
@@ -1679,8 +1653,7 @@ const deserializeAws_restJson1GetBlacklistReportsCommandError = async (output, c
1679
1653
  body: await parseBody(output.body, context),
1680
1654
  };
1681
1655
  let response;
1682
- let errorCode = "UnknownError";
1683
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1656
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1684
1657
  switch (errorCode) {
1685
1658
  case "BadRequestException":
1686
1659
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1693,10 +1666,12 @@ const deserializeAws_restJson1GetBlacklistReportsCommandError = async (output, c
1693
1666
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1694
1667
  default:
1695
1668
  const parsedBody = parsedOutput.body;
1669
+ const $metadata = deserializeMetadata(output);
1670
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1696
1671
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1697
- name: parsedBody.code || parsedBody.Code || errorCode,
1672
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1698
1673
  $fault: "client",
1699
- $metadata: deserializeMetadata(output),
1674
+ $metadata,
1700
1675
  });
1701
1676
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1702
1677
  }
@@ -1742,8 +1717,7 @@ const deserializeAws_restJson1GetConfigurationSetCommandError = async (output, c
1742
1717
  body: await parseBody(output.body, context),
1743
1718
  };
1744
1719
  let response;
1745
- let errorCode = "UnknownError";
1746
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1720
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1747
1721
  switch (errorCode) {
1748
1722
  case "BadRequestException":
1749
1723
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1756,10 +1730,12 @@ const deserializeAws_restJson1GetConfigurationSetCommandError = async (output, c
1756
1730
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1757
1731
  default:
1758
1732
  const parsedBody = parsedOutput.body;
1733
+ const $metadata = deserializeMetadata(output);
1734
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1759
1735
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1760
- name: parsedBody.code || parsedBody.Code || errorCode,
1736
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1761
1737
  $fault: "client",
1762
- $metadata: deserializeMetadata(output),
1738
+ $metadata,
1763
1739
  });
1764
1740
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1765
1741
  }
@@ -1785,8 +1761,7 @@ const deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError =
1785
1761
  body: await parseBody(output.body, context),
1786
1762
  };
1787
1763
  let response;
1788
- let errorCode = "UnknownError";
1789
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1764
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1790
1765
  switch (errorCode) {
1791
1766
  case "BadRequestException":
1792
1767
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1799,10 +1774,12 @@ const deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError =
1799
1774
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1800
1775
  default:
1801
1776
  const parsedBody = parsedOutput.body;
1777
+ const $metadata = deserializeMetadata(output);
1778
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1802
1779
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1803
- name: parsedBody.code || parsedBody.Code || errorCode,
1780
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1804
1781
  $fault: "client",
1805
- $metadata: deserializeMetadata(output),
1782
+ $metadata,
1806
1783
  });
1807
1784
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1808
1785
  }
@@ -1828,8 +1805,7 @@ const deserializeAws_restJson1GetDedicatedIpCommandError = async (output, contex
1828
1805
  body: await parseBody(output.body, context),
1829
1806
  };
1830
1807
  let response;
1831
- let errorCode = "UnknownError";
1832
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1808
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1833
1809
  switch (errorCode) {
1834
1810
  case "BadRequestException":
1835
1811
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1842,10 +1818,12 @@ const deserializeAws_restJson1GetDedicatedIpCommandError = async (output, contex
1842
1818
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1843
1819
  default:
1844
1820
  const parsedBody = parsedOutput.body;
1821
+ const $metadata = deserializeMetadata(output);
1822
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1845
1823
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1846
- name: parsedBody.code || parsedBody.Code || errorCode,
1824
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1847
1825
  $fault: "client",
1848
- $metadata: deserializeMetadata(output),
1826
+ $metadata,
1849
1827
  });
1850
1828
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1851
1829
  }
@@ -1875,8 +1853,7 @@ const deserializeAws_restJson1GetDedicatedIpsCommandError = async (output, conte
1875
1853
  body: await parseBody(output.body, context),
1876
1854
  };
1877
1855
  let response;
1878
- let errorCode = "UnknownError";
1879
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1856
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1880
1857
  switch (errorCode) {
1881
1858
  case "BadRequestException":
1882
1859
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1889,10 +1866,12 @@ const deserializeAws_restJson1GetDedicatedIpsCommandError = async (output, conte
1889
1866
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1890
1867
  default:
1891
1868
  const parsedBody = parsedOutput.body;
1869
+ const $metadata = deserializeMetadata(output);
1870
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1892
1871
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1893
- name: parsedBody.code || parsedBody.Code || errorCode,
1872
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1894
1873
  $fault: "client",
1895
- $metadata: deserializeMetadata(output),
1874
+ $metadata,
1896
1875
  });
1897
1876
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1898
1877
  }
@@ -1934,8 +1913,7 @@ const deserializeAws_restJson1GetDeliverabilityDashboardOptionsCommandError = as
1934
1913
  body: await parseBody(output.body, context),
1935
1914
  };
1936
1915
  let response;
1937
- let errorCode = "UnknownError";
1938
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1916
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1939
1917
  switch (errorCode) {
1940
1918
  case "BadRequestException":
1941
1919
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -1948,10 +1926,12 @@ const deserializeAws_restJson1GetDeliverabilityDashboardOptionsCommandError = as
1948
1926
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1949
1927
  default:
1950
1928
  const parsedBody = parsedOutput.body;
1929
+ const $metadata = deserializeMetadata(output);
1930
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1951
1931
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
1952
- name: parsedBody.code || parsedBody.Code || errorCode,
1932
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1953
1933
  $fault: "client",
1954
- $metadata: deserializeMetadata(output),
1934
+ $metadata,
1955
1935
  });
1956
1936
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1957
1937
  }
@@ -1993,8 +1973,7 @@ const deserializeAws_restJson1GetDeliverabilityTestReportCommandError = async (o
1993
1973
  body: await parseBody(output.body, context),
1994
1974
  };
1995
1975
  let response;
1996
- let errorCode = "UnknownError";
1997
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1976
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1998
1977
  switch (errorCode) {
1999
1978
  case "BadRequestException":
2000
1979
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2007,10 +1986,12 @@ const deserializeAws_restJson1GetDeliverabilityTestReportCommandError = async (o
2007
1986
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2008
1987
  default:
2009
1988
  const parsedBody = parsedOutput.body;
1989
+ const $metadata = deserializeMetadata(output);
1990
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2010
1991
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2011
- name: parsedBody.code || parsedBody.Code || errorCode,
1992
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2012
1993
  $fault: "client",
2013
- $metadata: deserializeMetadata(output),
1994
+ $metadata,
2014
1995
  });
2015
1996
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2016
1997
  }
@@ -2036,8 +2017,7 @@ const deserializeAws_restJson1GetDomainDeliverabilityCampaignCommandError = asyn
2036
2017
  body: await parseBody(output.body, context),
2037
2018
  };
2038
2019
  let response;
2039
- let errorCode = "UnknownError";
2040
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2020
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2041
2021
  switch (errorCode) {
2042
2022
  case "BadRequestException":
2043
2023
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2050,10 +2030,12 @@ const deserializeAws_restJson1GetDomainDeliverabilityCampaignCommandError = asyn
2050
2030
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2051
2031
  default:
2052
2032
  const parsedBody = parsedOutput.body;
2033
+ const $metadata = deserializeMetadata(output);
2034
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2053
2035
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2054
- name: parsedBody.code || parsedBody.Code || errorCode,
2036
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2055
2037
  $fault: "client",
2056
- $metadata: deserializeMetadata(output),
2038
+ $metadata,
2057
2039
  });
2058
2040
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2059
2041
  }
@@ -2083,8 +2065,7 @@ const deserializeAws_restJson1GetDomainStatisticsReportCommandError = async (out
2083
2065
  body: await parseBody(output.body, context),
2084
2066
  };
2085
2067
  let response;
2086
- let errorCode = "UnknownError";
2087
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2068
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2088
2069
  switch (errorCode) {
2089
2070
  case "BadRequestException":
2090
2071
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2097,10 +2078,12 @@ const deserializeAws_restJson1GetDomainStatisticsReportCommandError = async (out
2097
2078
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2098
2079
  default:
2099
2080
  const parsedBody = parsedOutput.body;
2081
+ const $metadata = deserializeMetadata(output);
2082
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2100
2083
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2101
- name: parsedBody.code || parsedBody.Code || errorCode,
2084
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2102
2085
  $fault: "client",
2103
- $metadata: deserializeMetadata(output),
2086
+ $metadata,
2104
2087
  });
2105
2088
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2106
2089
  }
@@ -2146,8 +2129,7 @@ const deserializeAws_restJson1GetEmailIdentityCommandError = async (output, cont
2146
2129
  body: await parseBody(output.body, context),
2147
2130
  };
2148
2131
  let response;
2149
- let errorCode = "UnknownError";
2150
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2132
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2151
2133
  switch (errorCode) {
2152
2134
  case "BadRequestException":
2153
2135
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2160,10 +2142,12 @@ const deserializeAws_restJson1GetEmailIdentityCommandError = async (output, cont
2160
2142
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2161
2143
  default:
2162
2144
  const parsedBody = parsedOutput.body;
2145
+ const $metadata = deserializeMetadata(output);
2146
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2163
2147
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2164
- name: parsedBody.code || parsedBody.Code || errorCode,
2148
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2165
2149
  $fault: "client",
2166
- $metadata: deserializeMetadata(output),
2150
+ $metadata,
2167
2151
  });
2168
2152
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2169
2153
  }
@@ -2193,8 +2177,7 @@ const deserializeAws_restJson1ListConfigurationSetsCommandError = async (output,
2193
2177
  body: await parseBody(output.body, context),
2194
2178
  };
2195
2179
  let response;
2196
- let errorCode = "UnknownError";
2197
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2180
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2198
2181
  switch (errorCode) {
2199
2182
  case "BadRequestException":
2200
2183
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2204,10 +2187,12 @@ const deserializeAws_restJson1ListConfigurationSetsCommandError = async (output,
2204
2187
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2205
2188
  default:
2206
2189
  const parsedBody = parsedOutput.body;
2190
+ const $metadata = deserializeMetadata(output);
2191
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2207
2192
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2208
- name: parsedBody.code || parsedBody.Code || errorCode,
2193
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2209
2194
  $fault: "client",
2210
- $metadata: deserializeMetadata(output),
2195
+ $metadata,
2211
2196
  });
2212
2197
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2213
2198
  }
@@ -2237,8 +2222,7 @@ const deserializeAws_restJson1ListDedicatedIpPoolsCommandError = async (output,
2237
2222
  body: await parseBody(output.body, context),
2238
2223
  };
2239
2224
  let response;
2240
- let errorCode = "UnknownError";
2241
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2225
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2242
2226
  switch (errorCode) {
2243
2227
  case "BadRequestException":
2244
2228
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2248,10 +2232,12 @@ const deserializeAws_restJson1ListDedicatedIpPoolsCommandError = async (output,
2248
2232
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2249
2233
  default:
2250
2234
  const parsedBody = parsedOutput.body;
2235
+ const $metadata = deserializeMetadata(output);
2236
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2251
2237
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2252
- name: parsedBody.code || parsedBody.Code || errorCode,
2238
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2253
2239
  $fault: "client",
2254
- $metadata: deserializeMetadata(output),
2240
+ $metadata,
2255
2241
  });
2256
2242
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2257
2243
  }
@@ -2281,8 +2267,7 @@ const deserializeAws_restJson1ListDeliverabilityTestReportsCommandError = async
2281
2267
  body: await parseBody(output.body, context),
2282
2268
  };
2283
2269
  let response;
2284
- let errorCode = "UnknownError";
2285
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2270
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2286
2271
  switch (errorCode) {
2287
2272
  case "BadRequestException":
2288
2273
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2295,10 +2280,12 @@ const deserializeAws_restJson1ListDeliverabilityTestReportsCommandError = async
2295
2280
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2296
2281
  default:
2297
2282
  const parsedBody = parsedOutput.body;
2283
+ const $metadata = deserializeMetadata(output);
2284
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2298
2285
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2299
- name: parsedBody.code || parsedBody.Code || errorCode,
2286
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2300
2287
  $fault: "client",
2301
- $metadata: deserializeMetadata(output),
2288
+ $metadata,
2302
2289
  });
2303
2290
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2304
2291
  }
@@ -2328,8 +2315,7 @@ const deserializeAws_restJson1ListDomainDeliverabilityCampaignsCommandError = as
2328
2315
  body: await parseBody(output.body, context),
2329
2316
  };
2330
2317
  let response;
2331
- let errorCode = "UnknownError";
2332
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2318
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2333
2319
  switch (errorCode) {
2334
2320
  case "BadRequestException":
2335
2321
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2342,10 +2328,12 @@ const deserializeAws_restJson1ListDomainDeliverabilityCampaignsCommandError = as
2342
2328
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2343
2329
  default:
2344
2330
  const parsedBody = parsedOutput.body;
2331
+ const $metadata = deserializeMetadata(output);
2332
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2345
2333
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2346
- name: parsedBody.code || parsedBody.Code || errorCode,
2334
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2347
2335
  $fault: "client",
2348
- $metadata: deserializeMetadata(output),
2336
+ $metadata,
2349
2337
  });
2350
2338
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2351
2339
  }
@@ -2375,8 +2363,7 @@ const deserializeAws_restJson1ListEmailIdentitiesCommandError = async (output, c
2375
2363
  body: await parseBody(output.body, context),
2376
2364
  };
2377
2365
  let response;
2378
- let errorCode = "UnknownError";
2379
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2366
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2380
2367
  switch (errorCode) {
2381
2368
  case "BadRequestException":
2382
2369
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2386,10 +2373,12 @@ const deserializeAws_restJson1ListEmailIdentitiesCommandError = async (output, c
2386
2373
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2387
2374
  default:
2388
2375
  const parsedBody = parsedOutput.body;
2376
+ const $metadata = deserializeMetadata(output);
2377
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2389
2378
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2390
- name: parsedBody.code || parsedBody.Code || errorCode,
2379
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2391
2380
  $fault: "client",
2392
- $metadata: deserializeMetadata(output),
2381
+ $metadata,
2393
2382
  });
2394
2383
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2395
2384
  }
@@ -2415,8 +2404,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2415
2404
  body: await parseBody(output.body, context),
2416
2405
  };
2417
2406
  let response;
2418
- let errorCode = "UnknownError";
2419
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2407
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2420
2408
  switch (errorCode) {
2421
2409
  case "BadRequestException":
2422
2410
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2429,10 +2417,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2429
2417
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2430
2418
  default:
2431
2419
  const parsedBody = parsedOutput.body;
2420
+ const $metadata = deserializeMetadata(output);
2421
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2432
2422
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2433
- name: parsedBody.code || parsedBody.Code || errorCode,
2423
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2434
2424
  $fault: "client",
2435
- $metadata: deserializeMetadata(output),
2425
+ $metadata,
2436
2426
  });
2437
2427
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2438
2428
  }
@@ -2454,8 +2444,7 @@ const deserializeAws_restJson1PutAccountDedicatedIpWarmupAttributesCommandError
2454
2444
  body: await parseBody(output.body, context),
2455
2445
  };
2456
2446
  let response;
2457
- let errorCode = "UnknownError";
2458
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2447
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2459
2448
  switch (errorCode) {
2460
2449
  case "BadRequestException":
2461
2450
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2465,10 +2454,12 @@ const deserializeAws_restJson1PutAccountDedicatedIpWarmupAttributesCommandError
2465
2454
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2466
2455
  default:
2467
2456
  const parsedBody = parsedOutput.body;
2457
+ const $metadata = deserializeMetadata(output);
2458
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2468
2459
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2469
- name: parsedBody.code || parsedBody.Code || errorCode,
2460
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2470
2461
  $fault: "client",
2471
- $metadata: deserializeMetadata(output),
2462
+ $metadata,
2472
2463
  });
2473
2464
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2474
2465
  }
@@ -2490,8 +2481,7 @@ const deserializeAws_restJson1PutAccountSendingAttributesCommandError = async (o
2490
2481
  body: await parseBody(output.body, context),
2491
2482
  };
2492
2483
  let response;
2493
- let errorCode = "UnknownError";
2494
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2484
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2495
2485
  switch (errorCode) {
2496
2486
  case "BadRequestException":
2497
2487
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2501,10 +2491,12 @@ const deserializeAws_restJson1PutAccountSendingAttributesCommandError = async (o
2501
2491
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2502
2492
  default:
2503
2493
  const parsedBody = parsedOutput.body;
2494
+ const $metadata = deserializeMetadata(output);
2495
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2504
2496
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2505
- name: parsedBody.code || parsedBody.Code || errorCode,
2497
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2506
2498
  $fault: "client",
2507
- $metadata: deserializeMetadata(output),
2499
+ $metadata,
2508
2500
  });
2509
2501
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2510
2502
  }
@@ -2526,8 +2518,7 @@ const deserializeAws_restJson1PutConfigurationSetDeliveryOptionsCommandError = a
2526
2518
  body: await parseBody(output.body, context),
2527
2519
  };
2528
2520
  let response;
2529
- let errorCode = "UnknownError";
2530
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2521
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2531
2522
  switch (errorCode) {
2532
2523
  case "BadRequestException":
2533
2524
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2540,10 +2531,12 @@ const deserializeAws_restJson1PutConfigurationSetDeliveryOptionsCommandError = a
2540
2531
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2541
2532
  default:
2542
2533
  const parsedBody = parsedOutput.body;
2534
+ const $metadata = deserializeMetadata(output);
2535
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2543
2536
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2544
- name: parsedBody.code || parsedBody.Code || errorCode,
2537
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2545
2538
  $fault: "client",
2546
- $metadata: deserializeMetadata(output),
2539
+ $metadata,
2547
2540
  });
2548
2541
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2549
2542
  }
@@ -2565,8 +2558,7 @@ const deserializeAws_restJson1PutConfigurationSetReputationOptionsCommandError =
2565
2558
  body: await parseBody(output.body, context),
2566
2559
  };
2567
2560
  let response;
2568
- let errorCode = "UnknownError";
2569
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2561
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2570
2562
  switch (errorCode) {
2571
2563
  case "BadRequestException":
2572
2564
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2579,10 +2571,12 @@ const deserializeAws_restJson1PutConfigurationSetReputationOptionsCommandError =
2579
2571
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2580
2572
  default:
2581
2573
  const parsedBody = parsedOutput.body;
2574
+ const $metadata = deserializeMetadata(output);
2575
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2582
2576
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2583
- name: parsedBody.code || parsedBody.Code || errorCode,
2577
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2584
2578
  $fault: "client",
2585
- $metadata: deserializeMetadata(output),
2579
+ $metadata,
2586
2580
  });
2587
2581
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2588
2582
  }
@@ -2604,8 +2598,7 @@ const deserializeAws_restJson1PutConfigurationSetSendingOptionsCommandError = as
2604
2598
  body: await parseBody(output.body, context),
2605
2599
  };
2606
2600
  let response;
2607
- let errorCode = "UnknownError";
2608
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2601
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2609
2602
  switch (errorCode) {
2610
2603
  case "BadRequestException":
2611
2604
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2618,10 +2611,12 @@ const deserializeAws_restJson1PutConfigurationSetSendingOptionsCommandError = as
2618
2611
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2619
2612
  default:
2620
2613
  const parsedBody = parsedOutput.body;
2614
+ const $metadata = deserializeMetadata(output);
2615
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2621
2616
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2622
- name: parsedBody.code || parsedBody.Code || errorCode,
2617
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2623
2618
  $fault: "client",
2624
- $metadata: deserializeMetadata(output),
2619
+ $metadata,
2625
2620
  });
2626
2621
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2627
2622
  }
@@ -2643,8 +2638,7 @@ const deserializeAws_restJson1PutConfigurationSetTrackingOptionsCommandError = a
2643
2638
  body: await parseBody(output.body, context),
2644
2639
  };
2645
2640
  let response;
2646
- let errorCode = "UnknownError";
2647
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2641
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2648
2642
  switch (errorCode) {
2649
2643
  case "BadRequestException":
2650
2644
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2657,10 +2651,12 @@ const deserializeAws_restJson1PutConfigurationSetTrackingOptionsCommandError = a
2657
2651
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2658
2652
  default:
2659
2653
  const parsedBody = parsedOutput.body;
2654
+ const $metadata = deserializeMetadata(output);
2655
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2660
2656
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2661
- name: parsedBody.code || parsedBody.Code || errorCode,
2657
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2662
2658
  $fault: "client",
2663
- $metadata: deserializeMetadata(output),
2659
+ $metadata,
2664
2660
  });
2665
2661
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2666
2662
  }
@@ -2682,8 +2678,7 @@ const deserializeAws_restJson1PutDedicatedIpInPoolCommandError = async (output,
2682
2678
  body: await parseBody(output.body, context),
2683
2679
  };
2684
2680
  let response;
2685
- let errorCode = "UnknownError";
2686
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2681
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2687
2682
  switch (errorCode) {
2688
2683
  case "BadRequestException":
2689
2684
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2696,10 +2691,12 @@ const deserializeAws_restJson1PutDedicatedIpInPoolCommandError = async (output,
2696
2691
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2697
2692
  default:
2698
2693
  const parsedBody = parsedOutput.body;
2694
+ const $metadata = deserializeMetadata(output);
2695
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2699
2696
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2700
- name: parsedBody.code || parsedBody.Code || errorCode,
2697
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2701
2698
  $fault: "client",
2702
- $metadata: deserializeMetadata(output),
2699
+ $metadata,
2703
2700
  });
2704
2701
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2705
2702
  }
@@ -2721,8 +2718,7 @@ const deserializeAws_restJson1PutDedicatedIpWarmupAttributesCommandError = async
2721
2718
  body: await parseBody(output.body, context),
2722
2719
  };
2723
2720
  let response;
2724
- let errorCode = "UnknownError";
2725
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2721
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2726
2722
  switch (errorCode) {
2727
2723
  case "BadRequestException":
2728
2724
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2735,10 +2731,12 @@ const deserializeAws_restJson1PutDedicatedIpWarmupAttributesCommandError = async
2735
2731
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2736
2732
  default:
2737
2733
  const parsedBody = parsedOutput.body;
2734
+ const $metadata = deserializeMetadata(output);
2735
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2738
2736
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2739
- name: parsedBody.code || parsedBody.Code || errorCode,
2737
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2740
2738
  $fault: "client",
2741
- $metadata: deserializeMetadata(output),
2739
+ $metadata,
2742
2740
  });
2743
2741
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2744
2742
  }
@@ -2760,8 +2758,7 @@ const deserializeAws_restJson1PutDeliverabilityDashboardOptionCommandError = asy
2760
2758
  body: await parseBody(output.body, context),
2761
2759
  };
2762
2760
  let response;
2763
- let errorCode = "UnknownError";
2764
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2761
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2765
2762
  switch (errorCode) {
2766
2763
  case "AlreadyExistsException":
2767
2764
  case "com.amazonaws.pinpointemail#AlreadyExistsException":
@@ -2780,10 +2777,12 @@ const deserializeAws_restJson1PutDeliverabilityDashboardOptionCommandError = asy
2780
2777
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2781
2778
  default:
2782
2779
  const parsedBody = parsedOutput.body;
2780
+ const $metadata = deserializeMetadata(output);
2781
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2783
2782
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2784
- name: parsedBody.code || parsedBody.Code || errorCode,
2783
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2785
2784
  $fault: "client",
2786
- $metadata: deserializeMetadata(output),
2785
+ $metadata,
2787
2786
  });
2788
2787
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2789
2788
  }
@@ -2805,8 +2804,7 @@ const deserializeAws_restJson1PutEmailIdentityDkimAttributesCommandError = async
2805
2804
  body: await parseBody(output.body, context),
2806
2805
  };
2807
2806
  let response;
2808
- let errorCode = "UnknownError";
2809
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2807
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2810
2808
  switch (errorCode) {
2811
2809
  case "BadRequestException":
2812
2810
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2819,10 +2817,12 @@ const deserializeAws_restJson1PutEmailIdentityDkimAttributesCommandError = async
2819
2817
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2820
2818
  default:
2821
2819
  const parsedBody = parsedOutput.body;
2820
+ const $metadata = deserializeMetadata(output);
2821
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2822
2822
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2823
- name: parsedBody.code || parsedBody.Code || errorCode,
2823
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2824
2824
  $fault: "client",
2825
- $metadata: deserializeMetadata(output),
2825
+ $metadata,
2826
2826
  });
2827
2827
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2828
2828
  }
@@ -2844,8 +2844,7 @@ const deserializeAws_restJson1PutEmailIdentityFeedbackAttributesCommandError = a
2844
2844
  body: await parseBody(output.body, context),
2845
2845
  };
2846
2846
  let response;
2847
- let errorCode = "UnknownError";
2848
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2847
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2849
2848
  switch (errorCode) {
2850
2849
  case "BadRequestException":
2851
2850
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2858,10 +2857,12 @@ const deserializeAws_restJson1PutEmailIdentityFeedbackAttributesCommandError = a
2858
2857
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2859
2858
  default:
2860
2859
  const parsedBody = parsedOutput.body;
2860
+ const $metadata = deserializeMetadata(output);
2861
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2861
2862
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2862
- name: parsedBody.code || parsedBody.Code || errorCode,
2863
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2863
2864
  $fault: "client",
2864
- $metadata: deserializeMetadata(output),
2865
+ $metadata,
2865
2866
  });
2866
2867
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2867
2868
  }
@@ -2883,8 +2884,7 @@ const deserializeAws_restJson1PutEmailIdentityMailFromAttributesCommandError = a
2883
2884
  body: await parseBody(output.body, context),
2884
2885
  };
2885
2886
  let response;
2886
- let errorCode = "UnknownError";
2887
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2887
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2888
2888
  switch (errorCode) {
2889
2889
  case "BadRequestException":
2890
2890
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2897,10 +2897,12 @@ const deserializeAws_restJson1PutEmailIdentityMailFromAttributesCommandError = a
2897
2897
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2898
2898
  default:
2899
2899
  const parsedBody = parsedOutput.body;
2900
+ const $metadata = deserializeMetadata(output);
2901
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2900
2902
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2901
- name: parsedBody.code || parsedBody.Code || errorCode,
2903
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2902
2904
  $fault: "client",
2903
- $metadata: deserializeMetadata(output),
2905
+ $metadata,
2904
2906
  });
2905
2907
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2906
2908
  }
@@ -2926,8 +2928,7 @@ const deserializeAws_restJson1SendEmailCommandError = async (output, context) =>
2926
2928
  body: await parseBody(output.body, context),
2927
2929
  };
2928
2930
  let response;
2929
- let errorCode = "UnknownError";
2930
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2931
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2931
2932
  switch (errorCode) {
2932
2933
  case "AccountSuspendedException":
2933
2934
  case "com.amazonaws.pinpointemail#AccountSuspendedException":
@@ -2955,10 +2956,12 @@ const deserializeAws_restJson1SendEmailCommandError = async (output, context) =>
2955
2956
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2956
2957
  default:
2957
2958
  const parsedBody = parsedOutput.body;
2959
+ const $metadata = deserializeMetadata(output);
2960
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2958
2961
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
2959
- name: parsedBody.code || parsedBody.Code || errorCode,
2962
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2960
2963
  $fault: "client",
2961
- $metadata: deserializeMetadata(output),
2964
+ $metadata,
2962
2965
  });
2963
2966
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2964
2967
  }
@@ -2980,8 +2983,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2980
2983
  body: await parseBody(output.body, context),
2981
2984
  };
2982
2985
  let response;
2983
- let errorCode = "UnknownError";
2984
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2986
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2985
2987
  switch (errorCode) {
2986
2988
  case "BadRequestException":
2987
2989
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -2997,10 +2999,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
2997
2999
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2998
3000
  default:
2999
3001
  const parsedBody = parsedOutput.body;
3002
+ const $metadata = deserializeMetadata(output);
3003
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3000
3004
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
3001
- name: parsedBody.code || parsedBody.Code || errorCode,
3005
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3002
3006
  $fault: "client",
3003
- $metadata: deserializeMetadata(output),
3007
+ $metadata,
3004
3008
  });
3005
3009
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3006
3010
  }
@@ -3022,8 +3026,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
3022
3026
  body: await parseBody(output.body, context),
3023
3027
  };
3024
3028
  let response;
3025
- let errorCode = "UnknownError";
3026
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3029
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3027
3030
  switch (errorCode) {
3028
3031
  case "BadRequestException":
3029
3032
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -3039,10 +3042,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
3039
3042
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3040
3043
  default:
3041
3044
  const parsedBody = parsedOutput.body;
3045
+ const $metadata = deserializeMetadata(output);
3046
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3042
3047
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
3043
- name: parsedBody.code || parsedBody.Code || errorCode,
3048
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3044
3049
  $fault: "client",
3045
- $metadata: deserializeMetadata(output),
3050
+ $metadata,
3046
3051
  });
3047
3052
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3048
3053
  }
@@ -3064,8 +3069,7 @@ const deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError
3064
3069
  body: await parseBody(output.body, context),
3065
3070
  };
3066
3071
  let response;
3067
- let errorCode = "UnknownError";
3068
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3072
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3069
3073
  switch (errorCode) {
3070
3074
  case "BadRequestException":
3071
3075
  case "com.amazonaws.pinpointemail#BadRequestException":
@@ -3078,10 +3082,12 @@ const deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError
3078
3082
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3079
3083
  default:
3080
3084
  const parsedBody = parsedOutput.body;
3085
+ const $metadata = deserializeMetadata(output);
3086
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3081
3087
  response = new PinpointEmailServiceException_1.PinpointEmailServiceException({
3082
- name: parsedBody.code || parsedBody.Code || errorCode,
3088
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3083
3089
  $fault: "client",
3084
- $metadata: deserializeMetadata(output),
3090
+ $metadata,
3085
3091
  });
3086
3092
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3087
3093
  }
@@ -3208,27 +3214,22 @@ const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOu
3208
3214
  };
3209
3215
  const serializeAws_restJson1Body = (input, context) => {
3210
3216
  return {
3211
- ...(input.Html !== undefined &&
3212
- input.Html !== null && { Html: serializeAws_restJson1Content(input.Html, context) }),
3213
- ...(input.Text !== undefined &&
3214
- input.Text !== null && { Text: serializeAws_restJson1Content(input.Text, context) }),
3217
+ ...(input.Html != null && { Html: serializeAws_restJson1Content(input.Html, context) }),
3218
+ ...(input.Text != null && { Text: serializeAws_restJson1Content(input.Text, context) }),
3215
3219
  };
3216
3220
  };
3217
3221
  const serializeAws_restJson1CloudWatchDestination = (input, context) => {
3218
3222
  return {
3219
- ...(input.DimensionConfigurations !== undefined &&
3220
- input.DimensionConfigurations !== null && {
3223
+ ...(input.DimensionConfigurations != null && {
3221
3224
  DimensionConfigurations: serializeAws_restJson1CloudWatchDimensionConfigurations(input.DimensionConfigurations, context),
3222
3225
  }),
3223
3226
  };
3224
3227
  };
3225
3228
  const serializeAws_restJson1CloudWatchDimensionConfiguration = (input, context) => {
3226
3229
  return {
3227
- ...(input.DefaultDimensionValue !== undefined &&
3228
- input.DefaultDimensionValue !== null && { DefaultDimensionValue: input.DefaultDimensionValue }),
3229
- ...(input.DimensionName !== undefined && input.DimensionName !== null && { DimensionName: input.DimensionName }),
3230
- ...(input.DimensionValueSource !== undefined &&
3231
- input.DimensionValueSource !== null && { DimensionValueSource: input.DimensionValueSource }),
3230
+ ...(input.DefaultDimensionValue != null && { DefaultDimensionValue: input.DefaultDimensionValue }),
3231
+ ...(input.DimensionName != null && { DimensionName: input.DimensionName }),
3232
+ ...(input.DimensionValueSource != null && { DimensionValueSource: input.DimensionValueSource }),
3232
3233
  };
3233
3234
  };
3234
3235
  const serializeAws_restJson1CloudWatchDimensionConfigurations = (input, context) => {
@@ -3243,42 +3244,36 @@ const serializeAws_restJson1CloudWatchDimensionConfigurations = (input, context)
3243
3244
  };
3244
3245
  const serializeAws_restJson1Content = (input, context) => {
3245
3246
  return {
3246
- ...(input.Charset !== undefined && input.Charset !== null && { Charset: input.Charset }),
3247
- ...(input.Data !== undefined && input.Data !== null && { Data: input.Data }),
3247
+ ...(input.Charset != null && { Charset: input.Charset }),
3248
+ ...(input.Data != null && { Data: input.Data }),
3248
3249
  };
3249
3250
  };
3250
3251
  const serializeAws_restJson1DeliveryOptions = (input, context) => {
3251
3252
  return {
3252
- ...(input.SendingPoolName !== undefined &&
3253
- input.SendingPoolName !== null && { SendingPoolName: input.SendingPoolName }),
3254
- ...(input.TlsPolicy !== undefined && input.TlsPolicy !== null && { TlsPolicy: input.TlsPolicy }),
3253
+ ...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }),
3254
+ ...(input.TlsPolicy != null && { TlsPolicy: input.TlsPolicy }),
3255
3255
  };
3256
3256
  };
3257
3257
  const serializeAws_restJson1Destination = (input, context) => {
3258
3258
  return {
3259
- ...(input.BccAddresses !== undefined &&
3260
- input.BccAddresses !== null && {
3259
+ ...(input.BccAddresses != null && {
3261
3260
  BccAddresses: serializeAws_restJson1EmailAddressList(input.BccAddresses, context),
3262
3261
  }),
3263
- ...(input.CcAddresses !== undefined &&
3264
- input.CcAddresses !== null && {
3262
+ ...(input.CcAddresses != null && {
3265
3263
  CcAddresses: serializeAws_restJson1EmailAddressList(input.CcAddresses, context),
3266
3264
  }),
3267
- ...(input.ToAddresses !== undefined &&
3268
- input.ToAddresses !== null && {
3265
+ ...(input.ToAddresses != null && {
3269
3266
  ToAddresses: serializeAws_restJson1EmailAddressList(input.ToAddresses, context),
3270
3267
  }),
3271
3268
  };
3272
3269
  };
3273
3270
  const serializeAws_restJson1DomainDeliverabilityTrackingOption = (input, context) => {
3274
3271
  return {
3275
- ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }),
3276
- ...(input.InboxPlacementTrackingOption !== undefined &&
3277
- input.InboxPlacementTrackingOption !== null && {
3272
+ ...(input.Domain != null && { Domain: input.Domain }),
3273
+ ...(input.InboxPlacementTrackingOption != null && {
3278
3274
  InboxPlacementTrackingOption: serializeAws_restJson1InboxPlacementTrackingOption(input.InboxPlacementTrackingOption, context),
3279
3275
  }),
3280
- ...(input.SubscriptionStartDate !== undefined &&
3281
- input.SubscriptionStartDate !== null && {
3276
+ ...(input.SubscriptionStartDate != null && {
3282
3277
  SubscriptionStartDate: Math.round(input.SubscriptionStartDate.getTime() / 1000),
3283
3278
  }),
3284
3279
  };
@@ -3305,34 +3300,27 @@ const serializeAws_restJson1EmailAddressList = (input, context) => {
3305
3300
  };
3306
3301
  const serializeAws_restJson1EmailContent = (input, context) => {
3307
3302
  return {
3308
- ...(input.Raw !== undefined && input.Raw !== null && { Raw: serializeAws_restJson1RawMessage(input.Raw, context) }),
3309
- ...(input.Simple !== undefined &&
3310
- input.Simple !== null && { Simple: serializeAws_restJson1Message(input.Simple, context) }),
3311
- ...(input.Template !== undefined &&
3312
- input.Template !== null && { Template: serializeAws_restJson1Template(input.Template, context) }),
3303
+ ...(input.Raw != null && { Raw: serializeAws_restJson1RawMessage(input.Raw, context) }),
3304
+ ...(input.Simple != null && { Simple: serializeAws_restJson1Message(input.Simple, context) }),
3305
+ ...(input.Template != null && { Template: serializeAws_restJson1Template(input.Template, context) }),
3313
3306
  };
3314
3307
  };
3315
3308
  const serializeAws_restJson1EventDestinationDefinition = (input, context) => {
3316
3309
  return {
3317
- ...(input.CloudWatchDestination !== undefined &&
3318
- input.CloudWatchDestination !== null && {
3310
+ ...(input.CloudWatchDestination != null && {
3319
3311
  CloudWatchDestination: serializeAws_restJson1CloudWatchDestination(input.CloudWatchDestination, context),
3320
3312
  }),
3321
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
3322
- ...(input.KinesisFirehoseDestination !== undefined &&
3323
- input.KinesisFirehoseDestination !== null && {
3313
+ ...(input.Enabled != null && { Enabled: input.Enabled }),
3314
+ ...(input.KinesisFirehoseDestination != null && {
3324
3315
  KinesisFirehoseDestination: serializeAws_restJson1KinesisFirehoseDestination(input.KinesisFirehoseDestination, context),
3325
3316
  }),
3326
- ...(input.MatchingEventTypes !== undefined &&
3327
- input.MatchingEventTypes !== null && {
3317
+ ...(input.MatchingEventTypes != null && {
3328
3318
  MatchingEventTypes: serializeAws_restJson1EventTypes(input.MatchingEventTypes, context),
3329
3319
  }),
3330
- ...(input.PinpointDestination !== undefined &&
3331
- input.PinpointDestination !== null && {
3320
+ ...(input.PinpointDestination != null && {
3332
3321
  PinpointDestination: serializeAws_restJson1PinpointDestination(input.PinpointDestination, context),
3333
3322
  }),
3334
- ...(input.SnsDestination !== undefined &&
3335
- input.SnsDestination !== null && {
3323
+ ...(input.SnsDestination != null && {
3336
3324
  SnsDestination: serializeAws_restJson1SnsDestination(input.SnsDestination, context),
3337
3325
  }),
3338
3326
  };
@@ -3349,9 +3337,8 @@ const serializeAws_restJson1EventTypes = (input, context) => {
3349
3337
  };
3350
3338
  const serializeAws_restJson1InboxPlacementTrackingOption = (input, context) => {
3351
3339
  return {
3352
- ...(input.Global !== undefined && input.Global !== null && { Global: input.Global }),
3353
- ...(input.TrackedIsps !== undefined &&
3354
- input.TrackedIsps !== null && { TrackedIsps: serializeAws_restJson1IspNameList(input.TrackedIsps, context) }),
3340
+ ...(input.Global != null && { Global: input.Global }),
3341
+ ...(input.TrackedIsps != null && { TrackedIsps: serializeAws_restJson1IspNameList(input.TrackedIsps, context) }),
3355
3342
  };
3356
3343
  };
3357
3344
  const serializeAws_restJson1IspNameList = (input, context) => {
@@ -3366,22 +3353,20 @@ const serializeAws_restJson1IspNameList = (input, context) => {
3366
3353
  };
3367
3354
  const serializeAws_restJson1KinesisFirehoseDestination = (input, context) => {
3368
3355
  return {
3369
- ...(input.DeliveryStreamArn !== undefined &&
3370
- input.DeliveryStreamArn !== null && { DeliveryStreamArn: input.DeliveryStreamArn }),
3371
- ...(input.IamRoleArn !== undefined && input.IamRoleArn !== null && { IamRoleArn: input.IamRoleArn }),
3356
+ ...(input.DeliveryStreamArn != null && { DeliveryStreamArn: input.DeliveryStreamArn }),
3357
+ ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
3372
3358
  };
3373
3359
  };
3374
3360
  const serializeAws_restJson1Message = (input, context) => {
3375
3361
  return {
3376
- ...(input.Body !== undefined && input.Body !== null && { Body: serializeAws_restJson1Body(input.Body, context) }),
3377
- ...(input.Subject !== undefined &&
3378
- input.Subject !== null && { Subject: serializeAws_restJson1Content(input.Subject, context) }),
3362
+ ...(input.Body != null && { Body: serializeAws_restJson1Body(input.Body, context) }),
3363
+ ...(input.Subject != null && { Subject: serializeAws_restJson1Content(input.Subject, context) }),
3379
3364
  };
3380
3365
  };
3381
3366
  const serializeAws_restJson1MessageTag = (input, context) => {
3382
3367
  return {
3383
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
3384
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3368
+ ...(input.Name != null && { Name: input.Name }),
3369
+ ...(input.Value != null && { Value: input.Value }),
3385
3370
  };
3386
3371
  };
3387
3372
  const serializeAws_restJson1MessageTagList = (input, context) => {
@@ -3396,38 +3381,34 @@ const serializeAws_restJson1MessageTagList = (input, context) => {
3396
3381
  };
3397
3382
  const serializeAws_restJson1PinpointDestination = (input, context) => {
3398
3383
  return {
3399
- ...(input.ApplicationArn !== undefined &&
3400
- input.ApplicationArn !== null && { ApplicationArn: input.ApplicationArn }),
3384
+ ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }),
3401
3385
  };
3402
3386
  };
3403
3387
  const serializeAws_restJson1RawMessage = (input, context) => {
3404
3388
  return {
3405
- ...(input.Data !== undefined && input.Data !== null && { Data: context.base64Encoder(input.Data) }),
3389
+ ...(input.Data != null && { Data: context.base64Encoder(input.Data) }),
3406
3390
  };
3407
3391
  };
3408
3392
  const serializeAws_restJson1ReputationOptions = (input, context) => {
3409
3393
  return {
3410
- ...(input.LastFreshStart !== undefined &&
3411
- input.LastFreshStart !== null && { LastFreshStart: Math.round(input.LastFreshStart.getTime() / 1000) }),
3412
- ...(input.ReputationMetricsEnabled !== undefined &&
3413
- input.ReputationMetricsEnabled !== null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }),
3394
+ ...(input.LastFreshStart != null && { LastFreshStart: Math.round(input.LastFreshStart.getTime() / 1000) }),
3395
+ ...(input.ReputationMetricsEnabled != null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }),
3414
3396
  };
3415
3397
  };
3416
3398
  const serializeAws_restJson1SendingOptions = (input, context) => {
3417
3399
  return {
3418
- ...(input.SendingEnabled !== undefined &&
3419
- input.SendingEnabled !== null && { SendingEnabled: input.SendingEnabled }),
3400
+ ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }),
3420
3401
  };
3421
3402
  };
3422
3403
  const serializeAws_restJson1SnsDestination = (input, context) => {
3423
3404
  return {
3424
- ...(input.TopicArn !== undefined && input.TopicArn !== null && { TopicArn: input.TopicArn }),
3405
+ ...(input.TopicArn != null && { TopicArn: input.TopicArn }),
3425
3406
  };
3426
3407
  };
3427
3408
  const serializeAws_restJson1Tag = (input, context) => {
3428
3409
  return {
3429
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
3430
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3410
+ ...(input.Key != null && { Key: input.Key }),
3411
+ ...(input.Value != null && { Value: input.Value }),
3431
3412
  };
3432
3413
  };
3433
3414
  const serializeAws_restJson1TagList = (input, context) => {
@@ -3442,14 +3423,13 @@ const serializeAws_restJson1TagList = (input, context) => {
3442
3423
  };
3443
3424
  const serializeAws_restJson1Template = (input, context) => {
3444
3425
  return {
3445
- ...(input.TemplateArn !== undefined && input.TemplateArn !== null && { TemplateArn: input.TemplateArn }),
3446
- ...(input.TemplateData !== undefined && input.TemplateData !== null && { TemplateData: input.TemplateData }),
3426
+ ...(input.TemplateArn != null && { TemplateArn: input.TemplateArn }),
3427
+ ...(input.TemplateData != null && { TemplateData: input.TemplateData }),
3447
3428
  };
3448
3429
  };
3449
3430
  const serializeAws_restJson1TrackingOptions = (input, context) => {
3450
3431
  return {
3451
- ...(input.CustomRedirectDomain !== undefined &&
3452
- input.CustomRedirectDomain !== null && { CustomRedirectDomain: input.CustomRedirectDomain }),
3432
+ ...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }),
3453
3433
  };
3454
3434
  };
3455
3435
  const deserializeAws_restJson1BlacklistEntries = (output, context) => {
@@ -3466,7 +3446,7 @@ const deserializeAws_restJson1BlacklistEntries = (output, context) => {
3466
3446
  const deserializeAws_restJson1BlacklistEntry = (output, context) => {
3467
3447
  return {
3468
3448
  Description: (0, smithy_client_1.expectString)(output.Description),
3469
- ListingTime: output.ListingTime !== undefined && output.ListingTime !== null
3449
+ ListingTime: output.ListingTime != null
3470
3450
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ListingTime)))
3471
3451
  : undefined,
3472
3452
  RblName: (0, smithy_client_1.expectString)(output.RblName),
@@ -3485,7 +3465,7 @@ const deserializeAws_restJson1BlacklistReport = (output, context) => {
3485
3465
  };
3486
3466
  const deserializeAws_restJson1CloudWatchDestination = (output, context) => {
3487
3467
  return {
3488
- DimensionConfigurations: output.DimensionConfigurations !== undefined && output.DimensionConfigurations !== null
3468
+ DimensionConfigurations: output.DimensionConfigurations != null
3489
3469
  ? deserializeAws_restJson1CloudWatchDimensionConfigurations(output.DimensionConfigurations, context)
3490
3470
  : undefined,
3491
3471
  };
@@ -3521,13 +3501,11 @@ const deserializeAws_restJson1ConfigurationSetNameList = (output, context) => {
3521
3501
  };
3522
3502
  const deserializeAws_restJson1DailyVolume = (output, context) => {
3523
3503
  return {
3524
- DomainIspPlacements: output.DomainIspPlacements !== undefined && output.DomainIspPlacements !== null
3504
+ DomainIspPlacements: output.DomainIspPlacements != null
3525
3505
  ? deserializeAws_restJson1DomainIspPlacements(output.DomainIspPlacements, context)
3526
3506
  : undefined,
3527
- StartDate: output.StartDate !== undefined && output.StartDate !== null
3528
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartDate)))
3529
- : undefined,
3530
- VolumeStatistics: output.VolumeStatistics !== undefined && output.VolumeStatistics !== null
3507
+ StartDate: output.StartDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartDate))) : undefined,
3508
+ VolumeStatistics: output.VolumeStatistics != null
3531
3509
  ? deserializeAws_restJson1VolumeStatistics(output.VolumeStatistics, context)
3532
3510
  : undefined,
3533
3511
  };
@@ -3564,9 +3542,7 @@ const deserializeAws_restJson1DedicatedIpList = (output, context) => {
3564
3542
  };
3565
3543
  const deserializeAws_restJson1DeliverabilityTestReport = (output, context) => {
3566
3544
  return {
3567
- CreateDate: output.CreateDate !== undefined && output.CreateDate !== null
3568
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate)))
3569
- : undefined,
3545
+ CreateDate: output.CreateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate))) : undefined,
3570
3546
  DeliverabilityTestStatus: (0, smithy_client_1.expectString)(output.DeliverabilityTestStatus),
3571
3547
  FromEmailAddress: (0, smithy_client_1.expectString)(output.FromEmailAddress),
3572
3548
  ReportId: (0, smithy_client_1.expectString)(output.ReportId),
@@ -3595,9 +3571,7 @@ const deserializeAws_restJson1DkimAttributes = (output, context) => {
3595
3571
  return {
3596
3572
  SigningEnabled: (0, smithy_client_1.expectBoolean)(output.SigningEnabled),
3597
3573
  Status: (0, smithy_client_1.expectString)(output.Status),
3598
- Tokens: output.Tokens !== undefined && output.Tokens !== null
3599
- ? deserializeAws_restJson1DnsTokenList(output.Tokens, context)
3600
- : undefined,
3574
+ Tokens: output.Tokens != null ? deserializeAws_restJson1DnsTokenList(output.Tokens, context) : undefined,
3601
3575
  };
3602
3576
  };
3603
3577
  const deserializeAws_restJson1DnsTokenList = (output, context) => {
@@ -3615,24 +3589,20 @@ const deserializeAws_restJson1DomainDeliverabilityCampaign = (output, context) =
3615
3589
  return {
3616
3590
  CampaignId: (0, smithy_client_1.expectString)(output.CampaignId),
3617
3591
  DeleteRate: (0, smithy_client_1.limitedParseDouble)(output.DeleteRate),
3618
- Esps: output.Esps !== undefined && output.Esps !== null
3619
- ? deserializeAws_restJson1Esps(output.Esps, context)
3620
- : undefined,
3621
- FirstSeenDateTime: output.FirstSeenDateTime !== undefined && output.FirstSeenDateTime !== null
3592
+ Esps: output.Esps != null ? deserializeAws_restJson1Esps(output.Esps, context) : undefined,
3593
+ FirstSeenDateTime: output.FirstSeenDateTime != null
3622
3594
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FirstSeenDateTime)))
3623
3595
  : undefined,
3624
3596
  FromAddress: (0, smithy_client_1.expectString)(output.FromAddress),
3625
3597
  ImageUrl: (0, smithy_client_1.expectString)(output.ImageUrl),
3626
3598
  InboxCount: (0, smithy_client_1.expectLong)(output.InboxCount),
3627
- LastSeenDateTime: output.LastSeenDateTime !== undefined && output.LastSeenDateTime !== null
3599
+ LastSeenDateTime: output.LastSeenDateTime != null
3628
3600
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastSeenDateTime)))
3629
3601
  : undefined,
3630
3602
  ProjectedVolume: (0, smithy_client_1.expectLong)(output.ProjectedVolume),
3631
3603
  ReadDeleteRate: (0, smithy_client_1.limitedParseDouble)(output.ReadDeleteRate),
3632
3604
  ReadRate: (0, smithy_client_1.limitedParseDouble)(output.ReadRate),
3633
- SendingIps: output.SendingIps !== undefined && output.SendingIps !== null
3634
- ? deserializeAws_restJson1IpList(output.SendingIps, context)
3635
- : undefined,
3605
+ SendingIps: output.SendingIps != null ? deserializeAws_restJson1IpList(output.SendingIps, context) : undefined,
3636
3606
  SpamCount: (0, smithy_client_1.expectLong)(output.SpamCount),
3637
3607
  Subject: (0, smithy_client_1.expectString)(output.Subject),
3638
3608
  };
@@ -3651,10 +3621,10 @@ const deserializeAws_restJson1DomainDeliverabilityCampaignList = (output, contex
3651
3621
  const deserializeAws_restJson1DomainDeliverabilityTrackingOption = (output, context) => {
3652
3622
  return {
3653
3623
  Domain: (0, smithy_client_1.expectString)(output.Domain),
3654
- InboxPlacementTrackingOption: output.InboxPlacementTrackingOption !== undefined && output.InboxPlacementTrackingOption !== null
3624
+ InboxPlacementTrackingOption: output.InboxPlacementTrackingOption != null
3655
3625
  ? deserializeAws_restJson1InboxPlacementTrackingOption(output.InboxPlacementTrackingOption, context)
3656
3626
  : undefined,
3657
- SubscriptionStartDate: output.SubscriptionStartDate !== undefined && output.SubscriptionStartDate !== null
3627
+ SubscriptionStartDate: output.SubscriptionStartDate != null
3658
3628
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.SubscriptionStartDate)))
3659
3629
  : undefined,
3660
3630
  };
@@ -3703,21 +3673,21 @@ const deserializeAws_restJson1Esps = (output, context) => {
3703
3673
  };
3704
3674
  const deserializeAws_restJson1EventDestination = (output, context) => {
3705
3675
  return {
3706
- CloudWatchDestination: output.CloudWatchDestination !== undefined && output.CloudWatchDestination !== null
3676
+ CloudWatchDestination: output.CloudWatchDestination != null
3707
3677
  ? deserializeAws_restJson1CloudWatchDestination(output.CloudWatchDestination, context)
3708
3678
  : undefined,
3709
3679
  Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
3710
- KinesisFirehoseDestination: output.KinesisFirehoseDestination !== undefined && output.KinesisFirehoseDestination !== null
3680
+ KinesisFirehoseDestination: output.KinesisFirehoseDestination != null
3711
3681
  ? deserializeAws_restJson1KinesisFirehoseDestination(output.KinesisFirehoseDestination, context)
3712
3682
  : undefined,
3713
- MatchingEventTypes: output.MatchingEventTypes !== undefined && output.MatchingEventTypes !== null
3683
+ MatchingEventTypes: output.MatchingEventTypes != null
3714
3684
  ? deserializeAws_restJson1EventTypes(output.MatchingEventTypes, context)
3715
3685
  : undefined,
3716
3686
  Name: (0, smithy_client_1.expectString)(output.Name),
3717
- PinpointDestination: output.PinpointDestination !== undefined && output.PinpointDestination !== null
3687
+ PinpointDestination: output.PinpointDestination != null
3718
3688
  ? deserializeAws_restJson1PinpointDestination(output.PinpointDestination, context)
3719
3689
  : undefined,
3720
- SnsDestination: output.SnsDestination !== undefined && output.SnsDestination !== null
3690
+ SnsDestination: output.SnsDestination != null
3721
3691
  ? deserializeAws_restJson1SnsDestination(output.SnsDestination, context)
3722
3692
  : undefined,
3723
3693
  };
@@ -3765,9 +3735,7 @@ const deserializeAws_restJson1IdentityInfoList = (output, context) => {
3765
3735
  const deserializeAws_restJson1InboxPlacementTrackingOption = (output, context) => {
3766
3736
  return {
3767
3737
  Global: (0, smithy_client_1.expectBoolean)(output.Global),
3768
- TrackedIsps: output.TrackedIsps !== undefined && output.TrackedIsps !== null
3769
- ? deserializeAws_restJson1IspNameList(output.TrackedIsps, context)
3770
- : undefined,
3738
+ TrackedIsps: output.TrackedIsps != null ? deserializeAws_restJson1IspNameList(output.TrackedIsps, context) : undefined,
3771
3739
  };
3772
3740
  };
3773
3741
  const deserializeAws_restJson1IpList = (output, context) => {
@@ -3795,7 +3763,7 @@ const deserializeAws_restJson1IspNameList = (output, context) => {
3795
3763
  const deserializeAws_restJson1IspPlacement = (output, context) => {
3796
3764
  return {
3797
3765
  IspName: (0, smithy_client_1.expectString)(output.IspName),
3798
- PlacementStatistics: output.PlacementStatistics !== undefined && output.PlacementStatistics !== null
3766
+ PlacementStatistics: output.PlacementStatistics != null
3799
3767
  ? deserializeAws_restJson1PlacementStatistics(output.PlacementStatistics, context)
3800
3768
  : undefined,
3801
3769
  };
@@ -3837,11 +3805,11 @@ const deserializeAws_restJson1MailFromAttributes = (output, context) => {
3837
3805
  };
3838
3806
  const deserializeAws_restJson1OverallVolume = (output, context) => {
3839
3807
  return {
3840
- DomainIspPlacements: output.DomainIspPlacements !== undefined && output.DomainIspPlacements !== null
3808
+ DomainIspPlacements: output.DomainIspPlacements != null
3841
3809
  ? deserializeAws_restJson1DomainIspPlacements(output.DomainIspPlacements, context)
3842
3810
  : undefined,
3843
3811
  ReadRatePercent: (0, smithy_client_1.limitedParseDouble)(output.ReadRatePercent),
3844
- VolumeStatistics: output.VolumeStatistics !== undefined && output.VolumeStatistics !== null
3812
+ VolumeStatistics: output.VolumeStatistics != null
3845
3813
  ? deserializeAws_restJson1VolumeStatistics(output.VolumeStatistics, context)
3846
3814
  : undefined,
3847
3815
  };
@@ -3862,7 +3830,7 @@ const deserializeAws_restJson1PlacementStatistics = (output, context) => {
3862
3830
  };
3863
3831
  const deserializeAws_restJson1ReputationOptions = (output, context) => {
3864
3832
  return {
3865
- LastFreshStart: output.LastFreshStart !== undefined && output.LastFreshStart !== null
3833
+ LastFreshStart: output.LastFreshStart != null
3866
3834
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastFreshStart)))
3867
3835
  : undefined,
3868
3836
  ReputationMetricsEnabled: (0, smithy_client_1.expectBoolean)(output.ReputationMetricsEnabled),
@@ -3964,5 +3932,4 @@ const loadRestJsonErrorCode = (output, data) => {
3964
3932
  if (data["__type"] !== undefined) {
3965
3933
  return sanitizeErrorCode(data["__type"]);
3966
3934
  }
3967
- return "";
3968
3935
  };