@aws-sdk/client-sesv2 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.
@@ -16,28 +16,21 @@ const serializeAws_restJson1CreateConfigurationSetCommand = async (input, contex
16
16
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/configuration-sets";
17
17
  let body;
18
18
  body = JSON.stringify({
19
- ...(input.ConfigurationSetName !== undefined &&
20
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
21
- ...(input.DeliveryOptions !== undefined &&
22
- input.DeliveryOptions !== null && {
19
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
20
+ ...(input.DeliveryOptions != null && {
23
21
  DeliveryOptions: serializeAws_restJson1DeliveryOptions(input.DeliveryOptions, context),
24
22
  }),
25
- ...(input.ReputationOptions !== undefined &&
26
- input.ReputationOptions !== null && {
23
+ ...(input.ReputationOptions != null && {
27
24
  ReputationOptions: serializeAws_restJson1ReputationOptions(input.ReputationOptions, context),
28
25
  }),
29
- ...(input.SendingOptions !== undefined &&
30
- input.SendingOptions !== null && {
26
+ ...(input.SendingOptions != null && {
31
27
  SendingOptions: serializeAws_restJson1SendingOptions(input.SendingOptions, context),
32
28
  }),
33
- ...(input.SuppressionOptions !== undefined &&
34
- input.SuppressionOptions !== null && {
29
+ ...(input.SuppressionOptions != null && {
35
30
  SuppressionOptions: serializeAws_restJson1SuppressionOptions(input.SuppressionOptions, context),
36
31
  }),
37
- ...(input.Tags !== undefined &&
38
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
39
- ...(input.TrackingOptions !== undefined &&
40
- input.TrackingOptions !== null && {
32
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
33
+ ...(input.TrackingOptions != null && {
41
34
  TrackingOptions: serializeAws_restJson1TrackingOptions(input.TrackingOptions, context),
42
35
  }),
43
36
  });
@@ -71,12 +64,10 @@ const serializeAws_restJson1CreateConfigurationSetEventDestinationCommand = asyn
71
64
  }
72
65
  let body;
73
66
  body = JSON.stringify({
74
- ...(input.EventDestination !== undefined &&
75
- input.EventDestination !== null && {
67
+ ...(input.EventDestination != null && {
76
68
  EventDestination: serializeAws_restJson1EventDestinationDefinition(input.EventDestination, context),
77
69
  }),
78
- ...(input.EventDestinationName !== undefined &&
79
- input.EventDestinationName !== null && { EventDestinationName: input.EventDestinationName }),
70
+ ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }),
80
71
  });
81
72
  return new protocol_http_1.HttpRequest({
82
73
  protocol,
@@ -108,15 +99,12 @@ const serializeAws_restJson1CreateContactCommand = async (input, context) => {
108
99
  }
109
100
  let body;
110
101
  body = JSON.stringify({
111
- ...(input.AttributesData !== undefined &&
112
- input.AttributesData !== null && { AttributesData: input.AttributesData }),
113
- ...(input.EmailAddress !== undefined && input.EmailAddress !== null && { EmailAddress: input.EmailAddress }),
114
- ...(input.TopicPreferences !== undefined &&
115
- input.TopicPreferences !== null && {
102
+ ...(input.AttributesData != null && { AttributesData: input.AttributesData }),
103
+ ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
104
+ ...(input.TopicPreferences != null && {
116
105
  TopicPreferences: serializeAws_restJson1TopicPreferenceList(input.TopicPreferences, context),
117
106
  }),
118
- ...(input.UnsubscribeAll !== undefined &&
119
- input.UnsubscribeAll !== null && { UnsubscribeAll: input.UnsubscribeAll }),
107
+ ...(input.UnsubscribeAll != null && { UnsubscribeAll: input.UnsubscribeAll }),
120
108
  });
121
109
  return new protocol_http_1.HttpRequest({
122
110
  protocol,
@@ -137,13 +125,10 @@ const serializeAws_restJson1CreateContactListCommand = async (input, context) =>
137
125
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/contact-lists";
138
126
  let body;
139
127
  body = JSON.stringify({
140
- ...(input.ContactListName !== undefined &&
141
- input.ContactListName !== null && { ContactListName: input.ContactListName }),
142
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
143
- ...(input.Tags !== undefined &&
144
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
145
- ...(input.Topics !== undefined &&
146
- input.Topics !== null && { Topics: serializeAws_restJson1Topics(input.Topics, context) }),
128
+ ...(input.ContactListName != null && { ContactListName: input.ContactListName }),
129
+ ...(input.Description != null && { Description: input.Description }),
130
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
131
+ ...(input.Topics != null && { Topics: serializeAws_restJson1Topics(input.Topics, context) }),
147
132
  });
148
133
  return new protocol_http_1.HttpRequest({
149
134
  protocol,
@@ -165,17 +150,12 @@ const serializeAws_restJson1CreateCustomVerificationEmailTemplateCommand = async
165
150
  "/v2/email/custom-verification-email-templates";
166
151
  let body;
167
152
  body = JSON.stringify({
168
- ...(input.FailureRedirectionURL !== undefined &&
169
- input.FailureRedirectionURL !== null && { FailureRedirectionURL: input.FailureRedirectionURL }),
170
- ...(input.FromEmailAddress !== undefined &&
171
- input.FromEmailAddress !== null && { FromEmailAddress: input.FromEmailAddress }),
172
- ...(input.SuccessRedirectionURL !== undefined &&
173
- input.SuccessRedirectionURL !== null && { SuccessRedirectionURL: input.SuccessRedirectionURL }),
174
- ...(input.TemplateContent !== undefined &&
175
- input.TemplateContent !== null && { TemplateContent: input.TemplateContent }),
176
- ...(input.TemplateName !== undefined && input.TemplateName !== null && { TemplateName: input.TemplateName }),
177
- ...(input.TemplateSubject !== undefined &&
178
- input.TemplateSubject !== null && { TemplateSubject: input.TemplateSubject }),
153
+ ...(input.FailureRedirectionURL != null && { FailureRedirectionURL: input.FailureRedirectionURL }),
154
+ ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }),
155
+ ...(input.SuccessRedirectionURL != null && { SuccessRedirectionURL: input.SuccessRedirectionURL }),
156
+ ...(input.TemplateContent != null && { TemplateContent: input.TemplateContent }),
157
+ ...(input.TemplateName != null && { TemplateName: input.TemplateName }),
158
+ ...(input.TemplateSubject != null && { TemplateSubject: input.TemplateSubject }),
179
159
  });
180
160
  return new protocol_http_1.HttpRequest({
181
161
  protocol,
@@ -196,9 +176,8 @@ const serializeAws_restJson1CreateDedicatedIpPoolCommand = async (input, context
196
176
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/dedicated-ip-pools";
197
177
  let body;
198
178
  body = JSON.stringify({
199
- ...(input.PoolName !== undefined && input.PoolName !== null && { PoolName: input.PoolName }),
200
- ...(input.Tags !== undefined &&
201
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
179
+ ...(input.PoolName != null && { PoolName: input.PoolName }),
180
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
202
181
  });
203
182
  return new protocol_http_1.HttpRequest({
204
183
  protocol,
@@ -219,13 +198,10 @@ const serializeAws_restJson1CreateDeliverabilityTestReportCommand = async (input
219
198
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/deliverability-dashboard/test";
220
199
  let body;
221
200
  body = JSON.stringify({
222
- ...(input.Content !== undefined &&
223
- input.Content !== null && { Content: serializeAws_restJson1EmailContent(input.Content, context) }),
224
- ...(input.FromEmailAddress !== undefined &&
225
- input.FromEmailAddress !== null && { FromEmailAddress: input.FromEmailAddress }),
226
- ...(input.ReportName !== undefined && input.ReportName !== null && { ReportName: input.ReportName }),
227
- ...(input.Tags !== undefined &&
228
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
201
+ ...(input.Content != null && { Content: serializeAws_restJson1EmailContent(input.Content, context) }),
202
+ ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }),
203
+ ...(input.ReportName != null && { ReportName: input.ReportName }),
204
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
229
205
  });
230
206
  return new protocol_http_1.HttpRequest({
231
207
  protocol,
@@ -246,15 +222,12 @@ const serializeAws_restJson1CreateEmailIdentityCommand = async (input, context)
246
222
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/identities";
247
223
  let body;
248
224
  body = JSON.stringify({
249
- ...(input.ConfigurationSetName !== undefined &&
250
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
251
- ...(input.DkimSigningAttributes !== undefined &&
252
- input.DkimSigningAttributes !== null && {
225
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
226
+ ...(input.DkimSigningAttributes != null && {
253
227
  DkimSigningAttributes: serializeAws_restJson1DkimSigningAttributes(input.DkimSigningAttributes, context),
254
228
  }),
255
- ...(input.EmailIdentity !== undefined && input.EmailIdentity !== null && { EmailIdentity: input.EmailIdentity }),
256
- ...(input.Tags !== undefined &&
257
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
229
+ ...(input.EmailIdentity != null && { EmailIdentity: input.EmailIdentity }),
230
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
258
231
  });
259
232
  return new protocol_http_1.HttpRequest({
260
233
  protocol,
@@ -296,7 +269,7 @@ const serializeAws_restJson1CreateEmailIdentityPolicyCommand = async (input, con
296
269
  }
297
270
  let body;
298
271
  body = JSON.stringify({
299
- ...(input.Policy !== undefined && input.Policy !== null && { Policy: input.Policy }),
272
+ ...(input.Policy != null && { Policy: input.Policy }),
300
273
  });
301
274
  return new protocol_http_1.HttpRequest({
302
275
  protocol,
@@ -317,11 +290,10 @@ const serializeAws_restJson1CreateEmailTemplateCommand = async (input, context)
317
290
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/templates";
318
291
  let body;
319
292
  body = JSON.stringify({
320
- ...(input.TemplateContent !== undefined &&
321
- input.TemplateContent !== null && {
293
+ ...(input.TemplateContent != null && {
322
294
  TemplateContent: serializeAws_restJson1EmailTemplateContent(input.TemplateContent, context),
323
295
  }),
324
- ...(input.TemplateName !== undefined && input.TemplateName !== null && { TemplateName: input.TemplateName }),
296
+ ...(input.TemplateName != null && { TemplateName: input.TemplateName }),
325
297
  });
326
298
  return new protocol_http_1.HttpRequest({
327
299
  protocol,
@@ -342,12 +314,10 @@ const serializeAws_restJson1CreateImportJobCommand = async (input, context) => {
342
314
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/import-jobs";
343
315
  let body;
344
316
  body = JSON.stringify({
345
- ...(input.ImportDataSource !== undefined &&
346
- input.ImportDataSource !== null && {
317
+ ...(input.ImportDataSource != null && {
347
318
  ImportDataSource: serializeAws_restJson1ImportDataSource(input.ImportDataSource, context),
348
319
  }),
349
- ...(input.ImportDestination !== undefined &&
350
- input.ImportDestination !== null && {
320
+ ...(input.ImportDestination != null && {
351
321
  ImportDestination: serializeAws_restJson1ImportDestination(input.ImportDestination, context),
352
322
  }),
353
323
  });
@@ -1194,8 +1164,7 @@ const serializeAws_restJson1ListContactsCommand = async (input, context) => {
1194
1164
  };
1195
1165
  let body;
1196
1166
  body = JSON.stringify({
1197
- ...(input.Filter !== undefined &&
1198
- input.Filter !== null && { Filter: serializeAws_restJson1ListContactsFilter(input.Filter, context) }),
1167
+ ...(input.Filter != null && { Filter: serializeAws_restJson1ListContactsFilter(input.Filter, context) }),
1199
1168
  });
1200
1169
  return new protocol_http_1.HttpRequest({
1201
1170
  protocol,
@@ -1362,8 +1331,7 @@ const serializeAws_restJson1ListImportJobsCommand = async (input, context) => {
1362
1331
  };
1363
1332
  let body;
1364
1333
  body = JSON.stringify({
1365
- ...(input.ImportDestinationType !== undefined &&
1366
- input.ImportDestinationType !== null && { ImportDestinationType: input.ImportDestinationType }),
1334
+ ...(input.ImportDestinationType != null && { ImportDestinationType: input.ImportDestinationType }),
1367
1335
  });
1368
1336
  return new protocol_http_1.HttpRequest({
1369
1337
  protocol,
@@ -1429,8 +1397,7 @@ const serializeAws_restJson1PutAccountDedicatedIpWarmupAttributesCommand = async
1429
1397
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/dedicated-ips/warmup";
1430
1398
  let body;
1431
1399
  body = JSON.stringify({
1432
- ...(input.AutoWarmupEnabled !== undefined &&
1433
- input.AutoWarmupEnabled !== null && { AutoWarmupEnabled: input.AutoWarmupEnabled }),
1400
+ ...(input.AutoWarmupEnabled != null && { AutoWarmupEnabled: input.AutoWarmupEnabled }),
1434
1401
  });
1435
1402
  return new protocol_http_1.HttpRequest({
1436
1403
  protocol,
@@ -1451,18 +1418,14 @@ const serializeAws_restJson1PutAccountDetailsCommand = async (input, context) =>
1451
1418
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/details";
1452
1419
  let body;
1453
1420
  body = JSON.stringify({
1454
- ...(input.AdditionalContactEmailAddresses !== undefined &&
1455
- input.AdditionalContactEmailAddresses !== null && {
1421
+ ...(input.AdditionalContactEmailAddresses != null && {
1456
1422
  AdditionalContactEmailAddresses: serializeAws_restJson1AdditionalContactEmailAddresses(input.AdditionalContactEmailAddresses, context),
1457
1423
  }),
1458
- ...(input.ContactLanguage !== undefined &&
1459
- input.ContactLanguage !== null && { ContactLanguage: input.ContactLanguage }),
1460
- ...(input.MailType !== undefined && input.MailType !== null && { MailType: input.MailType }),
1461
- ...(input.ProductionAccessEnabled !== undefined &&
1462
- input.ProductionAccessEnabled !== null && { ProductionAccessEnabled: input.ProductionAccessEnabled }),
1463
- ...(input.UseCaseDescription !== undefined &&
1464
- input.UseCaseDescription !== null && { UseCaseDescription: input.UseCaseDescription }),
1465
- ...(input.WebsiteURL !== undefined && input.WebsiteURL !== null && { WebsiteURL: input.WebsiteURL }),
1424
+ ...(input.ContactLanguage != null && { ContactLanguage: input.ContactLanguage }),
1425
+ ...(input.MailType != null && { MailType: input.MailType }),
1426
+ ...(input.ProductionAccessEnabled != null && { ProductionAccessEnabled: input.ProductionAccessEnabled }),
1427
+ ...(input.UseCaseDescription != null && { UseCaseDescription: input.UseCaseDescription }),
1428
+ ...(input.WebsiteURL != null && { WebsiteURL: input.WebsiteURL }),
1466
1429
  });
1467
1430
  return new protocol_http_1.HttpRequest({
1468
1431
  protocol,
@@ -1483,8 +1446,7 @@ const serializeAws_restJson1PutAccountSendingAttributesCommand = async (input, c
1483
1446
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/sending";
1484
1447
  let body;
1485
1448
  body = JSON.stringify({
1486
- ...(input.SendingEnabled !== undefined &&
1487
- input.SendingEnabled !== null && { SendingEnabled: input.SendingEnabled }),
1449
+ ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }),
1488
1450
  });
1489
1451
  return new protocol_http_1.HttpRequest({
1490
1452
  protocol,
@@ -1505,8 +1467,7 @@ const serializeAws_restJson1PutAccountSuppressionAttributesCommand = async (inpu
1505
1467
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/suppression";
1506
1468
  let body;
1507
1469
  body = JSON.stringify({
1508
- ...(input.SuppressedReasons !== undefined &&
1509
- input.SuppressedReasons !== null && {
1470
+ ...(input.SuppressedReasons != null && {
1510
1471
  SuppressedReasons: serializeAws_restJson1SuppressionListReasons(input.SuppressedReasons, context),
1511
1472
  }),
1512
1473
  });
@@ -1540,9 +1501,8 @@ const serializeAws_restJson1PutConfigurationSetDeliveryOptionsCommand = async (i
1540
1501
  }
1541
1502
  let body;
1542
1503
  body = JSON.stringify({
1543
- ...(input.SendingPoolName !== undefined &&
1544
- input.SendingPoolName !== null && { SendingPoolName: input.SendingPoolName }),
1545
- ...(input.TlsPolicy !== undefined && input.TlsPolicy !== null && { TlsPolicy: input.TlsPolicy }),
1504
+ ...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }),
1505
+ ...(input.TlsPolicy != null && { TlsPolicy: input.TlsPolicy }),
1546
1506
  });
1547
1507
  return new protocol_http_1.HttpRequest({
1548
1508
  protocol,
@@ -1574,8 +1534,7 @@ const serializeAws_restJson1PutConfigurationSetReputationOptionsCommand = async
1574
1534
  }
1575
1535
  let body;
1576
1536
  body = JSON.stringify({
1577
- ...(input.ReputationMetricsEnabled !== undefined &&
1578
- input.ReputationMetricsEnabled !== null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }),
1537
+ ...(input.ReputationMetricsEnabled != null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }),
1579
1538
  });
1580
1539
  return new protocol_http_1.HttpRequest({
1581
1540
  protocol,
@@ -1607,8 +1566,7 @@ const serializeAws_restJson1PutConfigurationSetSendingOptionsCommand = async (in
1607
1566
  }
1608
1567
  let body;
1609
1568
  body = JSON.stringify({
1610
- ...(input.SendingEnabled !== undefined &&
1611
- input.SendingEnabled !== null && { SendingEnabled: input.SendingEnabled }),
1569
+ ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }),
1612
1570
  });
1613
1571
  return new protocol_http_1.HttpRequest({
1614
1572
  protocol,
@@ -1640,8 +1598,7 @@ const serializeAws_restJson1PutConfigurationSetSuppressionOptionsCommand = async
1640
1598
  }
1641
1599
  let body;
1642
1600
  body = JSON.stringify({
1643
- ...(input.SuppressedReasons !== undefined &&
1644
- input.SuppressedReasons !== null && {
1601
+ ...(input.SuppressedReasons != null && {
1645
1602
  SuppressedReasons: serializeAws_restJson1SuppressionListReasons(input.SuppressedReasons, context),
1646
1603
  }),
1647
1604
  });
@@ -1675,8 +1632,7 @@ const serializeAws_restJson1PutConfigurationSetTrackingOptionsCommand = async (i
1675
1632
  }
1676
1633
  let body;
1677
1634
  body = JSON.stringify({
1678
- ...(input.CustomRedirectDomain !== undefined &&
1679
- input.CustomRedirectDomain !== null && { CustomRedirectDomain: input.CustomRedirectDomain }),
1635
+ ...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }),
1680
1636
  });
1681
1637
  return new protocol_http_1.HttpRequest({
1682
1638
  protocol,
@@ -1707,8 +1663,7 @@ const serializeAws_restJson1PutDedicatedIpInPoolCommand = async (input, context)
1707
1663
  }
1708
1664
  let body;
1709
1665
  body = JSON.stringify({
1710
- ...(input.DestinationPoolName !== undefined &&
1711
- input.DestinationPoolName !== null && { DestinationPoolName: input.DestinationPoolName }),
1666
+ ...(input.DestinationPoolName != null && { DestinationPoolName: input.DestinationPoolName }),
1712
1667
  });
1713
1668
  return new protocol_http_1.HttpRequest({
1714
1669
  protocol,
@@ -1739,8 +1694,7 @@ const serializeAws_restJson1PutDedicatedIpWarmupAttributesCommand = async (input
1739
1694
  }
1740
1695
  let body;
1741
1696
  body = JSON.stringify({
1742
- ...(input.WarmupPercentage !== undefined &&
1743
- input.WarmupPercentage !== null && { WarmupPercentage: input.WarmupPercentage }),
1697
+ ...(input.WarmupPercentage != null && { WarmupPercentage: input.WarmupPercentage }),
1744
1698
  });
1745
1699
  return new protocol_http_1.HttpRequest({
1746
1700
  protocol,
@@ -1761,10 +1715,8 @@ const serializeAws_restJson1PutDeliverabilityDashboardOptionCommand = async (inp
1761
1715
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/deliverability-dashboard";
1762
1716
  let body;
1763
1717
  body = JSON.stringify({
1764
- ...(input.DashboardEnabled !== undefined &&
1765
- input.DashboardEnabled !== null && { DashboardEnabled: input.DashboardEnabled }),
1766
- ...(input.SubscribedDomains !== undefined &&
1767
- input.SubscribedDomains !== null && {
1718
+ ...(input.DashboardEnabled != null && { DashboardEnabled: input.DashboardEnabled }),
1719
+ ...(input.SubscribedDomains != null && {
1768
1720
  SubscribedDomains: serializeAws_restJson1DomainDeliverabilityTrackingOptions(input.SubscribedDomains, context),
1769
1721
  }),
1770
1722
  });
@@ -1798,8 +1750,7 @@ const serializeAws_restJson1PutEmailIdentityConfigurationSetAttributesCommand =
1798
1750
  }
1799
1751
  let body;
1800
1752
  body = JSON.stringify({
1801
- ...(input.ConfigurationSetName !== undefined &&
1802
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
1753
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
1803
1754
  });
1804
1755
  return new protocol_http_1.HttpRequest({
1805
1756
  protocol,
@@ -1830,8 +1781,7 @@ const serializeAws_restJson1PutEmailIdentityDkimAttributesCommand = async (input
1830
1781
  }
1831
1782
  let body;
1832
1783
  body = JSON.stringify({
1833
- ...(input.SigningEnabled !== undefined &&
1834
- input.SigningEnabled !== null && { SigningEnabled: input.SigningEnabled }),
1784
+ ...(input.SigningEnabled != null && { SigningEnabled: input.SigningEnabled }),
1835
1785
  });
1836
1786
  return new protocol_http_1.HttpRequest({
1837
1787
  protocol,
@@ -1863,12 +1813,10 @@ const serializeAws_restJson1PutEmailIdentityDkimSigningAttributesCommand = async
1863
1813
  }
1864
1814
  let body;
1865
1815
  body = JSON.stringify({
1866
- ...(input.SigningAttributes !== undefined &&
1867
- input.SigningAttributes !== null && {
1816
+ ...(input.SigningAttributes != null && {
1868
1817
  SigningAttributes: serializeAws_restJson1DkimSigningAttributes(input.SigningAttributes, context),
1869
1818
  }),
1870
- ...(input.SigningAttributesOrigin !== undefined &&
1871
- input.SigningAttributesOrigin !== null && { SigningAttributesOrigin: input.SigningAttributesOrigin }),
1819
+ ...(input.SigningAttributesOrigin != null && { SigningAttributesOrigin: input.SigningAttributesOrigin }),
1872
1820
  });
1873
1821
  return new protocol_http_1.HttpRequest({
1874
1822
  protocol,
@@ -1900,8 +1848,7 @@ const serializeAws_restJson1PutEmailIdentityFeedbackAttributesCommand = async (i
1900
1848
  }
1901
1849
  let body;
1902
1850
  body = JSON.stringify({
1903
- ...(input.EmailForwardingEnabled !== undefined &&
1904
- input.EmailForwardingEnabled !== null && { EmailForwardingEnabled: input.EmailForwardingEnabled }),
1851
+ ...(input.EmailForwardingEnabled != null && { EmailForwardingEnabled: input.EmailForwardingEnabled }),
1905
1852
  });
1906
1853
  return new protocol_http_1.HttpRequest({
1907
1854
  protocol,
@@ -1933,10 +1880,8 @@ const serializeAws_restJson1PutEmailIdentityMailFromAttributesCommand = async (i
1933
1880
  }
1934
1881
  let body;
1935
1882
  body = JSON.stringify({
1936
- ...(input.BehaviorOnMxFailure !== undefined &&
1937
- input.BehaviorOnMxFailure !== null && { BehaviorOnMxFailure: input.BehaviorOnMxFailure }),
1938
- ...(input.MailFromDomain !== undefined &&
1939
- input.MailFromDomain !== null && { MailFromDomain: input.MailFromDomain }),
1883
+ ...(input.BehaviorOnMxFailure != null && { BehaviorOnMxFailure: input.BehaviorOnMxFailure }),
1884
+ ...(input.MailFromDomain != null && { MailFromDomain: input.MailFromDomain }),
1940
1885
  });
1941
1886
  return new protocol_http_1.HttpRequest({
1942
1887
  protocol,
@@ -1957,8 +1902,8 @@ const serializeAws_restJson1PutSuppressedDestinationCommand = async (input, cont
1957
1902
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/suppression/addresses";
1958
1903
  let body;
1959
1904
  body = JSON.stringify({
1960
- ...(input.EmailAddress !== undefined && input.EmailAddress !== null && { EmailAddress: input.EmailAddress }),
1961
- ...(input.Reason !== undefined && input.Reason !== null && { Reason: input.Reason }),
1905
+ ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
1906
+ ...(input.Reason != null && { Reason: input.Reason }),
1962
1907
  });
1963
1908
  return new protocol_http_1.HttpRequest({
1964
1909
  protocol,
@@ -1979,34 +1924,27 @@ const serializeAws_restJson1SendBulkEmailCommand = async (input, context) => {
1979
1924
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/outbound-bulk-emails";
1980
1925
  let body;
1981
1926
  body = JSON.stringify({
1982
- ...(input.BulkEmailEntries !== undefined &&
1983
- input.BulkEmailEntries !== null && {
1927
+ ...(input.BulkEmailEntries != null && {
1984
1928
  BulkEmailEntries: serializeAws_restJson1BulkEmailEntryList(input.BulkEmailEntries, context),
1985
1929
  }),
1986
- ...(input.ConfigurationSetName !== undefined &&
1987
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
1988
- ...(input.DefaultContent !== undefined &&
1989
- input.DefaultContent !== null && {
1930
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
1931
+ ...(input.DefaultContent != null && {
1990
1932
  DefaultContent: serializeAws_restJson1BulkEmailContent(input.DefaultContent, context),
1991
1933
  }),
1992
- ...(input.DefaultEmailTags !== undefined &&
1993
- input.DefaultEmailTags !== null && {
1934
+ ...(input.DefaultEmailTags != null && {
1994
1935
  DefaultEmailTags: serializeAws_restJson1MessageTagList(input.DefaultEmailTags, context),
1995
1936
  }),
1996
- ...(input.FeedbackForwardingEmailAddress !== undefined &&
1997
- input.FeedbackForwardingEmailAddress !== null && {
1937
+ ...(input.FeedbackForwardingEmailAddress != null && {
1998
1938
  FeedbackForwardingEmailAddress: input.FeedbackForwardingEmailAddress,
1999
1939
  }),
2000
- ...(input.FeedbackForwardingEmailAddressIdentityArn !== undefined &&
2001
- input.FeedbackForwardingEmailAddressIdentityArn !== null && {
1940
+ ...(input.FeedbackForwardingEmailAddressIdentityArn != null && {
2002
1941
  FeedbackForwardingEmailAddressIdentityArn: input.FeedbackForwardingEmailAddressIdentityArn,
2003
1942
  }),
2004
- ...(input.FromEmailAddress !== undefined &&
2005
- input.FromEmailAddress !== null && { FromEmailAddress: input.FromEmailAddress }),
2006
- ...(input.FromEmailAddressIdentityArn !== undefined &&
2007
- input.FromEmailAddressIdentityArn !== null && { FromEmailAddressIdentityArn: input.FromEmailAddressIdentityArn }),
2008
- ...(input.ReplyToAddresses !== undefined &&
2009
- input.ReplyToAddresses !== null && {
1943
+ ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }),
1944
+ ...(input.FromEmailAddressIdentityArn != null && {
1945
+ FromEmailAddressIdentityArn: input.FromEmailAddressIdentityArn,
1946
+ }),
1947
+ ...(input.ReplyToAddresses != null && {
2010
1948
  ReplyToAddresses: serializeAws_restJson1EmailAddressList(input.ReplyToAddresses, context),
2011
1949
  }),
2012
1950
  });
@@ -2030,10 +1968,9 @@ const serializeAws_restJson1SendCustomVerificationEmailCommand = async (input, c
2030
1968
  "/v2/email/outbound-custom-verification-emails";
2031
1969
  let body;
2032
1970
  body = JSON.stringify({
2033
- ...(input.ConfigurationSetName !== undefined &&
2034
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
2035
- ...(input.EmailAddress !== undefined && input.EmailAddress !== null && { EmailAddress: input.EmailAddress }),
2036
- ...(input.TemplateName !== undefined && input.TemplateName !== null && { TemplateName: input.TemplateName }),
1971
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
1972
+ ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }),
1973
+ ...(input.TemplateName != null && { TemplateName: input.TemplateName }),
2037
1974
  });
2038
1975
  return new protocol_http_1.HttpRequest({
2039
1976
  protocol,
@@ -2054,32 +1991,24 @@ const serializeAws_restJson1SendEmailCommand = async (input, context) => {
2054
1991
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/outbound-emails";
2055
1992
  let body;
2056
1993
  body = JSON.stringify({
2057
- ...(input.ConfigurationSetName !== undefined &&
2058
- input.ConfigurationSetName !== null && { ConfigurationSetName: input.ConfigurationSetName }),
2059
- ...(input.Content !== undefined &&
2060
- input.Content !== null && { Content: serializeAws_restJson1EmailContent(input.Content, context) }),
2061
- ...(input.Destination !== undefined &&
2062
- input.Destination !== null && { Destination: serializeAws_restJson1Destination(input.Destination, context) }),
2063
- ...(input.EmailTags !== undefined &&
2064
- input.EmailTags !== null && { EmailTags: serializeAws_restJson1MessageTagList(input.EmailTags, context) }),
2065
- ...(input.FeedbackForwardingEmailAddress !== undefined &&
2066
- input.FeedbackForwardingEmailAddress !== null && {
1994
+ ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }),
1995
+ ...(input.Content != null && { Content: serializeAws_restJson1EmailContent(input.Content, context) }),
1996
+ ...(input.Destination != null && { Destination: serializeAws_restJson1Destination(input.Destination, context) }),
1997
+ ...(input.EmailTags != null && { EmailTags: serializeAws_restJson1MessageTagList(input.EmailTags, context) }),
1998
+ ...(input.FeedbackForwardingEmailAddress != null && {
2067
1999
  FeedbackForwardingEmailAddress: input.FeedbackForwardingEmailAddress,
2068
2000
  }),
2069
- ...(input.FeedbackForwardingEmailAddressIdentityArn !== undefined &&
2070
- input.FeedbackForwardingEmailAddressIdentityArn !== null && {
2001
+ ...(input.FeedbackForwardingEmailAddressIdentityArn != null && {
2071
2002
  FeedbackForwardingEmailAddressIdentityArn: input.FeedbackForwardingEmailAddressIdentityArn,
2072
2003
  }),
2073
- ...(input.FromEmailAddress !== undefined &&
2074
- input.FromEmailAddress !== null && { FromEmailAddress: input.FromEmailAddress }),
2075
- ...(input.FromEmailAddressIdentityArn !== undefined &&
2076
- input.FromEmailAddressIdentityArn !== null && { FromEmailAddressIdentityArn: input.FromEmailAddressIdentityArn }),
2077
- ...(input.ListManagementOptions !== undefined &&
2078
- input.ListManagementOptions !== null && {
2004
+ ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }),
2005
+ ...(input.FromEmailAddressIdentityArn != null && {
2006
+ FromEmailAddressIdentityArn: input.FromEmailAddressIdentityArn,
2007
+ }),
2008
+ ...(input.ListManagementOptions != null && {
2079
2009
  ListManagementOptions: serializeAws_restJson1ListManagementOptions(input.ListManagementOptions, context),
2080
2010
  }),
2081
- ...(input.ReplyToAddresses !== undefined &&
2082
- input.ReplyToAddresses !== null && {
2011
+ ...(input.ReplyToAddresses != null && {
2083
2012
  ReplyToAddresses: serializeAws_restJson1EmailAddressList(input.ReplyToAddresses, context),
2084
2013
  }),
2085
2014
  });
@@ -2102,9 +2031,8 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
2102
2031
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/tags";
2103
2032
  let body;
2104
2033
  body = JSON.stringify({
2105
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2106
- ...(input.Tags !== undefined &&
2107
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
2034
+ ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
2035
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
2108
2036
  });
2109
2037
  return new protocol_http_1.HttpRequest({
2110
2038
  protocol,
@@ -2135,7 +2063,7 @@ const serializeAws_restJson1TestRenderEmailTemplateCommand = async (input, conte
2135
2063
  }
2136
2064
  let body;
2137
2065
  body = JSON.stringify({
2138
- ...(input.TemplateData !== undefined && input.TemplateData !== null && { TemplateData: input.TemplateData }),
2066
+ ...(input.TemplateData != null && { TemplateData: input.TemplateData }),
2139
2067
  });
2140
2068
  return new protocol_http_1.HttpRequest({
2141
2069
  protocol,
@@ -2198,8 +2126,7 @@ const serializeAws_restJson1UpdateConfigurationSetEventDestinationCommand = asyn
2198
2126
  }
2199
2127
  let body;
2200
2128
  body = JSON.stringify({
2201
- ...(input.EventDestination !== undefined &&
2202
- input.EventDestination !== null && {
2129
+ ...(input.EventDestination != null && {
2203
2130
  EventDestination: serializeAws_restJson1EventDestinationDefinition(input.EventDestination, context),
2204
2131
  }),
2205
2132
  });
@@ -2243,14 +2170,11 @@ const serializeAws_restJson1UpdateContactCommand = async (input, context) => {
2243
2170
  }
2244
2171
  let body;
2245
2172
  body = JSON.stringify({
2246
- ...(input.AttributesData !== undefined &&
2247
- input.AttributesData !== null && { AttributesData: input.AttributesData }),
2248
- ...(input.TopicPreferences !== undefined &&
2249
- input.TopicPreferences !== null && {
2173
+ ...(input.AttributesData != null && { AttributesData: input.AttributesData }),
2174
+ ...(input.TopicPreferences != null && {
2250
2175
  TopicPreferences: serializeAws_restJson1TopicPreferenceList(input.TopicPreferences, context),
2251
2176
  }),
2252
- ...(input.UnsubscribeAll !== undefined &&
2253
- input.UnsubscribeAll !== null && { UnsubscribeAll: input.UnsubscribeAll }),
2177
+ ...(input.UnsubscribeAll != null && { UnsubscribeAll: input.UnsubscribeAll }),
2254
2178
  });
2255
2179
  return new protocol_http_1.HttpRequest({
2256
2180
  protocol,
@@ -2281,9 +2205,8 @@ const serializeAws_restJson1UpdateContactListCommand = async (input, context) =>
2281
2205
  }
2282
2206
  let body;
2283
2207
  body = JSON.stringify({
2284
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
2285
- ...(input.Topics !== undefined &&
2286
- input.Topics !== null && { Topics: serializeAws_restJson1Topics(input.Topics, context) }),
2208
+ ...(input.Description != null && { Description: input.Description }),
2209
+ ...(input.Topics != null && { Topics: serializeAws_restJson1Topics(input.Topics, context) }),
2287
2210
  });
2288
2211
  return new protocol_http_1.HttpRequest({
2289
2212
  protocol,
@@ -2315,16 +2238,11 @@ const serializeAws_restJson1UpdateCustomVerificationEmailTemplateCommand = async
2315
2238
  }
2316
2239
  let body;
2317
2240
  body = JSON.stringify({
2318
- ...(input.FailureRedirectionURL !== undefined &&
2319
- input.FailureRedirectionURL !== null && { FailureRedirectionURL: input.FailureRedirectionURL }),
2320
- ...(input.FromEmailAddress !== undefined &&
2321
- input.FromEmailAddress !== null && { FromEmailAddress: input.FromEmailAddress }),
2322
- ...(input.SuccessRedirectionURL !== undefined &&
2323
- input.SuccessRedirectionURL !== null && { SuccessRedirectionURL: input.SuccessRedirectionURL }),
2324
- ...(input.TemplateContent !== undefined &&
2325
- input.TemplateContent !== null && { TemplateContent: input.TemplateContent }),
2326
- ...(input.TemplateSubject !== undefined &&
2327
- input.TemplateSubject !== null && { TemplateSubject: input.TemplateSubject }),
2241
+ ...(input.FailureRedirectionURL != null && { FailureRedirectionURL: input.FailureRedirectionURL }),
2242
+ ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }),
2243
+ ...(input.SuccessRedirectionURL != null && { SuccessRedirectionURL: input.SuccessRedirectionURL }),
2244
+ ...(input.TemplateContent != null && { TemplateContent: input.TemplateContent }),
2245
+ ...(input.TemplateSubject != null && { TemplateSubject: input.TemplateSubject }),
2328
2246
  });
2329
2247
  return new protocol_http_1.HttpRequest({
2330
2248
  protocol,
@@ -2366,7 +2284,7 @@ const serializeAws_restJson1UpdateEmailIdentityPolicyCommand = async (input, con
2366
2284
  }
2367
2285
  let body;
2368
2286
  body = JSON.stringify({
2369
- ...(input.Policy !== undefined && input.Policy !== null && { Policy: input.Policy }),
2287
+ ...(input.Policy != null && { Policy: input.Policy }),
2370
2288
  });
2371
2289
  return new protocol_http_1.HttpRequest({
2372
2290
  protocol,
@@ -2397,8 +2315,7 @@ const serializeAws_restJson1UpdateEmailTemplateCommand = async (input, context)
2397
2315
  }
2398
2316
  let body;
2399
2317
  body = JSON.stringify({
2400
- ...(input.TemplateContent !== undefined &&
2401
- input.TemplateContent !== null && {
2318
+ ...(input.TemplateContent != null && {
2402
2319
  TemplateContent: serializeAws_restJson1EmailTemplateContent(input.TemplateContent, context),
2403
2320
  }),
2404
2321
  });
@@ -2430,8 +2347,7 @@ const deserializeAws_restJson1CreateConfigurationSetCommandError = async (output
2430
2347
  body: await parseBody(output.body, context),
2431
2348
  };
2432
2349
  let response;
2433
- let errorCode = "UnknownError";
2434
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2350
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2435
2351
  switch (errorCode) {
2436
2352
  case "AlreadyExistsException":
2437
2353
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2453,10 +2369,12 @@ const deserializeAws_restJson1CreateConfigurationSetCommandError = async (output
2453
2369
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2454
2370
  default:
2455
2371
  const parsedBody = parsedOutput.body;
2372
+ const $metadata = deserializeMetadata(output);
2373
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2456
2374
  response = new SESv2ServiceException_1.SESv2ServiceException({
2457
- name: parsedBody.code || parsedBody.Code || errorCode,
2375
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2458
2376
  $fault: "client",
2459
- $metadata: deserializeMetadata(output),
2377
+ $metadata,
2460
2378
  });
2461
2379
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2462
2380
  }
@@ -2478,8 +2396,7 @@ const deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError
2478
2396
  body: await parseBody(output.body, context),
2479
2397
  };
2480
2398
  let response;
2481
- let errorCode = "UnknownError";
2482
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2399
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2483
2400
  switch (errorCode) {
2484
2401
  case "AlreadyExistsException":
2485
2402
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2498,10 +2415,12 @@ const deserializeAws_restJson1CreateConfigurationSetEventDestinationCommandError
2498
2415
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2499
2416
  default:
2500
2417
  const parsedBody = parsedOutput.body;
2418
+ const $metadata = deserializeMetadata(output);
2419
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2501
2420
  response = new SESv2ServiceException_1.SESv2ServiceException({
2502
- name: parsedBody.code || parsedBody.Code || errorCode,
2421
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2503
2422
  $fault: "client",
2504
- $metadata: deserializeMetadata(output),
2423
+ $metadata,
2505
2424
  });
2506
2425
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2507
2426
  }
@@ -2523,8 +2442,7 @@ const deserializeAws_restJson1CreateContactCommandError = async (output, context
2523
2442
  body: await parseBody(output.body, context),
2524
2443
  };
2525
2444
  let response;
2526
- let errorCode = "UnknownError";
2527
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2445
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2528
2446
  switch (errorCode) {
2529
2447
  case "AlreadyExistsException":
2530
2448
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2540,10 +2458,12 @@ const deserializeAws_restJson1CreateContactCommandError = async (output, context
2540
2458
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2541
2459
  default:
2542
2460
  const parsedBody = parsedOutput.body;
2461
+ const $metadata = deserializeMetadata(output);
2462
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2543
2463
  response = new SESv2ServiceException_1.SESv2ServiceException({
2544
- name: parsedBody.code || parsedBody.Code || errorCode,
2464
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2545
2465
  $fault: "client",
2546
- $metadata: deserializeMetadata(output),
2466
+ $metadata,
2547
2467
  });
2548
2468
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2549
2469
  }
@@ -2565,8 +2485,7 @@ const deserializeAws_restJson1CreateContactListCommandError = async (output, con
2565
2485
  body: await parseBody(output.body, context),
2566
2486
  };
2567
2487
  let response;
2568
- let errorCode = "UnknownError";
2569
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2488
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2570
2489
  switch (errorCode) {
2571
2490
  case "AlreadyExistsException":
2572
2491
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2582,10 +2501,12 @@ const deserializeAws_restJson1CreateContactListCommandError = async (output, con
2582
2501
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2583
2502
  default:
2584
2503
  const parsedBody = parsedOutput.body;
2504
+ const $metadata = deserializeMetadata(output);
2505
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2585
2506
  response = new SESv2ServiceException_1.SESv2ServiceException({
2586
- name: parsedBody.code || parsedBody.Code || errorCode,
2507
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2587
2508
  $fault: "client",
2588
- $metadata: deserializeMetadata(output),
2509
+ $metadata,
2589
2510
  });
2590
2511
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2591
2512
  }
@@ -2607,8 +2528,7 @@ const deserializeAws_restJson1CreateCustomVerificationEmailTemplateCommandError
2607
2528
  body: await parseBody(output.body, context),
2608
2529
  };
2609
2530
  let response;
2610
- let errorCode = "UnknownError";
2611
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2531
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2612
2532
  switch (errorCode) {
2613
2533
  case "AlreadyExistsException":
2614
2534
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2627,10 +2547,12 @@ const deserializeAws_restJson1CreateCustomVerificationEmailTemplateCommandError
2627
2547
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2628
2548
  default:
2629
2549
  const parsedBody = parsedOutput.body;
2550
+ const $metadata = deserializeMetadata(output);
2551
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2630
2552
  response = new SESv2ServiceException_1.SESv2ServiceException({
2631
- name: parsedBody.code || parsedBody.Code || errorCode,
2553
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2632
2554
  $fault: "client",
2633
- $metadata: deserializeMetadata(output),
2555
+ $metadata,
2634
2556
  });
2635
2557
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2636
2558
  }
@@ -2652,8 +2574,7 @@ const deserializeAws_restJson1CreateDedicatedIpPoolCommandError = async (output,
2652
2574
  body: await parseBody(output.body, context),
2653
2575
  };
2654
2576
  let response;
2655
- let errorCode = "UnknownError";
2656
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2577
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2657
2578
  switch (errorCode) {
2658
2579
  case "AlreadyExistsException":
2659
2580
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2672,10 +2593,12 @@ const deserializeAws_restJson1CreateDedicatedIpPoolCommandError = async (output,
2672
2593
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2673
2594
  default:
2674
2595
  const parsedBody = parsedOutput.body;
2596
+ const $metadata = deserializeMetadata(output);
2597
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2675
2598
  response = new SESv2ServiceException_1.SESv2ServiceException({
2676
- name: parsedBody.code || parsedBody.Code || errorCode,
2599
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2677
2600
  $fault: "client",
2678
- $metadata: deserializeMetadata(output),
2601
+ $metadata,
2679
2602
  });
2680
2603
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2681
2604
  }
@@ -2705,8 +2628,7 @@ const deserializeAws_restJson1CreateDeliverabilityTestReportCommandError = async
2705
2628
  body: await parseBody(output.body, context),
2706
2629
  };
2707
2630
  let response;
2708
- let errorCode = "UnknownError";
2709
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2631
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2710
2632
  switch (errorCode) {
2711
2633
  case "AccountSuspendedException":
2712
2634
  case "com.amazonaws.sesv2#AccountSuspendedException":
@@ -2737,10 +2659,12 @@ const deserializeAws_restJson1CreateDeliverabilityTestReportCommandError = async
2737
2659
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2738
2660
  default:
2739
2661
  const parsedBody = parsedOutput.body;
2662
+ const $metadata = deserializeMetadata(output);
2663
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2740
2664
  response = new SESv2ServiceException_1.SESv2ServiceException({
2741
- name: parsedBody.code || parsedBody.Code || errorCode,
2665
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2742
2666
  $fault: "client",
2743
- $metadata: deserializeMetadata(output),
2667
+ $metadata,
2744
2668
  });
2745
2669
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2746
2670
  }
@@ -2774,8 +2698,7 @@ const deserializeAws_restJson1CreateEmailIdentityCommandError = async (output, c
2774
2698
  body: await parseBody(output.body, context),
2775
2699
  };
2776
2700
  let response;
2777
- let errorCode = "UnknownError";
2778
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2701
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2779
2702
  switch (errorCode) {
2780
2703
  case "AlreadyExistsException":
2781
2704
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2797,10 +2720,12 @@ const deserializeAws_restJson1CreateEmailIdentityCommandError = async (output, c
2797
2720
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2798
2721
  default:
2799
2722
  const parsedBody = parsedOutput.body;
2723
+ const $metadata = deserializeMetadata(output);
2724
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2800
2725
  response = new SESv2ServiceException_1.SESv2ServiceException({
2801
- name: parsedBody.code || parsedBody.Code || errorCode,
2726
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2802
2727
  $fault: "client",
2803
- $metadata: deserializeMetadata(output),
2728
+ $metadata,
2804
2729
  });
2805
2730
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2806
2731
  }
@@ -2822,8 +2747,7 @@ const deserializeAws_restJson1CreateEmailIdentityPolicyCommandError = async (out
2822
2747
  body: await parseBody(output.body, context),
2823
2748
  };
2824
2749
  let response;
2825
- let errorCode = "UnknownError";
2826
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2750
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2827
2751
  switch (errorCode) {
2828
2752
  case "AlreadyExistsException":
2829
2753
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2842,10 +2766,12 @@ const deserializeAws_restJson1CreateEmailIdentityPolicyCommandError = async (out
2842
2766
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2843
2767
  default:
2844
2768
  const parsedBody = parsedOutput.body;
2769
+ const $metadata = deserializeMetadata(output);
2770
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2845
2771
  response = new SESv2ServiceException_1.SESv2ServiceException({
2846
- name: parsedBody.code || parsedBody.Code || errorCode,
2772
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2847
2773
  $fault: "client",
2848
- $metadata: deserializeMetadata(output),
2774
+ $metadata,
2849
2775
  });
2850
2776
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2851
2777
  }
@@ -2867,8 +2793,7 @@ const deserializeAws_restJson1CreateEmailTemplateCommandError = async (output, c
2867
2793
  body: await parseBody(output.body, context),
2868
2794
  };
2869
2795
  let response;
2870
- let errorCode = "UnknownError";
2871
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2796
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2872
2797
  switch (errorCode) {
2873
2798
  case "AlreadyExistsException":
2874
2799
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -2884,10 +2809,12 @@ const deserializeAws_restJson1CreateEmailTemplateCommandError = async (output, c
2884
2809
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2885
2810
  default:
2886
2811
  const parsedBody = parsedOutput.body;
2812
+ const $metadata = deserializeMetadata(output);
2813
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2887
2814
  response = new SESv2ServiceException_1.SESv2ServiceException({
2888
- name: parsedBody.code || parsedBody.Code || errorCode,
2815
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2889
2816
  $fault: "client",
2890
- $metadata: deserializeMetadata(output),
2817
+ $metadata,
2891
2818
  });
2892
2819
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2893
2820
  }
@@ -2913,8 +2840,7 @@ const deserializeAws_restJson1CreateImportJobCommandError = async (output, conte
2913
2840
  body: await parseBody(output.body, context),
2914
2841
  };
2915
2842
  let response;
2916
- let errorCode = "UnknownError";
2917
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2843
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2918
2844
  switch (errorCode) {
2919
2845
  case "BadRequestException":
2920
2846
  case "com.amazonaws.sesv2#BadRequestException":
@@ -2927,10 +2853,12 @@ const deserializeAws_restJson1CreateImportJobCommandError = async (output, conte
2927
2853
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2928
2854
  default:
2929
2855
  const parsedBody = parsedOutput.body;
2856
+ const $metadata = deserializeMetadata(output);
2857
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2930
2858
  response = new SESv2ServiceException_1.SESv2ServiceException({
2931
- name: parsedBody.code || parsedBody.Code || errorCode,
2859
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2932
2860
  $fault: "client",
2933
- $metadata: deserializeMetadata(output),
2861
+ $metadata,
2934
2862
  });
2935
2863
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2936
2864
  }
@@ -2952,8 +2880,7 @@ const deserializeAws_restJson1DeleteConfigurationSetCommandError = async (output
2952
2880
  body: await parseBody(output.body, context),
2953
2881
  };
2954
2882
  let response;
2955
- let errorCode = "UnknownError";
2956
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2883
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2957
2884
  switch (errorCode) {
2958
2885
  case "BadRequestException":
2959
2886
  case "com.amazonaws.sesv2#BadRequestException":
@@ -2969,10 +2896,12 @@ const deserializeAws_restJson1DeleteConfigurationSetCommandError = async (output
2969
2896
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2970
2897
  default:
2971
2898
  const parsedBody = parsedOutput.body;
2899
+ const $metadata = deserializeMetadata(output);
2900
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2972
2901
  response = new SESv2ServiceException_1.SESv2ServiceException({
2973
- name: parsedBody.code || parsedBody.Code || errorCode,
2902
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2974
2903
  $fault: "client",
2975
- $metadata: deserializeMetadata(output),
2904
+ $metadata,
2976
2905
  });
2977
2906
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2978
2907
  }
@@ -2994,8 +2923,7 @@ const deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError
2994
2923
  body: await parseBody(output.body, context),
2995
2924
  };
2996
2925
  let response;
2997
- let errorCode = "UnknownError";
2998
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2926
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2999
2927
  switch (errorCode) {
3000
2928
  case "BadRequestException":
3001
2929
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3008,10 +2936,12 @@ const deserializeAws_restJson1DeleteConfigurationSetEventDestinationCommandError
3008
2936
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3009
2937
  default:
3010
2938
  const parsedBody = parsedOutput.body;
2939
+ const $metadata = deserializeMetadata(output);
2940
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3011
2941
  response = new SESv2ServiceException_1.SESv2ServiceException({
3012
- name: parsedBody.code || parsedBody.Code || errorCode,
2942
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3013
2943
  $fault: "client",
3014
- $metadata: deserializeMetadata(output),
2944
+ $metadata,
3015
2945
  });
3016
2946
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3017
2947
  }
@@ -3033,8 +2963,7 @@ const deserializeAws_restJson1DeleteContactCommandError = async (output, context
3033
2963
  body: await parseBody(output.body, context),
3034
2964
  };
3035
2965
  let response;
3036
- let errorCode = "UnknownError";
3037
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2966
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3038
2967
  switch (errorCode) {
3039
2968
  case "BadRequestException":
3040
2969
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3047,10 +2976,12 @@ const deserializeAws_restJson1DeleteContactCommandError = async (output, context
3047
2976
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3048
2977
  default:
3049
2978
  const parsedBody = parsedOutput.body;
2979
+ const $metadata = deserializeMetadata(output);
2980
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3050
2981
  response = new SESv2ServiceException_1.SESv2ServiceException({
3051
- name: parsedBody.code || parsedBody.Code || errorCode,
2982
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3052
2983
  $fault: "client",
3053
- $metadata: deserializeMetadata(output),
2984
+ $metadata,
3054
2985
  });
3055
2986
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3056
2987
  }
@@ -3072,8 +3003,7 @@ const deserializeAws_restJson1DeleteContactListCommandError = async (output, con
3072
3003
  body: await parseBody(output.body, context),
3073
3004
  };
3074
3005
  let response;
3075
- let errorCode = "UnknownError";
3076
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3006
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3077
3007
  switch (errorCode) {
3078
3008
  case "BadRequestException":
3079
3009
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3089,10 +3019,12 @@ const deserializeAws_restJson1DeleteContactListCommandError = async (output, con
3089
3019
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3090
3020
  default:
3091
3021
  const parsedBody = parsedOutput.body;
3022
+ const $metadata = deserializeMetadata(output);
3023
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3092
3024
  response = new SESv2ServiceException_1.SESv2ServiceException({
3093
- name: parsedBody.code || parsedBody.Code || errorCode,
3025
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3094
3026
  $fault: "client",
3095
- $metadata: deserializeMetadata(output),
3027
+ $metadata,
3096
3028
  });
3097
3029
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3098
3030
  }
@@ -3114,8 +3046,7 @@ const deserializeAws_restJson1DeleteCustomVerificationEmailTemplateCommandError
3114
3046
  body: await parseBody(output.body, context),
3115
3047
  };
3116
3048
  let response;
3117
- let errorCode = "UnknownError";
3118
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3049
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3119
3050
  switch (errorCode) {
3120
3051
  case "BadRequestException":
3121
3052
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3128,10 +3059,12 @@ const deserializeAws_restJson1DeleteCustomVerificationEmailTemplateCommandError
3128
3059
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3129
3060
  default:
3130
3061
  const parsedBody = parsedOutput.body;
3062
+ const $metadata = deserializeMetadata(output);
3063
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3131
3064
  response = new SESv2ServiceException_1.SESv2ServiceException({
3132
- name: parsedBody.code || parsedBody.Code || errorCode,
3065
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3133
3066
  $fault: "client",
3134
- $metadata: deserializeMetadata(output),
3067
+ $metadata,
3135
3068
  });
3136
3069
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3137
3070
  }
@@ -3153,8 +3086,7 @@ const deserializeAws_restJson1DeleteDedicatedIpPoolCommandError = async (output,
3153
3086
  body: await parseBody(output.body, context),
3154
3087
  };
3155
3088
  let response;
3156
- let errorCode = "UnknownError";
3157
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3089
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3158
3090
  switch (errorCode) {
3159
3091
  case "BadRequestException":
3160
3092
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3170,10 +3102,12 @@ const deserializeAws_restJson1DeleteDedicatedIpPoolCommandError = async (output,
3170
3102
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3171
3103
  default:
3172
3104
  const parsedBody = parsedOutput.body;
3105
+ const $metadata = deserializeMetadata(output);
3106
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3173
3107
  response = new SESv2ServiceException_1.SESv2ServiceException({
3174
- name: parsedBody.code || parsedBody.Code || errorCode,
3108
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3175
3109
  $fault: "client",
3176
- $metadata: deserializeMetadata(output),
3110
+ $metadata,
3177
3111
  });
3178
3112
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3179
3113
  }
@@ -3195,8 +3129,7 @@ const deserializeAws_restJson1DeleteEmailIdentityCommandError = async (output, c
3195
3129
  body: await parseBody(output.body, context),
3196
3130
  };
3197
3131
  let response;
3198
- let errorCode = "UnknownError";
3199
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3132
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3200
3133
  switch (errorCode) {
3201
3134
  case "BadRequestException":
3202
3135
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3212,10 +3145,12 @@ const deserializeAws_restJson1DeleteEmailIdentityCommandError = async (output, c
3212
3145
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3213
3146
  default:
3214
3147
  const parsedBody = parsedOutput.body;
3148
+ const $metadata = deserializeMetadata(output);
3149
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3215
3150
  response = new SESv2ServiceException_1.SESv2ServiceException({
3216
- name: parsedBody.code || parsedBody.Code || errorCode,
3151
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3217
3152
  $fault: "client",
3218
- $metadata: deserializeMetadata(output),
3153
+ $metadata,
3219
3154
  });
3220
3155
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3221
3156
  }
@@ -3237,8 +3172,7 @@ const deserializeAws_restJson1DeleteEmailIdentityPolicyCommandError = async (out
3237
3172
  body: await parseBody(output.body, context),
3238
3173
  };
3239
3174
  let response;
3240
- let errorCode = "UnknownError";
3241
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3175
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3242
3176
  switch (errorCode) {
3243
3177
  case "BadRequestException":
3244
3178
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3251,10 +3185,12 @@ const deserializeAws_restJson1DeleteEmailIdentityPolicyCommandError = async (out
3251
3185
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3252
3186
  default:
3253
3187
  const parsedBody = parsedOutput.body;
3188
+ const $metadata = deserializeMetadata(output);
3189
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3254
3190
  response = new SESv2ServiceException_1.SESv2ServiceException({
3255
- name: parsedBody.code || parsedBody.Code || errorCode,
3191
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3256
3192
  $fault: "client",
3257
- $metadata: deserializeMetadata(output),
3193
+ $metadata,
3258
3194
  });
3259
3195
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3260
3196
  }
@@ -3276,8 +3212,7 @@ const deserializeAws_restJson1DeleteEmailTemplateCommandError = async (output, c
3276
3212
  body: await parseBody(output.body, context),
3277
3213
  };
3278
3214
  let response;
3279
- let errorCode = "UnknownError";
3280
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3215
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3281
3216
  switch (errorCode) {
3282
3217
  case "BadRequestException":
3283
3218
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3290,10 +3225,12 @@ const deserializeAws_restJson1DeleteEmailTemplateCommandError = async (output, c
3290
3225
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3291
3226
  default:
3292
3227
  const parsedBody = parsedOutput.body;
3228
+ const $metadata = deserializeMetadata(output);
3229
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3293
3230
  response = new SESv2ServiceException_1.SESv2ServiceException({
3294
- name: parsedBody.code || parsedBody.Code || errorCode,
3231
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3295
3232
  $fault: "client",
3296
- $metadata: deserializeMetadata(output),
3233
+ $metadata,
3297
3234
  });
3298
3235
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3299
3236
  }
@@ -3315,8 +3252,7 @@ const deserializeAws_restJson1DeleteSuppressedDestinationCommandError = async (o
3315
3252
  body: await parseBody(output.body, context),
3316
3253
  };
3317
3254
  let response;
3318
- let errorCode = "UnknownError";
3319
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3255
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3320
3256
  switch (errorCode) {
3321
3257
  case "BadRequestException":
3322
3258
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3329,10 +3265,12 @@ const deserializeAws_restJson1DeleteSuppressedDestinationCommandError = async (o
3329
3265
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3330
3266
  default:
3331
3267
  const parsedBody = parsedOutput.body;
3268
+ const $metadata = deserializeMetadata(output);
3269
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3332
3270
  response = new SESv2ServiceException_1.SESv2ServiceException({
3333
- name: parsedBody.code || parsedBody.Code || errorCode,
3271
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3334
3272
  $fault: "client",
3335
- $metadata: deserializeMetadata(output),
3273
+ $metadata,
3336
3274
  });
3337
3275
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3338
3276
  }
@@ -3382,8 +3320,7 @@ const deserializeAws_restJson1GetAccountCommandError = async (output, context) =
3382
3320
  body: await parseBody(output.body, context),
3383
3321
  };
3384
3322
  let response;
3385
- let errorCode = "UnknownError";
3386
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3323
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3387
3324
  switch (errorCode) {
3388
3325
  case "BadRequestException":
3389
3326
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3393,10 +3330,12 @@ const deserializeAws_restJson1GetAccountCommandError = async (output, context) =
3393
3330
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3394
3331
  default:
3395
3332
  const parsedBody = parsedOutput.body;
3333
+ const $metadata = deserializeMetadata(output);
3334
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3396
3335
  response = new SESv2ServiceException_1.SESv2ServiceException({
3397
- name: parsedBody.code || parsedBody.Code || errorCode,
3336
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3398
3337
  $fault: "client",
3399
- $metadata: deserializeMetadata(output),
3338
+ $metadata,
3400
3339
  });
3401
3340
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3402
3341
  }
@@ -3422,8 +3361,7 @@ const deserializeAws_restJson1GetBlacklistReportsCommandError = async (output, c
3422
3361
  body: await parseBody(output.body, context),
3423
3362
  };
3424
3363
  let response;
3425
- let errorCode = "UnknownError";
3426
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3364
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3427
3365
  switch (errorCode) {
3428
3366
  case "BadRequestException":
3429
3367
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3436,10 +3374,12 @@ const deserializeAws_restJson1GetBlacklistReportsCommandError = async (output, c
3436
3374
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3437
3375
  default:
3438
3376
  const parsedBody = parsedOutput.body;
3377
+ const $metadata = deserializeMetadata(output);
3378
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3439
3379
  response = new SESv2ServiceException_1.SESv2ServiceException({
3440
- name: parsedBody.code || parsedBody.Code || errorCode,
3380
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3441
3381
  $fault: "client",
3442
- $metadata: deserializeMetadata(output),
3382
+ $metadata,
3443
3383
  });
3444
3384
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3445
3385
  }
@@ -3489,8 +3429,7 @@ const deserializeAws_restJson1GetConfigurationSetCommandError = async (output, c
3489
3429
  body: await parseBody(output.body, context),
3490
3430
  };
3491
3431
  let response;
3492
- let errorCode = "UnknownError";
3493
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3432
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3494
3433
  switch (errorCode) {
3495
3434
  case "BadRequestException":
3496
3435
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3503,10 +3442,12 @@ const deserializeAws_restJson1GetConfigurationSetCommandError = async (output, c
3503
3442
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3504
3443
  default:
3505
3444
  const parsedBody = parsedOutput.body;
3445
+ const $metadata = deserializeMetadata(output);
3446
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3506
3447
  response = new SESv2ServiceException_1.SESv2ServiceException({
3507
- name: parsedBody.code || parsedBody.Code || errorCode,
3448
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3508
3449
  $fault: "client",
3509
- $metadata: deserializeMetadata(output),
3450
+ $metadata,
3510
3451
  });
3511
3452
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3512
3453
  }
@@ -3532,8 +3473,7 @@ const deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError =
3532
3473
  body: await parseBody(output.body, context),
3533
3474
  };
3534
3475
  let response;
3535
- let errorCode = "UnknownError";
3536
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3476
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3537
3477
  switch (errorCode) {
3538
3478
  case "BadRequestException":
3539
3479
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3546,10 +3486,12 @@ const deserializeAws_restJson1GetConfigurationSetEventDestinationsCommandError =
3546
3486
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3547
3487
  default:
3548
3488
  const parsedBody = parsedOutput.body;
3489
+ const $metadata = deserializeMetadata(output);
3490
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3549
3491
  response = new SESv2ServiceException_1.SESv2ServiceException({
3550
- name: parsedBody.code || parsedBody.Code || errorCode,
3492
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3551
3493
  $fault: "client",
3552
- $metadata: deserializeMetadata(output),
3494
+ $metadata,
3553
3495
  });
3554
3496
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3555
3497
  }
@@ -3603,8 +3545,7 @@ const deserializeAws_restJson1GetContactCommandError = async (output, context) =
3603
3545
  body: await parseBody(output.body, context),
3604
3546
  };
3605
3547
  let response;
3606
- let errorCode = "UnknownError";
3607
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3548
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3608
3549
  switch (errorCode) {
3609
3550
  case "BadRequestException":
3610
3551
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3617,10 +3558,12 @@ const deserializeAws_restJson1GetContactCommandError = async (output, context) =
3617
3558
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3618
3559
  default:
3619
3560
  const parsedBody = parsedOutput.body;
3561
+ const $metadata = deserializeMetadata(output);
3562
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3620
3563
  response = new SESv2ServiceException_1.SESv2ServiceException({
3621
- name: parsedBody.code || parsedBody.Code || errorCode,
3564
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3622
3565
  $fault: "client",
3623
- $metadata: deserializeMetadata(output),
3566
+ $metadata,
3624
3567
  });
3625
3568
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3626
3569
  }
@@ -3666,8 +3609,7 @@ const deserializeAws_restJson1GetContactListCommandError = async (output, contex
3666
3609
  body: await parseBody(output.body, context),
3667
3610
  };
3668
3611
  let response;
3669
- let errorCode = "UnknownError";
3670
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3612
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3671
3613
  switch (errorCode) {
3672
3614
  case "BadRequestException":
3673
3615
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3680,10 +3622,12 @@ const deserializeAws_restJson1GetContactListCommandError = async (output, contex
3680
3622
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3681
3623
  default:
3682
3624
  const parsedBody = parsedOutput.body;
3625
+ const $metadata = deserializeMetadata(output);
3626
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3683
3627
  response = new SESv2ServiceException_1.SESv2ServiceException({
3684
- name: parsedBody.code || parsedBody.Code || errorCode,
3628
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3685
3629
  $fault: "client",
3686
- $metadata: deserializeMetadata(output),
3630
+ $metadata,
3687
3631
  });
3688
3632
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3689
3633
  }
@@ -3729,8 +3673,7 @@ const deserializeAws_restJson1GetCustomVerificationEmailTemplateCommandError = a
3729
3673
  body: await parseBody(output.body, context),
3730
3674
  };
3731
3675
  let response;
3732
- let errorCode = "UnknownError";
3733
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3676
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3734
3677
  switch (errorCode) {
3735
3678
  case "BadRequestException":
3736
3679
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3743,10 +3686,12 @@ const deserializeAws_restJson1GetCustomVerificationEmailTemplateCommandError = a
3743
3686
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3744
3687
  default:
3745
3688
  const parsedBody = parsedOutput.body;
3689
+ const $metadata = deserializeMetadata(output);
3690
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3746
3691
  response = new SESv2ServiceException_1.SESv2ServiceException({
3747
- name: parsedBody.code || parsedBody.Code || errorCode,
3692
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3748
3693
  $fault: "client",
3749
- $metadata: deserializeMetadata(output),
3694
+ $metadata,
3750
3695
  });
3751
3696
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3752
3697
  }
@@ -3772,8 +3717,7 @@ const deserializeAws_restJson1GetDedicatedIpCommandError = async (output, contex
3772
3717
  body: await parseBody(output.body, context),
3773
3718
  };
3774
3719
  let response;
3775
- let errorCode = "UnknownError";
3776
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3720
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3777
3721
  switch (errorCode) {
3778
3722
  case "BadRequestException":
3779
3723
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3786,10 +3730,12 @@ const deserializeAws_restJson1GetDedicatedIpCommandError = async (output, contex
3786
3730
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3787
3731
  default:
3788
3732
  const parsedBody = parsedOutput.body;
3733
+ const $metadata = deserializeMetadata(output);
3734
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3789
3735
  response = new SESv2ServiceException_1.SESv2ServiceException({
3790
- name: parsedBody.code || parsedBody.Code || errorCode,
3736
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3791
3737
  $fault: "client",
3792
- $metadata: deserializeMetadata(output),
3738
+ $metadata,
3793
3739
  });
3794
3740
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3795
3741
  }
@@ -3819,8 +3765,7 @@ const deserializeAws_restJson1GetDedicatedIpsCommandError = async (output, conte
3819
3765
  body: await parseBody(output.body, context),
3820
3766
  };
3821
3767
  let response;
3822
- let errorCode = "UnknownError";
3823
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3768
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3824
3769
  switch (errorCode) {
3825
3770
  case "BadRequestException":
3826
3771
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3833,10 +3778,12 @@ const deserializeAws_restJson1GetDedicatedIpsCommandError = async (output, conte
3833
3778
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3834
3779
  default:
3835
3780
  const parsedBody = parsedOutput.body;
3781
+ const $metadata = deserializeMetadata(output);
3782
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3836
3783
  response = new SESv2ServiceException_1.SESv2ServiceException({
3837
- name: parsedBody.code || parsedBody.Code || errorCode,
3784
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3838
3785
  $fault: "client",
3839
- $metadata: deserializeMetadata(output),
3786
+ $metadata,
3840
3787
  });
3841
3788
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3842
3789
  }
@@ -3878,8 +3825,7 @@ const deserializeAws_restJson1GetDeliverabilityDashboardOptionsCommandError = as
3878
3825
  body: await parseBody(output.body, context),
3879
3826
  };
3880
3827
  let response;
3881
- let errorCode = "UnknownError";
3882
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3828
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3883
3829
  switch (errorCode) {
3884
3830
  case "BadRequestException":
3885
3831
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3892,10 +3838,12 @@ const deserializeAws_restJson1GetDeliverabilityDashboardOptionsCommandError = as
3892
3838
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3893
3839
  default:
3894
3840
  const parsedBody = parsedOutput.body;
3841
+ const $metadata = deserializeMetadata(output);
3842
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3895
3843
  response = new SESv2ServiceException_1.SESv2ServiceException({
3896
- name: parsedBody.code || parsedBody.Code || errorCode,
3844
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3897
3845
  $fault: "client",
3898
- $metadata: deserializeMetadata(output),
3846
+ $metadata,
3899
3847
  });
3900
3848
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3901
3849
  }
@@ -3937,8 +3885,7 @@ const deserializeAws_restJson1GetDeliverabilityTestReportCommandError = async (o
3937
3885
  body: await parseBody(output.body, context),
3938
3886
  };
3939
3887
  let response;
3940
- let errorCode = "UnknownError";
3941
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3888
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3942
3889
  switch (errorCode) {
3943
3890
  case "BadRequestException":
3944
3891
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3951,10 +3898,12 @@ const deserializeAws_restJson1GetDeliverabilityTestReportCommandError = async (o
3951
3898
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3952
3899
  default:
3953
3900
  const parsedBody = parsedOutput.body;
3901
+ const $metadata = deserializeMetadata(output);
3902
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3954
3903
  response = new SESv2ServiceException_1.SESv2ServiceException({
3955
- name: parsedBody.code || parsedBody.Code || errorCode,
3904
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3956
3905
  $fault: "client",
3957
- $metadata: deserializeMetadata(output),
3906
+ $metadata,
3958
3907
  });
3959
3908
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3960
3909
  }
@@ -3980,8 +3929,7 @@ const deserializeAws_restJson1GetDomainDeliverabilityCampaignCommandError = asyn
3980
3929
  body: await parseBody(output.body, context),
3981
3930
  };
3982
3931
  let response;
3983
- let errorCode = "UnknownError";
3984
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3932
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3985
3933
  switch (errorCode) {
3986
3934
  case "BadRequestException":
3987
3935
  case "com.amazonaws.sesv2#BadRequestException":
@@ -3994,10 +3942,12 @@ const deserializeAws_restJson1GetDomainDeliverabilityCampaignCommandError = asyn
3994
3942
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3995
3943
  default:
3996
3944
  const parsedBody = parsedOutput.body;
3945
+ const $metadata = deserializeMetadata(output);
3946
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3997
3947
  response = new SESv2ServiceException_1.SESv2ServiceException({
3998
- name: parsedBody.code || parsedBody.Code || errorCode,
3948
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3999
3949
  $fault: "client",
4000
- $metadata: deserializeMetadata(output),
3950
+ $metadata,
4001
3951
  });
4002
3952
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4003
3953
  }
@@ -4027,8 +3977,7 @@ const deserializeAws_restJson1GetDomainStatisticsReportCommandError = async (out
4027
3977
  body: await parseBody(output.body, context),
4028
3978
  };
4029
3979
  let response;
4030
- let errorCode = "UnknownError";
4031
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3980
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4032
3981
  switch (errorCode) {
4033
3982
  case "BadRequestException":
4034
3983
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4041,10 +3990,12 @@ const deserializeAws_restJson1GetDomainStatisticsReportCommandError = async (out
4041
3990
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4042
3991
  default:
4043
3992
  const parsedBody = parsedOutput.body;
3993
+ const $metadata = deserializeMetadata(output);
3994
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4044
3995
  response = new SESv2ServiceException_1.SESv2ServiceException({
4045
- name: parsedBody.code || parsedBody.Code || errorCode,
3996
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4046
3997
  $fault: "client",
4047
- $metadata: deserializeMetadata(output),
3998
+ $metadata,
4048
3999
  });
4049
4000
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4050
4001
  }
@@ -4098,8 +4049,7 @@ const deserializeAws_restJson1GetEmailIdentityCommandError = async (output, cont
4098
4049
  body: await parseBody(output.body, context),
4099
4050
  };
4100
4051
  let response;
4101
- let errorCode = "UnknownError";
4102
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4052
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4103
4053
  switch (errorCode) {
4104
4054
  case "BadRequestException":
4105
4055
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4112,10 +4062,12 @@ const deserializeAws_restJson1GetEmailIdentityCommandError = async (output, cont
4112
4062
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4113
4063
  default:
4114
4064
  const parsedBody = parsedOutput.body;
4065
+ const $metadata = deserializeMetadata(output);
4066
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4115
4067
  response = new SESv2ServiceException_1.SESv2ServiceException({
4116
- name: parsedBody.code || parsedBody.Code || errorCode,
4068
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4117
4069
  $fault: "client",
4118
- $metadata: deserializeMetadata(output),
4070
+ $metadata,
4119
4071
  });
4120
4072
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4121
4073
  }
@@ -4141,8 +4093,7 @@ const deserializeAws_restJson1GetEmailIdentityPoliciesCommandError = async (outp
4141
4093
  body: await parseBody(output.body, context),
4142
4094
  };
4143
4095
  let response;
4144
- let errorCode = "UnknownError";
4145
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4096
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4146
4097
  switch (errorCode) {
4147
4098
  case "BadRequestException":
4148
4099
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4155,10 +4106,12 @@ const deserializeAws_restJson1GetEmailIdentityPoliciesCommandError = async (outp
4155
4106
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4156
4107
  default:
4157
4108
  const parsedBody = parsedOutput.body;
4109
+ const $metadata = deserializeMetadata(output);
4110
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4158
4111
  response = new SESv2ServiceException_1.SESv2ServiceException({
4159
- name: parsedBody.code || parsedBody.Code || errorCode,
4112
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4160
4113
  $fault: "client",
4161
- $metadata: deserializeMetadata(output),
4114
+ $metadata,
4162
4115
  });
4163
4116
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4164
4117
  }
@@ -4188,8 +4141,7 @@ const deserializeAws_restJson1GetEmailTemplateCommandError = async (output, cont
4188
4141
  body: await parseBody(output.body, context),
4189
4142
  };
4190
4143
  let response;
4191
- let errorCode = "UnknownError";
4192
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4144
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4193
4145
  switch (errorCode) {
4194
4146
  case "BadRequestException":
4195
4147
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4202,10 +4154,12 @@ const deserializeAws_restJson1GetEmailTemplateCommandError = async (output, cont
4202
4154
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4203
4155
  default:
4204
4156
  const parsedBody = parsedOutput.body;
4157
+ const $metadata = deserializeMetadata(output);
4158
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4205
4159
  response = new SESv2ServiceException_1.SESv2ServiceException({
4206
- name: parsedBody.code || parsedBody.Code || errorCode,
4160
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4207
4161
  $fault: "client",
4208
- $metadata: deserializeMetadata(output),
4162
+ $metadata,
4209
4163
  });
4210
4164
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4211
4165
  }
@@ -4263,8 +4217,7 @@ const deserializeAws_restJson1GetImportJobCommandError = async (output, context)
4263
4217
  body: await parseBody(output.body, context),
4264
4218
  };
4265
4219
  let response;
4266
- let errorCode = "UnknownError";
4267
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4220
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4268
4221
  switch (errorCode) {
4269
4222
  case "BadRequestException":
4270
4223
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4277,10 +4230,12 @@ const deserializeAws_restJson1GetImportJobCommandError = async (output, context)
4277
4230
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4278
4231
  default:
4279
4232
  const parsedBody = parsedOutput.body;
4233
+ const $metadata = deserializeMetadata(output);
4234
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4280
4235
  response = new SESv2ServiceException_1.SESv2ServiceException({
4281
- name: parsedBody.code || parsedBody.Code || errorCode,
4236
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4282
4237
  $fault: "client",
4283
- $metadata: deserializeMetadata(output),
4238
+ $metadata,
4284
4239
  });
4285
4240
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4286
4241
  }
@@ -4306,8 +4261,7 @@ const deserializeAws_restJson1GetSuppressedDestinationCommandError = async (outp
4306
4261
  body: await parseBody(output.body, context),
4307
4262
  };
4308
4263
  let response;
4309
- let errorCode = "UnknownError";
4310
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4264
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4311
4265
  switch (errorCode) {
4312
4266
  case "BadRequestException":
4313
4267
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4320,10 +4274,12 @@ const deserializeAws_restJson1GetSuppressedDestinationCommandError = async (outp
4320
4274
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4321
4275
  default:
4322
4276
  const parsedBody = parsedOutput.body;
4277
+ const $metadata = deserializeMetadata(output);
4278
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4323
4279
  response = new SESv2ServiceException_1.SESv2ServiceException({
4324
- name: parsedBody.code || parsedBody.Code || errorCode,
4280
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4325
4281
  $fault: "client",
4326
- $metadata: deserializeMetadata(output),
4282
+ $metadata,
4327
4283
  });
4328
4284
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4329
4285
  }
@@ -4353,8 +4309,7 @@ const deserializeAws_restJson1ListConfigurationSetsCommandError = async (output,
4353
4309
  body: await parseBody(output.body, context),
4354
4310
  };
4355
4311
  let response;
4356
- let errorCode = "UnknownError";
4357
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4312
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4358
4313
  switch (errorCode) {
4359
4314
  case "BadRequestException":
4360
4315
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4364,10 +4319,12 @@ const deserializeAws_restJson1ListConfigurationSetsCommandError = async (output,
4364
4319
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4365
4320
  default:
4366
4321
  const parsedBody = parsedOutput.body;
4322
+ const $metadata = deserializeMetadata(output);
4323
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4367
4324
  response = new SESv2ServiceException_1.SESv2ServiceException({
4368
- name: parsedBody.code || parsedBody.Code || errorCode,
4325
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4369
4326
  $fault: "client",
4370
- $metadata: deserializeMetadata(output),
4327
+ $metadata,
4371
4328
  });
4372
4329
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4373
4330
  }
@@ -4397,8 +4354,7 @@ const deserializeAws_restJson1ListContactListsCommandError = async (output, cont
4397
4354
  body: await parseBody(output.body, context),
4398
4355
  };
4399
4356
  let response;
4400
- let errorCode = "UnknownError";
4401
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4357
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4402
4358
  switch (errorCode) {
4403
4359
  case "BadRequestException":
4404
4360
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4408,10 +4364,12 @@ const deserializeAws_restJson1ListContactListsCommandError = async (output, cont
4408
4364
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4409
4365
  default:
4410
4366
  const parsedBody = parsedOutput.body;
4367
+ const $metadata = deserializeMetadata(output);
4368
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4411
4369
  response = new SESv2ServiceException_1.SESv2ServiceException({
4412
- name: parsedBody.code || parsedBody.Code || errorCode,
4370
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4413
4371
  $fault: "client",
4414
- $metadata: deserializeMetadata(output),
4372
+ $metadata,
4415
4373
  });
4416
4374
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4417
4375
  }
@@ -4441,8 +4399,7 @@ const deserializeAws_restJson1ListContactsCommandError = async (output, context)
4441
4399
  body: await parseBody(output.body, context),
4442
4400
  };
4443
4401
  let response;
4444
- let errorCode = "UnknownError";
4445
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4402
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4446
4403
  switch (errorCode) {
4447
4404
  case "BadRequestException":
4448
4405
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4455,10 +4412,12 @@ const deserializeAws_restJson1ListContactsCommandError = async (output, context)
4455
4412
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4456
4413
  default:
4457
4414
  const parsedBody = parsedOutput.body;
4415
+ const $metadata = deserializeMetadata(output);
4416
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4458
4417
  response = new SESv2ServiceException_1.SESv2ServiceException({
4459
- name: parsedBody.code || parsedBody.Code || errorCode,
4418
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4460
4419
  $fault: "client",
4461
- $metadata: deserializeMetadata(output),
4420
+ $metadata,
4462
4421
  });
4463
4422
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4464
4423
  }
@@ -4488,8 +4447,7 @@ const deserializeAws_restJson1ListCustomVerificationEmailTemplatesCommandError =
4488
4447
  body: await parseBody(output.body, context),
4489
4448
  };
4490
4449
  let response;
4491
- let errorCode = "UnknownError";
4492
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4450
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4493
4451
  switch (errorCode) {
4494
4452
  case "BadRequestException":
4495
4453
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4499,10 +4457,12 @@ const deserializeAws_restJson1ListCustomVerificationEmailTemplatesCommandError =
4499
4457
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4500
4458
  default:
4501
4459
  const parsedBody = parsedOutput.body;
4460
+ const $metadata = deserializeMetadata(output);
4461
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4502
4462
  response = new SESv2ServiceException_1.SESv2ServiceException({
4503
- name: parsedBody.code || parsedBody.Code || errorCode,
4463
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4504
4464
  $fault: "client",
4505
- $metadata: deserializeMetadata(output),
4465
+ $metadata,
4506
4466
  });
4507
4467
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4508
4468
  }
@@ -4532,8 +4492,7 @@ const deserializeAws_restJson1ListDedicatedIpPoolsCommandError = async (output,
4532
4492
  body: await parseBody(output.body, context),
4533
4493
  };
4534
4494
  let response;
4535
- let errorCode = "UnknownError";
4536
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4495
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4537
4496
  switch (errorCode) {
4538
4497
  case "BadRequestException":
4539
4498
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4543,10 +4502,12 @@ const deserializeAws_restJson1ListDedicatedIpPoolsCommandError = async (output,
4543
4502
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4544
4503
  default:
4545
4504
  const parsedBody = parsedOutput.body;
4505
+ const $metadata = deserializeMetadata(output);
4506
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4546
4507
  response = new SESv2ServiceException_1.SESv2ServiceException({
4547
- name: parsedBody.code || parsedBody.Code || errorCode,
4508
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4548
4509
  $fault: "client",
4549
- $metadata: deserializeMetadata(output),
4510
+ $metadata,
4550
4511
  });
4551
4512
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4552
4513
  }
@@ -4576,8 +4537,7 @@ const deserializeAws_restJson1ListDeliverabilityTestReportsCommandError = async
4576
4537
  body: await parseBody(output.body, context),
4577
4538
  };
4578
4539
  let response;
4579
- let errorCode = "UnknownError";
4580
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4540
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4581
4541
  switch (errorCode) {
4582
4542
  case "BadRequestException":
4583
4543
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4590,10 +4550,12 @@ const deserializeAws_restJson1ListDeliverabilityTestReportsCommandError = async
4590
4550
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4591
4551
  default:
4592
4552
  const parsedBody = parsedOutput.body;
4553
+ const $metadata = deserializeMetadata(output);
4554
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4593
4555
  response = new SESv2ServiceException_1.SESv2ServiceException({
4594
- name: parsedBody.code || parsedBody.Code || errorCode,
4556
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4595
4557
  $fault: "client",
4596
- $metadata: deserializeMetadata(output),
4558
+ $metadata,
4597
4559
  });
4598
4560
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4599
4561
  }
@@ -4623,8 +4585,7 @@ const deserializeAws_restJson1ListDomainDeliverabilityCampaignsCommandError = as
4623
4585
  body: await parseBody(output.body, context),
4624
4586
  };
4625
4587
  let response;
4626
- let errorCode = "UnknownError";
4627
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4588
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4628
4589
  switch (errorCode) {
4629
4590
  case "BadRequestException":
4630
4591
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4637,10 +4598,12 @@ const deserializeAws_restJson1ListDomainDeliverabilityCampaignsCommandError = as
4637
4598
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4638
4599
  default:
4639
4600
  const parsedBody = parsedOutput.body;
4601
+ const $metadata = deserializeMetadata(output);
4602
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4640
4603
  response = new SESv2ServiceException_1.SESv2ServiceException({
4641
- name: parsedBody.code || parsedBody.Code || errorCode,
4604
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4642
4605
  $fault: "client",
4643
- $metadata: deserializeMetadata(output),
4606
+ $metadata,
4644
4607
  });
4645
4608
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4646
4609
  }
@@ -4670,8 +4633,7 @@ const deserializeAws_restJson1ListEmailIdentitiesCommandError = async (output, c
4670
4633
  body: await parseBody(output.body, context),
4671
4634
  };
4672
4635
  let response;
4673
- let errorCode = "UnknownError";
4674
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4636
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4675
4637
  switch (errorCode) {
4676
4638
  case "BadRequestException":
4677
4639
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4681,10 +4643,12 @@ const deserializeAws_restJson1ListEmailIdentitiesCommandError = async (output, c
4681
4643
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4682
4644
  default:
4683
4645
  const parsedBody = parsedOutput.body;
4646
+ const $metadata = deserializeMetadata(output);
4647
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4684
4648
  response = new SESv2ServiceException_1.SESv2ServiceException({
4685
- name: parsedBody.code || parsedBody.Code || errorCode,
4649
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4686
4650
  $fault: "client",
4687
- $metadata: deserializeMetadata(output),
4651
+ $metadata,
4688
4652
  });
4689
4653
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4690
4654
  }
@@ -4714,8 +4678,7 @@ const deserializeAws_restJson1ListEmailTemplatesCommandError = async (output, co
4714
4678
  body: await parseBody(output.body, context),
4715
4679
  };
4716
4680
  let response;
4717
- let errorCode = "UnknownError";
4718
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4681
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4719
4682
  switch (errorCode) {
4720
4683
  case "BadRequestException":
4721
4684
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4725,10 +4688,12 @@ const deserializeAws_restJson1ListEmailTemplatesCommandError = async (output, co
4725
4688
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4726
4689
  default:
4727
4690
  const parsedBody = parsedOutput.body;
4691
+ const $metadata = deserializeMetadata(output);
4692
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4728
4693
  response = new SESv2ServiceException_1.SESv2ServiceException({
4729
- name: parsedBody.code || parsedBody.Code || errorCode,
4694
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4730
4695
  $fault: "client",
4731
- $metadata: deserializeMetadata(output),
4696
+ $metadata,
4732
4697
  });
4733
4698
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4734
4699
  }
@@ -4758,8 +4723,7 @@ const deserializeAws_restJson1ListImportJobsCommandError = async (output, contex
4758
4723
  body: await parseBody(output.body, context),
4759
4724
  };
4760
4725
  let response;
4761
- let errorCode = "UnknownError";
4762
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4726
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4763
4727
  switch (errorCode) {
4764
4728
  case "BadRequestException":
4765
4729
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4769,10 +4733,12 @@ const deserializeAws_restJson1ListImportJobsCommandError = async (output, contex
4769
4733
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4770
4734
  default:
4771
4735
  const parsedBody = parsedOutput.body;
4736
+ const $metadata = deserializeMetadata(output);
4737
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4772
4738
  response = new SESv2ServiceException_1.SESv2ServiceException({
4773
- name: parsedBody.code || parsedBody.Code || errorCode,
4739
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4774
4740
  $fault: "client",
4775
- $metadata: deserializeMetadata(output),
4741
+ $metadata,
4776
4742
  });
4777
4743
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4778
4744
  }
@@ -4802,8 +4768,7 @@ const deserializeAws_restJson1ListSuppressedDestinationsCommandError = async (ou
4802
4768
  body: await parseBody(output.body, context),
4803
4769
  };
4804
4770
  let response;
4805
- let errorCode = "UnknownError";
4806
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4771
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4807
4772
  switch (errorCode) {
4808
4773
  case "BadRequestException":
4809
4774
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4816,10 +4781,12 @@ const deserializeAws_restJson1ListSuppressedDestinationsCommandError = async (ou
4816
4781
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4817
4782
  default:
4818
4783
  const parsedBody = parsedOutput.body;
4784
+ const $metadata = deserializeMetadata(output);
4785
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4819
4786
  response = new SESv2ServiceException_1.SESv2ServiceException({
4820
- name: parsedBody.code || parsedBody.Code || errorCode,
4787
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4821
4788
  $fault: "client",
4822
- $metadata: deserializeMetadata(output),
4789
+ $metadata,
4823
4790
  });
4824
4791
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4825
4792
  }
@@ -4845,8 +4812,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
4845
4812
  body: await parseBody(output.body, context),
4846
4813
  };
4847
4814
  let response;
4848
- let errorCode = "UnknownError";
4849
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4815
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4850
4816
  switch (errorCode) {
4851
4817
  case "BadRequestException":
4852
4818
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4859,10 +4825,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
4859
4825
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4860
4826
  default:
4861
4827
  const parsedBody = parsedOutput.body;
4828
+ const $metadata = deserializeMetadata(output);
4829
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4862
4830
  response = new SESv2ServiceException_1.SESv2ServiceException({
4863
- name: parsedBody.code || parsedBody.Code || errorCode,
4831
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4864
4832
  $fault: "client",
4865
- $metadata: deserializeMetadata(output),
4833
+ $metadata,
4866
4834
  });
4867
4835
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4868
4836
  }
@@ -4884,8 +4852,7 @@ const deserializeAws_restJson1PutAccountDedicatedIpWarmupAttributesCommandError
4884
4852
  body: await parseBody(output.body, context),
4885
4853
  };
4886
4854
  let response;
4887
- let errorCode = "UnknownError";
4888
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4855
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4889
4856
  switch (errorCode) {
4890
4857
  case "BadRequestException":
4891
4858
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4895,10 +4862,12 @@ const deserializeAws_restJson1PutAccountDedicatedIpWarmupAttributesCommandError
4895
4862
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4896
4863
  default:
4897
4864
  const parsedBody = parsedOutput.body;
4865
+ const $metadata = deserializeMetadata(output);
4866
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4898
4867
  response = new SESv2ServiceException_1.SESv2ServiceException({
4899
- name: parsedBody.code || parsedBody.Code || errorCode,
4868
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4900
4869
  $fault: "client",
4901
- $metadata: deserializeMetadata(output),
4870
+ $metadata,
4902
4871
  });
4903
4872
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4904
4873
  }
@@ -4920,8 +4889,7 @@ const deserializeAws_restJson1PutAccountDetailsCommandError = async (output, con
4920
4889
  body: await parseBody(output.body, context),
4921
4890
  };
4922
4891
  let response;
4923
- let errorCode = "UnknownError";
4924
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4892
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4925
4893
  switch (errorCode) {
4926
4894
  case "BadRequestException":
4927
4895
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4934,10 +4902,12 @@ const deserializeAws_restJson1PutAccountDetailsCommandError = async (output, con
4934
4902
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4935
4903
  default:
4936
4904
  const parsedBody = parsedOutput.body;
4905
+ const $metadata = deserializeMetadata(output);
4906
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4937
4907
  response = new SESv2ServiceException_1.SESv2ServiceException({
4938
- name: parsedBody.code || parsedBody.Code || errorCode,
4908
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4939
4909
  $fault: "client",
4940
- $metadata: deserializeMetadata(output),
4910
+ $metadata,
4941
4911
  });
4942
4912
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4943
4913
  }
@@ -4959,8 +4929,7 @@ const deserializeAws_restJson1PutAccountSendingAttributesCommandError = async (o
4959
4929
  body: await parseBody(output.body, context),
4960
4930
  };
4961
4931
  let response;
4962
- let errorCode = "UnknownError";
4963
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4932
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4964
4933
  switch (errorCode) {
4965
4934
  case "BadRequestException":
4966
4935
  case "com.amazonaws.sesv2#BadRequestException":
@@ -4970,10 +4939,12 @@ const deserializeAws_restJson1PutAccountSendingAttributesCommandError = async (o
4970
4939
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4971
4940
  default:
4972
4941
  const parsedBody = parsedOutput.body;
4942
+ const $metadata = deserializeMetadata(output);
4943
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4973
4944
  response = new SESv2ServiceException_1.SESv2ServiceException({
4974
- name: parsedBody.code || parsedBody.Code || errorCode,
4945
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4975
4946
  $fault: "client",
4976
- $metadata: deserializeMetadata(output),
4947
+ $metadata,
4977
4948
  });
4978
4949
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4979
4950
  }
@@ -4995,8 +4966,7 @@ const deserializeAws_restJson1PutAccountSuppressionAttributesCommandError = asyn
4995
4966
  body: await parseBody(output.body, context),
4996
4967
  };
4997
4968
  let response;
4998
- let errorCode = "UnknownError";
4999
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4969
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5000
4970
  switch (errorCode) {
5001
4971
  case "BadRequestException":
5002
4972
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5006,10 +4976,12 @@ const deserializeAws_restJson1PutAccountSuppressionAttributesCommandError = asyn
5006
4976
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5007
4977
  default:
5008
4978
  const parsedBody = parsedOutput.body;
4979
+ const $metadata = deserializeMetadata(output);
4980
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5009
4981
  response = new SESv2ServiceException_1.SESv2ServiceException({
5010
- name: parsedBody.code || parsedBody.Code || errorCode,
4982
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5011
4983
  $fault: "client",
5012
- $metadata: deserializeMetadata(output),
4984
+ $metadata,
5013
4985
  });
5014
4986
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5015
4987
  }
@@ -5031,8 +5003,7 @@ const deserializeAws_restJson1PutConfigurationSetDeliveryOptionsCommandError = a
5031
5003
  body: await parseBody(output.body, context),
5032
5004
  };
5033
5005
  let response;
5034
- let errorCode = "UnknownError";
5035
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5006
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5036
5007
  switch (errorCode) {
5037
5008
  case "BadRequestException":
5038
5009
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5045,10 +5016,12 @@ const deserializeAws_restJson1PutConfigurationSetDeliveryOptionsCommandError = a
5045
5016
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5046
5017
  default:
5047
5018
  const parsedBody = parsedOutput.body;
5019
+ const $metadata = deserializeMetadata(output);
5020
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5048
5021
  response = new SESv2ServiceException_1.SESv2ServiceException({
5049
- name: parsedBody.code || parsedBody.Code || errorCode,
5022
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5050
5023
  $fault: "client",
5051
- $metadata: deserializeMetadata(output),
5024
+ $metadata,
5052
5025
  });
5053
5026
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5054
5027
  }
@@ -5070,8 +5043,7 @@ const deserializeAws_restJson1PutConfigurationSetReputationOptionsCommandError =
5070
5043
  body: await parseBody(output.body, context),
5071
5044
  };
5072
5045
  let response;
5073
- let errorCode = "UnknownError";
5074
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5046
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5075
5047
  switch (errorCode) {
5076
5048
  case "BadRequestException":
5077
5049
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5084,10 +5056,12 @@ const deserializeAws_restJson1PutConfigurationSetReputationOptionsCommandError =
5084
5056
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5085
5057
  default:
5086
5058
  const parsedBody = parsedOutput.body;
5059
+ const $metadata = deserializeMetadata(output);
5060
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5087
5061
  response = new SESv2ServiceException_1.SESv2ServiceException({
5088
- name: parsedBody.code || parsedBody.Code || errorCode,
5062
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5089
5063
  $fault: "client",
5090
- $metadata: deserializeMetadata(output),
5064
+ $metadata,
5091
5065
  });
5092
5066
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5093
5067
  }
@@ -5109,8 +5083,7 @@ const deserializeAws_restJson1PutConfigurationSetSendingOptionsCommandError = as
5109
5083
  body: await parseBody(output.body, context),
5110
5084
  };
5111
5085
  let response;
5112
- let errorCode = "UnknownError";
5113
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5086
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5114
5087
  switch (errorCode) {
5115
5088
  case "BadRequestException":
5116
5089
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5123,10 +5096,12 @@ const deserializeAws_restJson1PutConfigurationSetSendingOptionsCommandError = as
5123
5096
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5124
5097
  default:
5125
5098
  const parsedBody = parsedOutput.body;
5099
+ const $metadata = deserializeMetadata(output);
5100
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5126
5101
  response = new SESv2ServiceException_1.SESv2ServiceException({
5127
- name: parsedBody.code || parsedBody.Code || errorCode,
5102
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5128
5103
  $fault: "client",
5129
- $metadata: deserializeMetadata(output),
5104
+ $metadata,
5130
5105
  });
5131
5106
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5132
5107
  }
@@ -5148,8 +5123,7 @@ const deserializeAws_restJson1PutConfigurationSetSuppressionOptionsCommandError
5148
5123
  body: await parseBody(output.body, context),
5149
5124
  };
5150
5125
  let response;
5151
- let errorCode = "UnknownError";
5152
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5126
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5153
5127
  switch (errorCode) {
5154
5128
  case "BadRequestException":
5155
5129
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5162,10 +5136,12 @@ const deserializeAws_restJson1PutConfigurationSetSuppressionOptionsCommandError
5162
5136
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5163
5137
  default:
5164
5138
  const parsedBody = parsedOutput.body;
5139
+ const $metadata = deserializeMetadata(output);
5140
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5165
5141
  response = new SESv2ServiceException_1.SESv2ServiceException({
5166
- name: parsedBody.code || parsedBody.Code || errorCode,
5142
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5167
5143
  $fault: "client",
5168
- $metadata: deserializeMetadata(output),
5144
+ $metadata,
5169
5145
  });
5170
5146
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5171
5147
  }
@@ -5187,8 +5163,7 @@ const deserializeAws_restJson1PutConfigurationSetTrackingOptionsCommandError = a
5187
5163
  body: await parseBody(output.body, context),
5188
5164
  };
5189
5165
  let response;
5190
- let errorCode = "UnknownError";
5191
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5166
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5192
5167
  switch (errorCode) {
5193
5168
  case "BadRequestException":
5194
5169
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5201,10 +5176,12 @@ const deserializeAws_restJson1PutConfigurationSetTrackingOptionsCommandError = a
5201
5176
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5202
5177
  default:
5203
5178
  const parsedBody = parsedOutput.body;
5179
+ const $metadata = deserializeMetadata(output);
5180
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5204
5181
  response = new SESv2ServiceException_1.SESv2ServiceException({
5205
- name: parsedBody.code || parsedBody.Code || errorCode,
5182
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5206
5183
  $fault: "client",
5207
- $metadata: deserializeMetadata(output),
5184
+ $metadata,
5208
5185
  });
5209
5186
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5210
5187
  }
@@ -5226,8 +5203,7 @@ const deserializeAws_restJson1PutDedicatedIpInPoolCommandError = async (output,
5226
5203
  body: await parseBody(output.body, context),
5227
5204
  };
5228
5205
  let response;
5229
- let errorCode = "UnknownError";
5230
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5206
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5231
5207
  switch (errorCode) {
5232
5208
  case "BadRequestException":
5233
5209
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5240,10 +5216,12 @@ const deserializeAws_restJson1PutDedicatedIpInPoolCommandError = async (output,
5240
5216
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5241
5217
  default:
5242
5218
  const parsedBody = parsedOutput.body;
5219
+ const $metadata = deserializeMetadata(output);
5220
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5243
5221
  response = new SESv2ServiceException_1.SESv2ServiceException({
5244
- name: parsedBody.code || parsedBody.Code || errorCode,
5222
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5245
5223
  $fault: "client",
5246
- $metadata: deserializeMetadata(output),
5224
+ $metadata,
5247
5225
  });
5248
5226
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5249
5227
  }
@@ -5265,8 +5243,7 @@ const deserializeAws_restJson1PutDedicatedIpWarmupAttributesCommandError = async
5265
5243
  body: await parseBody(output.body, context),
5266
5244
  };
5267
5245
  let response;
5268
- let errorCode = "UnknownError";
5269
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5246
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5270
5247
  switch (errorCode) {
5271
5248
  case "BadRequestException":
5272
5249
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5279,10 +5256,12 @@ const deserializeAws_restJson1PutDedicatedIpWarmupAttributesCommandError = async
5279
5256
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5280
5257
  default:
5281
5258
  const parsedBody = parsedOutput.body;
5259
+ const $metadata = deserializeMetadata(output);
5260
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5282
5261
  response = new SESv2ServiceException_1.SESv2ServiceException({
5283
- name: parsedBody.code || parsedBody.Code || errorCode,
5262
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5284
5263
  $fault: "client",
5285
- $metadata: deserializeMetadata(output),
5264
+ $metadata,
5286
5265
  });
5287
5266
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5288
5267
  }
@@ -5304,8 +5283,7 @@ const deserializeAws_restJson1PutDeliverabilityDashboardOptionCommandError = asy
5304
5283
  body: await parseBody(output.body, context),
5305
5284
  };
5306
5285
  let response;
5307
- let errorCode = "UnknownError";
5308
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5286
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5309
5287
  switch (errorCode) {
5310
5288
  case "AlreadyExistsException":
5311
5289
  case "com.amazonaws.sesv2#AlreadyExistsException":
@@ -5324,10 +5302,12 @@ const deserializeAws_restJson1PutDeliverabilityDashboardOptionCommandError = asy
5324
5302
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5325
5303
  default:
5326
5304
  const parsedBody = parsedOutput.body;
5305
+ const $metadata = deserializeMetadata(output);
5306
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5327
5307
  response = new SESv2ServiceException_1.SESv2ServiceException({
5328
- name: parsedBody.code || parsedBody.Code || errorCode,
5308
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5329
5309
  $fault: "client",
5330
- $metadata: deserializeMetadata(output),
5310
+ $metadata,
5331
5311
  });
5332
5312
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5333
5313
  }
@@ -5349,8 +5329,7 @@ const deserializeAws_restJson1PutEmailIdentityConfigurationSetAttributesCommandE
5349
5329
  body: await parseBody(output.body, context),
5350
5330
  };
5351
5331
  let response;
5352
- let errorCode = "UnknownError";
5353
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5332
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5354
5333
  switch (errorCode) {
5355
5334
  case "BadRequestException":
5356
5335
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5363,10 +5342,12 @@ const deserializeAws_restJson1PutEmailIdentityConfigurationSetAttributesCommandE
5363
5342
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5364
5343
  default:
5365
5344
  const parsedBody = parsedOutput.body;
5345
+ const $metadata = deserializeMetadata(output);
5346
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5366
5347
  response = new SESv2ServiceException_1.SESv2ServiceException({
5367
- name: parsedBody.code || parsedBody.Code || errorCode,
5348
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5368
5349
  $fault: "client",
5369
- $metadata: deserializeMetadata(output),
5350
+ $metadata,
5370
5351
  });
5371
5352
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5372
5353
  }
@@ -5388,8 +5369,7 @@ const deserializeAws_restJson1PutEmailIdentityDkimAttributesCommandError = async
5388
5369
  body: await parseBody(output.body, context),
5389
5370
  };
5390
5371
  let response;
5391
- let errorCode = "UnknownError";
5392
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5372
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5393
5373
  switch (errorCode) {
5394
5374
  case "BadRequestException":
5395
5375
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5402,10 +5382,12 @@ const deserializeAws_restJson1PutEmailIdentityDkimAttributesCommandError = async
5402
5382
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5403
5383
  default:
5404
5384
  const parsedBody = parsedOutput.body;
5385
+ const $metadata = deserializeMetadata(output);
5386
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5405
5387
  response = new SESv2ServiceException_1.SESv2ServiceException({
5406
- name: parsedBody.code || parsedBody.Code || errorCode,
5388
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5407
5389
  $fault: "client",
5408
- $metadata: deserializeMetadata(output),
5390
+ $metadata,
5409
5391
  });
5410
5392
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5411
5393
  }
@@ -5435,8 +5417,7 @@ const deserializeAws_restJson1PutEmailIdentityDkimSigningAttributesCommandError
5435
5417
  body: await parseBody(output.body, context),
5436
5418
  };
5437
5419
  let response;
5438
- let errorCode = "UnknownError";
5439
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5420
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5440
5421
  switch (errorCode) {
5441
5422
  case "BadRequestException":
5442
5423
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5449,10 +5430,12 @@ const deserializeAws_restJson1PutEmailIdentityDkimSigningAttributesCommandError
5449
5430
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5450
5431
  default:
5451
5432
  const parsedBody = parsedOutput.body;
5433
+ const $metadata = deserializeMetadata(output);
5434
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5452
5435
  response = new SESv2ServiceException_1.SESv2ServiceException({
5453
- name: parsedBody.code || parsedBody.Code || errorCode,
5436
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5454
5437
  $fault: "client",
5455
- $metadata: deserializeMetadata(output),
5438
+ $metadata,
5456
5439
  });
5457
5440
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5458
5441
  }
@@ -5474,8 +5457,7 @@ const deserializeAws_restJson1PutEmailIdentityFeedbackAttributesCommandError = a
5474
5457
  body: await parseBody(output.body, context),
5475
5458
  };
5476
5459
  let response;
5477
- let errorCode = "UnknownError";
5478
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5460
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5479
5461
  switch (errorCode) {
5480
5462
  case "BadRequestException":
5481
5463
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5488,10 +5470,12 @@ const deserializeAws_restJson1PutEmailIdentityFeedbackAttributesCommandError = a
5488
5470
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5489
5471
  default:
5490
5472
  const parsedBody = parsedOutput.body;
5473
+ const $metadata = deserializeMetadata(output);
5474
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5491
5475
  response = new SESv2ServiceException_1.SESv2ServiceException({
5492
- name: parsedBody.code || parsedBody.Code || errorCode,
5476
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5493
5477
  $fault: "client",
5494
- $metadata: deserializeMetadata(output),
5478
+ $metadata,
5495
5479
  });
5496
5480
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5497
5481
  }
@@ -5513,8 +5497,7 @@ const deserializeAws_restJson1PutEmailIdentityMailFromAttributesCommandError = a
5513
5497
  body: await parseBody(output.body, context),
5514
5498
  };
5515
5499
  let response;
5516
- let errorCode = "UnknownError";
5517
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5500
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5518
5501
  switch (errorCode) {
5519
5502
  case "BadRequestException":
5520
5503
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5527,10 +5510,12 @@ const deserializeAws_restJson1PutEmailIdentityMailFromAttributesCommandError = a
5527
5510
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5528
5511
  default:
5529
5512
  const parsedBody = parsedOutput.body;
5513
+ const $metadata = deserializeMetadata(output);
5514
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5530
5515
  response = new SESv2ServiceException_1.SESv2ServiceException({
5531
- name: parsedBody.code || parsedBody.Code || errorCode,
5516
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5532
5517
  $fault: "client",
5533
- $metadata: deserializeMetadata(output),
5518
+ $metadata,
5534
5519
  });
5535
5520
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5536
5521
  }
@@ -5552,8 +5537,7 @@ const deserializeAws_restJson1PutSuppressedDestinationCommandError = async (outp
5552
5537
  body: await parseBody(output.body, context),
5553
5538
  };
5554
5539
  let response;
5555
- let errorCode = "UnknownError";
5556
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5540
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5557
5541
  switch (errorCode) {
5558
5542
  case "BadRequestException":
5559
5543
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5563,10 +5547,12 @@ const deserializeAws_restJson1PutSuppressedDestinationCommandError = async (outp
5563
5547
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5564
5548
  default:
5565
5549
  const parsedBody = parsedOutput.body;
5550
+ const $metadata = deserializeMetadata(output);
5551
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5566
5552
  response = new SESv2ServiceException_1.SESv2ServiceException({
5567
- name: parsedBody.code || parsedBody.Code || errorCode,
5553
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5568
5554
  $fault: "client",
5569
- $metadata: deserializeMetadata(output),
5555
+ $metadata,
5570
5556
  });
5571
5557
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5572
5558
  }
@@ -5592,8 +5578,7 @@ const deserializeAws_restJson1SendBulkEmailCommandError = async (output, context
5592
5578
  body: await parseBody(output.body, context),
5593
5579
  };
5594
5580
  let response;
5595
- let errorCode = "UnknownError";
5596
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5581
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5597
5582
  switch (errorCode) {
5598
5583
  case "AccountSuspendedException":
5599
5584
  case "com.amazonaws.sesv2#AccountSuspendedException":
@@ -5621,10 +5606,12 @@ const deserializeAws_restJson1SendBulkEmailCommandError = async (output, context
5621
5606
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5622
5607
  default:
5623
5608
  const parsedBody = parsedOutput.body;
5609
+ const $metadata = deserializeMetadata(output);
5610
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5624
5611
  response = new SESv2ServiceException_1.SESv2ServiceException({
5625
- name: parsedBody.code || parsedBody.Code || errorCode,
5612
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5626
5613
  $fault: "client",
5627
- $metadata: deserializeMetadata(output),
5614
+ $metadata,
5628
5615
  });
5629
5616
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5630
5617
  }
@@ -5650,8 +5637,7 @@ const deserializeAws_restJson1SendCustomVerificationEmailCommandError = async (o
5650
5637
  body: await parseBody(output.body, context),
5651
5638
  };
5652
5639
  let response;
5653
- let errorCode = "UnknownError";
5654
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5640
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5655
5641
  switch (errorCode) {
5656
5642
  case "BadRequestException":
5657
5643
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5676,10 +5662,12 @@ const deserializeAws_restJson1SendCustomVerificationEmailCommandError = async (o
5676
5662
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5677
5663
  default:
5678
5664
  const parsedBody = parsedOutput.body;
5665
+ const $metadata = deserializeMetadata(output);
5666
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5679
5667
  response = new SESv2ServiceException_1.SESv2ServiceException({
5680
- name: parsedBody.code || parsedBody.Code || errorCode,
5668
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5681
5669
  $fault: "client",
5682
- $metadata: deserializeMetadata(output),
5670
+ $metadata,
5683
5671
  });
5684
5672
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5685
5673
  }
@@ -5705,8 +5693,7 @@ const deserializeAws_restJson1SendEmailCommandError = async (output, context) =>
5705
5693
  body: await parseBody(output.body, context),
5706
5694
  };
5707
5695
  let response;
5708
- let errorCode = "UnknownError";
5709
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5696
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5710
5697
  switch (errorCode) {
5711
5698
  case "AccountSuspendedException":
5712
5699
  case "com.amazonaws.sesv2#AccountSuspendedException":
@@ -5734,10 +5721,12 @@ const deserializeAws_restJson1SendEmailCommandError = async (output, context) =>
5734
5721
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5735
5722
  default:
5736
5723
  const parsedBody = parsedOutput.body;
5724
+ const $metadata = deserializeMetadata(output);
5725
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5737
5726
  response = new SESv2ServiceException_1.SESv2ServiceException({
5738
- name: parsedBody.code || parsedBody.Code || errorCode,
5727
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5739
5728
  $fault: "client",
5740
- $metadata: deserializeMetadata(output),
5729
+ $metadata,
5741
5730
  });
5742
5731
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5743
5732
  }
@@ -5759,8 +5748,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
5759
5748
  body: await parseBody(output.body, context),
5760
5749
  };
5761
5750
  let response;
5762
- let errorCode = "UnknownError";
5763
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5751
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5764
5752
  switch (errorCode) {
5765
5753
  case "BadRequestException":
5766
5754
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5776,10 +5764,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
5776
5764
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5777
5765
  default:
5778
5766
  const parsedBody = parsedOutput.body;
5767
+ const $metadata = deserializeMetadata(output);
5768
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5779
5769
  response = new SESv2ServiceException_1.SESv2ServiceException({
5780
- name: parsedBody.code || parsedBody.Code || errorCode,
5770
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5781
5771
  $fault: "client",
5782
- $metadata: deserializeMetadata(output),
5772
+ $metadata,
5783
5773
  });
5784
5774
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5785
5775
  }
@@ -5805,8 +5795,7 @@ const deserializeAws_restJson1TestRenderEmailTemplateCommandError = async (outpu
5805
5795
  body: await parseBody(output.body, context),
5806
5796
  };
5807
5797
  let response;
5808
- let errorCode = "UnknownError";
5809
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5798
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5810
5799
  switch (errorCode) {
5811
5800
  case "BadRequestException":
5812
5801
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5819,10 +5808,12 @@ const deserializeAws_restJson1TestRenderEmailTemplateCommandError = async (outpu
5819
5808
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5820
5809
  default:
5821
5810
  const parsedBody = parsedOutput.body;
5811
+ const $metadata = deserializeMetadata(output);
5812
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5822
5813
  response = new SESv2ServiceException_1.SESv2ServiceException({
5823
- name: parsedBody.code || parsedBody.Code || errorCode,
5814
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5824
5815
  $fault: "client",
5825
- $metadata: deserializeMetadata(output),
5816
+ $metadata,
5826
5817
  });
5827
5818
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5828
5819
  }
@@ -5844,8 +5835,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
5844
5835
  body: await parseBody(output.body, context),
5845
5836
  };
5846
5837
  let response;
5847
- let errorCode = "UnknownError";
5848
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5838
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5849
5839
  switch (errorCode) {
5850
5840
  case "BadRequestException":
5851
5841
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5861,10 +5851,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
5861
5851
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5862
5852
  default:
5863
5853
  const parsedBody = parsedOutput.body;
5854
+ const $metadata = deserializeMetadata(output);
5855
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5864
5856
  response = new SESv2ServiceException_1.SESv2ServiceException({
5865
- name: parsedBody.code || parsedBody.Code || errorCode,
5857
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5866
5858
  $fault: "client",
5867
- $metadata: deserializeMetadata(output),
5859
+ $metadata,
5868
5860
  });
5869
5861
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5870
5862
  }
@@ -5886,8 +5878,7 @@ const deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError
5886
5878
  body: await parseBody(output.body, context),
5887
5879
  };
5888
5880
  let response;
5889
- let errorCode = "UnknownError";
5890
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5881
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5891
5882
  switch (errorCode) {
5892
5883
  case "BadRequestException":
5893
5884
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5900,10 +5891,12 @@ const deserializeAws_restJson1UpdateConfigurationSetEventDestinationCommandError
5900
5891
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5901
5892
  default:
5902
5893
  const parsedBody = parsedOutput.body;
5894
+ const $metadata = deserializeMetadata(output);
5895
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5903
5896
  response = new SESv2ServiceException_1.SESv2ServiceException({
5904
- name: parsedBody.code || parsedBody.Code || errorCode,
5897
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5905
5898
  $fault: "client",
5906
- $metadata: deserializeMetadata(output),
5899
+ $metadata,
5907
5900
  });
5908
5901
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5909
5902
  }
@@ -5925,8 +5918,7 @@ const deserializeAws_restJson1UpdateContactCommandError = async (output, context
5925
5918
  body: await parseBody(output.body, context),
5926
5919
  };
5927
5920
  let response;
5928
- let errorCode = "UnknownError";
5929
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5921
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5930
5922
  switch (errorCode) {
5931
5923
  case "BadRequestException":
5932
5924
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5942,10 +5934,12 @@ const deserializeAws_restJson1UpdateContactCommandError = async (output, context
5942
5934
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5943
5935
  default:
5944
5936
  const parsedBody = parsedOutput.body;
5937
+ const $metadata = deserializeMetadata(output);
5938
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5945
5939
  response = new SESv2ServiceException_1.SESv2ServiceException({
5946
- name: parsedBody.code || parsedBody.Code || errorCode,
5940
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5947
5941
  $fault: "client",
5948
- $metadata: deserializeMetadata(output),
5942
+ $metadata,
5949
5943
  });
5950
5944
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5951
5945
  }
@@ -5967,8 +5961,7 @@ const deserializeAws_restJson1UpdateContactListCommandError = async (output, con
5967
5961
  body: await parseBody(output.body, context),
5968
5962
  };
5969
5963
  let response;
5970
- let errorCode = "UnknownError";
5971
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5964
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5972
5965
  switch (errorCode) {
5973
5966
  case "BadRequestException":
5974
5967
  case "com.amazonaws.sesv2#BadRequestException":
@@ -5984,10 +5977,12 @@ const deserializeAws_restJson1UpdateContactListCommandError = async (output, con
5984
5977
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5985
5978
  default:
5986
5979
  const parsedBody = parsedOutput.body;
5980
+ const $metadata = deserializeMetadata(output);
5981
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5987
5982
  response = new SESv2ServiceException_1.SESv2ServiceException({
5988
- name: parsedBody.code || parsedBody.Code || errorCode,
5983
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5989
5984
  $fault: "client",
5990
- $metadata: deserializeMetadata(output),
5985
+ $metadata,
5991
5986
  });
5992
5987
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5993
5988
  }
@@ -6009,8 +6004,7 @@ const deserializeAws_restJson1UpdateCustomVerificationEmailTemplateCommandError
6009
6004
  body: await parseBody(output.body, context),
6010
6005
  };
6011
6006
  let response;
6012
- let errorCode = "UnknownError";
6013
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6007
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6014
6008
  switch (errorCode) {
6015
6009
  case "BadRequestException":
6016
6010
  case "com.amazonaws.sesv2#BadRequestException":
@@ -6023,10 +6017,12 @@ const deserializeAws_restJson1UpdateCustomVerificationEmailTemplateCommandError
6023
6017
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6024
6018
  default:
6025
6019
  const parsedBody = parsedOutput.body;
6020
+ const $metadata = deserializeMetadata(output);
6021
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6026
6022
  response = new SESv2ServiceException_1.SESv2ServiceException({
6027
- name: parsedBody.code || parsedBody.Code || errorCode,
6023
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6028
6024
  $fault: "client",
6029
- $metadata: deserializeMetadata(output),
6025
+ $metadata,
6030
6026
  });
6031
6027
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6032
6028
  }
@@ -6048,8 +6044,7 @@ const deserializeAws_restJson1UpdateEmailIdentityPolicyCommandError = async (out
6048
6044
  body: await parseBody(output.body, context),
6049
6045
  };
6050
6046
  let response;
6051
- let errorCode = "UnknownError";
6052
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6047
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6053
6048
  switch (errorCode) {
6054
6049
  case "BadRequestException":
6055
6050
  case "com.amazonaws.sesv2#BadRequestException":
@@ -6062,10 +6057,12 @@ const deserializeAws_restJson1UpdateEmailIdentityPolicyCommandError = async (out
6062
6057
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6063
6058
  default:
6064
6059
  const parsedBody = parsedOutput.body;
6060
+ const $metadata = deserializeMetadata(output);
6061
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6065
6062
  response = new SESv2ServiceException_1.SESv2ServiceException({
6066
- name: parsedBody.code || parsedBody.Code || errorCode,
6063
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6067
6064
  $fault: "client",
6068
- $metadata: deserializeMetadata(output),
6065
+ $metadata,
6069
6066
  });
6070
6067
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6071
6068
  }
@@ -6087,8 +6084,7 @@ const deserializeAws_restJson1UpdateEmailTemplateCommandError = async (output, c
6087
6084
  body: await parseBody(output.body, context),
6088
6085
  };
6089
6086
  let response;
6090
- let errorCode = "UnknownError";
6091
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6087
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6092
6088
  switch (errorCode) {
6093
6089
  case "BadRequestException":
6094
6090
  case "com.amazonaws.sesv2#BadRequestException":
@@ -6101,10 +6097,12 @@ const deserializeAws_restJson1UpdateEmailTemplateCommandError = async (output, c
6101
6097
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6102
6098
  default:
6103
6099
  const parsedBody = parsedOutput.body;
6100
+ const $metadata = deserializeMetadata(output);
6101
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6104
6102
  response = new SESv2ServiceException_1.SESv2ServiceException({
6105
- name: parsedBody.code || parsedBody.Code || errorCode,
6103
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6106
6104
  $fault: "client",
6107
- $metadata: deserializeMetadata(output),
6105
+ $metadata,
6108
6106
  });
6109
6107
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6110
6108
  }
@@ -6265,28 +6263,22 @@ const serializeAws_restJson1AdditionalContactEmailAddresses = (input, context) =
6265
6263
  };
6266
6264
  const serializeAws_restJson1Body = (input, context) => {
6267
6265
  return {
6268
- ...(input.Html !== undefined &&
6269
- input.Html !== null && { Html: serializeAws_restJson1Content(input.Html, context) }),
6270
- ...(input.Text !== undefined &&
6271
- input.Text !== null && { Text: serializeAws_restJson1Content(input.Text, context) }),
6266
+ ...(input.Html != null && { Html: serializeAws_restJson1Content(input.Html, context) }),
6267
+ ...(input.Text != null && { Text: serializeAws_restJson1Content(input.Text, context) }),
6272
6268
  };
6273
6269
  };
6274
6270
  const serializeAws_restJson1BulkEmailContent = (input, context) => {
6275
6271
  return {
6276
- ...(input.Template !== undefined &&
6277
- input.Template !== null && { Template: serializeAws_restJson1Template(input.Template, context) }),
6272
+ ...(input.Template != null && { Template: serializeAws_restJson1Template(input.Template, context) }),
6278
6273
  };
6279
6274
  };
6280
6275
  const serializeAws_restJson1BulkEmailEntry = (input, context) => {
6281
6276
  return {
6282
- ...(input.Destination !== undefined &&
6283
- input.Destination !== null && { Destination: serializeAws_restJson1Destination(input.Destination, context) }),
6284
- ...(input.ReplacementEmailContent !== undefined &&
6285
- input.ReplacementEmailContent !== null && {
6277
+ ...(input.Destination != null && { Destination: serializeAws_restJson1Destination(input.Destination, context) }),
6278
+ ...(input.ReplacementEmailContent != null && {
6286
6279
  ReplacementEmailContent: serializeAws_restJson1ReplacementEmailContent(input.ReplacementEmailContent, context),
6287
6280
  }),
6288
- ...(input.ReplacementTags !== undefined &&
6289
- input.ReplacementTags !== null && {
6281
+ ...(input.ReplacementTags != null && {
6290
6282
  ReplacementTags: serializeAws_restJson1MessageTagList(input.ReplacementTags, context),
6291
6283
  }),
6292
6284
  };
@@ -6303,19 +6295,16 @@ const serializeAws_restJson1BulkEmailEntryList = (input, context) => {
6303
6295
  };
6304
6296
  const serializeAws_restJson1CloudWatchDestination = (input, context) => {
6305
6297
  return {
6306
- ...(input.DimensionConfigurations !== undefined &&
6307
- input.DimensionConfigurations !== null && {
6298
+ ...(input.DimensionConfigurations != null && {
6308
6299
  DimensionConfigurations: serializeAws_restJson1CloudWatchDimensionConfigurations(input.DimensionConfigurations, context),
6309
6300
  }),
6310
6301
  };
6311
6302
  };
6312
6303
  const serializeAws_restJson1CloudWatchDimensionConfiguration = (input, context) => {
6313
6304
  return {
6314
- ...(input.DefaultDimensionValue !== undefined &&
6315
- input.DefaultDimensionValue !== null && { DefaultDimensionValue: input.DefaultDimensionValue }),
6316
- ...(input.DimensionName !== undefined && input.DimensionName !== null && { DimensionName: input.DimensionName }),
6317
- ...(input.DimensionValueSource !== undefined &&
6318
- input.DimensionValueSource !== null && { DimensionValueSource: input.DimensionValueSource }),
6305
+ ...(input.DefaultDimensionValue != null && { DefaultDimensionValue: input.DefaultDimensionValue }),
6306
+ ...(input.DimensionName != null && { DimensionName: input.DimensionName }),
6307
+ ...(input.DimensionValueSource != null && { DimensionValueSource: input.DimensionValueSource }),
6319
6308
  };
6320
6309
  };
6321
6310
  const serializeAws_restJson1CloudWatchDimensionConfigurations = (input, context) => {
@@ -6330,60 +6319,49 @@ const serializeAws_restJson1CloudWatchDimensionConfigurations = (input, context)
6330
6319
  };
6331
6320
  const serializeAws_restJson1ContactListDestination = (input, context) => {
6332
6321
  return {
6333
- ...(input.ContactListImportAction !== undefined &&
6334
- input.ContactListImportAction !== null && { ContactListImportAction: input.ContactListImportAction }),
6335
- ...(input.ContactListName !== undefined &&
6336
- input.ContactListName !== null && { ContactListName: input.ContactListName }),
6322
+ ...(input.ContactListImportAction != null && { ContactListImportAction: input.ContactListImportAction }),
6323
+ ...(input.ContactListName != null && { ContactListName: input.ContactListName }),
6337
6324
  };
6338
6325
  };
6339
6326
  const serializeAws_restJson1Content = (input, context) => {
6340
6327
  return {
6341
- ...(input.Charset !== undefined && input.Charset !== null && { Charset: input.Charset }),
6342
- ...(input.Data !== undefined && input.Data !== null && { Data: input.Data }),
6328
+ ...(input.Charset != null && { Charset: input.Charset }),
6329
+ ...(input.Data != null && { Data: input.Data }),
6343
6330
  };
6344
6331
  };
6345
6332
  const serializeAws_restJson1DeliveryOptions = (input, context) => {
6346
6333
  return {
6347
- ...(input.SendingPoolName !== undefined &&
6348
- input.SendingPoolName !== null && { SendingPoolName: input.SendingPoolName }),
6349
- ...(input.TlsPolicy !== undefined && input.TlsPolicy !== null && { TlsPolicy: input.TlsPolicy }),
6334
+ ...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }),
6335
+ ...(input.TlsPolicy != null && { TlsPolicy: input.TlsPolicy }),
6350
6336
  };
6351
6337
  };
6352
6338
  const serializeAws_restJson1Destination = (input, context) => {
6353
6339
  return {
6354
- ...(input.BccAddresses !== undefined &&
6355
- input.BccAddresses !== null && {
6340
+ ...(input.BccAddresses != null && {
6356
6341
  BccAddresses: serializeAws_restJson1EmailAddressList(input.BccAddresses, context),
6357
6342
  }),
6358
- ...(input.CcAddresses !== undefined &&
6359
- input.CcAddresses !== null && {
6343
+ ...(input.CcAddresses != null && {
6360
6344
  CcAddresses: serializeAws_restJson1EmailAddressList(input.CcAddresses, context),
6361
6345
  }),
6362
- ...(input.ToAddresses !== undefined &&
6363
- input.ToAddresses !== null && {
6346
+ ...(input.ToAddresses != null && {
6364
6347
  ToAddresses: serializeAws_restJson1EmailAddressList(input.ToAddresses, context),
6365
6348
  }),
6366
6349
  };
6367
6350
  };
6368
6351
  const serializeAws_restJson1DkimSigningAttributes = (input, context) => {
6369
6352
  return {
6370
- ...(input.DomainSigningPrivateKey !== undefined &&
6371
- input.DomainSigningPrivateKey !== null && { DomainSigningPrivateKey: input.DomainSigningPrivateKey }),
6372
- ...(input.DomainSigningSelector !== undefined &&
6373
- input.DomainSigningSelector !== null && { DomainSigningSelector: input.DomainSigningSelector }),
6374
- ...(input.NextSigningKeyLength !== undefined &&
6375
- input.NextSigningKeyLength !== null && { NextSigningKeyLength: input.NextSigningKeyLength }),
6353
+ ...(input.DomainSigningPrivateKey != null && { DomainSigningPrivateKey: input.DomainSigningPrivateKey }),
6354
+ ...(input.DomainSigningSelector != null && { DomainSigningSelector: input.DomainSigningSelector }),
6355
+ ...(input.NextSigningKeyLength != null && { NextSigningKeyLength: input.NextSigningKeyLength }),
6376
6356
  };
6377
6357
  };
6378
6358
  const serializeAws_restJson1DomainDeliverabilityTrackingOption = (input, context) => {
6379
6359
  return {
6380
- ...(input.Domain !== undefined && input.Domain !== null && { Domain: input.Domain }),
6381
- ...(input.InboxPlacementTrackingOption !== undefined &&
6382
- input.InboxPlacementTrackingOption !== null && {
6360
+ ...(input.Domain != null && { Domain: input.Domain }),
6361
+ ...(input.InboxPlacementTrackingOption != null && {
6383
6362
  InboxPlacementTrackingOption: serializeAws_restJson1InboxPlacementTrackingOption(input.InboxPlacementTrackingOption, context),
6384
6363
  }),
6385
- ...(input.SubscriptionStartDate !== undefined &&
6386
- input.SubscriptionStartDate !== null && {
6364
+ ...(input.SubscriptionStartDate != null && {
6387
6365
  SubscriptionStartDate: Math.round(input.SubscriptionStartDate.getTime() / 1000),
6388
6366
  }),
6389
6367
  };
@@ -6410,41 +6388,34 @@ const serializeAws_restJson1EmailAddressList = (input, context) => {
6410
6388
  };
6411
6389
  const serializeAws_restJson1EmailContent = (input, context) => {
6412
6390
  return {
6413
- ...(input.Raw !== undefined && input.Raw !== null && { Raw: serializeAws_restJson1RawMessage(input.Raw, context) }),
6414
- ...(input.Simple !== undefined &&
6415
- input.Simple !== null && { Simple: serializeAws_restJson1Message(input.Simple, context) }),
6416
- ...(input.Template !== undefined &&
6417
- input.Template !== null && { Template: serializeAws_restJson1Template(input.Template, context) }),
6391
+ ...(input.Raw != null && { Raw: serializeAws_restJson1RawMessage(input.Raw, context) }),
6392
+ ...(input.Simple != null && { Simple: serializeAws_restJson1Message(input.Simple, context) }),
6393
+ ...(input.Template != null && { Template: serializeAws_restJson1Template(input.Template, context) }),
6418
6394
  };
6419
6395
  };
6420
6396
  const serializeAws_restJson1EmailTemplateContent = (input, context) => {
6421
6397
  return {
6422
- ...(input.Html !== undefined && input.Html !== null && { Html: input.Html }),
6423
- ...(input.Subject !== undefined && input.Subject !== null && { Subject: input.Subject }),
6424
- ...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
6398
+ ...(input.Html != null && { Html: input.Html }),
6399
+ ...(input.Subject != null && { Subject: input.Subject }),
6400
+ ...(input.Text != null && { Text: input.Text }),
6425
6401
  };
6426
6402
  };
6427
6403
  const serializeAws_restJson1EventDestinationDefinition = (input, context) => {
6428
6404
  return {
6429
- ...(input.CloudWatchDestination !== undefined &&
6430
- input.CloudWatchDestination !== null && {
6405
+ ...(input.CloudWatchDestination != null && {
6431
6406
  CloudWatchDestination: serializeAws_restJson1CloudWatchDestination(input.CloudWatchDestination, context),
6432
6407
  }),
6433
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
6434
- ...(input.KinesisFirehoseDestination !== undefined &&
6435
- input.KinesisFirehoseDestination !== null && {
6408
+ ...(input.Enabled != null && { Enabled: input.Enabled }),
6409
+ ...(input.KinesisFirehoseDestination != null && {
6436
6410
  KinesisFirehoseDestination: serializeAws_restJson1KinesisFirehoseDestination(input.KinesisFirehoseDestination, context),
6437
6411
  }),
6438
- ...(input.MatchingEventTypes !== undefined &&
6439
- input.MatchingEventTypes !== null && {
6412
+ ...(input.MatchingEventTypes != null && {
6440
6413
  MatchingEventTypes: serializeAws_restJson1EventTypes(input.MatchingEventTypes, context),
6441
6414
  }),
6442
- ...(input.PinpointDestination !== undefined &&
6443
- input.PinpointDestination !== null && {
6415
+ ...(input.PinpointDestination != null && {
6444
6416
  PinpointDestination: serializeAws_restJson1PinpointDestination(input.PinpointDestination, context),
6445
6417
  }),
6446
- ...(input.SnsDestination !== undefined &&
6447
- input.SnsDestination !== null && {
6418
+ ...(input.SnsDestination != null && {
6448
6419
  SnsDestination: serializeAws_restJson1SnsDestination(input.SnsDestination, context),
6449
6420
  }),
6450
6421
  };
@@ -6461,27 +6432,24 @@ const serializeAws_restJson1EventTypes = (input, context) => {
6461
6432
  };
6462
6433
  const serializeAws_restJson1ImportDataSource = (input, context) => {
6463
6434
  return {
6464
- ...(input.DataFormat !== undefined && input.DataFormat !== null && { DataFormat: input.DataFormat }),
6465
- ...(input.S3Url !== undefined && input.S3Url !== null && { S3Url: input.S3Url }),
6435
+ ...(input.DataFormat != null && { DataFormat: input.DataFormat }),
6436
+ ...(input.S3Url != null && { S3Url: input.S3Url }),
6466
6437
  };
6467
6438
  };
6468
6439
  const serializeAws_restJson1ImportDestination = (input, context) => {
6469
6440
  return {
6470
- ...(input.ContactListDestination !== undefined &&
6471
- input.ContactListDestination !== null && {
6441
+ ...(input.ContactListDestination != null && {
6472
6442
  ContactListDestination: serializeAws_restJson1ContactListDestination(input.ContactListDestination, context),
6473
6443
  }),
6474
- ...(input.SuppressionListDestination !== undefined &&
6475
- input.SuppressionListDestination !== null && {
6444
+ ...(input.SuppressionListDestination != null && {
6476
6445
  SuppressionListDestination: serializeAws_restJson1SuppressionListDestination(input.SuppressionListDestination, context),
6477
6446
  }),
6478
6447
  };
6479
6448
  };
6480
6449
  const serializeAws_restJson1InboxPlacementTrackingOption = (input, context) => {
6481
6450
  return {
6482
- ...(input.Global !== undefined && input.Global !== null && { Global: input.Global }),
6483
- ...(input.TrackedIsps !== undefined &&
6484
- input.TrackedIsps !== null && { TrackedIsps: serializeAws_restJson1IspNameList(input.TrackedIsps, context) }),
6451
+ ...(input.Global != null && { Global: input.Global }),
6452
+ ...(input.TrackedIsps != null && { TrackedIsps: serializeAws_restJson1IspNameList(input.TrackedIsps, context) }),
6485
6453
  };
6486
6454
  };
6487
6455
  const serializeAws_restJson1IspNameList = (input, context) => {
@@ -6496,37 +6464,32 @@ const serializeAws_restJson1IspNameList = (input, context) => {
6496
6464
  };
6497
6465
  const serializeAws_restJson1KinesisFirehoseDestination = (input, context) => {
6498
6466
  return {
6499
- ...(input.DeliveryStreamArn !== undefined &&
6500
- input.DeliveryStreamArn !== null && { DeliveryStreamArn: input.DeliveryStreamArn }),
6501
- ...(input.IamRoleArn !== undefined && input.IamRoleArn !== null && { IamRoleArn: input.IamRoleArn }),
6467
+ ...(input.DeliveryStreamArn != null && { DeliveryStreamArn: input.DeliveryStreamArn }),
6468
+ ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
6502
6469
  };
6503
6470
  };
6504
6471
  const serializeAws_restJson1ListContactsFilter = (input, context) => {
6505
6472
  return {
6506
- ...(input.FilteredStatus !== undefined &&
6507
- input.FilteredStatus !== null && { FilteredStatus: input.FilteredStatus }),
6508
- ...(input.TopicFilter !== undefined &&
6509
- input.TopicFilter !== null && { TopicFilter: serializeAws_restJson1TopicFilter(input.TopicFilter, context) }),
6473
+ ...(input.FilteredStatus != null && { FilteredStatus: input.FilteredStatus }),
6474
+ ...(input.TopicFilter != null && { TopicFilter: serializeAws_restJson1TopicFilter(input.TopicFilter, context) }),
6510
6475
  };
6511
6476
  };
6512
6477
  const serializeAws_restJson1ListManagementOptions = (input, context) => {
6513
6478
  return {
6514
- ...(input.ContactListName !== undefined &&
6515
- input.ContactListName !== null && { ContactListName: input.ContactListName }),
6516
- ...(input.TopicName !== undefined && input.TopicName !== null && { TopicName: input.TopicName }),
6479
+ ...(input.ContactListName != null && { ContactListName: input.ContactListName }),
6480
+ ...(input.TopicName != null && { TopicName: input.TopicName }),
6517
6481
  };
6518
6482
  };
6519
6483
  const serializeAws_restJson1Message = (input, context) => {
6520
6484
  return {
6521
- ...(input.Body !== undefined && input.Body !== null && { Body: serializeAws_restJson1Body(input.Body, context) }),
6522
- ...(input.Subject !== undefined &&
6523
- input.Subject !== null && { Subject: serializeAws_restJson1Content(input.Subject, context) }),
6485
+ ...(input.Body != null && { Body: serializeAws_restJson1Body(input.Body, context) }),
6486
+ ...(input.Subject != null && { Subject: serializeAws_restJson1Content(input.Subject, context) }),
6524
6487
  };
6525
6488
  };
6526
6489
  const serializeAws_restJson1MessageTag = (input, context) => {
6527
6490
  return {
6528
- ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
6529
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
6491
+ ...(input.Name != null && { Name: input.Name }),
6492
+ ...(input.Value != null && { Value: input.Value }),
6530
6493
  };
6531
6494
  };
6532
6495
  const serializeAws_restJson1MessageTagList = (input, context) => {
@@ -6541,52 +6504,47 @@ const serializeAws_restJson1MessageTagList = (input, context) => {
6541
6504
  };
6542
6505
  const serializeAws_restJson1PinpointDestination = (input, context) => {
6543
6506
  return {
6544
- ...(input.ApplicationArn !== undefined &&
6545
- input.ApplicationArn !== null && { ApplicationArn: input.ApplicationArn }),
6507
+ ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }),
6546
6508
  };
6547
6509
  };
6548
6510
  const serializeAws_restJson1RawMessage = (input, context) => {
6549
6511
  return {
6550
- ...(input.Data !== undefined && input.Data !== null && { Data: context.base64Encoder(input.Data) }),
6512
+ ...(input.Data != null && { Data: context.base64Encoder(input.Data) }),
6551
6513
  };
6552
6514
  };
6553
6515
  const serializeAws_restJson1ReplacementEmailContent = (input, context) => {
6554
6516
  return {
6555
- ...(input.ReplacementTemplate !== undefined &&
6556
- input.ReplacementTemplate !== null && {
6517
+ ...(input.ReplacementTemplate != null && {
6557
6518
  ReplacementTemplate: serializeAws_restJson1ReplacementTemplate(input.ReplacementTemplate, context),
6558
6519
  }),
6559
6520
  };
6560
6521
  };
6561
6522
  const serializeAws_restJson1ReplacementTemplate = (input, context) => {
6562
6523
  return {
6563
- ...(input.ReplacementTemplateData !== undefined &&
6564
- input.ReplacementTemplateData !== null && { ReplacementTemplateData: input.ReplacementTemplateData }),
6524
+ ...(input.ReplacementTemplateData != null && { ReplacementTemplateData: input.ReplacementTemplateData }),
6565
6525
  };
6566
6526
  };
6567
6527
  const serializeAws_restJson1ReputationOptions = (input, context) => {
6568
6528
  return {
6569
- ...(input.LastFreshStart !== undefined &&
6570
- input.LastFreshStart !== null && { LastFreshStart: Math.round(input.LastFreshStart.getTime() / 1000) }),
6571
- ...(input.ReputationMetricsEnabled !== undefined &&
6572
- input.ReputationMetricsEnabled !== null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }),
6529
+ ...(input.LastFreshStart != null && { LastFreshStart: Math.round(input.LastFreshStart.getTime() / 1000) }),
6530
+ ...(input.ReputationMetricsEnabled != null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }),
6573
6531
  };
6574
6532
  };
6575
6533
  const serializeAws_restJson1SendingOptions = (input, context) => {
6576
6534
  return {
6577
- ...(input.SendingEnabled !== undefined &&
6578
- input.SendingEnabled !== null && { SendingEnabled: input.SendingEnabled }),
6535
+ ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }),
6579
6536
  };
6580
6537
  };
6581
6538
  const serializeAws_restJson1SnsDestination = (input, context) => {
6582
6539
  return {
6583
- ...(input.TopicArn !== undefined && input.TopicArn !== null && { TopicArn: input.TopicArn }),
6540
+ ...(input.TopicArn != null && { TopicArn: input.TopicArn }),
6584
6541
  };
6585
6542
  };
6586
6543
  const serializeAws_restJson1SuppressionListDestination = (input, context) => {
6587
6544
  return {
6588
- ...(input.SuppressionListImportAction !== undefined &&
6589
- input.SuppressionListImportAction !== null && { SuppressionListImportAction: input.SuppressionListImportAction }),
6545
+ ...(input.SuppressionListImportAction != null && {
6546
+ SuppressionListImportAction: input.SuppressionListImportAction,
6547
+ }),
6590
6548
  };
6591
6549
  };
6592
6550
  const serializeAws_restJson1SuppressionListReasons = (input, context) => {
@@ -6601,16 +6559,15 @@ const serializeAws_restJson1SuppressionListReasons = (input, context) => {
6601
6559
  };
6602
6560
  const serializeAws_restJson1SuppressionOptions = (input, context) => {
6603
6561
  return {
6604
- ...(input.SuppressedReasons !== undefined &&
6605
- input.SuppressedReasons !== null && {
6562
+ ...(input.SuppressedReasons != null && {
6606
6563
  SuppressedReasons: serializeAws_restJson1SuppressionListReasons(input.SuppressedReasons, context),
6607
6564
  }),
6608
6565
  };
6609
6566
  };
6610
6567
  const serializeAws_restJson1Tag = (input, context) => {
6611
6568
  return {
6612
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
6613
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
6569
+ ...(input.Key != null && { Key: input.Key }),
6570
+ ...(input.Value != null && { Value: input.Value }),
6614
6571
  };
6615
6572
  };
6616
6573
  const serializeAws_restJson1TagList = (input, context) => {
@@ -6625,34 +6582,31 @@ const serializeAws_restJson1TagList = (input, context) => {
6625
6582
  };
6626
6583
  const serializeAws_restJson1Template = (input, context) => {
6627
6584
  return {
6628
- ...(input.TemplateArn !== undefined && input.TemplateArn !== null && { TemplateArn: input.TemplateArn }),
6629
- ...(input.TemplateData !== undefined && input.TemplateData !== null && { TemplateData: input.TemplateData }),
6630
- ...(input.TemplateName !== undefined && input.TemplateName !== null && { TemplateName: input.TemplateName }),
6585
+ ...(input.TemplateArn != null && { TemplateArn: input.TemplateArn }),
6586
+ ...(input.TemplateData != null && { TemplateData: input.TemplateData }),
6587
+ ...(input.TemplateName != null && { TemplateName: input.TemplateName }),
6631
6588
  };
6632
6589
  };
6633
6590
  const serializeAws_restJson1Topic = (input, context) => {
6634
6591
  return {
6635
- ...(input.DefaultSubscriptionStatus !== undefined &&
6636
- input.DefaultSubscriptionStatus !== null && { DefaultSubscriptionStatus: input.DefaultSubscriptionStatus }),
6637
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
6638
- ...(input.DisplayName !== undefined && input.DisplayName !== null && { DisplayName: input.DisplayName }),
6639
- ...(input.TopicName !== undefined && input.TopicName !== null && { TopicName: input.TopicName }),
6592
+ ...(input.DefaultSubscriptionStatus != null && { DefaultSubscriptionStatus: input.DefaultSubscriptionStatus }),
6593
+ ...(input.Description != null && { Description: input.Description }),
6594
+ ...(input.DisplayName != null && { DisplayName: input.DisplayName }),
6595
+ ...(input.TopicName != null && { TopicName: input.TopicName }),
6640
6596
  };
6641
6597
  };
6642
6598
  const serializeAws_restJson1TopicFilter = (input, context) => {
6643
6599
  return {
6644
- ...(input.TopicName !== undefined && input.TopicName !== null && { TopicName: input.TopicName }),
6645
- ...(input.UseDefaultIfPreferenceUnavailable !== undefined &&
6646
- input.UseDefaultIfPreferenceUnavailable !== null && {
6600
+ ...(input.TopicName != null && { TopicName: input.TopicName }),
6601
+ ...(input.UseDefaultIfPreferenceUnavailable != null && {
6647
6602
  UseDefaultIfPreferenceUnavailable: input.UseDefaultIfPreferenceUnavailable,
6648
6603
  }),
6649
6604
  };
6650
6605
  };
6651
6606
  const serializeAws_restJson1TopicPreference = (input, context) => {
6652
6607
  return {
6653
- ...(input.SubscriptionStatus !== undefined &&
6654
- input.SubscriptionStatus !== null && { SubscriptionStatus: input.SubscriptionStatus }),
6655
- ...(input.TopicName !== undefined && input.TopicName !== null && { TopicName: input.TopicName }),
6608
+ ...(input.SubscriptionStatus != null && { SubscriptionStatus: input.SubscriptionStatus }),
6609
+ ...(input.TopicName != null && { TopicName: input.TopicName }),
6656
6610
  };
6657
6611
  };
6658
6612
  const serializeAws_restJson1TopicPreferenceList = (input, context) => {
@@ -6677,20 +6631,17 @@ const serializeAws_restJson1Topics = (input, context) => {
6677
6631
  };
6678
6632
  const serializeAws_restJson1TrackingOptions = (input, context) => {
6679
6633
  return {
6680
- ...(input.CustomRedirectDomain !== undefined &&
6681
- input.CustomRedirectDomain !== null && { CustomRedirectDomain: input.CustomRedirectDomain }),
6634
+ ...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }),
6682
6635
  };
6683
6636
  };
6684
6637
  const deserializeAws_restJson1AccountDetails = (output, context) => {
6685
6638
  return {
6686
- AdditionalContactEmailAddresses: output.AdditionalContactEmailAddresses !== undefined && output.AdditionalContactEmailAddresses !== null
6639
+ AdditionalContactEmailAddresses: output.AdditionalContactEmailAddresses != null
6687
6640
  ? deserializeAws_restJson1AdditionalContactEmailAddresses(output.AdditionalContactEmailAddresses, context)
6688
6641
  : undefined,
6689
6642
  ContactLanguage: (0, smithy_client_1.expectString)(output.ContactLanguage),
6690
6643
  MailType: (0, smithy_client_1.expectString)(output.MailType),
6691
- ReviewDetails: output.ReviewDetails !== undefined && output.ReviewDetails !== null
6692
- ? deserializeAws_restJson1ReviewDetails(output.ReviewDetails, context)
6693
- : undefined,
6644
+ ReviewDetails: output.ReviewDetails != null ? deserializeAws_restJson1ReviewDetails(output.ReviewDetails, context) : undefined,
6694
6645
  UseCaseDescription: (0, smithy_client_1.expectString)(output.UseCaseDescription),
6695
6646
  WebsiteURL: (0, smithy_client_1.expectString)(output.WebsiteURL),
6696
6647
  };
@@ -6720,7 +6671,7 @@ const deserializeAws_restJson1BlacklistEntries = (output, context) => {
6720
6671
  const deserializeAws_restJson1BlacklistEntry = (output, context) => {
6721
6672
  return {
6722
6673
  Description: (0, smithy_client_1.expectString)(output.Description),
6723
- ListingTime: output.ListingTime !== undefined && output.ListingTime !== null
6674
+ ListingTime: output.ListingTime != null
6724
6675
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ListingTime)))
6725
6676
  : undefined,
6726
6677
  RblName: (0, smithy_client_1.expectString)(output.RblName),
@@ -6757,7 +6708,7 @@ const deserializeAws_restJson1BulkEmailEntryResultList = (output, context) => {
6757
6708
  };
6758
6709
  const deserializeAws_restJson1CloudWatchDestination = (output, context) => {
6759
6710
  return {
6760
- DimensionConfigurations: output.DimensionConfigurations !== undefined && output.DimensionConfigurations !== null
6711
+ DimensionConfigurations: output.DimensionConfigurations != null
6761
6712
  ? deserializeAws_restJson1CloudWatchDimensionConfigurations(output.DimensionConfigurations, context)
6762
6713
  : undefined,
6763
6714
  };
@@ -6794,13 +6745,13 @@ const deserializeAws_restJson1ConfigurationSetNameList = (output, context) => {
6794
6745
  const deserializeAws_restJson1Contact = (output, context) => {
6795
6746
  return {
6796
6747
  EmailAddress: (0, smithy_client_1.expectString)(output.EmailAddress),
6797
- LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
6748
+ LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
6798
6749
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
6799
6750
  : undefined,
6800
- TopicDefaultPreferences: output.TopicDefaultPreferences !== undefined && output.TopicDefaultPreferences !== null
6751
+ TopicDefaultPreferences: output.TopicDefaultPreferences != null
6801
6752
  ? deserializeAws_restJson1TopicPreferenceList(output.TopicDefaultPreferences, context)
6802
6753
  : undefined,
6803
- TopicPreferences: output.TopicPreferences !== undefined && output.TopicPreferences !== null
6754
+ TopicPreferences: output.TopicPreferences != null
6804
6755
  ? deserializeAws_restJson1TopicPreferenceList(output.TopicPreferences, context)
6805
6756
  : undefined,
6806
6757
  UnsubscribeAll: (0, smithy_client_1.expectBoolean)(output.UnsubscribeAll),
@@ -6809,7 +6760,7 @@ const deserializeAws_restJson1Contact = (output, context) => {
6809
6760
  const deserializeAws_restJson1ContactList = (output, context) => {
6810
6761
  return {
6811
6762
  ContactListName: (0, smithy_client_1.expectString)(output.ContactListName),
6812
- LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
6763
+ LastUpdatedTimestamp: output.LastUpdatedTimestamp != null
6813
6764
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTimestamp)))
6814
6765
  : undefined,
6815
6766
  };
@@ -6842,13 +6793,11 @@ const deserializeAws_restJson1CustomVerificationEmailTemplatesList = (output, co
6842
6793
  };
6843
6794
  const deserializeAws_restJson1DailyVolume = (output, context) => {
6844
6795
  return {
6845
- DomainIspPlacements: output.DomainIspPlacements !== undefined && output.DomainIspPlacements !== null
6796
+ DomainIspPlacements: output.DomainIspPlacements != null
6846
6797
  ? deserializeAws_restJson1DomainIspPlacements(output.DomainIspPlacements, context)
6847
6798
  : undefined,
6848
- StartDate: output.StartDate !== undefined && output.StartDate !== null
6849
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartDate)))
6850
- : undefined,
6851
- VolumeStatistics: output.VolumeStatistics !== undefined && output.VolumeStatistics !== null
6799
+ StartDate: output.StartDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartDate))) : undefined,
6800
+ VolumeStatistics: output.VolumeStatistics != null
6852
6801
  ? deserializeAws_restJson1VolumeStatistics(output.VolumeStatistics, context)
6853
6802
  : undefined,
6854
6803
  };
@@ -6885,9 +6834,7 @@ const deserializeAws_restJson1DedicatedIpList = (output, context) => {
6885
6834
  };
6886
6835
  const deserializeAws_restJson1DeliverabilityTestReport = (output, context) => {
6887
6836
  return {
6888
- CreateDate: output.CreateDate !== undefined && output.CreateDate !== null
6889
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate)))
6890
- : undefined,
6837
+ CreateDate: output.CreateDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreateDate))) : undefined,
6891
6838
  DeliverabilityTestStatus: (0, smithy_client_1.expectString)(output.DeliverabilityTestStatus),
6892
6839
  FromEmailAddress: (0, smithy_client_1.expectString)(output.FromEmailAddress),
6893
6840
  ReportId: (0, smithy_client_1.expectString)(output.ReportId),
@@ -6915,16 +6862,14 @@ const deserializeAws_restJson1DeliveryOptions = (output, context) => {
6915
6862
  const deserializeAws_restJson1DkimAttributes = (output, context) => {
6916
6863
  return {
6917
6864
  CurrentSigningKeyLength: (0, smithy_client_1.expectString)(output.CurrentSigningKeyLength),
6918
- LastKeyGenerationTimestamp: output.LastKeyGenerationTimestamp !== undefined && output.LastKeyGenerationTimestamp !== null
6865
+ LastKeyGenerationTimestamp: output.LastKeyGenerationTimestamp != null
6919
6866
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastKeyGenerationTimestamp)))
6920
6867
  : undefined,
6921
6868
  NextSigningKeyLength: (0, smithy_client_1.expectString)(output.NextSigningKeyLength),
6922
6869
  SigningAttributesOrigin: (0, smithy_client_1.expectString)(output.SigningAttributesOrigin),
6923
6870
  SigningEnabled: (0, smithy_client_1.expectBoolean)(output.SigningEnabled),
6924
6871
  Status: (0, smithy_client_1.expectString)(output.Status),
6925
- Tokens: output.Tokens !== undefined && output.Tokens !== null
6926
- ? deserializeAws_restJson1DnsTokenList(output.Tokens, context)
6927
- : undefined,
6872
+ Tokens: output.Tokens != null ? deserializeAws_restJson1DnsTokenList(output.Tokens, context) : undefined,
6928
6873
  };
6929
6874
  };
6930
6875
  const deserializeAws_restJson1DnsTokenList = (output, context) => {
@@ -6942,24 +6887,20 @@ const deserializeAws_restJson1DomainDeliverabilityCampaign = (output, context) =
6942
6887
  return {
6943
6888
  CampaignId: (0, smithy_client_1.expectString)(output.CampaignId),
6944
6889
  DeleteRate: (0, smithy_client_1.limitedParseDouble)(output.DeleteRate),
6945
- Esps: output.Esps !== undefined && output.Esps !== null
6946
- ? deserializeAws_restJson1Esps(output.Esps, context)
6947
- : undefined,
6948
- FirstSeenDateTime: output.FirstSeenDateTime !== undefined && output.FirstSeenDateTime !== null
6890
+ Esps: output.Esps != null ? deserializeAws_restJson1Esps(output.Esps, context) : undefined,
6891
+ FirstSeenDateTime: output.FirstSeenDateTime != null
6949
6892
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.FirstSeenDateTime)))
6950
6893
  : undefined,
6951
6894
  FromAddress: (0, smithy_client_1.expectString)(output.FromAddress),
6952
6895
  ImageUrl: (0, smithy_client_1.expectString)(output.ImageUrl),
6953
6896
  InboxCount: (0, smithy_client_1.expectLong)(output.InboxCount),
6954
- LastSeenDateTime: output.LastSeenDateTime !== undefined && output.LastSeenDateTime !== null
6897
+ LastSeenDateTime: output.LastSeenDateTime != null
6955
6898
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastSeenDateTime)))
6956
6899
  : undefined,
6957
6900
  ProjectedVolume: (0, smithy_client_1.expectLong)(output.ProjectedVolume),
6958
6901
  ReadDeleteRate: (0, smithy_client_1.limitedParseDouble)(output.ReadDeleteRate),
6959
6902
  ReadRate: (0, smithy_client_1.limitedParseDouble)(output.ReadRate),
6960
- SendingIps: output.SendingIps !== undefined && output.SendingIps !== null
6961
- ? deserializeAws_restJson1IpList(output.SendingIps, context)
6962
- : undefined,
6903
+ SendingIps: output.SendingIps != null ? deserializeAws_restJson1IpList(output.SendingIps, context) : undefined,
6963
6904
  SpamCount: (0, smithy_client_1.expectLong)(output.SpamCount),
6964
6905
  Subject: (0, smithy_client_1.expectString)(output.Subject),
6965
6906
  };
@@ -6978,10 +6919,10 @@ const deserializeAws_restJson1DomainDeliverabilityCampaignList = (output, contex
6978
6919
  const deserializeAws_restJson1DomainDeliverabilityTrackingOption = (output, context) => {
6979
6920
  return {
6980
6921
  Domain: (0, smithy_client_1.expectString)(output.Domain),
6981
- InboxPlacementTrackingOption: output.InboxPlacementTrackingOption !== undefined && output.InboxPlacementTrackingOption !== null
6922
+ InboxPlacementTrackingOption: output.InboxPlacementTrackingOption != null
6982
6923
  ? deserializeAws_restJson1InboxPlacementTrackingOption(output.InboxPlacementTrackingOption, context)
6983
6924
  : undefined,
6984
- SubscriptionStartDate: output.SubscriptionStartDate !== undefined && output.SubscriptionStartDate !== null
6925
+ SubscriptionStartDate: output.SubscriptionStartDate != null
6985
6926
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.SubscriptionStartDate)))
6986
6927
  : undefined,
6987
6928
  };
@@ -7026,7 +6967,7 @@ const deserializeAws_restJson1EmailTemplateContent = (output, context) => {
7026
6967
  };
7027
6968
  const deserializeAws_restJson1EmailTemplateMetadata = (output, context) => {
7028
6969
  return {
7029
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
6970
+ CreatedTimestamp: output.CreatedTimestamp != null
7030
6971
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
7031
6972
  : undefined,
7032
6973
  TemplateName: (0, smithy_client_1.expectString)(output.TemplateName),
@@ -7056,21 +6997,21 @@ const deserializeAws_restJson1Esps = (output, context) => {
7056
6997
  };
7057
6998
  const deserializeAws_restJson1EventDestination = (output, context) => {
7058
6999
  return {
7059
- CloudWatchDestination: output.CloudWatchDestination !== undefined && output.CloudWatchDestination !== null
7000
+ CloudWatchDestination: output.CloudWatchDestination != null
7060
7001
  ? deserializeAws_restJson1CloudWatchDestination(output.CloudWatchDestination, context)
7061
7002
  : undefined,
7062
7003
  Enabled: (0, smithy_client_1.expectBoolean)(output.Enabled),
7063
- KinesisFirehoseDestination: output.KinesisFirehoseDestination !== undefined && output.KinesisFirehoseDestination !== null
7004
+ KinesisFirehoseDestination: output.KinesisFirehoseDestination != null
7064
7005
  ? deserializeAws_restJson1KinesisFirehoseDestination(output.KinesisFirehoseDestination, context)
7065
7006
  : undefined,
7066
- MatchingEventTypes: output.MatchingEventTypes !== undefined && output.MatchingEventTypes !== null
7007
+ MatchingEventTypes: output.MatchingEventTypes != null
7067
7008
  ? deserializeAws_restJson1EventTypes(output.MatchingEventTypes, context)
7068
7009
  : undefined,
7069
7010
  Name: (0, smithy_client_1.expectString)(output.Name),
7070
- PinpointDestination: output.PinpointDestination !== undefined && output.PinpointDestination !== null
7011
+ PinpointDestination: output.PinpointDestination != null
7071
7012
  ? deserializeAws_restJson1PinpointDestination(output.PinpointDestination, context)
7072
7013
  : undefined,
7073
- SnsDestination: output.SnsDestination !== undefined && output.SnsDestination !== null
7014
+ SnsDestination: output.SnsDestination != null
7074
7015
  ? deserializeAws_restJson1SnsDestination(output.SnsDestination, context)
7075
7016
  : undefined,
7076
7017
  };
@@ -7129,20 +7070,20 @@ const deserializeAws_restJson1ImportDataSource = (output, context) => {
7129
7070
  };
7130
7071
  const deserializeAws_restJson1ImportDestination = (output, context) => {
7131
7072
  return {
7132
- ContactListDestination: output.ContactListDestination !== undefined && output.ContactListDestination !== null
7073
+ ContactListDestination: output.ContactListDestination != null
7133
7074
  ? deserializeAws_restJson1ContactListDestination(output.ContactListDestination, context)
7134
7075
  : undefined,
7135
- SuppressionListDestination: output.SuppressionListDestination !== undefined && output.SuppressionListDestination !== null
7076
+ SuppressionListDestination: output.SuppressionListDestination != null
7136
7077
  ? deserializeAws_restJson1SuppressionListDestination(output.SuppressionListDestination, context)
7137
7078
  : undefined,
7138
7079
  };
7139
7080
  };
7140
7081
  const deserializeAws_restJson1ImportJobSummary = (output, context) => {
7141
7082
  return {
7142
- CreatedTimestamp: output.CreatedTimestamp !== undefined && output.CreatedTimestamp !== null
7083
+ CreatedTimestamp: output.CreatedTimestamp != null
7143
7084
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTimestamp)))
7144
7085
  : undefined,
7145
- ImportDestination: output.ImportDestination !== undefined && output.ImportDestination !== null
7086
+ ImportDestination: output.ImportDestination != null
7146
7087
  ? deserializeAws_restJson1ImportDestination(output.ImportDestination, context)
7147
7088
  : undefined,
7148
7089
  JobId: (0, smithy_client_1.expectString)(output.JobId),
@@ -7163,9 +7104,7 @@ const deserializeAws_restJson1ImportJobSummaryList = (output, context) => {
7163
7104
  const deserializeAws_restJson1InboxPlacementTrackingOption = (output, context) => {
7164
7105
  return {
7165
7106
  Global: (0, smithy_client_1.expectBoolean)(output.Global),
7166
- TrackedIsps: output.TrackedIsps !== undefined && output.TrackedIsps !== null
7167
- ? deserializeAws_restJson1IspNameList(output.TrackedIsps, context)
7168
- : undefined,
7107
+ TrackedIsps: output.TrackedIsps != null ? deserializeAws_restJson1IspNameList(output.TrackedIsps, context) : undefined,
7169
7108
  };
7170
7109
  };
7171
7110
  const deserializeAws_restJson1IpList = (output, context) => {
@@ -7193,7 +7132,7 @@ const deserializeAws_restJson1IspNameList = (output, context) => {
7193
7132
  const deserializeAws_restJson1IspPlacement = (output, context) => {
7194
7133
  return {
7195
7134
  IspName: (0, smithy_client_1.expectString)(output.IspName),
7196
- PlacementStatistics: output.PlacementStatistics !== undefined && output.PlacementStatistics !== null
7135
+ PlacementStatistics: output.PlacementStatistics != null
7197
7136
  ? deserializeAws_restJson1PlacementStatistics(output.PlacementStatistics, context)
7198
7137
  : undefined,
7199
7138
  };
@@ -7257,11 +7196,11 @@ const deserializeAws_restJson1MailFromAttributes = (output, context) => {
7257
7196
  };
7258
7197
  const deserializeAws_restJson1OverallVolume = (output, context) => {
7259
7198
  return {
7260
- DomainIspPlacements: output.DomainIspPlacements !== undefined && output.DomainIspPlacements !== null
7199
+ DomainIspPlacements: output.DomainIspPlacements != null
7261
7200
  ? deserializeAws_restJson1DomainIspPlacements(output.DomainIspPlacements, context)
7262
7201
  : undefined,
7263
7202
  ReadRatePercent: (0, smithy_client_1.limitedParseDouble)(output.ReadRatePercent),
7264
- VolumeStatistics: output.VolumeStatistics !== undefined && output.VolumeStatistics !== null
7203
+ VolumeStatistics: output.VolumeStatistics != null
7265
7204
  ? deserializeAws_restJson1VolumeStatistics(output.VolumeStatistics, context)
7266
7205
  : undefined,
7267
7206
  };
@@ -7293,7 +7232,7 @@ const deserializeAws_restJson1PolicyMap = (output, context) => {
7293
7232
  };
7294
7233
  const deserializeAws_restJson1ReputationOptions = (output, context) => {
7295
7234
  return {
7296
- LastFreshStart: output.LastFreshStart !== undefined && output.LastFreshStart !== null
7235
+ LastFreshStart: output.LastFreshStart != null
7297
7236
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastFreshStart)))
7298
7237
  : undefined,
7299
7238
  ReputationMetricsEnabled: (0, smithy_client_1.expectBoolean)(output.ReputationMetricsEnabled),
@@ -7324,11 +7263,11 @@ const deserializeAws_restJson1SnsDestination = (output, context) => {
7324
7263
  };
7325
7264
  const deserializeAws_restJson1SuppressedDestination = (output, context) => {
7326
7265
  return {
7327
- Attributes: output.Attributes !== undefined && output.Attributes !== null
7266
+ Attributes: output.Attributes != null
7328
7267
  ? deserializeAws_restJson1SuppressedDestinationAttributes(output.Attributes, context)
7329
7268
  : undefined,
7330
7269
  EmailAddress: (0, smithy_client_1.expectString)(output.EmailAddress),
7331
- LastUpdateTime: output.LastUpdateTime !== undefined && output.LastUpdateTime !== null
7270
+ LastUpdateTime: output.LastUpdateTime != null
7332
7271
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdateTime)))
7333
7272
  : undefined,
7334
7273
  Reason: (0, smithy_client_1.expectString)(output.Reason),
@@ -7354,7 +7293,7 @@ const deserializeAws_restJson1SuppressedDestinationSummaries = (output, context)
7354
7293
  const deserializeAws_restJson1SuppressedDestinationSummary = (output, context) => {
7355
7294
  return {
7356
7295
  EmailAddress: (0, smithy_client_1.expectString)(output.EmailAddress),
7357
- LastUpdateTime: output.LastUpdateTime !== undefined && output.LastUpdateTime !== null
7296
+ LastUpdateTime: output.LastUpdateTime != null
7358
7297
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdateTime)))
7359
7298
  : undefined,
7360
7299
  Reason: (0, smithy_client_1.expectString)(output.Reason),
@@ -7362,7 +7301,7 @@ const deserializeAws_restJson1SuppressedDestinationSummary = (output, context) =
7362
7301
  };
7363
7302
  const deserializeAws_restJson1SuppressionAttributes = (output, context) => {
7364
7303
  return {
7365
- SuppressedReasons: output.SuppressedReasons !== undefined && output.SuppressedReasons !== null
7304
+ SuppressedReasons: output.SuppressedReasons != null
7366
7305
  ? deserializeAws_restJson1SuppressionListReasons(output.SuppressedReasons, context)
7367
7306
  : undefined,
7368
7307
  };
@@ -7385,7 +7324,7 @@ const deserializeAws_restJson1SuppressionListReasons = (output, context) => {
7385
7324
  };
7386
7325
  const deserializeAws_restJson1SuppressionOptions = (output, context) => {
7387
7326
  return {
7388
- SuppressedReasons: output.SuppressedReasons !== undefined && output.SuppressedReasons !== null
7327
+ SuppressedReasons: output.SuppressedReasons != null
7389
7328
  ? deserializeAws_restJson1SuppressionListReasons(output.SuppressedReasons, context)
7390
7329
  : undefined,
7391
7330
  };
@@ -7505,5 +7444,4 @@ const loadRestJsonErrorCode = (output, data) => {
7505
7444
  if (data["__type"] !== undefined) {
7506
7445
  return sanitizeErrorCode(data["__type"]);
7507
7446
  }
7508
- return "";
7509
7447
  };