From a2036c4f57400126767ab217c7b08bdf97963a10 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Mon, 6 Jan 2020 11:06:35 -0800 Subject: [PATCH] feat: add client-pinpoint-email (#643) --- clients/client-pinpoint-email/.gitignore | 14 + clients/client-pinpoint-email/.npmignore | 4 + clients/client-pinpoint-email/LICENSE | 201 + .../client-pinpoint-email/PinpointEmail.ts | 2127 ++++++ .../PinpointEmailClient.ts | 390 ++ clients/client-pinpoint-email/README.md | 6 + .../commands/CreateConfigurationSetCommand.ts | 93 + ...ConfigurationSetEventDestinationCommand.ts | 95 + .../commands/CreateDedicatedIpPoolCommand.ts | 90 + .../CreateDeliverabilityTestReportCommand.ts | 93 + .../commands/CreateEmailIdentityCommand.ts | 90 + .../commands/DeleteConfigurationSetCommand.ts | 93 + ...ConfigurationSetEventDestinationCommand.ts | 95 + .../commands/DeleteDedicatedIpPoolCommand.ts | 90 + .../commands/DeleteEmailIdentityCommand.ts | 90 + .../commands/GetAccountCommand.ts | 81 + .../commands/GetBlacklistReportsCommand.ts | 90 + .../commands/GetConfigurationSetCommand.ts | 90 + ...onfigurationSetEventDestinationsCommand.ts | 95 + .../commands/GetDedicatedIpCommand.ts | 81 + .../commands/GetDedicatedIpsCommand.ts | 84 + ...etDeliverabilityDashboardOptionsCommand.ts | 93 + .../GetDeliverabilityTestReportCommand.ts | 93 + .../GetDomainDeliverabilityCampaignCommand.ts | 93 + .../GetDomainStatisticsReportCommand.ts | 93 + .../commands/GetEmailIdentityCommand.ts | 84 + .../commands/ListConfigurationSetsCommand.ts | 90 + .../commands/ListDedicatedIpPoolsCommand.ts | 90 + .../ListDeliverabilityTestReportsCommand.ts | 93 + ...istDomainDeliverabilityCampaignsCommand.ts | 93 + .../commands/ListEmailIdentitiesCommand.ts | 90 + .../commands/ListTagsForResourceCommand.ts | 90 + ...countDedicatedIpWarmupAttributesCommand.ts | 95 + .../PutAccountSendingAttributesCommand.ts | 93 + ...tConfigurationSetDeliveryOptionsCommand.ts | 93 + ...onfigurationSetReputationOptionsCommand.ts | 95 + ...utConfigurationSetSendingOptionsCommand.ts | 93 + ...tConfigurationSetTrackingOptionsCommand.ts | 93 + .../commands/PutDedicatedIpInPoolCommand.ts | 90 + .../PutDedicatedIpWarmupAttributesCommand.ts | 93 + ...PutDeliverabilityDashboardOptionCommand.ts | 93 + .../PutEmailIdentityDkimAttributesCommand.ts | 93 + ...tEmailIdentityFeedbackAttributesCommand.ts | 93 + ...tEmailIdentityMailFromAttributesCommand.ts | 93 + .../commands/SendEmailCommand.ts | 81 + .../commands/TagResourceCommand.ts | 81 + .../commands/UntagResourceCommand.ts | 81 + ...ConfigurationSetEventDestinationCommand.ts | 95 + clients/client-pinpoint-email/endpoints.ts | 78 + clients/client-pinpoint-email/index.ts | 44 + clients/client-pinpoint-email/models/index.ts | 4415 ++++++++++++ clients/client-pinpoint-email/package.json | 75 + .../protocols/Aws_restJson1_1.ts | 6036 +++++++++++++++++ .../runtimeConfig.browser.ts | 30 + .../runtimeConfig.shared.ts | 7 + .../client-pinpoint-email/runtimeConfig.ts | 31 + .../client-pinpoint-email/tsconfig.es.json | 19 + clients/client-pinpoint-email/tsconfig.json | 27 + 58 files changed, 17311 insertions(+) create mode 100644 clients/client-pinpoint-email/.gitignore create mode 100644 clients/client-pinpoint-email/.npmignore create mode 100644 clients/client-pinpoint-email/LICENSE create mode 100644 clients/client-pinpoint-email/PinpointEmail.ts create mode 100644 clients/client-pinpoint-email/PinpointEmailClient.ts create mode 100644 clients/client-pinpoint-email/README.md create mode 100644 clients/client-pinpoint-email/commands/CreateConfigurationSetCommand.ts create mode 100644 clients/client-pinpoint-email/commands/CreateConfigurationSetEventDestinationCommand.ts create mode 100644 clients/client-pinpoint-email/commands/CreateDedicatedIpPoolCommand.ts create mode 100644 clients/client-pinpoint-email/commands/CreateDeliverabilityTestReportCommand.ts create mode 100644 clients/client-pinpoint-email/commands/CreateEmailIdentityCommand.ts create mode 100644 clients/client-pinpoint-email/commands/DeleteConfigurationSetCommand.ts create mode 100644 clients/client-pinpoint-email/commands/DeleteConfigurationSetEventDestinationCommand.ts create mode 100644 clients/client-pinpoint-email/commands/DeleteDedicatedIpPoolCommand.ts create mode 100644 clients/client-pinpoint-email/commands/DeleteEmailIdentityCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetAccountCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetBlacklistReportsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetConfigurationSetCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetConfigurationSetEventDestinationsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetDedicatedIpCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetDedicatedIpsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetDeliverabilityDashboardOptionsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetDeliverabilityTestReportCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetDomainDeliverabilityCampaignCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetDomainStatisticsReportCommand.ts create mode 100644 clients/client-pinpoint-email/commands/GetEmailIdentityCommand.ts create mode 100644 clients/client-pinpoint-email/commands/ListConfigurationSetsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/ListDedicatedIpPoolsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/ListDeliverabilityTestReportsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/ListDomainDeliverabilityCampaignsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/ListEmailIdentitiesCommand.ts create mode 100644 clients/client-pinpoint-email/commands/ListTagsForResourceCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutAccountDedicatedIpWarmupAttributesCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutAccountSendingAttributesCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutConfigurationSetDeliveryOptionsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutConfigurationSetReputationOptionsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutConfigurationSetSendingOptionsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutConfigurationSetTrackingOptionsCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutDedicatedIpInPoolCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutDedicatedIpWarmupAttributesCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutDeliverabilityDashboardOptionCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutEmailIdentityDkimAttributesCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutEmailIdentityFeedbackAttributesCommand.ts create mode 100644 clients/client-pinpoint-email/commands/PutEmailIdentityMailFromAttributesCommand.ts create mode 100644 clients/client-pinpoint-email/commands/SendEmailCommand.ts create mode 100644 clients/client-pinpoint-email/commands/TagResourceCommand.ts create mode 100644 clients/client-pinpoint-email/commands/UntagResourceCommand.ts create mode 100644 clients/client-pinpoint-email/commands/UpdateConfigurationSetEventDestinationCommand.ts create mode 100644 clients/client-pinpoint-email/endpoints.ts create mode 100644 clients/client-pinpoint-email/index.ts create mode 100644 clients/client-pinpoint-email/models/index.ts create mode 100644 clients/client-pinpoint-email/package.json create mode 100644 clients/client-pinpoint-email/protocols/Aws_restJson1_1.ts create mode 100644 clients/client-pinpoint-email/runtimeConfig.browser.ts create mode 100644 clients/client-pinpoint-email/runtimeConfig.shared.ts create mode 100644 clients/client-pinpoint-email/runtimeConfig.ts create mode 100644 clients/client-pinpoint-email/tsconfig.es.json create mode 100644 clients/client-pinpoint-email/tsconfig.json diff --git a/clients/client-pinpoint-email/.gitignore b/clients/client-pinpoint-email/.gitignore new file mode 100644 index 000000000000..b41c05b597c4 --- /dev/null +++ b/clients/client-pinpoint-email/.gitignore @@ -0,0 +1,14 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/types/ +/dist/ +*.tsbuildinfo +*.tgz +*.log +package-lock.json + +*.d.ts +*.js +*.js.map diff --git a/clients/client-pinpoint-email/.npmignore b/clients/client-pinpoint-email/.npmignore new file mode 100644 index 000000000000..b7ff81137c4a --- /dev/null +++ b/clients/client-pinpoint-email/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-pinpoint-email/LICENSE b/clients/client-pinpoint-email/LICENSE new file mode 100644 index 000000000000..b7d2463d8cc0 --- /dev/null +++ b/clients/client-pinpoint-email/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-pinpoint-email/PinpointEmail.ts b/clients/client-pinpoint-email/PinpointEmail.ts new file mode 100644 index 000000000000..6734253afb91 --- /dev/null +++ b/clients/client-pinpoint-email/PinpointEmail.ts @@ -0,0 +1,2127 @@ +import { PinpointEmailClient } from "./PinpointEmailClient"; +import { + CreateConfigurationSetCommand, + CreateConfigurationSetCommandInput, + CreateConfigurationSetCommandOutput +} from "./commands/CreateConfigurationSetCommand"; +import { + CreateConfigurationSetEventDestinationCommand, + CreateConfigurationSetEventDestinationCommandInput, + CreateConfigurationSetEventDestinationCommandOutput +} from "./commands/CreateConfigurationSetEventDestinationCommand"; +import { + CreateDedicatedIpPoolCommand, + CreateDedicatedIpPoolCommandInput, + CreateDedicatedIpPoolCommandOutput +} from "./commands/CreateDedicatedIpPoolCommand"; +import { + CreateDeliverabilityTestReportCommand, + CreateDeliverabilityTestReportCommandInput, + CreateDeliverabilityTestReportCommandOutput +} from "./commands/CreateDeliverabilityTestReportCommand"; +import { + CreateEmailIdentityCommand, + CreateEmailIdentityCommandInput, + CreateEmailIdentityCommandOutput +} from "./commands/CreateEmailIdentityCommand"; +import { + DeleteConfigurationSetCommand, + DeleteConfigurationSetCommandInput, + DeleteConfigurationSetCommandOutput +} from "./commands/DeleteConfigurationSetCommand"; +import { + DeleteConfigurationSetEventDestinationCommand, + DeleteConfigurationSetEventDestinationCommandInput, + DeleteConfigurationSetEventDestinationCommandOutput +} from "./commands/DeleteConfigurationSetEventDestinationCommand"; +import { + DeleteDedicatedIpPoolCommand, + DeleteDedicatedIpPoolCommandInput, + DeleteDedicatedIpPoolCommandOutput +} from "./commands/DeleteDedicatedIpPoolCommand"; +import { + DeleteEmailIdentityCommand, + DeleteEmailIdentityCommandInput, + DeleteEmailIdentityCommandOutput +} from "./commands/DeleteEmailIdentityCommand"; +import { + GetAccountCommand, + GetAccountCommandInput, + GetAccountCommandOutput +} from "./commands/GetAccountCommand"; +import { + GetBlacklistReportsCommand, + GetBlacklistReportsCommandInput, + GetBlacklistReportsCommandOutput +} from "./commands/GetBlacklistReportsCommand"; +import { + GetConfigurationSetCommand, + GetConfigurationSetCommandInput, + GetConfigurationSetCommandOutput +} from "./commands/GetConfigurationSetCommand"; +import { + GetConfigurationSetEventDestinationsCommand, + GetConfigurationSetEventDestinationsCommandInput, + GetConfigurationSetEventDestinationsCommandOutput +} from "./commands/GetConfigurationSetEventDestinationsCommand"; +import { + GetDedicatedIpCommand, + GetDedicatedIpCommandInput, + GetDedicatedIpCommandOutput +} from "./commands/GetDedicatedIpCommand"; +import { + GetDedicatedIpsCommand, + GetDedicatedIpsCommandInput, + GetDedicatedIpsCommandOutput +} from "./commands/GetDedicatedIpsCommand"; +import { + GetDeliverabilityDashboardOptionsCommand, + GetDeliverabilityDashboardOptionsCommandInput, + GetDeliverabilityDashboardOptionsCommandOutput +} from "./commands/GetDeliverabilityDashboardOptionsCommand"; +import { + GetDeliverabilityTestReportCommand, + GetDeliverabilityTestReportCommandInput, + GetDeliverabilityTestReportCommandOutput +} from "./commands/GetDeliverabilityTestReportCommand"; +import { + GetDomainDeliverabilityCampaignCommand, + GetDomainDeliverabilityCampaignCommandInput, + GetDomainDeliverabilityCampaignCommandOutput +} from "./commands/GetDomainDeliverabilityCampaignCommand"; +import { + GetDomainStatisticsReportCommand, + GetDomainStatisticsReportCommandInput, + GetDomainStatisticsReportCommandOutput +} from "./commands/GetDomainStatisticsReportCommand"; +import { + GetEmailIdentityCommand, + GetEmailIdentityCommandInput, + GetEmailIdentityCommandOutput +} from "./commands/GetEmailIdentityCommand"; +import { + ListConfigurationSetsCommand, + ListConfigurationSetsCommandInput, + ListConfigurationSetsCommandOutput +} from "./commands/ListConfigurationSetsCommand"; +import { + ListDedicatedIpPoolsCommand, + ListDedicatedIpPoolsCommandInput, + ListDedicatedIpPoolsCommandOutput +} from "./commands/ListDedicatedIpPoolsCommand"; +import { + ListDeliverabilityTestReportsCommand, + ListDeliverabilityTestReportsCommandInput, + ListDeliverabilityTestReportsCommandOutput +} from "./commands/ListDeliverabilityTestReportsCommand"; +import { + ListDomainDeliverabilityCampaignsCommand, + ListDomainDeliverabilityCampaignsCommandInput, + ListDomainDeliverabilityCampaignsCommandOutput +} from "./commands/ListDomainDeliverabilityCampaignsCommand"; +import { + ListEmailIdentitiesCommand, + ListEmailIdentitiesCommandInput, + ListEmailIdentitiesCommandOutput +} from "./commands/ListEmailIdentitiesCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput +} from "./commands/ListTagsForResourceCommand"; +import { + PutAccountDedicatedIpWarmupAttributesCommand, + PutAccountDedicatedIpWarmupAttributesCommandInput, + PutAccountDedicatedIpWarmupAttributesCommandOutput +} from "./commands/PutAccountDedicatedIpWarmupAttributesCommand"; +import { + PutAccountSendingAttributesCommand, + PutAccountSendingAttributesCommandInput, + PutAccountSendingAttributesCommandOutput +} from "./commands/PutAccountSendingAttributesCommand"; +import { + PutConfigurationSetDeliveryOptionsCommand, + PutConfigurationSetDeliveryOptionsCommandInput, + PutConfigurationSetDeliveryOptionsCommandOutput +} from "./commands/PutConfigurationSetDeliveryOptionsCommand"; +import { + PutConfigurationSetReputationOptionsCommand, + PutConfigurationSetReputationOptionsCommandInput, + PutConfigurationSetReputationOptionsCommandOutput +} from "./commands/PutConfigurationSetReputationOptionsCommand"; +import { + PutConfigurationSetSendingOptionsCommand, + PutConfigurationSetSendingOptionsCommandInput, + PutConfigurationSetSendingOptionsCommandOutput +} from "./commands/PutConfigurationSetSendingOptionsCommand"; +import { + PutConfigurationSetTrackingOptionsCommand, + PutConfigurationSetTrackingOptionsCommandInput, + PutConfigurationSetTrackingOptionsCommandOutput +} from "./commands/PutConfigurationSetTrackingOptionsCommand"; +import { + PutDedicatedIpInPoolCommand, + PutDedicatedIpInPoolCommandInput, + PutDedicatedIpInPoolCommandOutput +} from "./commands/PutDedicatedIpInPoolCommand"; +import { + PutDedicatedIpWarmupAttributesCommand, + PutDedicatedIpWarmupAttributesCommandInput, + PutDedicatedIpWarmupAttributesCommandOutput +} from "./commands/PutDedicatedIpWarmupAttributesCommand"; +import { + PutDeliverabilityDashboardOptionCommand, + PutDeliverabilityDashboardOptionCommandInput, + PutDeliverabilityDashboardOptionCommandOutput +} from "./commands/PutDeliverabilityDashboardOptionCommand"; +import { + PutEmailIdentityDkimAttributesCommand, + PutEmailIdentityDkimAttributesCommandInput, + PutEmailIdentityDkimAttributesCommandOutput +} from "./commands/PutEmailIdentityDkimAttributesCommand"; +import { + PutEmailIdentityFeedbackAttributesCommand, + PutEmailIdentityFeedbackAttributesCommandInput, + PutEmailIdentityFeedbackAttributesCommandOutput +} from "./commands/PutEmailIdentityFeedbackAttributesCommand"; +import { + PutEmailIdentityMailFromAttributesCommand, + PutEmailIdentityMailFromAttributesCommandInput, + PutEmailIdentityMailFromAttributesCommandOutput +} from "./commands/PutEmailIdentityMailFromAttributesCommand"; +import { + SendEmailCommand, + SendEmailCommandInput, + SendEmailCommandOutput +} from "./commands/SendEmailCommand"; +import { + TagResourceCommand, + TagResourceCommandInput, + TagResourceCommandOutput +} from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput +} from "./commands/UntagResourceCommand"; +import { + UpdateConfigurationSetEventDestinationCommand, + UpdateConfigurationSetEventDestinationCommandInput, + UpdateConfigurationSetEventDestinationCommandOutput +} from "./commands/UpdateConfigurationSetEventDestinationCommand"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +/** + * + * Amazon Pinpoint Email Service + *

Welcome to the Amazon Pinpoint Email API Reference. This guide provides + * information about the Amazon Pinpoint Email API (version 1.0), including supported + * operations, data types, parameters, and schemas.

+ *

+ * Amazon Pinpoint is an AWS service that you + * can use to engage with your customers across multiple messaging channels. You can use + * Amazon Pinpoint to send email, SMS text messages, voice messages, and push notifications. The + * Amazon Pinpoint Email API provides programmatic access to options that are unique to the + * email channel and supplement the options provided by the Amazon Pinpoint API.

+ *

If you're new to Amazon Pinpoint, you might find it helpful to also review the Amazon + * Pinpoint Developer Guide. The Amazon Pinpoint Developer + * Guide provides tutorials, code samples, and procedures that demonstrate + * how to use Amazon Pinpoint features programmatically and how to integrate Amazon Pinpoint functionality into + * mobile apps and other types of applications. The guide also provides information about + * key topics such as Amazon Pinpoint integration with other AWS services and the limits that apply + * to using the service.

+ *

The Amazon Pinpoint Email API is available in several AWS Regions and it provides an endpoint + * for each of these Regions. For a list of all the Regions and endpoints where the API is + * currently available, see AWS Service Endpoints in + * the Amazon Web Services General Reference. To learn more about AWS Regions, see + * Managing AWS + * Regions in the Amazon Web Services General Reference.

+ *

In each Region, AWS maintains multiple Availability Zones. These Availability Zones + * are physically isolated from each other, but are united by private, low-latency, + * high-throughput, and highly redundant network connections. These Availability Zones + * enable us to provide very high levels of availability and redundancy, while also + * minimizing latency. To learn more about the number of Availability Zones that are + * available in each Region, see AWS Global Infrastructure.

+ * + */ +export class PinpointEmail extends PinpointEmailClient { + /** + * + *

Create an event destination. In Amazon Pinpoint, events include message + * sends, deliveries, opens, clicks, bounces, and complaints. Event + * destinations are places that you can send information about these events + * to. For example, you can send event data to Amazon SNS to receive notifications when you + * receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term + * storage.

+ *

A single configuration set can include more than one event destination.

+ * + */ + public createConfigurationSetEventDestination( + args: CreateConfigurationSetEventDestinationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createConfigurationSetEventDestination( + args: CreateConfigurationSetEventDestinationCommandInput, + cb: ( + err: any, + data?: CreateConfigurationSetEventDestinationCommandOutput + ) => void + ): void; + public createConfigurationSetEventDestination( + args: CreateConfigurationSetEventDestinationCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: CreateConfigurationSetEventDestinationCommandOutput + ) => void + ): void; + public createConfigurationSetEventDestination( + args: CreateConfigurationSetEventDestinationCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: CreateConfigurationSetEventDestinationCommandOutput + ) => void), + cb?: ( + err: any, + data?: CreateConfigurationSetEventDestinationCommandOutput + ) => void + ): Promise | void { + const command = new CreateConfigurationSetEventDestinationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

+ * + */ + public putDedicatedIpWarmupAttributes( + args: PutDedicatedIpWarmupAttributesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putDedicatedIpWarmupAttributes( + args: PutDedicatedIpWarmupAttributesCommandInput, + cb: (err: any, data?: PutDedicatedIpWarmupAttributesCommandOutput) => void + ): void; + public putDedicatedIpWarmupAttributes( + args: PutDedicatedIpWarmupAttributesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutDedicatedIpWarmupAttributesCommandOutput) => void + ): void; + public putDedicatedIpWarmupAttributes( + args: PutDedicatedIpWarmupAttributesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutDedicatedIpWarmupAttributesCommandOutput + ) => void), + cb?: (err: any, data?: PutDedicatedIpWarmupAttributesCommandOutput) => void + ): Promise | void { + const command = new PutDedicatedIpWarmupAttributesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Enable or disable the ability of your account to send email.

+ * + */ + public putAccountSendingAttributes( + args: PutAccountSendingAttributesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putAccountSendingAttributes( + args: PutAccountSendingAttributesCommandInput, + cb: (err: any, data?: PutAccountSendingAttributesCommandOutput) => void + ): void; + public putAccountSendingAttributes( + args: PutAccountSendingAttributesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutAccountSendingAttributesCommandOutput) => void + ): void; + public putAccountSendingAttributes( + args: PutAccountSendingAttributesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: PutAccountSendingAttributesCommandOutput) => void), + cb?: (err: any, data?: PutAccountSendingAttributesCommandOutput) => void + ): Promise | void { + const command = new PutAccountSendingAttributesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Deletes an email identity that you previously verified for use with Amazon Pinpoint. An identity + * can be either an email address or a domain name.

+ * + */ + public deleteEmailIdentity( + args: DeleteEmailIdentityCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteEmailIdentity( + args: DeleteEmailIdentityCommandInput, + cb: (err: any, data?: DeleteEmailIdentityCommandOutput) => void + ): void; + public deleteEmailIdentity( + args: DeleteEmailIdentityCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteEmailIdentityCommandOutput) => void + ): void; + public deleteEmailIdentity( + args: DeleteEmailIdentityCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteEmailIdentityCommandOutput) => void), + cb?: (err: any, data?: DeleteEmailIdentityCommandOutput) => void + ): Promise | void { + const command = new DeleteEmailIdentityCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Associate a configuration set with a dedicated IP pool. You can use dedicated IP pools + * to create groups of dedicated IP addresses for sending specific types of email.

+ * + */ + public putConfigurationSetDeliveryOptions( + args: PutConfigurationSetDeliveryOptionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putConfigurationSetDeliveryOptions( + args: PutConfigurationSetDeliveryOptionsCommandInput, + cb: ( + err: any, + data?: PutConfigurationSetDeliveryOptionsCommandOutput + ) => void + ): void; + public putConfigurationSetDeliveryOptions( + args: PutConfigurationSetDeliveryOptionsCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: PutConfigurationSetDeliveryOptionsCommandOutput + ) => void + ): void; + public putConfigurationSetDeliveryOptions( + args: PutConfigurationSetDeliveryOptionsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutConfigurationSetDeliveryOptionsCommandOutput + ) => void), + cb?: ( + err: any, + data?: PutConfigurationSetDeliveryOptionsCommandOutput + ) => void + ): Promise | void { + const command = new PutConfigurationSetDeliveryOptionsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Delete an event destination.

+ *

In Amazon Pinpoint, events include message sends, deliveries, opens, + * clicks, bounces, and complaints. Event destinations are places that + * you can send information about these events to. For example, you can send event data to + * Amazon SNS to receive notifications when you receive bounces or complaints, or you can use + * Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

+ * + */ + public deleteConfigurationSetEventDestination( + args: DeleteConfigurationSetEventDestinationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteConfigurationSetEventDestination( + args: DeleteConfigurationSetEventDestinationCommandInput, + cb: ( + err: any, + data?: DeleteConfigurationSetEventDestinationCommandOutput + ) => void + ): void; + public deleteConfigurationSetEventDestination( + args: DeleteConfigurationSetEventDestinationCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: DeleteConfigurationSetEventDestinationCommandOutput + ) => void + ): void; + public deleteConfigurationSetEventDestination( + args: DeleteConfigurationSetEventDestinationCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: DeleteConfigurationSetEventDestinationCommandOutput + ) => void), + cb?: ( + err: any, + data?: DeleteConfigurationSetEventDestinationCommandOutput + ) => void + ): Promise | void { + const command = new DeleteConfigurationSetEventDestinationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Create a new predictive inbox placement test. Predictive inbox placement tests can help you predict how your messages will be handled + * by various email providers around the world. When you perform a predictive inbox placement test, you provide a + * sample message that contains the content that you plan to send to your customers. Amazon Pinpoint + * then sends that message to special email addresses spread across several major email + * providers. After about 24 hours, the test is complete, and you can use the + * GetDeliverabilityTestReport operation to view the results of the + * test.

+ * + */ + public createDeliverabilityTestReport( + args: CreateDeliverabilityTestReportCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createDeliverabilityTestReport( + args: CreateDeliverabilityTestReportCommandInput, + cb: (err: any, data?: CreateDeliverabilityTestReportCommandOutput) => void + ): void; + public createDeliverabilityTestReport( + args: CreateDeliverabilityTestReportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDeliverabilityTestReportCommandOutput) => void + ): void; + public createDeliverabilityTestReport( + args: CreateDeliverabilityTestReportCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: CreateDeliverabilityTestReportCommandOutput + ) => void), + cb?: (err: any, data?: CreateDeliverabilityTestReportCommandOutput) => void + ): Promise | void { + const command = new CreateDeliverabilityTestReportCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Show a list of the predictive inbox placement tests that you've performed, regardless of their statuses. For + * predictive inbox placement tests that are complete, you can use the GetDeliverabilityTestReport + * operation to view the results.

+ * + */ + public listDeliverabilityTestReports( + args: ListDeliverabilityTestReportsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listDeliverabilityTestReports( + args: ListDeliverabilityTestReportsCommandInput, + cb: (err: any, data?: ListDeliverabilityTestReportsCommandOutput) => void + ): void; + public listDeliverabilityTestReports( + args: ListDeliverabilityTestReportsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDeliverabilityTestReportsCommandOutput) => void + ): void; + public listDeliverabilityTestReports( + args: ListDeliverabilityTestReportsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListDeliverabilityTestReportsCommandOutput) => void), + cb?: (err: any, data?: ListDeliverabilityTestReportsCommandOutput) => void + ): Promise | void { + const command = new ListDeliverabilityTestReportsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Verifies an email identity for use with Amazon Pinpoint. In Amazon Pinpoint, an identity is an email + * address or domain that you use when you send email. Before you can use an identity to + * send email with Amazon Pinpoint, you first have to verify it. By verifying an address, you + * demonstrate that you're the owner of the address, and that you've given Amazon Pinpoint permission + * to send email from the address.

+ *

When you verify an email address, Amazon Pinpoint sends an email to the address. Your email + * address is verified as soon as you follow the link in the verification email. + * + *

+ *

When you verify a domain, this operation provides a set of DKIM tokens, which you can + * convert into CNAME tokens. You add these CNAME tokens to the DNS configuration for your + * domain. Your domain is verified when Amazon Pinpoint detects these records in the DNS + * configuration for your domain. It usually takes around 72 hours to complete the domain + * verification process.

+ * + */ + public createEmailIdentity( + args: CreateEmailIdentityCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createEmailIdentity( + args: CreateEmailIdentityCommandInput, + cb: (err: any, data?: CreateEmailIdentityCommandOutput) => void + ): void; + public createEmailIdentity( + args: CreateEmailIdentityCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateEmailIdentityCommandOutput) => void + ): void; + public createEmailIdentity( + args: CreateEmailIdentityCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateEmailIdentityCommandOutput) => void), + cb?: (err: any, data?: CreateEmailIdentityCommandOutput) => void + ): Promise | void { + const command = new CreateEmailIdentityCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Move a dedicated IP address to an existing dedicated IP pool.

+ * + *

The dedicated IP address that you specify must already exist, and must be + * associated with your Amazon Pinpoint account. + * + *

+ *

The dedicated IP pool you specify must already exist. You can create a new pool by + * using the CreateDedicatedIpPool operation.

+ * + *
+ * + */ + public putDedicatedIpInPool( + args: PutDedicatedIpInPoolCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putDedicatedIpInPool( + args: PutDedicatedIpInPoolCommandInput, + cb: (err: any, data?: PutDedicatedIpInPoolCommandOutput) => void + ): void; + public putDedicatedIpInPool( + args: PutDedicatedIpInPoolCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutDedicatedIpInPoolCommandOutput) => void + ): void; + public putDedicatedIpInPool( + args: PutDedicatedIpInPoolCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: PutDedicatedIpInPoolCommandOutput) => void), + cb?: (err: any, data?: PutDedicatedIpInPoolCommandOutput) => void + ): Promise | void { + const command = new PutDedicatedIpInPoolCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Create a configuration set. Configuration sets are groups of + * rules that you can apply to the emails you send using Amazon Pinpoint. You apply a configuration + * set to an email by including a reference to the configuration set in the headers of the + * email. When you apply a configuration set to an email, all of the rules in that + * configuration set are applied to the email.

+ * + */ + public createConfigurationSet( + args: CreateConfigurationSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createConfigurationSet( + args: CreateConfigurationSetCommandInput, + cb: (err: any, data?: CreateConfigurationSetCommandOutput) => void + ): void; + public createConfigurationSet( + args: CreateConfigurationSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateConfigurationSetCommandOutput) => void + ): void; + public createConfigurationSet( + args: CreateConfigurationSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateConfigurationSetCommandOutput) => void), + cb?: (err: any, data?: CreateConfigurationSetCommandOutput) => void + ): Promise | void { + const command = new CreateConfigurationSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Add one or more tags (keys and values) to a specified resource. A + * tag is a label that you optionally define and associate with a + * resource in Amazon Pinpoint. Tags can help you categorize and manage resources in different ways, + * such as by purpose, owner, environment, or other criteria. A resource can have as many + * as 50 tags.

+ *

Each tag consists of a required tag key and an + * associated tag value, both of which you define. A tag key is a + * general label that acts as a category for more specific tag values. A tag value acts as + * a descriptor within a tag key.

+ * + */ + public tagResource( + args: TagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public tagResource( + args: TagResourceCommandInput, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: TagResourceCommandOutput) => void), + cb?: (err: any, data?: TagResourceCommandOutput) => void + ): Promise | void { + const command = new TagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Retrieve information about the status of the Deliverability dashboard for your Amazon Pinpoint account. + * When the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and + * other metrics for the domains that you use to send email using Amazon Pinpoint. You also gain the + * ability to perform predictive inbox placement tests.

+ *

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition + * to any other fees that you accrue by using Amazon Pinpoint. For more information about the + * features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

+ * + */ + public getDeliverabilityDashboardOptions( + args: GetDeliverabilityDashboardOptionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getDeliverabilityDashboardOptions( + args: GetDeliverabilityDashboardOptionsCommandInput, + cb: ( + err: any, + data?: GetDeliverabilityDashboardOptionsCommandOutput + ) => void + ): void; + public getDeliverabilityDashboardOptions( + args: GetDeliverabilityDashboardOptionsCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: GetDeliverabilityDashboardOptionsCommandOutput + ) => void + ): void; + public getDeliverabilityDashboardOptions( + args: GetDeliverabilityDashboardOptionsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: GetDeliverabilityDashboardOptionsCommandOutput + ) => void), + cb?: ( + err: any, + data?: GetDeliverabilityDashboardOptionsCommandOutput + ) => void + ): Promise | void { + const command = new GetDeliverabilityDashboardOptionsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Used to enable or disable DKIM authentication for an email identity.

+ * + */ + public putEmailIdentityDkimAttributes( + args: PutEmailIdentityDkimAttributesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putEmailIdentityDkimAttributes( + args: PutEmailIdentityDkimAttributesCommandInput, + cb: (err: any, data?: PutEmailIdentityDkimAttributesCommandOutput) => void + ): void; + public putEmailIdentityDkimAttributes( + args: PutEmailIdentityDkimAttributesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutEmailIdentityDkimAttributesCommandOutput) => void + ): void; + public putEmailIdentityDkimAttributes( + args: PutEmailIdentityDkimAttributesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutEmailIdentityDkimAttributesCommandOutput + ) => void), + cb?: (err: any, data?: PutEmailIdentityDkimAttributesCommandOutput) => void + ): Promise | void { + const command = new PutEmailIdentityDkimAttributesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

List all of the configuration sets associated with your Amazon Pinpoint account in the current + * region.

+ *

In Amazon Pinpoint, configuration sets are groups of rules that you can + * apply to the emails you send. You apply a configuration set to an email by including a + * reference to the configuration set in the headers of the email. When you apply a + * configuration set to an email, all of the rules in that configuration set are applied to + * the email.

+ * + */ + public listConfigurationSets( + args: ListConfigurationSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listConfigurationSets( + args: ListConfigurationSetsCommandInput, + cb: (err: any, data?: ListConfigurationSetsCommandOutput) => void + ): void; + public listConfigurationSets( + args: ListConfigurationSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListConfigurationSetsCommandOutput) => void + ): void; + public listConfigurationSets( + args: ListConfigurationSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListConfigurationSetsCommandOutput) => void), + cb?: (err: any, data?: ListConfigurationSetsCommandOutput) => void + ): Promise | void { + const command = new ListConfigurationSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Provides information about a specific identity associated with your Amazon Pinpoint account, + * including the identity's verification status, its DKIM authentication status, and its + * custom Mail-From settings.

+ * + */ + public getEmailIdentity( + args: GetEmailIdentityCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getEmailIdentity( + args: GetEmailIdentityCommandInput, + cb: (err: any, data?: GetEmailIdentityCommandOutput) => void + ): void; + public getEmailIdentity( + args: GetEmailIdentityCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetEmailIdentityCommandOutput) => void + ): void; + public getEmailIdentity( + args: GetEmailIdentityCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetEmailIdentityCommandOutput) => void), + cb?: (err: any, data?: GetEmailIdentityCommandOutput) => void + ): Promise | void { + const command = new GetEmailIdentityCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

List all of the dedicated IP pools that exist in your Amazon Pinpoint account in the current + * AWS Region.

+ * + */ + public listDedicatedIpPools( + args: ListDedicatedIpPoolsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listDedicatedIpPools( + args: ListDedicatedIpPoolsCommandInput, + cb: (err: any, data?: ListDedicatedIpPoolsCommandOutput) => void + ): void; + public listDedicatedIpPools( + args: ListDedicatedIpPoolsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListDedicatedIpPoolsCommandOutput) => void + ): void; + public listDedicatedIpPools( + args: ListDedicatedIpPoolsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListDedicatedIpPoolsCommandOutput) => void), + cb?: (err: any, data?: ListDedicatedIpPoolsCommandOutput) => void + ): Promise | void { + const command = new ListDedicatedIpPoolsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Enable or disable email sending for messages that use a particular configuration set + * in a specific AWS Region.

+ * + */ + public putConfigurationSetSendingOptions( + args: PutConfigurationSetSendingOptionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putConfigurationSetSendingOptions( + args: PutConfigurationSetSendingOptionsCommandInput, + cb: ( + err: any, + data?: PutConfigurationSetSendingOptionsCommandOutput + ) => void + ): void; + public putConfigurationSetSendingOptions( + args: PutConfigurationSetSendingOptionsCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: PutConfigurationSetSendingOptionsCommandOutput + ) => void + ): void; + public putConfigurationSetSendingOptions( + args: PutConfigurationSetSendingOptionsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutConfigurationSetSendingOptionsCommandOutput + ) => void), + cb?: ( + err: any, + data?: PutConfigurationSetSendingOptionsCommandOutput + ) => void + ): Promise | void { + const command = new PutConfigurationSetSendingOptionsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Obtain information about the email-sending status and capabilities of your Amazon Pinpoint + * account in the current AWS Region.

+ * + */ + public getAccount( + args: GetAccountCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getAccount( + args: GetAccountCommandInput, + cb: (err: any, data?: GetAccountCommandOutput) => void + ): void; + public getAccount( + args: GetAccountCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetAccountCommandOutput) => void + ): void; + public getAccount( + args: GetAccountCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetAccountCommandOutput) => void), + cb?: (err: any, data?: GetAccountCommandOutput) => void + ): Promise | void { + const command = new GetAccountCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Enable or disable the automatic warm-up feature for dedicated IP addresses.

+ * + */ + public putAccountDedicatedIpWarmupAttributes( + args: PutAccountDedicatedIpWarmupAttributesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putAccountDedicatedIpWarmupAttributes( + args: PutAccountDedicatedIpWarmupAttributesCommandInput, + cb: ( + err: any, + data?: PutAccountDedicatedIpWarmupAttributesCommandOutput + ) => void + ): void; + public putAccountDedicatedIpWarmupAttributes( + args: PutAccountDedicatedIpWarmupAttributesCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: PutAccountDedicatedIpWarmupAttributesCommandOutput + ) => void + ): void; + public putAccountDedicatedIpWarmupAttributes( + args: PutAccountDedicatedIpWarmupAttributesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutAccountDedicatedIpWarmupAttributesCommandOutput + ) => void), + cb?: ( + err: any, + data?: PutAccountDedicatedIpWarmupAttributesCommandOutput + ) => void + ): Promise | void { + const command = new PutAccountDedicatedIpWarmupAttributesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Enable or disable the Deliverability dashboard for your Amazon Pinpoint account. When you enable the + * Deliverability dashboard, you gain access to reputation, deliverability, and other metrics for + * the domains that you use to send email using Amazon Pinpoint. You also gain the ability to perform + * predictive inbox placement tests.

+ *

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition + * to any other fees that you accrue by using Amazon Pinpoint. For more information about the + * features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

+ * + */ + public putDeliverabilityDashboardOption( + args: PutDeliverabilityDashboardOptionCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putDeliverabilityDashboardOption( + args: PutDeliverabilityDashboardOptionCommandInput, + cb: (err: any, data?: PutDeliverabilityDashboardOptionCommandOutput) => void + ): void; + public putDeliverabilityDashboardOption( + args: PutDeliverabilityDashboardOptionCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutDeliverabilityDashboardOptionCommandOutput) => void + ): void; + public putDeliverabilityDashboardOption( + args: PutDeliverabilityDashboardOptionCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutDeliverabilityDashboardOptionCommandOutput + ) => void), + cb?: ( + err: any, + data?: PutDeliverabilityDashboardOptionCommandOutput + ) => void + ): Promise | void { + const command = new PutDeliverabilityDashboardOptionCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Retrieve all the deliverability data for a specific campaign. This data is available + * for a campaign only if the campaign sent email by using a domain that the + * Deliverability dashboard is enabled for (PutDeliverabilityDashboardOption + * operation).

+ * + */ + public getDomainDeliverabilityCampaign( + args: GetDomainDeliverabilityCampaignCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getDomainDeliverabilityCampaign( + args: GetDomainDeliverabilityCampaignCommandInput, + cb: (err: any, data?: GetDomainDeliverabilityCampaignCommandOutput) => void + ): void; + public getDomainDeliverabilityCampaign( + args: GetDomainDeliverabilityCampaignCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDomainDeliverabilityCampaignCommandOutput) => void + ): void; + public getDomainDeliverabilityCampaign( + args: GetDomainDeliverabilityCampaignCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: GetDomainDeliverabilityCampaignCommandOutput + ) => void), + cb?: (err: any, data?: GetDomainDeliverabilityCampaignCommandOutput) => void + ): Promise | void { + const command = new GetDomainDeliverabilityCampaignCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Delete an existing configuration set.

+ *

In Amazon Pinpoint, configuration sets are groups of rules that you can + * apply to the emails you send. You apply a configuration set to an email by including a + * reference to the configuration set in the headers of the email. When you apply a + * configuration set to an email, all of the rules in that configuration set are applied to + * the email.

+ * + */ + public deleteConfigurationSet( + args: DeleteConfigurationSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteConfigurationSet( + args: DeleteConfigurationSetCommandInput, + cb: (err: any, data?: DeleteConfigurationSetCommandOutput) => void + ): void; + public deleteConfigurationSet( + args: DeleteConfigurationSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteConfigurationSetCommandOutput) => void + ): void; + public deleteConfigurationSet( + args: DeleteConfigurationSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteConfigurationSetCommandOutput) => void), + cb?: (err: any, data?: DeleteConfigurationSetCommandOutput) => void + ): Promise | void { + const command = new DeleteConfigurationSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Sends an email message. You can use the Amazon Pinpoint Email API to send two types of + * messages:

+ *
    + *
  • + *

    + * Simple – A standard email message. When + * you create this type of message, you specify the sender, the recipient, and the + * message body, and Amazon Pinpoint assembles the message for you.

    + *
  • + *
  • + *

    + * Raw – A raw, MIME-formatted email + * message. When you send this type of email, you have to specify all of the + * message headers, as well as the message body. You can use this message type to + * send messages that contain attachments. The message that you specify has to be a + * valid MIME message.

    + *
  • + *
+ * + */ + public sendEmail( + args: SendEmailCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public sendEmail( + args: SendEmailCommandInput, + cb: (err: any, data?: SendEmailCommandOutput) => void + ): void; + public sendEmail( + args: SendEmailCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SendEmailCommandOutput) => void + ): void; + public sendEmail( + args: SendEmailCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: SendEmailCommandOutput) => void), + cb?: (err: any, data?: SendEmailCommandOutput) => void + ): Promise | void { + const command = new SendEmailCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Specify a custom domain to use for open and click tracking elements in email that you + * send using Amazon Pinpoint.

+ * + * + */ + public putConfigurationSetTrackingOptions( + args: PutConfigurationSetTrackingOptionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putConfigurationSetTrackingOptions( + args: PutConfigurationSetTrackingOptionsCommandInput, + cb: ( + err: any, + data?: PutConfigurationSetTrackingOptionsCommandOutput + ) => void + ): void; + public putConfigurationSetTrackingOptions( + args: PutConfigurationSetTrackingOptionsCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: PutConfigurationSetTrackingOptionsCommandOutput + ) => void + ): void; + public putConfigurationSetTrackingOptions( + args: PutConfigurationSetTrackingOptionsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutConfigurationSetTrackingOptionsCommandOutput + ) => void), + cb?: ( + err: any, + data?: PutConfigurationSetTrackingOptionsCommandOutput + ) => void + ): Promise | void { + const command = new PutConfigurationSetTrackingOptionsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Delete a dedicated IP pool.

+ * + */ + public deleteDedicatedIpPool( + args: DeleteDedicatedIpPoolCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteDedicatedIpPool( + args: DeleteDedicatedIpPoolCommandInput, + cb: (err: any, data?: DeleteDedicatedIpPoolCommandOutput) => void + ): void; + public deleteDedicatedIpPool( + args: DeleteDedicatedIpPoolCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteDedicatedIpPoolCommandOutput) => void + ): void; + public deleteDedicatedIpPool( + args: DeleteDedicatedIpPoolCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteDedicatedIpPoolCommandOutput) => void), + cb?: (err: any, data?: DeleteDedicatedIpPoolCommandOutput) => void + ): Promise | void { + const command = new DeleteDedicatedIpPoolCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Used to enable or disable the custom Mail-From domain configuration for an email + * identity.

+ * + */ + public putEmailIdentityMailFromAttributes( + args: PutEmailIdentityMailFromAttributesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putEmailIdentityMailFromAttributes( + args: PutEmailIdentityMailFromAttributesCommandInput, + cb: ( + err: any, + data?: PutEmailIdentityMailFromAttributesCommandOutput + ) => void + ): void; + public putEmailIdentityMailFromAttributes( + args: PutEmailIdentityMailFromAttributesCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: PutEmailIdentityMailFromAttributesCommandOutput + ) => void + ): void; + public putEmailIdentityMailFromAttributes( + args: PutEmailIdentityMailFromAttributesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutEmailIdentityMailFromAttributesCommandOutput + ) => void), + cb?: ( + err: any, + data?: PutEmailIdentityMailFromAttributesCommandOutput + ) => void + ): Promise | void { + const command = new PutEmailIdentityMailFromAttributesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Retrieve the results of a predictive inbox placement test.

+ * + */ + public getDeliverabilityTestReport( + args: GetDeliverabilityTestReportCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getDeliverabilityTestReport( + args: GetDeliverabilityTestReportCommandInput, + cb: (err: any, data?: GetDeliverabilityTestReportCommandOutput) => void + ): void; + public getDeliverabilityTestReport( + args: GetDeliverabilityTestReportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDeliverabilityTestReportCommandOutput) => void + ): void; + public getDeliverabilityTestReport( + args: GetDeliverabilityTestReportCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetDeliverabilityTestReportCommandOutput) => void), + cb?: (err: any, data?: GetDeliverabilityTestReportCommandOutput) => void + ): Promise | void { + const command = new GetDeliverabilityTestReportCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

List the dedicated IP addresses that are associated with your Amazon Pinpoint + * account.

+ * + */ + public getDedicatedIps( + args: GetDedicatedIpsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getDedicatedIps( + args: GetDedicatedIpsCommandInput, + cb: (err: any, data?: GetDedicatedIpsCommandOutput) => void + ): void; + public getDedicatedIps( + args: GetDedicatedIpsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDedicatedIpsCommandOutput) => void + ): void; + public getDedicatedIps( + args: GetDedicatedIpsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetDedicatedIpsCommandOutput) => void), + cb?: (err: any, data?: GetDedicatedIpsCommandOutput) => void + ): Promise | void { + const command = new GetDedicatedIpsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Remove one or more tags (keys and values) from a specified resource.

+ * + */ + public untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public untagResource( + args: UntagResourceCommandInput, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UntagResourceCommandOutput) => void), + cb?: (err: any, data?: UntagResourceCommandOutput) => void + ): Promise | void { + const command = new UntagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Retrieve a list of the tags (keys and values) that are associated with a specified + * resource. A tag is a label that you optionally define and associate + * with a resource in Amazon Pinpoint. Each tag consists of a required tag + * key and an optional associated tag value. A tag key + * is a general label that acts as a category for more specific tag values. A tag value + * acts as a descriptor within a tag key.

+ * + */ + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListTagsForResourceCommandOutput) => void), + cb?: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): Promise | void { + const command = new ListTagsForResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Enable or disable collection of reputation metrics for emails that you send using a + * particular configuration set in a specific AWS Region.

+ * + */ + public putConfigurationSetReputationOptions( + args: PutConfigurationSetReputationOptionsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putConfigurationSetReputationOptions( + args: PutConfigurationSetReputationOptionsCommandInput, + cb: ( + err: any, + data?: PutConfigurationSetReputationOptionsCommandOutput + ) => void + ): void; + public putConfigurationSetReputationOptions( + args: PutConfigurationSetReputationOptionsCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: PutConfigurationSetReputationOptionsCommandOutput + ) => void + ): void; + public putConfigurationSetReputationOptions( + args: PutConfigurationSetReputationOptionsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutConfigurationSetReputationOptionsCommandOutput + ) => void), + cb?: ( + err: any, + data?: PutConfigurationSetReputationOptionsCommandOutput + ) => void + ): Promise | void { + const command = new PutConfigurationSetReputationOptionsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Get information about an existing configuration set, including the dedicated IP pool + * that it's associated with, whether or not it's enabled for sending email, and + * more.

+ *

In Amazon Pinpoint, configuration sets are groups of rules that you can + * apply to the emails you send. You apply a configuration set to an email by including a + * reference to the configuration set in the headers of the email. When you apply a + * configuration set to an email, all of the rules in that configuration set are applied to + * the email.

+ * + */ + public getConfigurationSet( + args: GetConfigurationSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getConfigurationSet( + args: GetConfigurationSetCommandInput, + cb: (err: any, data?: GetConfigurationSetCommandOutput) => void + ): void; + public getConfigurationSet( + args: GetConfigurationSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetConfigurationSetCommandOutput) => void + ): void; + public getConfigurationSet( + args: GetConfigurationSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetConfigurationSetCommandOutput) => void), + cb?: (err: any, data?: GetConfigurationSetCommandOutput) => void + ): Promise | void { + const command = new GetConfigurationSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns a list of all of the email identities that are associated with your Amazon Pinpoint + * account. An identity can be either an email address or a domain. This operation returns + * identities that are verified as well as those that aren't.

+ * + */ + public listEmailIdentities( + args: ListEmailIdentitiesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listEmailIdentities( + args: ListEmailIdentitiesCommandInput, + cb: (err: any, data?: ListEmailIdentitiesCommandOutput) => void + ): void; + public listEmailIdentities( + args: ListEmailIdentitiesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListEmailIdentitiesCommandOutput) => void + ): void; + public listEmailIdentities( + args: ListEmailIdentitiesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListEmailIdentitiesCommandOutput) => void), + cb?: (err: any, data?: ListEmailIdentitiesCommandOutput) => void + ): Promise | void { + const command = new ListEmailIdentitiesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Create a new pool of dedicated IP addresses. A pool can include one or more dedicated + * IP addresses that are associated with your Amazon Pinpoint account. You can associate a pool with + * a configuration set. When you send an email that uses that configuration set, Amazon Pinpoint + * sends it using only the IP addresses in the associated pool.

+ * + */ + public createDedicatedIpPool( + args: CreateDedicatedIpPoolCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createDedicatedIpPool( + args: CreateDedicatedIpPoolCommandInput, + cb: (err: any, data?: CreateDedicatedIpPoolCommandOutput) => void + ): void; + public createDedicatedIpPool( + args: CreateDedicatedIpPoolCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateDedicatedIpPoolCommandOutput) => void + ): void; + public createDedicatedIpPool( + args: CreateDedicatedIpPoolCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateDedicatedIpPoolCommandOutput) => void), + cb?: (err: any, data?: CreateDedicatedIpPoolCommandOutput) => void + ): Promise | void { + const command = new CreateDedicatedIpPoolCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Retrieve inbox placement and engagement rates for the domains that you use to send + * email.

+ * + */ + public getDomainStatisticsReport( + args: GetDomainStatisticsReportCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getDomainStatisticsReport( + args: GetDomainStatisticsReportCommandInput, + cb: (err: any, data?: GetDomainStatisticsReportCommandOutput) => void + ): void; + public getDomainStatisticsReport( + args: GetDomainStatisticsReportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDomainStatisticsReportCommandOutput) => void + ): void; + public getDomainStatisticsReport( + args: GetDomainStatisticsReportCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetDomainStatisticsReportCommandOutput) => void), + cb?: (err: any, data?: GetDomainStatisticsReportCommandOutput) => void + ): Promise | void { + const command = new GetDomainStatisticsReportCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Update the configuration of an event destination for a configuration set.

+ *

In Amazon Pinpoint, events include message sends, deliveries, opens, + * clicks, bounces, and complaints. Event destinations are places that + * you can send information about these events to. For example, you can send event data to + * Amazon SNS to receive notifications when you receive bounces or complaints, or you can use + * Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

+ * + */ + public updateConfigurationSetEventDestination( + args: UpdateConfigurationSetEventDestinationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateConfigurationSetEventDestination( + args: UpdateConfigurationSetEventDestinationCommandInput, + cb: ( + err: any, + data?: UpdateConfigurationSetEventDestinationCommandOutput + ) => void + ): void; + public updateConfigurationSetEventDestination( + args: UpdateConfigurationSetEventDestinationCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: UpdateConfigurationSetEventDestinationCommandOutput + ) => void + ): void; + public updateConfigurationSetEventDestination( + args: UpdateConfigurationSetEventDestinationCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: UpdateConfigurationSetEventDestinationCommandOutput + ) => void), + cb?: ( + err: any, + data?: UpdateConfigurationSetEventDestinationCommandOutput + ) => void + ): Promise | void { + const command = new UpdateConfigurationSetEventDestinationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Used to enable or disable feedback forwarding for an identity. This setting determines + * what happens when an identity is used to send an email that results in a bounce or + * complaint event.

+ *

When you enable feedback forwarding, Amazon Pinpoint sends you email notifications when bounce + * or complaint events occur. Amazon Pinpoint sends this notification to the address that you + * specified in the Return-Path header of the original email.

+ *

When you disable feedback forwarding, Amazon Pinpoint sends notifications through other + * mechanisms, such as by notifying an Amazon SNS topic. You're required to have a method of + * tracking bounces and complaints. If you haven't set up another mechanism for receiving + * bounce or complaint notifications, Amazon Pinpoint sends an email notification when these events + * occur (even if this setting is disabled).

+ * + */ + public putEmailIdentityFeedbackAttributes( + args: PutEmailIdentityFeedbackAttributesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putEmailIdentityFeedbackAttributes( + args: PutEmailIdentityFeedbackAttributesCommandInput, + cb: ( + err: any, + data?: PutEmailIdentityFeedbackAttributesCommandOutput + ) => void + ): void; + public putEmailIdentityFeedbackAttributes( + args: PutEmailIdentityFeedbackAttributesCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: PutEmailIdentityFeedbackAttributesCommandOutput + ) => void + ): void; + public putEmailIdentityFeedbackAttributes( + args: PutEmailIdentityFeedbackAttributesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: PutEmailIdentityFeedbackAttributesCommandOutput + ) => void), + cb?: ( + err: any, + data?: PutEmailIdentityFeedbackAttributesCommandOutput + ) => void + ): Promise | void { + const command = new PutEmailIdentityFeedbackAttributesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Retrieve a list of event destinations that are associated with a configuration + * set.

+ *

In Amazon Pinpoint, events include message sends, deliveries, opens, + * clicks, bounces, and complaints. Event destinations are places that + * you can send information about these events to. For example, you can send event data to + * Amazon SNS to receive notifications when you receive bounces or complaints, or you can use + * Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

+ * + */ + public getConfigurationSetEventDestinations( + args: GetConfigurationSetEventDestinationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getConfigurationSetEventDestinations( + args: GetConfigurationSetEventDestinationsCommandInput, + cb: ( + err: any, + data?: GetConfigurationSetEventDestinationsCommandOutput + ) => void + ): void; + public getConfigurationSetEventDestinations( + args: GetConfigurationSetEventDestinationsCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: GetConfigurationSetEventDestinationsCommandOutput + ) => void + ): void; + public getConfigurationSetEventDestinations( + args: GetConfigurationSetEventDestinationsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: GetConfigurationSetEventDestinationsCommandOutput + ) => void), + cb?: ( + err: any, + data?: GetConfigurationSetEventDestinationsCommandOutput + ) => void + ): Promise | void { + const command = new GetConfigurationSetEventDestinationsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Get information about a dedicated IP address, including the name of the dedicated IP + * pool that it's associated with, as well information about the automatic warm-up process + * for the address.

+ * + */ + public getDedicatedIp( + args: GetDedicatedIpCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getDedicatedIp( + args: GetDedicatedIpCommandInput, + cb: (err: any, data?: GetDedicatedIpCommandOutput) => void + ): void; + public getDedicatedIp( + args: GetDedicatedIpCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetDedicatedIpCommandOutput) => void + ): void; + public getDedicatedIp( + args: GetDedicatedIpCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetDedicatedIpCommandOutput) => void), + cb?: (err: any, data?: GetDedicatedIpCommandOutput) => void + ): Promise | void { + const command = new GetDedicatedIpCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Retrieve deliverability data for all the campaigns that used a specific domain to send + * email during a specified time range. This data is available for a domain only if you + * enabled the Deliverability dashboard (PutDeliverabilityDashboardOption operation) + * for the domain.

+ * + */ + public listDomainDeliverabilityCampaigns( + args: ListDomainDeliverabilityCampaignsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listDomainDeliverabilityCampaigns( + args: ListDomainDeliverabilityCampaignsCommandInput, + cb: ( + err: any, + data?: ListDomainDeliverabilityCampaignsCommandOutput + ) => void + ): void; + public listDomainDeliverabilityCampaigns( + args: ListDomainDeliverabilityCampaignsCommandInput, + options: __HttpHandlerOptions, + cb: ( + err: any, + data?: ListDomainDeliverabilityCampaignsCommandOutput + ) => void + ): void; + public listDomainDeliverabilityCampaigns( + args: ListDomainDeliverabilityCampaignsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | (( + err: any, + data?: ListDomainDeliverabilityCampaignsCommandOutput + ) => void), + cb?: ( + err: any, + data?: ListDomainDeliverabilityCampaignsCommandOutput + ) => void + ): Promise | void { + const command = new ListDomainDeliverabilityCampaignsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Retrieve a list of the blacklists that your dedicated IP addresses appear on.

+ * + */ + public getBlacklistReports( + args: GetBlacklistReportsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getBlacklistReports( + args: GetBlacklistReportsCommandInput, + cb: (err: any, data?: GetBlacklistReportsCommandOutput) => void + ): void; + public getBlacklistReports( + args: GetBlacklistReportsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetBlacklistReportsCommandOutput) => void + ): void; + public getBlacklistReports( + args: GetBlacklistReportsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetBlacklistReportsCommandOutput) => void), + cb?: (err: any, data?: GetBlacklistReportsCommandOutput) => void + ): Promise | void { + const command = new GetBlacklistReportsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } +} diff --git a/clients/client-pinpoint-email/PinpointEmailClient.ts b/clients/client-pinpoint-email/PinpointEmailClient.ts new file mode 100644 index 000000000000..83a2c30fc16c --- /dev/null +++ b/clients/client-pinpoint-email/PinpointEmailClient.ts @@ -0,0 +1,390 @@ +import { + CreateConfigurationSetEventDestinationRequest, + CreateConfigurationSetEventDestinationResponse, + CreateConfigurationSetRequest, + CreateConfigurationSetResponse, + CreateDedicatedIpPoolRequest, + CreateDedicatedIpPoolResponse, + CreateDeliverabilityTestReportRequest, + CreateDeliverabilityTestReportResponse, + CreateEmailIdentityRequest, + CreateEmailIdentityResponse, + DeleteConfigurationSetEventDestinationRequest, + DeleteConfigurationSetEventDestinationResponse, + DeleteConfigurationSetRequest, + DeleteConfigurationSetResponse, + DeleteDedicatedIpPoolRequest, + DeleteDedicatedIpPoolResponse, + DeleteEmailIdentityRequest, + DeleteEmailIdentityResponse, + GetAccountRequest, + GetAccountResponse, + GetBlacklistReportsRequest, + GetBlacklistReportsResponse, + GetConfigurationSetEventDestinationsRequest, + GetConfigurationSetEventDestinationsResponse, + GetConfigurationSetRequest, + GetConfigurationSetResponse, + GetDedicatedIpRequest, + GetDedicatedIpResponse, + GetDedicatedIpsRequest, + GetDedicatedIpsResponse, + GetDeliverabilityDashboardOptionsRequest, + GetDeliverabilityDashboardOptionsResponse, + GetDeliverabilityTestReportRequest, + GetDeliverabilityTestReportResponse, + GetDomainDeliverabilityCampaignRequest, + GetDomainDeliverabilityCampaignResponse, + GetDomainStatisticsReportRequest, + GetDomainStatisticsReportResponse, + GetEmailIdentityRequest, + GetEmailIdentityResponse, + ListConfigurationSetsRequest, + ListConfigurationSetsResponse, + ListDedicatedIpPoolsRequest, + ListDedicatedIpPoolsResponse, + ListDeliverabilityTestReportsRequest, + ListDeliverabilityTestReportsResponse, + ListDomainDeliverabilityCampaignsRequest, + ListDomainDeliverabilityCampaignsResponse, + ListEmailIdentitiesRequest, + ListEmailIdentitiesResponse, + ListTagsForResourceRequest, + ListTagsForResourceResponse, + PutAccountDedicatedIpWarmupAttributesRequest, + PutAccountDedicatedIpWarmupAttributesResponse, + PutAccountSendingAttributesRequest, + PutAccountSendingAttributesResponse, + PutConfigurationSetDeliveryOptionsRequest, + PutConfigurationSetDeliveryOptionsResponse, + PutConfigurationSetReputationOptionsRequest, + PutConfigurationSetReputationOptionsResponse, + PutConfigurationSetSendingOptionsRequest, + PutConfigurationSetSendingOptionsResponse, + PutConfigurationSetTrackingOptionsRequest, + PutConfigurationSetTrackingOptionsResponse, + PutDedicatedIpInPoolRequest, + PutDedicatedIpInPoolResponse, + PutDedicatedIpWarmupAttributesRequest, + PutDedicatedIpWarmupAttributesResponse, + PutDeliverabilityDashboardOptionRequest, + PutDeliverabilityDashboardOptionResponse, + PutEmailIdentityDkimAttributesRequest, + PutEmailIdentityDkimAttributesResponse, + PutEmailIdentityFeedbackAttributesRequest, + PutEmailIdentityFeedbackAttributesResponse, + PutEmailIdentityMailFromAttributesRequest, + PutEmailIdentityMailFromAttributesResponse, + SendEmailRequest, + SendEmailResponse, + TagResourceRequest, + TagResourceResponse, + UntagResourceRequest, + UntagResourceResponse, + UpdateConfigurationSetEventDestinationRequest, + UpdateConfigurationSetEventDestinationResponse +} from "./models/index"; +import { ClientDefaultValues as __ClientDefaultValues } from "./runtimeConfig"; +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + HostHeaderInputConfig, + HostHeaderResolvedConfig, + getHostHeaderPlugin, + resolveHostHeaderConfig +} from "@aws-sdk/middleware-host-header"; +import { + RetryInputConfig, + RetryResolvedConfig, + getRetryPlugin, + resolveRetryConfig +} from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig +} from "@aws-sdk/middleware-signing"; +import { + UserAgentInputConfig, + UserAgentResolvedConfig, + getUserAgentPlugin, + resolveUserAgentConfig +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration +} from "@aws-sdk/smithy-client"; +import { + RegionInfoProvider, + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Provider as __Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser +} from "@aws-sdk/types"; + +export type ServiceInputTypes = + | CreateConfigurationSetEventDestinationRequest + | CreateConfigurationSetRequest + | CreateDedicatedIpPoolRequest + | CreateDeliverabilityTestReportRequest + | CreateEmailIdentityRequest + | DeleteConfigurationSetEventDestinationRequest + | DeleteConfigurationSetRequest + | DeleteDedicatedIpPoolRequest + | DeleteEmailIdentityRequest + | GetAccountRequest + | GetBlacklistReportsRequest + | GetConfigurationSetEventDestinationsRequest + | GetConfigurationSetRequest + | GetDedicatedIpRequest + | GetDedicatedIpsRequest + | GetDeliverabilityDashboardOptionsRequest + | GetDeliverabilityTestReportRequest + | GetDomainDeliverabilityCampaignRequest + | GetDomainStatisticsReportRequest + | GetEmailIdentityRequest + | ListConfigurationSetsRequest + | ListDedicatedIpPoolsRequest + | ListDeliverabilityTestReportsRequest + | ListDomainDeliverabilityCampaignsRequest + | ListEmailIdentitiesRequest + | ListTagsForResourceRequest + | PutAccountDedicatedIpWarmupAttributesRequest + | PutAccountSendingAttributesRequest + | PutConfigurationSetDeliveryOptionsRequest + | PutConfigurationSetReputationOptionsRequest + | PutConfigurationSetSendingOptionsRequest + | PutConfigurationSetTrackingOptionsRequest + | PutDedicatedIpInPoolRequest + | PutDedicatedIpWarmupAttributesRequest + | PutDeliverabilityDashboardOptionRequest + | PutEmailIdentityDkimAttributesRequest + | PutEmailIdentityFeedbackAttributesRequest + | PutEmailIdentityMailFromAttributesRequest + | SendEmailRequest + | TagResourceRequest + | UntagResourceRequest + | UpdateConfigurationSetEventDestinationRequest; + +export type ServiceOutputTypes = + | CreateConfigurationSetEventDestinationResponse + | CreateConfigurationSetResponse + | CreateDedicatedIpPoolResponse + | CreateDeliverabilityTestReportResponse + | CreateEmailIdentityResponse + | DeleteConfigurationSetEventDestinationResponse + | DeleteConfigurationSetResponse + | DeleteDedicatedIpPoolResponse + | DeleteEmailIdentityResponse + | GetAccountResponse + | GetBlacklistReportsResponse + | GetConfigurationSetEventDestinationsResponse + | GetConfigurationSetResponse + | GetDedicatedIpResponse + | GetDedicatedIpsResponse + | GetDeliverabilityDashboardOptionsResponse + | GetDeliverabilityTestReportResponse + | GetDomainDeliverabilityCampaignResponse + | GetDomainStatisticsReportResponse + | GetEmailIdentityResponse + | ListConfigurationSetsResponse + | ListDedicatedIpPoolsResponse + | ListDeliverabilityTestReportsResponse + | ListDomainDeliverabilityCampaignsResponse + | ListEmailIdentitiesResponse + | ListTagsForResourceResponse + | PutAccountDedicatedIpWarmupAttributesResponse + | PutAccountSendingAttributesResponse + | PutConfigurationSetDeliveryOptionsResponse + | PutConfigurationSetReputationOptionsResponse + | PutConfigurationSetSendingOptionsResponse + | PutConfigurationSetTrackingOptionsResponse + | PutDedicatedIpInPoolResponse + | PutDedicatedIpWarmupAttributesResponse + | PutDeliverabilityDashboardOptionResponse + | PutEmailIdentityDkimAttributesResponse + | PutEmailIdentityFeedbackAttributesResponse + | PutEmailIdentityMailFromAttributesResponse + | SendEmailResponse + | TagResourceResponse + | UntagResourceResponse + | UpdateConfigurationSetEventDestinationResponse; + +export interface ClientDefaults + extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the @aws-sdk/types.Hash interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + */ + sha256?: __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + */ + bodyLengthChecker?: (body: any) => number | undefined; + + /** + * A function that converts a stream into an array of bytes. + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string + */ + utf8Encoder?: __Encoder; + + /** + * The string that will be used to populate default value in 'User-Agent' header + */ + defaultUserAgent?: string; + + /** + * The runtime environment + */ + runtime?: string; + + /** + * The service name with which to sign requests. + */ + signingName?: string; + + /** + * Default credentials provider; Not available in browser runtime + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Provider function that return promise of a region string + */ + regionDefaultProvider?: (input: any) => __Provider; + + /** + * Fetch related hostname, signing name or signing region with given region. + */ + regionInfoProvider?: RegionInfoProvider; +} + +export type PinpointEmailClientConfig = Partial< + __SmithyConfiguration<__HttpHandlerOptions> +> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + AwsAuthInputConfig & + RetryInputConfig & + UserAgentInputConfig & + HostHeaderInputConfig; + +export type PinpointEmailClientResolvedConfig = __SmithyResolvedConfiguration< + __HttpHandlerOptions +> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + AwsAuthResolvedConfig & + RetryResolvedConfig & + UserAgentResolvedConfig & + HostHeaderResolvedConfig; + +/** + * + * Amazon Pinpoint Email Service + *

Welcome to the Amazon Pinpoint Email API Reference. This guide provides + * information about the Amazon Pinpoint Email API (version 1.0), including supported + * operations, data types, parameters, and schemas.

+ *

+ * Amazon Pinpoint is an AWS service that you + * can use to engage with your customers across multiple messaging channels. You can use + * Amazon Pinpoint to send email, SMS text messages, voice messages, and push notifications. The + * Amazon Pinpoint Email API provides programmatic access to options that are unique to the + * email channel and supplement the options provided by the Amazon Pinpoint API.

+ *

If you're new to Amazon Pinpoint, you might find it helpful to also review the Amazon + * Pinpoint Developer Guide. The Amazon Pinpoint Developer + * Guide provides tutorials, code samples, and procedures that demonstrate + * how to use Amazon Pinpoint features programmatically and how to integrate Amazon Pinpoint functionality into + * mobile apps and other types of applications. The guide also provides information about + * key topics such as Amazon Pinpoint integration with other AWS services and the limits that apply + * to using the service.

+ *

The Amazon Pinpoint Email API is available in several AWS Regions and it provides an endpoint + * for each of these Regions. For a list of all the Regions and endpoints where the API is + * currently available, see AWS Service Endpoints in + * the Amazon Web Services General Reference. To learn more about AWS Regions, see + * Managing AWS + * Regions in the Amazon Web Services General Reference.

+ *

In each Region, AWS maintains multiple Availability Zones. These Availability Zones + * are physically isolated from each other, but are united by private, low-latency, + * high-throughput, and highly redundant network connections. These Availability Zones + * enable us to provide very high levels of availability and redundancy, while also + * minimizing latency. To learn more about the number of Availability Zones that are + * available in each Region, see AWS Global Infrastructure.

+ * + */ +export class PinpointEmailClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + PinpointEmailClientResolvedConfig +> { + readonly config: PinpointEmailClientResolvedConfig; + + constructor(configuration: PinpointEmailClientConfig) { + let _config_0 = { + ...__ClientDefaultValues, + ...configuration + }; + let _config_1 = resolveRegionConfig(_config_0); + let _config_2 = resolveEndpointsConfig(_config_1); + let _config_3 = resolveAwsAuthConfig(_config_2); + let _config_4 = resolveRetryConfig(_config_3); + let _config_5 = resolveUserAgentConfig(_config_4); + let _config_6 = resolveHostHeaderConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + } + + destroy(): void {} +} diff --git a/clients/client-pinpoint-email/README.md b/clients/client-pinpoint-email/README.md new file mode 100644 index 000000000000..84760f537533 --- /dev/null +++ b/clients/client-pinpoint-email/README.md @@ -0,0 +1,6 @@ +@aws-sdk/client-pinpoint-email + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-pinpoint-email/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-pinpoint-email) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-pinpoint-email.svg)](https://www.npmjs.com/package/@aws-sdk/client-pinpoint-email) + +For SDK usage, please step to [SDK reademe](https://github.com/aws/aws-sdk-js-v3). diff --git a/clients/client-pinpoint-email/commands/CreateConfigurationSetCommand.ts b/clients/client-pinpoint-email/commands/CreateConfigurationSetCommand.ts new file mode 100644 index 000000000000..8b260a1aeb43 --- /dev/null +++ b/clients/client-pinpoint-email/commands/CreateConfigurationSetCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + CreateConfigurationSetRequest, + CreateConfigurationSetResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateConfigurationSetCommand, + serializeAws_restJson1_1CreateConfigurationSetCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateConfigurationSetCommandInput = CreateConfigurationSetRequest; +export type CreateConfigurationSetCommandOutput = CreateConfigurationSetResponse; + +export class CreateConfigurationSetCommand extends $Command< + CreateConfigurationSetCommandInput, + CreateConfigurationSetCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateConfigurationSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateConfigurationSetCommandInput, + CreateConfigurationSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateConfigurationSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateConfigurationSetCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateConfigurationSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/CreateConfigurationSetEventDestinationCommand.ts b/clients/client-pinpoint-email/commands/CreateConfigurationSetEventDestinationCommand.ts new file mode 100644 index 000000000000..9bed63a36fae --- /dev/null +++ b/clients/client-pinpoint-email/commands/CreateConfigurationSetEventDestinationCommand.ts @@ -0,0 +1,95 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + CreateConfigurationSetEventDestinationRequest, + CreateConfigurationSetEventDestinationResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateConfigurationSetEventDestinationCommand, + serializeAws_restJson1_1CreateConfigurationSetEventDestinationCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateConfigurationSetEventDestinationCommandInput = CreateConfigurationSetEventDestinationRequest; +export type CreateConfigurationSetEventDestinationCommandOutput = CreateConfigurationSetEventDestinationResponse; + +export class CreateConfigurationSetEventDestinationCommand extends $Command< + CreateConfigurationSetEventDestinationCommandInput, + CreateConfigurationSetEventDestinationCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor( + readonly input: CreateConfigurationSetEventDestinationCommandInput + ) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateConfigurationSetEventDestinationCommandInput, + CreateConfigurationSetEventDestinationCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateConfigurationSetEventDestinationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateConfigurationSetEventDestinationCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateConfigurationSetEventDestinationCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/CreateDedicatedIpPoolCommand.ts b/clients/client-pinpoint-email/commands/CreateDedicatedIpPoolCommand.ts new file mode 100644 index 000000000000..bb497c429c57 --- /dev/null +++ b/clients/client-pinpoint-email/commands/CreateDedicatedIpPoolCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + CreateDedicatedIpPoolRequest, + CreateDedicatedIpPoolResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateDedicatedIpPoolCommand, + serializeAws_restJson1_1CreateDedicatedIpPoolCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateDedicatedIpPoolCommandInput = CreateDedicatedIpPoolRequest; +export type CreateDedicatedIpPoolCommandOutput = CreateDedicatedIpPoolResponse; + +export class CreateDedicatedIpPoolCommand extends $Command< + CreateDedicatedIpPoolCommandInput, + CreateDedicatedIpPoolCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDedicatedIpPoolCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateDedicatedIpPoolCommandInput, + CreateDedicatedIpPoolCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateDedicatedIpPoolCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateDedicatedIpPoolCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateDedicatedIpPoolCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/CreateDeliverabilityTestReportCommand.ts b/clients/client-pinpoint-email/commands/CreateDeliverabilityTestReportCommand.ts new file mode 100644 index 000000000000..8b508dcc1056 --- /dev/null +++ b/clients/client-pinpoint-email/commands/CreateDeliverabilityTestReportCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + CreateDeliverabilityTestReportRequest, + CreateDeliverabilityTestReportResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateDeliverabilityTestReportCommand, + serializeAws_restJson1_1CreateDeliverabilityTestReportCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateDeliverabilityTestReportCommandInput = CreateDeliverabilityTestReportRequest; +export type CreateDeliverabilityTestReportCommandOutput = CreateDeliverabilityTestReportResponse; + +export class CreateDeliverabilityTestReportCommand extends $Command< + CreateDeliverabilityTestReportCommandInput, + CreateDeliverabilityTestReportCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateDeliverabilityTestReportCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateDeliverabilityTestReportCommandInput, + CreateDeliverabilityTestReportCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateDeliverabilityTestReportCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateDeliverabilityTestReportCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateDeliverabilityTestReportCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/CreateEmailIdentityCommand.ts b/clients/client-pinpoint-email/commands/CreateEmailIdentityCommand.ts new file mode 100644 index 000000000000..60e1ccd2b243 --- /dev/null +++ b/clients/client-pinpoint-email/commands/CreateEmailIdentityCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + CreateEmailIdentityRequest, + CreateEmailIdentityResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1CreateEmailIdentityCommand, + serializeAws_restJson1_1CreateEmailIdentityCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateEmailIdentityCommandInput = CreateEmailIdentityRequest; +export type CreateEmailIdentityCommandOutput = CreateEmailIdentityResponse; + +export class CreateEmailIdentityCommand extends $Command< + CreateEmailIdentityCommandInput, + CreateEmailIdentityCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateEmailIdentityCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateEmailIdentityCommandInput, + CreateEmailIdentityCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateEmailIdentityCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1CreateEmailIdentityCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1CreateEmailIdentityCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/DeleteConfigurationSetCommand.ts b/clients/client-pinpoint-email/commands/DeleteConfigurationSetCommand.ts new file mode 100644 index 000000000000..fc748ccc7008 --- /dev/null +++ b/clients/client-pinpoint-email/commands/DeleteConfigurationSetCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + DeleteConfigurationSetRequest, + DeleteConfigurationSetResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1DeleteConfigurationSetCommand, + serializeAws_restJson1_1DeleteConfigurationSetCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteConfigurationSetCommandInput = DeleteConfigurationSetRequest; +export type DeleteConfigurationSetCommandOutput = DeleteConfigurationSetResponse; + +export class DeleteConfigurationSetCommand extends $Command< + DeleteConfigurationSetCommandInput, + DeleteConfigurationSetCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteConfigurationSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteConfigurationSetCommandInput, + DeleteConfigurationSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteConfigurationSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteConfigurationSetCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteConfigurationSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/DeleteConfigurationSetEventDestinationCommand.ts b/clients/client-pinpoint-email/commands/DeleteConfigurationSetEventDestinationCommand.ts new file mode 100644 index 000000000000..04dff1e0db45 --- /dev/null +++ b/clients/client-pinpoint-email/commands/DeleteConfigurationSetEventDestinationCommand.ts @@ -0,0 +1,95 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + DeleteConfigurationSetEventDestinationRequest, + DeleteConfigurationSetEventDestinationResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1DeleteConfigurationSetEventDestinationCommand, + serializeAws_restJson1_1DeleteConfigurationSetEventDestinationCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteConfigurationSetEventDestinationCommandInput = DeleteConfigurationSetEventDestinationRequest; +export type DeleteConfigurationSetEventDestinationCommandOutput = DeleteConfigurationSetEventDestinationResponse; + +export class DeleteConfigurationSetEventDestinationCommand extends $Command< + DeleteConfigurationSetEventDestinationCommandInput, + DeleteConfigurationSetEventDestinationCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor( + readonly input: DeleteConfigurationSetEventDestinationCommandInput + ) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteConfigurationSetEventDestinationCommandInput, + DeleteConfigurationSetEventDestinationCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteConfigurationSetEventDestinationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteConfigurationSetEventDestinationCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteConfigurationSetEventDestinationCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/DeleteDedicatedIpPoolCommand.ts b/clients/client-pinpoint-email/commands/DeleteDedicatedIpPoolCommand.ts new file mode 100644 index 000000000000..c62497215a8f --- /dev/null +++ b/clients/client-pinpoint-email/commands/DeleteDedicatedIpPoolCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + DeleteDedicatedIpPoolRequest, + DeleteDedicatedIpPoolResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1DeleteDedicatedIpPoolCommand, + serializeAws_restJson1_1DeleteDedicatedIpPoolCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteDedicatedIpPoolCommandInput = DeleteDedicatedIpPoolRequest; +export type DeleteDedicatedIpPoolCommandOutput = DeleteDedicatedIpPoolResponse; + +export class DeleteDedicatedIpPoolCommand extends $Command< + DeleteDedicatedIpPoolCommandInput, + DeleteDedicatedIpPoolCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteDedicatedIpPoolCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteDedicatedIpPoolCommandInput, + DeleteDedicatedIpPoolCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteDedicatedIpPoolCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteDedicatedIpPoolCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteDedicatedIpPoolCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/DeleteEmailIdentityCommand.ts b/clients/client-pinpoint-email/commands/DeleteEmailIdentityCommand.ts new file mode 100644 index 000000000000..18fd4edbf4dc --- /dev/null +++ b/clients/client-pinpoint-email/commands/DeleteEmailIdentityCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + DeleteEmailIdentityRequest, + DeleteEmailIdentityResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1DeleteEmailIdentityCommand, + serializeAws_restJson1_1DeleteEmailIdentityCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteEmailIdentityCommandInput = DeleteEmailIdentityRequest; +export type DeleteEmailIdentityCommandOutput = DeleteEmailIdentityResponse; + +export class DeleteEmailIdentityCommand extends $Command< + DeleteEmailIdentityCommandInput, + DeleteEmailIdentityCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteEmailIdentityCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteEmailIdentityCommandInput, + DeleteEmailIdentityCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteEmailIdentityCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1DeleteEmailIdentityCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1DeleteEmailIdentityCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetAccountCommand.ts b/clients/client-pinpoint-email/commands/GetAccountCommand.ts new file mode 100644 index 000000000000..1799ccbff384 --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetAccountCommand.ts @@ -0,0 +1,81 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { GetAccountRequest, GetAccountResponse } from "../models/index"; +import { + deserializeAws_restJson1_1GetAccountCommand, + serializeAws_restJson1_1GetAccountCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetAccountCommandInput = GetAccountRequest; +export type GetAccountCommandOutput = GetAccountResponse; + +export class GetAccountCommand extends $Command< + GetAccountCommandInput, + GetAccountCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetAccountCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetAccountCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetAccountCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetAccountCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetBlacklistReportsCommand.ts b/clients/client-pinpoint-email/commands/GetBlacklistReportsCommand.ts new file mode 100644 index 000000000000..9c1b1e76822d --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetBlacklistReportsCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetBlacklistReportsRequest, + GetBlacklistReportsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetBlacklistReportsCommand, + serializeAws_restJson1_1GetBlacklistReportsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetBlacklistReportsCommandInput = GetBlacklistReportsRequest; +export type GetBlacklistReportsCommandOutput = GetBlacklistReportsResponse; + +export class GetBlacklistReportsCommand extends $Command< + GetBlacklistReportsCommandInput, + GetBlacklistReportsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetBlacklistReportsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetBlacklistReportsCommandInput, + GetBlacklistReportsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetBlacklistReportsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetBlacklistReportsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetBlacklistReportsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetConfigurationSetCommand.ts b/clients/client-pinpoint-email/commands/GetConfigurationSetCommand.ts new file mode 100644 index 000000000000..691244fe144b --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetConfigurationSetCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetConfigurationSetRequest, + GetConfigurationSetResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetConfigurationSetCommand, + serializeAws_restJson1_1GetConfigurationSetCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetConfigurationSetCommandInput = GetConfigurationSetRequest; +export type GetConfigurationSetCommandOutput = GetConfigurationSetResponse; + +export class GetConfigurationSetCommand extends $Command< + GetConfigurationSetCommandInput, + GetConfigurationSetCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetConfigurationSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetConfigurationSetCommandInput, + GetConfigurationSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetConfigurationSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetConfigurationSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetConfigurationSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetConfigurationSetEventDestinationsCommand.ts b/clients/client-pinpoint-email/commands/GetConfigurationSetEventDestinationsCommand.ts new file mode 100644 index 000000000000..034bcf0d6ac6 --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetConfigurationSetEventDestinationsCommand.ts @@ -0,0 +1,95 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetConfigurationSetEventDestinationsRequest, + GetConfigurationSetEventDestinationsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetConfigurationSetEventDestinationsCommand, + serializeAws_restJson1_1GetConfigurationSetEventDestinationsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetConfigurationSetEventDestinationsCommandInput = GetConfigurationSetEventDestinationsRequest; +export type GetConfigurationSetEventDestinationsCommandOutput = GetConfigurationSetEventDestinationsResponse; + +export class GetConfigurationSetEventDestinationsCommand extends $Command< + GetConfigurationSetEventDestinationsCommandInput, + GetConfigurationSetEventDestinationsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor( + readonly input: GetConfigurationSetEventDestinationsCommandInput + ) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetConfigurationSetEventDestinationsCommandInput, + GetConfigurationSetEventDestinationsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetConfigurationSetEventDestinationsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetConfigurationSetEventDestinationsCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetConfigurationSetEventDestinationsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetDedicatedIpCommand.ts b/clients/client-pinpoint-email/commands/GetDedicatedIpCommand.ts new file mode 100644 index 000000000000..7f72c7b4f0e0 --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetDedicatedIpCommand.ts @@ -0,0 +1,81 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { GetDedicatedIpRequest, GetDedicatedIpResponse } from "../models/index"; +import { + deserializeAws_restJson1_1GetDedicatedIpCommand, + serializeAws_restJson1_1GetDedicatedIpCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetDedicatedIpCommandInput = GetDedicatedIpRequest; +export type GetDedicatedIpCommandOutput = GetDedicatedIpResponse; + +export class GetDedicatedIpCommand extends $Command< + GetDedicatedIpCommandInput, + GetDedicatedIpCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDedicatedIpCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDedicatedIpCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDedicatedIpCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDedicatedIpCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetDedicatedIpsCommand.ts b/clients/client-pinpoint-email/commands/GetDedicatedIpsCommand.ts new file mode 100644 index 000000000000..48961df06805 --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetDedicatedIpsCommand.ts @@ -0,0 +1,84 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetDedicatedIpsRequest, + GetDedicatedIpsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDedicatedIpsCommand, + serializeAws_restJson1_1GetDedicatedIpsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetDedicatedIpsCommandInput = GetDedicatedIpsRequest; +export type GetDedicatedIpsCommandOutput = GetDedicatedIpsResponse; + +export class GetDedicatedIpsCommand extends $Command< + GetDedicatedIpsCommandInput, + GetDedicatedIpsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDedicatedIpsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDedicatedIpsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDedicatedIpsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDedicatedIpsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetDeliverabilityDashboardOptionsCommand.ts b/clients/client-pinpoint-email/commands/GetDeliverabilityDashboardOptionsCommand.ts new file mode 100644 index 000000000000..bdebe8bc0cdf --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetDeliverabilityDashboardOptionsCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetDeliverabilityDashboardOptionsRequest, + GetDeliverabilityDashboardOptionsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDeliverabilityDashboardOptionsCommand, + serializeAws_restJson1_1GetDeliverabilityDashboardOptionsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetDeliverabilityDashboardOptionsCommandInput = GetDeliverabilityDashboardOptionsRequest; +export type GetDeliverabilityDashboardOptionsCommandOutput = GetDeliverabilityDashboardOptionsResponse; + +export class GetDeliverabilityDashboardOptionsCommand extends $Command< + GetDeliverabilityDashboardOptionsCommandInput, + GetDeliverabilityDashboardOptionsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDeliverabilityDashboardOptionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetDeliverabilityDashboardOptionsCommandInput, + GetDeliverabilityDashboardOptionsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDeliverabilityDashboardOptionsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDeliverabilityDashboardOptionsCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDeliverabilityDashboardOptionsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetDeliverabilityTestReportCommand.ts b/clients/client-pinpoint-email/commands/GetDeliverabilityTestReportCommand.ts new file mode 100644 index 000000000000..cd6e722fe4ac --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetDeliverabilityTestReportCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetDeliverabilityTestReportRequest, + GetDeliverabilityTestReportResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDeliverabilityTestReportCommand, + serializeAws_restJson1_1GetDeliverabilityTestReportCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetDeliverabilityTestReportCommandInput = GetDeliverabilityTestReportRequest; +export type GetDeliverabilityTestReportCommandOutput = GetDeliverabilityTestReportResponse; + +export class GetDeliverabilityTestReportCommand extends $Command< + GetDeliverabilityTestReportCommandInput, + GetDeliverabilityTestReportCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDeliverabilityTestReportCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetDeliverabilityTestReportCommandInput, + GetDeliverabilityTestReportCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDeliverabilityTestReportCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDeliverabilityTestReportCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDeliverabilityTestReportCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetDomainDeliverabilityCampaignCommand.ts b/clients/client-pinpoint-email/commands/GetDomainDeliverabilityCampaignCommand.ts new file mode 100644 index 000000000000..949a400a1224 --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetDomainDeliverabilityCampaignCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetDomainDeliverabilityCampaignRequest, + GetDomainDeliverabilityCampaignResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDomainDeliverabilityCampaignCommand, + serializeAws_restJson1_1GetDomainDeliverabilityCampaignCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetDomainDeliverabilityCampaignCommandInput = GetDomainDeliverabilityCampaignRequest; +export type GetDomainDeliverabilityCampaignCommandOutput = GetDomainDeliverabilityCampaignResponse; + +export class GetDomainDeliverabilityCampaignCommand extends $Command< + GetDomainDeliverabilityCampaignCommandInput, + GetDomainDeliverabilityCampaignCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDomainDeliverabilityCampaignCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetDomainDeliverabilityCampaignCommandInput, + GetDomainDeliverabilityCampaignCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDomainDeliverabilityCampaignCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDomainDeliverabilityCampaignCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDomainDeliverabilityCampaignCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetDomainStatisticsReportCommand.ts b/clients/client-pinpoint-email/commands/GetDomainStatisticsReportCommand.ts new file mode 100644 index 000000000000..9b3688c37ec9 --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetDomainStatisticsReportCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetDomainStatisticsReportRequest, + GetDomainStatisticsReportResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetDomainStatisticsReportCommand, + serializeAws_restJson1_1GetDomainStatisticsReportCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetDomainStatisticsReportCommandInput = GetDomainStatisticsReportRequest; +export type GetDomainStatisticsReportCommandOutput = GetDomainStatisticsReportResponse; + +export class GetDomainStatisticsReportCommand extends $Command< + GetDomainStatisticsReportCommandInput, + GetDomainStatisticsReportCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetDomainStatisticsReportCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetDomainStatisticsReportCommandInput, + GetDomainStatisticsReportCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetDomainStatisticsReportCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetDomainStatisticsReportCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetDomainStatisticsReportCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/GetEmailIdentityCommand.ts b/clients/client-pinpoint-email/commands/GetEmailIdentityCommand.ts new file mode 100644 index 000000000000..d8a82aa13520 --- /dev/null +++ b/clients/client-pinpoint-email/commands/GetEmailIdentityCommand.ts @@ -0,0 +1,84 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + GetEmailIdentityRequest, + GetEmailIdentityResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1GetEmailIdentityCommand, + serializeAws_restJson1_1GetEmailIdentityCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetEmailIdentityCommandInput = GetEmailIdentityRequest; +export type GetEmailIdentityCommandOutput = GetEmailIdentityResponse; + +export class GetEmailIdentityCommand extends $Command< + GetEmailIdentityCommandInput, + GetEmailIdentityCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetEmailIdentityCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetEmailIdentityCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1GetEmailIdentityCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1GetEmailIdentityCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/ListConfigurationSetsCommand.ts b/clients/client-pinpoint-email/commands/ListConfigurationSetsCommand.ts new file mode 100644 index 000000000000..5ec69bf38ee6 --- /dev/null +++ b/clients/client-pinpoint-email/commands/ListConfigurationSetsCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + ListConfigurationSetsRequest, + ListConfigurationSetsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1ListConfigurationSetsCommand, + serializeAws_restJson1_1ListConfigurationSetsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListConfigurationSetsCommandInput = ListConfigurationSetsRequest; +export type ListConfigurationSetsCommandOutput = ListConfigurationSetsResponse; + +export class ListConfigurationSetsCommand extends $Command< + ListConfigurationSetsCommandInput, + ListConfigurationSetsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListConfigurationSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListConfigurationSetsCommandInput, + ListConfigurationSetsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListConfigurationSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ListConfigurationSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ListConfigurationSetsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/ListDedicatedIpPoolsCommand.ts b/clients/client-pinpoint-email/commands/ListDedicatedIpPoolsCommand.ts new file mode 100644 index 000000000000..05271536f040 --- /dev/null +++ b/clients/client-pinpoint-email/commands/ListDedicatedIpPoolsCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + ListDedicatedIpPoolsRequest, + ListDedicatedIpPoolsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1ListDedicatedIpPoolsCommand, + serializeAws_restJson1_1ListDedicatedIpPoolsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListDedicatedIpPoolsCommandInput = ListDedicatedIpPoolsRequest; +export type ListDedicatedIpPoolsCommandOutput = ListDedicatedIpPoolsResponse; + +export class ListDedicatedIpPoolsCommand extends $Command< + ListDedicatedIpPoolsCommandInput, + ListDedicatedIpPoolsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDedicatedIpPoolsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListDedicatedIpPoolsCommandInput, + ListDedicatedIpPoolsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListDedicatedIpPoolsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ListDedicatedIpPoolsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ListDedicatedIpPoolsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/ListDeliverabilityTestReportsCommand.ts b/clients/client-pinpoint-email/commands/ListDeliverabilityTestReportsCommand.ts new file mode 100644 index 000000000000..f62d581e4ee6 --- /dev/null +++ b/clients/client-pinpoint-email/commands/ListDeliverabilityTestReportsCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + ListDeliverabilityTestReportsRequest, + ListDeliverabilityTestReportsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1ListDeliverabilityTestReportsCommand, + serializeAws_restJson1_1ListDeliverabilityTestReportsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListDeliverabilityTestReportsCommandInput = ListDeliverabilityTestReportsRequest; +export type ListDeliverabilityTestReportsCommandOutput = ListDeliverabilityTestReportsResponse; + +export class ListDeliverabilityTestReportsCommand extends $Command< + ListDeliverabilityTestReportsCommandInput, + ListDeliverabilityTestReportsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDeliverabilityTestReportsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListDeliverabilityTestReportsCommandInput, + ListDeliverabilityTestReportsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListDeliverabilityTestReportsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ListDeliverabilityTestReportsCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ListDeliverabilityTestReportsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/ListDomainDeliverabilityCampaignsCommand.ts b/clients/client-pinpoint-email/commands/ListDomainDeliverabilityCampaignsCommand.ts new file mode 100644 index 000000000000..dae040116a4a --- /dev/null +++ b/clients/client-pinpoint-email/commands/ListDomainDeliverabilityCampaignsCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + ListDomainDeliverabilityCampaignsRequest, + ListDomainDeliverabilityCampaignsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1ListDomainDeliverabilityCampaignsCommand, + serializeAws_restJson1_1ListDomainDeliverabilityCampaignsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListDomainDeliverabilityCampaignsCommandInput = ListDomainDeliverabilityCampaignsRequest; +export type ListDomainDeliverabilityCampaignsCommandOutput = ListDomainDeliverabilityCampaignsResponse; + +export class ListDomainDeliverabilityCampaignsCommand extends $Command< + ListDomainDeliverabilityCampaignsCommandInput, + ListDomainDeliverabilityCampaignsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListDomainDeliverabilityCampaignsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListDomainDeliverabilityCampaignsCommandInput, + ListDomainDeliverabilityCampaignsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListDomainDeliverabilityCampaignsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ListDomainDeliverabilityCampaignsCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ListDomainDeliverabilityCampaignsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/ListEmailIdentitiesCommand.ts b/clients/client-pinpoint-email/commands/ListEmailIdentitiesCommand.ts new file mode 100644 index 000000000000..edc003062b6f --- /dev/null +++ b/clients/client-pinpoint-email/commands/ListEmailIdentitiesCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + ListEmailIdentitiesRequest, + ListEmailIdentitiesResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1ListEmailIdentitiesCommand, + serializeAws_restJson1_1ListEmailIdentitiesCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListEmailIdentitiesCommandInput = ListEmailIdentitiesRequest; +export type ListEmailIdentitiesCommandOutput = ListEmailIdentitiesResponse; + +export class ListEmailIdentitiesCommand extends $Command< + ListEmailIdentitiesCommandInput, + ListEmailIdentitiesCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListEmailIdentitiesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListEmailIdentitiesCommandInput, + ListEmailIdentitiesCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListEmailIdentitiesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ListEmailIdentitiesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ListEmailIdentitiesCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/ListTagsForResourceCommand.ts b/clients/client-pinpoint-email/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..82a0854ed5fb --- /dev/null +++ b/clients/client-pinpoint-email/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + ListTagsForResourceRequest, + ListTagsForResourceResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1ListTagsForResourceCommand, + serializeAws_restJson1_1ListTagsForResourceCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListTagsForResourceCommandInput = ListTagsForResourceRequest; +export type ListTagsForResourceCommandOutput = ListTagsForResourceResponse; + +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListTagsForResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1ListTagsForResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1ListTagsForResourceCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutAccountDedicatedIpWarmupAttributesCommand.ts b/clients/client-pinpoint-email/commands/PutAccountDedicatedIpWarmupAttributesCommand.ts new file mode 100644 index 000000000000..0d30ff8fb15a --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutAccountDedicatedIpWarmupAttributesCommand.ts @@ -0,0 +1,95 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutAccountDedicatedIpWarmupAttributesRequest, + PutAccountDedicatedIpWarmupAttributesResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutAccountDedicatedIpWarmupAttributesCommand, + serializeAws_restJson1_1PutAccountDedicatedIpWarmupAttributesCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutAccountDedicatedIpWarmupAttributesCommandInput = PutAccountDedicatedIpWarmupAttributesRequest; +export type PutAccountDedicatedIpWarmupAttributesCommandOutput = PutAccountDedicatedIpWarmupAttributesResponse; + +export class PutAccountDedicatedIpWarmupAttributesCommand extends $Command< + PutAccountDedicatedIpWarmupAttributesCommandInput, + PutAccountDedicatedIpWarmupAttributesCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor( + readonly input: PutAccountDedicatedIpWarmupAttributesCommandInput + ) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutAccountDedicatedIpWarmupAttributesCommandInput, + PutAccountDedicatedIpWarmupAttributesCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutAccountDedicatedIpWarmupAttributesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutAccountDedicatedIpWarmupAttributesCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutAccountDedicatedIpWarmupAttributesCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutAccountSendingAttributesCommand.ts b/clients/client-pinpoint-email/commands/PutAccountSendingAttributesCommand.ts new file mode 100644 index 000000000000..1352c566fafa --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutAccountSendingAttributesCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutAccountSendingAttributesRequest, + PutAccountSendingAttributesResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutAccountSendingAttributesCommand, + serializeAws_restJson1_1PutAccountSendingAttributesCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutAccountSendingAttributesCommandInput = PutAccountSendingAttributesRequest; +export type PutAccountSendingAttributesCommandOutput = PutAccountSendingAttributesResponse; + +export class PutAccountSendingAttributesCommand extends $Command< + PutAccountSendingAttributesCommandInput, + PutAccountSendingAttributesCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutAccountSendingAttributesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutAccountSendingAttributesCommandInput, + PutAccountSendingAttributesCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutAccountSendingAttributesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutAccountSendingAttributesCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutAccountSendingAttributesCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutConfigurationSetDeliveryOptionsCommand.ts b/clients/client-pinpoint-email/commands/PutConfigurationSetDeliveryOptionsCommand.ts new file mode 100644 index 000000000000..474990adaab2 --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutConfigurationSetDeliveryOptionsCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutConfigurationSetDeliveryOptionsRequest, + PutConfigurationSetDeliveryOptionsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutConfigurationSetDeliveryOptionsCommand, + serializeAws_restJson1_1PutConfigurationSetDeliveryOptionsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutConfigurationSetDeliveryOptionsCommandInput = PutConfigurationSetDeliveryOptionsRequest; +export type PutConfigurationSetDeliveryOptionsCommandOutput = PutConfigurationSetDeliveryOptionsResponse; + +export class PutConfigurationSetDeliveryOptionsCommand extends $Command< + PutConfigurationSetDeliveryOptionsCommandInput, + PutConfigurationSetDeliveryOptionsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutConfigurationSetDeliveryOptionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutConfigurationSetDeliveryOptionsCommandInput, + PutConfigurationSetDeliveryOptionsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutConfigurationSetDeliveryOptionsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutConfigurationSetDeliveryOptionsCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutConfigurationSetDeliveryOptionsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutConfigurationSetReputationOptionsCommand.ts b/clients/client-pinpoint-email/commands/PutConfigurationSetReputationOptionsCommand.ts new file mode 100644 index 000000000000..4260810eda98 --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutConfigurationSetReputationOptionsCommand.ts @@ -0,0 +1,95 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutConfigurationSetReputationOptionsRequest, + PutConfigurationSetReputationOptionsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutConfigurationSetReputationOptionsCommand, + serializeAws_restJson1_1PutConfigurationSetReputationOptionsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutConfigurationSetReputationOptionsCommandInput = PutConfigurationSetReputationOptionsRequest; +export type PutConfigurationSetReputationOptionsCommandOutput = PutConfigurationSetReputationOptionsResponse; + +export class PutConfigurationSetReputationOptionsCommand extends $Command< + PutConfigurationSetReputationOptionsCommandInput, + PutConfigurationSetReputationOptionsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor( + readonly input: PutConfigurationSetReputationOptionsCommandInput + ) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutConfigurationSetReputationOptionsCommandInput, + PutConfigurationSetReputationOptionsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutConfigurationSetReputationOptionsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutConfigurationSetReputationOptionsCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutConfigurationSetReputationOptionsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutConfigurationSetSendingOptionsCommand.ts b/clients/client-pinpoint-email/commands/PutConfigurationSetSendingOptionsCommand.ts new file mode 100644 index 000000000000..232b0a378ede --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutConfigurationSetSendingOptionsCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutConfigurationSetSendingOptionsRequest, + PutConfigurationSetSendingOptionsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutConfigurationSetSendingOptionsCommand, + serializeAws_restJson1_1PutConfigurationSetSendingOptionsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutConfigurationSetSendingOptionsCommandInput = PutConfigurationSetSendingOptionsRequest; +export type PutConfigurationSetSendingOptionsCommandOutput = PutConfigurationSetSendingOptionsResponse; + +export class PutConfigurationSetSendingOptionsCommand extends $Command< + PutConfigurationSetSendingOptionsCommandInput, + PutConfigurationSetSendingOptionsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutConfigurationSetSendingOptionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutConfigurationSetSendingOptionsCommandInput, + PutConfigurationSetSendingOptionsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutConfigurationSetSendingOptionsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutConfigurationSetSendingOptionsCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutConfigurationSetSendingOptionsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutConfigurationSetTrackingOptionsCommand.ts b/clients/client-pinpoint-email/commands/PutConfigurationSetTrackingOptionsCommand.ts new file mode 100644 index 000000000000..1efb3cf8a079 --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutConfigurationSetTrackingOptionsCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutConfigurationSetTrackingOptionsRequest, + PutConfigurationSetTrackingOptionsResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutConfigurationSetTrackingOptionsCommand, + serializeAws_restJson1_1PutConfigurationSetTrackingOptionsCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutConfigurationSetTrackingOptionsCommandInput = PutConfigurationSetTrackingOptionsRequest; +export type PutConfigurationSetTrackingOptionsCommandOutput = PutConfigurationSetTrackingOptionsResponse; + +export class PutConfigurationSetTrackingOptionsCommand extends $Command< + PutConfigurationSetTrackingOptionsCommandInput, + PutConfigurationSetTrackingOptionsCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutConfigurationSetTrackingOptionsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutConfigurationSetTrackingOptionsCommandInput, + PutConfigurationSetTrackingOptionsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutConfigurationSetTrackingOptionsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutConfigurationSetTrackingOptionsCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutConfigurationSetTrackingOptionsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutDedicatedIpInPoolCommand.ts b/clients/client-pinpoint-email/commands/PutDedicatedIpInPoolCommand.ts new file mode 100644 index 000000000000..c2087b482cf2 --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutDedicatedIpInPoolCommand.ts @@ -0,0 +1,90 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutDedicatedIpInPoolRequest, + PutDedicatedIpInPoolResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutDedicatedIpInPoolCommand, + serializeAws_restJson1_1PutDedicatedIpInPoolCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutDedicatedIpInPoolCommandInput = PutDedicatedIpInPoolRequest; +export type PutDedicatedIpInPoolCommandOutput = PutDedicatedIpInPoolResponse; + +export class PutDedicatedIpInPoolCommand extends $Command< + PutDedicatedIpInPoolCommandInput, + PutDedicatedIpInPoolCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutDedicatedIpInPoolCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutDedicatedIpInPoolCommandInput, + PutDedicatedIpInPoolCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutDedicatedIpInPoolCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutDedicatedIpInPoolCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutDedicatedIpInPoolCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutDedicatedIpWarmupAttributesCommand.ts b/clients/client-pinpoint-email/commands/PutDedicatedIpWarmupAttributesCommand.ts new file mode 100644 index 000000000000..cb8842fe2aa7 --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutDedicatedIpWarmupAttributesCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutDedicatedIpWarmupAttributesRequest, + PutDedicatedIpWarmupAttributesResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutDedicatedIpWarmupAttributesCommand, + serializeAws_restJson1_1PutDedicatedIpWarmupAttributesCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutDedicatedIpWarmupAttributesCommandInput = PutDedicatedIpWarmupAttributesRequest; +export type PutDedicatedIpWarmupAttributesCommandOutput = PutDedicatedIpWarmupAttributesResponse; + +export class PutDedicatedIpWarmupAttributesCommand extends $Command< + PutDedicatedIpWarmupAttributesCommandInput, + PutDedicatedIpWarmupAttributesCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutDedicatedIpWarmupAttributesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutDedicatedIpWarmupAttributesCommandInput, + PutDedicatedIpWarmupAttributesCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutDedicatedIpWarmupAttributesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutDedicatedIpWarmupAttributesCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutDedicatedIpWarmupAttributesCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutDeliverabilityDashboardOptionCommand.ts b/clients/client-pinpoint-email/commands/PutDeliverabilityDashboardOptionCommand.ts new file mode 100644 index 000000000000..11fa72b15e05 --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutDeliverabilityDashboardOptionCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutDeliverabilityDashboardOptionRequest, + PutDeliverabilityDashboardOptionResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutDeliverabilityDashboardOptionCommand, + serializeAws_restJson1_1PutDeliverabilityDashboardOptionCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutDeliverabilityDashboardOptionCommandInput = PutDeliverabilityDashboardOptionRequest; +export type PutDeliverabilityDashboardOptionCommandOutput = PutDeliverabilityDashboardOptionResponse; + +export class PutDeliverabilityDashboardOptionCommand extends $Command< + PutDeliverabilityDashboardOptionCommandInput, + PutDeliverabilityDashboardOptionCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutDeliverabilityDashboardOptionCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutDeliverabilityDashboardOptionCommandInput, + PutDeliverabilityDashboardOptionCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutDeliverabilityDashboardOptionCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutDeliverabilityDashboardOptionCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutDeliverabilityDashboardOptionCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutEmailIdentityDkimAttributesCommand.ts b/clients/client-pinpoint-email/commands/PutEmailIdentityDkimAttributesCommand.ts new file mode 100644 index 000000000000..7718c6fd018a --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutEmailIdentityDkimAttributesCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutEmailIdentityDkimAttributesRequest, + PutEmailIdentityDkimAttributesResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutEmailIdentityDkimAttributesCommand, + serializeAws_restJson1_1PutEmailIdentityDkimAttributesCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutEmailIdentityDkimAttributesCommandInput = PutEmailIdentityDkimAttributesRequest; +export type PutEmailIdentityDkimAttributesCommandOutput = PutEmailIdentityDkimAttributesResponse; + +export class PutEmailIdentityDkimAttributesCommand extends $Command< + PutEmailIdentityDkimAttributesCommandInput, + PutEmailIdentityDkimAttributesCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutEmailIdentityDkimAttributesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutEmailIdentityDkimAttributesCommandInput, + PutEmailIdentityDkimAttributesCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutEmailIdentityDkimAttributesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutEmailIdentityDkimAttributesCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutEmailIdentityDkimAttributesCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutEmailIdentityFeedbackAttributesCommand.ts b/clients/client-pinpoint-email/commands/PutEmailIdentityFeedbackAttributesCommand.ts new file mode 100644 index 000000000000..996e1c09d507 --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutEmailIdentityFeedbackAttributesCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutEmailIdentityFeedbackAttributesRequest, + PutEmailIdentityFeedbackAttributesResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutEmailIdentityFeedbackAttributesCommand, + serializeAws_restJson1_1PutEmailIdentityFeedbackAttributesCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutEmailIdentityFeedbackAttributesCommandInput = PutEmailIdentityFeedbackAttributesRequest; +export type PutEmailIdentityFeedbackAttributesCommandOutput = PutEmailIdentityFeedbackAttributesResponse; + +export class PutEmailIdentityFeedbackAttributesCommand extends $Command< + PutEmailIdentityFeedbackAttributesCommandInput, + PutEmailIdentityFeedbackAttributesCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutEmailIdentityFeedbackAttributesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutEmailIdentityFeedbackAttributesCommandInput, + PutEmailIdentityFeedbackAttributesCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutEmailIdentityFeedbackAttributesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutEmailIdentityFeedbackAttributesCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutEmailIdentityFeedbackAttributesCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/PutEmailIdentityMailFromAttributesCommand.ts b/clients/client-pinpoint-email/commands/PutEmailIdentityMailFromAttributesCommand.ts new file mode 100644 index 000000000000..c56b0badc48b --- /dev/null +++ b/clients/client-pinpoint-email/commands/PutEmailIdentityMailFromAttributesCommand.ts @@ -0,0 +1,93 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + PutEmailIdentityMailFromAttributesRequest, + PutEmailIdentityMailFromAttributesResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1PutEmailIdentityMailFromAttributesCommand, + serializeAws_restJson1_1PutEmailIdentityMailFromAttributesCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutEmailIdentityMailFromAttributesCommandInput = PutEmailIdentityMailFromAttributesRequest; +export type PutEmailIdentityMailFromAttributesCommandOutput = PutEmailIdentityMailFromAttributesResponse; + +export class PutEmailIdentityMailFromAttributesCommand extends $Command< + PutEmailIdentityMailFromAttributesCommandInput, + PutEmailIdentityMailFromAttributesCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutEmailIdentityMailFromAttributesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutEmailIdentityMailFromAttributesCommandInput, + PutEmailIdentityMailFromAttributesCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutEmailIdentityMailFromAttributesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1PutEmailIdentityMailFromAttributesCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1PutEmailIdentityMailFromAttributesCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/SendEmailCommand.ts b/clients/client-pinpoint-email/commands/SendEmailCommand.ts new file mode 100644 index 000000000000..dbbc15f6d5b8 --- /dev/null +++ b/clients/client-pinpoint-email/commands/SendEmailCommand.ts @@ -0,0 +1,81 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { SendEmailRequest, SendEmailResponse } from "../models/index"; +import { + deserializeAws_restJson1_1SendEmailCommand, + serializeAws_restJson1_1SendEmailCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type SendEmailCommandInput = SendEmailRequest; +export type SendEmailCommandOutput = SendEmailResponse; + +export class SendEmailCommand extends $Command< + SendEmailCommandInput, + SendEmailCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: SendEmailCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: SendEmailCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1SendEmailCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1SendEmailCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/TagResourceCommand.ts b/clients/client-pinpoint-email/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..fa84c85b47de --- /dev/null +++ b/clients/client-pinpoint-email/commands/TagResourceCommand.ts @@ -0,0 +1,81 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { TagResourceRequest, TagResourceResponse } from "../models/index"; +import { + deserializeAws_restJson1_1TagResourceCommand, + serializeAws_restJson1_1TagResourceCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type TagResourceCommandInput = TagResourceRequest; +export type TagResourceCommandOutput = TagResourceResponse; + +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: TagResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1TagResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/UntagResourceCommand.ts b/clients/client-pinpoint-email/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..02acc5c1bfd8 --- /dev/null +++ b/clients/client-pinpoint-email/commands/UntagResourceCommand.ts @@ -0,0 +1,81 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { UntagResourceRequest, UntagResourceResponse } from "../models/index"; +import { + deserializeAws_restJson1_1UntagResourceCommand, + serializeAws_restJson1_1UntagResourceCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UntagResourceCommandInput = UntagResourceRequest; +export type UntagResourceCommandOutput = UntagResourceResponse; + +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UntagResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UntagResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/commands/UpdateConfigurationSetEventDestinationCommand.ts b/clients/client-pinpoint-email/commands/UpdateConfigurationSetEventDestinationCommand.ts new file mode 100644 index 000000000000..b907e015ed1c --- /dev/null +++ b/clients/client-pinpoint-email/commands/UpdateConfigurationSetEventDestinationCommand.ts @@ -0,0 +1,95 @@ +import { + PinpointEmailClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes +} from "../PinpointEmailClient"; +import { + UpdateConfigurationSetEventDestinationRequest, + UpdateConfigurationSetEventDestinationResponse +} from "../models/index"; +import { + deserializeAws_restJson1_1UpdateConfigurationSetEventDestinationCommand, + serializeAws_restJson1_1UpdateConfigurationSetEventDestinationCommand +} from "../protocols/Aws_restJson1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateConfigurationSetEventDestinationCommandInput = UpdateConfigurationSetEventDestinationRequest; +export type UpdateConfigurationSetEventDestinationCommandOutput = UpdateConfigurationSetEventDestinationResponse; + +export class UpdateConfigurationSetEventDestinationCommand extends $Command< + UpdateConfigurationSetEventDestinationCommandInput, + UpdateConfigurationSetEventDestinationCommandOutput, + PinpointEmailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor( + readonly input: UpdateConfigurationSetEventDestinationCommandInput + ) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PinpointEmailClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + UpdateConfigurationSetEventDestinationCommandInput, + UpdateConfigurationSetEventDestinationCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateConfigurationSetEventDestinationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1_1UpdateConfigurationSetEventDestinationCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_restJson1_1UpdateConfigurationSetEventDestinationCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pinpoint-email/endpoints.ts b/clients/client-pinpoint-email/endpoints.ts new file mode 100644 index 000000000000..31b260258b38 --- /dev/null +++ b/clients/client-pinpoint-email/endpoints.ts @@ -0,0 +1,78 @@ +import { RegionInfo, RegionInfoProvider } from "@aws-sdk/types"; + +// Partition default templates +const AWS_TEMPLATE = "ses.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "ses.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "ses.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "ses.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "ses.{region}.amazonaws.com"; + +// Partition regions +const AWS_REGIONS = new Set([ + "ap-south-1", + "eu-north-1", + "eu-west-3", + "eu-west-2", + "eu-west-1", + "ap-northeast-2", + "ap-northeast-1", + "me-south-1", + "ca-central-1", + "sa-east-1", + "ap-east-1", + "ap-southeast-1", + "ap-southeast-2", + "eu-central-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2" +]); +const AWS_CN_REGIONS = new Set(["cn-north-1", "cn-northwest-1"]); +const AWS_ISO_REGIONS = new Set(["us-iso-east-1"]); +const AWS_ISO_B_REGIONS = new Set(["us-isob-east-1"]); +const AWS_US_GOV_REGIONS = new Set(["us-gov-west-1", "us-gov-east-1"]); + +export const defaultRegionInfoProvider: RegionInfoProvider = ( + region: string, + options?: any +) => { + let regionInfo: RegionInfo | undefined = undefined; + switch (region) { + // First, try to match exact region names. + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region) + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region) + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region) + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region) + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region) + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region) + }; + } + } + return Promise.resolve(regionInfo); +}; diff --git a/clients/client-pinpoint-email/index.ts b/clients/client-pinpoint-email/index.ts new file mode 100644 index 000000000000..7ee5277b830e --- /dev/null +++ b/clients/client-pinpoint-email/index.ts @@ -0,0 +1,44 @@ +export * from "./PinpointEmailClient"; +export * from "./PinpointEmail"; +export * from "./commands/CreateConfigurationSetEventDestinationCommand"; +export * from "./commands/PutDedicatedIpWarmupAttributesCommand"; +export * from "./commands/PutAccountSendingAttributesCommand"; +export * from "./commands/DeleteEmailIdentityCommand"; +export * from "./commands/PutConfigurationSetDeliveryOptionsCommand"; +export * from "./commands/DeleteConfigurationSetEventDestinationCommand"; +export * from "./commands/CreateDeliverabilityTestReportCommand"; +export * from "./commands/ListDeliverabilityTestReportsCommand"; +export * from "./commands/CreateEmailIdentityCommand"; +export * from "./commands/PutDedicatedIpInPoolCommand"; +export * from "./commands/CreateConfigurationSetCommand"; +export * from "./commands/TagResourceCommand"; +export * from "./commands/GetDeliverabilityDashboardOptionsCommand"; +export * from "./commands/PutEmailIdentityDkimAttributesCommand"; +export * from "./commands/ListConfigurationSetsCommand"; +export * from "./commands/GetEmailIdentityCommand"; +export * from "./commands/ListDedicatedIpPoolsCommand"; +export * from "./commands/PutConfigurationSetSendingOptionsCommand"; +export * from "./commands/GetAccountCommand"; +export * from "./commands/PutAccountDedicatedIpWarmupAttributesCommand"; +export * from "./commands/PutDeliverabilityDashboardOptionCommand"; +export * from "./commands/GetDomainDeliverabilityCampaignCommand"; +export * from "./commands/DeleteConfigurationSetCommand"; +export * from "./commands/SendEmailCommand"; +export * from "./commands/PutConfigurationSetTrackingOptionsCommand"; +export * from "./commands/DeleteDedicatedIpPoolCommand"; +export * from "./commands/PutEmailIdentityMailFromAttributesCommand"; +export * from "./commands/GetDeliverabilityTestReportCommand"; +export * from "./commands/GetDedicatedIpsCommand"; +export * from "./commands/UntagResourceCommand"; +export * from "./commands/ListTagsForResourceCommand"; +export * from "./commands/PutConfigurationSetReputationOptionsCommand"; +export * from "./commands/GetConfigurationSetCommand"; +export * from "./commands/ListEmailIdentitiesCommand"; +export * from "./commands/CreateDedicatedIpPoolCommand"; +export * from "./commands/GetDomainStatisticsReportCommand"; +export * from "./commands/UpdateConfigurationSetEventDestinationCommand"; +export * from "./commands/PutEmailIdentityFeedbackAttributesCommand"; +export * from "./commands/GetConfigurationSetEventDestinationsCommand"; +export * from "./commands/GetDedicatedIpCommand"; +export * from "./commands/ListDomainDeliverabilityCampaignsCommand"; +export * from "./commands/GetBlacklistReportsCommand"; diff --git a/clients/client-pinpoint-email/models/index.ts b/clients/client-pinpoint-email/models/index.ts new file mode 100644 index 000000000000..6da1522eea73 --- /dev/null +++ b/clients/client-pinpoint-email/models/index.ts @@ -0,0 +1,4415 @@ +import * as _smithy from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types"; + +/** + * + *

An object that defines the tags that are associated with a resource. + * A tag is a label that you optionally define and associate with + * a resource in Amazon Pinpoint. Tags can help you categorize and manage resources in different + * ways, such as by purpose, owner, environment, or other criteria. A resource can have as + * many as 50 tags.

+ *

Each tag consists of a required tag key and an + * associated tag value, both of which you define. A tag key is a + * general label that acts as a category for a more specific tag value. A tag value acts as + * a descriptor within a tag key. A tag key can contain as many as 128 characters. A tag + * value can contain as many as 256 characters. The characters can be Unicode letters, + * digits, white space, or one of the following symbols: _ . : / = + -. The following + * additional restrictions apply to tags:

+ *
    + *
  • + *

    Tag keys and values are case sensitive.

    + *
  • + *
  • + *

    For each associated resource, each tag key must be unique and it can have only + * one value.

    + *
  • + *
  • + *

    The aws: prefix is reserved for use by AWS; you can’t use it in + * any tag keys or values that you define. In addition, you can't edit or remove + * tag keys or values that use this prefix. Tags that use this prefix don’t count + * against the limit of 50 tags per resource.

    + *
  • + *
  • + *

    You can associate tags with public or shared resources, but the tags are + * available only for your AWS account, not any other accounts that share the + * resource. In addition, the tags are available only for resources that are + * located in the specified AWS Region for your AWS account.

    + *
  • + *
+ * + */ +export interface Tag { + __type?: "Tag"; + /** + * + *

One part of a key-value pair that defines a tag. The maximum length of a tag key is + * 128 characters. The minimum length is 1 character.

+ * + */ + Key: string | undefined; + + /** + * + *

The optional part of a key-value pair that defines a tag. The maximum length of a tag + * value is 256 characters. The minimum length is 0 characters. If you don’t want a + * resource to have a specific tag value, don’t specify a value for this parameter. Amazon Pinpoint + * will set the value to an empty string.

+ * + */ + Value: string | undefined; +} + +export namespace Tag { + export function isa(o: any): o is Tag { + return _smithy.isa(o, "Tag"); + } +} + +/** + * + *

The message can't be sent because the account's ability to send email has been + * permanently restricted.

+ * + */ +export interface AccountSuspendedException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "AccountSuspendedException"; + $fault: "client"; + message?: string; +} + +export namespace AccountSuspendedException { + export function isa(o: any): o is AccountSuspendedException { + return _smithy.isa(o, "AccountSuspendedException"); + } +} + +/** + * + *

The resource specified in your request already exists.

+ * + */ +export interface AlreadyExistsException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "AlreadyExistsException"; + $fault: "client"; + message?: string; +} + +export namespace AlreadyExistsException { + export function isa(o: any): o is AlreadyExistsException { + return _smithy.isa(o, "AlreadyExistsException"); + } +} + +/** + * + *

The input you provided is invalid.

+ * + */ +export interface BadRequestException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "BadRequestException"; + $fault: "client"; + message?: string; +} + +export namespace BadRequestException { + export function isa(o: any): o is BadRequestException { + return _smithy.isa(o, "BadRequestException"); + } +} + +export enum BehaviorOnMxFailure { + REJECT_MESSAGE = "REJECT_MESSAGE", + USE_DEFAULT_VALUE = "USE_DEFAULT_VALUE" +} + +/** + * + *

An object that contains information about a blacklisting event that impacts one of the + * dedicated IP addresses that is associated with your account.

+ * + */ +export interface BlacklistEntry { + __type?: "BlacklistEntry"; + /** + * + *

Additional information about the blacklisting event, as provided by the blacklist + * maintainer.

+ * + */ + Description?: string; + + /** + * + *

The time when the blacklisting event occurred, shown in Unix time format.

+ * + */ + ListingTime?: Date; + + /** + * + *

The name of the blacklist that the IP address appears on.

+ * + */ + RblName?: string; +} + +export namespace BlacklistEntry { + export function isa(o: any): o is BlacklistEntry { + return _smithy.isa(o, "BlacklistEntry"); + } +} + +/** + * + *

Represents the body of the email message.

+ * + */ +export interface Body { + __type?: "Body"; + /** + * + *

An object that represents the version of the message that is displayed in email + * clients that support HTML. HTML messages can include formatted text, hyperlinks, images, + * and more.

+ * + */ + Html?: Content; + + /** + * + *

An object that represents the version of the message that is displayed in email + * clients that don't support HTML, or clients where the recipient has disabled HTML + * rendering.

+ * + */ + Text?: Content; +} + +export namespace Body { + export function isa(o: any): o is Body { + return _smithy.isa(o, "Body"); + } +} + +/** + * + *

An object that defines an Amazon CloudWatch destination for email events. You can use Amazon CloudWatch to + * monitor and gain insights on your email sending metrics.

+ * + */ +export interface CloudWatchDestination { + __type?: "CloudWatchDestination"; + /** + * + *

An array of objects that define the dimensions to use when you send email events to + * Amazon CloudWatch.

+ * + */ + DimensionConfigurations: Array | undefined; +} + +export namespace CloudWatchDestination { + export function isa(o: any): o is CloudWatchDestination { + return _smithy.isa(o, "CloudWatchDestination"); + } +} + +/** + * + *

An object that defines the dimension configuration to use when you send Amazon Pinpoint email + * events to Amazon CloudWatch.

+ * + */ +export interface CloudWatchDimensionConfiguration { + __type?: "CloudWatchDimensionConfiguration"; + /** + * + *

The default value of the dimension that is published to Amazon CloudWatch if you don't provide the + * value of the dimension when you send an email. This value has to meet the following + * criteria:

+ *
    + *
  • + *

    It can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), + * or dashes (-).

    + *
  • + *
  • + *

    It can contain no more than 256 characters.

    + *
  • + *
+ * + */ + DefaultDimensionValue: string | undefined; + + /** + * + *

The name of an Amazon CloudWatch dimension associated with an email sending metric. The name has to + * meet the following criteria:

+ *
    + *
  • + *

    It can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), + * or dashes (-).

    + *
  • + *
  • + *

    It can contain no more than 256 characters.

    + *
  • + *
+ * + */ + DimensionName: string | undefined; + + /** + * + *

The location where Amazon Pinpoint finds the value of a dimension to publish to Amazon CloudWatch. If you + * want Amazon Pinpoint to use the message tags that you specify using an X-SES-MESSAGE-TAGS header + * or a parameter to the SendEmail/SendRawEmail API, choose messageTag. If you + * want Amazon Pinpoint to use your own email headers, choose emailHeader. If you want + * Amazon Pinpoint to use link tags, choose linkTags.

+ * + */ + DimensionValueSource: DimensionValueSource | string | undefined; +} + +export namespace CloudWatchDimensionConfiguration { + export function isa(o: any): o is CloudWatchDimensionConfiguration { + return _smithy.isa(o, "CloudWatchDimensionConfiguration"); + } +} + +/** + * + *

The resource is being modified by another operation or thread.

+ * + */ +export interface ConcurrentModificationException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "ConcurrentModificationException"; + $fault: "server"; + message?: string; +} + +export namespace ConcurrentModificationException { + export function isa(o: any): o is ConcurrentModificationException { + return _smithy.isa(o, "ConcurrentModificationException"); + } +} + +/** + * + *

An object that represents the content of the email, and optionally a character set + * specification.

+ * + */ +export interface Content { + __type?: "Content"; + /** + * + *

The character set for the content. Because of the constraints of the SMTP protocol, + * Amazon Pinpoint uses 7-bit ASCII by default. If the text includes characters outside of the ASCII + * range, you have to specify a character set. For example, you could specify + * UTF-8, ISO-8859-1, or Shift_JIS.

+ * + */ + Charset?: string; + + /** + * + *

The content of the message itself.

+ * + */ + Data: string | undefined; +} + +export namespace Content { + export function isa(o: any): o is Content { + return _smithy.isa(o, "Content"); + } +} + +/** + * + *

A request to add an event destination to a configuration set.

+ * + */ +export interface CreateConfigurationSetEventDestinationRequest { + __type?: "CreateConfigurationSetEventDestinationRequest"; + /** + * + *

The name of the configuration set that you want to add an event destination to.

+ * + */ + ConfigurationSetName: string | undefined; + + /** + * + *

An object that defines the event destination.

+ * + */ + EventDestination: EventDestinationDefinition | undefined; + + /** + * + *

A name that identifies the event destination within the configuration set.

+ * + */ + EventDestinationName: string | undefined; +} + +export namespace CreateConfigurationSetEventDestinationRequest { + export function isa( + o: any + ): o is CreateConfigurationSetEventDestinationRequest { + return _smithy.isa(o, "CreateConfigurationSetEventDestinationRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface CreateConfigurationSetEventDestinationResponse + extends $MetadataBearer { + __type?: "CreateConfigurationSetEventDestinationResponse"; +} + +export namespace CreateConfigurationSetEventDestinationResponse { + export function isa( + o: any + ): o is CreateConfigurationSetEventDestinationResponse { + return _smithy.isa(o, "CreateConfigurationSetEventDestinationResponse"); + } +} + +/** + * + *

A request to create a configuration set.

+ * + */ +export interface CreateConfigurationSetRequest { + __type?: "CreateConfigurationSetRequest"; + /** + * + *

The name of the configuration set.

+ * + */ + ConfigurationSetName: string | undefined; + + /** + * + *

An object that defines the dedicated IP pool that is used to send emails that you send + * using the configuration set.

+ * + */ + DeliveryOptions?: DeliveryOptions; + + /** + * + *

An object that defines whether or not Amazon Pinpoint collects reputation metrics for the emails + * that you send that use the configuration set.

+ * + */ + ReputationOptions?: ReputationOptions; + + /** + * + *

An object that defines whether or not Amazon Pinpoint can send email that you send using the + * configuration set.

+ * + */ + SendingOptions?: SendingOptions; + + /** + * + *

An array of objects that define the tags (keys and values) that you want to associate + * with the configuration set.

+ * + */ + Tags?: Array; + + /** + * + *

An object that defines the open and click tracking options for emails that you send + * using the configuration set.

+ * + */ + TrackingOptions?: TrackingOptions; +} + +export namespace CreateConfigurationSetRequest { + export function isa(o: any): o is CreateConfigurationSetRequest { + return _smithy.isa(o, "CreateConfigurationSetRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface CreateConfigurationSetResponse extends $MetadataBearer { + __type?: "CreateConfigurationSetResponse"; +} + +export namespace CreateConfigurationSetResponse { + export function isa(o: any): o is CreateConfigurationSetResponse { + return _smithy.isa(o, "CreateConfigurationSetResponse"); + } +} + +/** + * + *

A request to create a new dedicated IP pool.

+ * + */ +export interface CreateDedicatedIpPoolRequest { + __type?: "CreateDedicatedIpPoolRequest"; + /** + * + *

The name of the dedicated IP pool.

+ * + */ + PoolName: string | undefined; + + /** + * + *

An object that defines the tags (keys and values) that you want to associate with the + * pool.

+ * + */ + Tags?: Array; +} + +export namespace CreateDedicatedIpPoolRequest { + export function isa(o: any): o is CreateDedicatedIpPoolRequest { + return _smithy.isa(o, "CreateDedicatedIpPoolRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface CreateDedicatedIpPoolResponse extends $MetadataBearer { + __type?: "CreateDedicatedIpPoolResponse"; +} + +export namespace CreateDedicatedIpPoolResponse { + export function isa(o: any): o is CreateDedicatedIpPoolResponse { + return _smithy.isa(o, "CreateDedicatedIpPoolResponse"); + } +} + +/** + * + *

A request to perform a predictive inbox placement test. Predictive inbox placement tests can help you predict how your messages will + * be handled by various email providers around the world. When you perform a predictive inbox placement test, you + * provide a sample message that contains the content that you plan to send to your + * customers. Amazon Pinpoint then sends that message to special email addresses spread across + * several major email providers. After about 24 hours, the test is complete, and you can + * use the GetDeliverabilityTestReport operation to view the results of the + * test.

+ * + */ +export interface CreateDeliverabilityTestReportRequest { + __type?: "CreateDeliverabilityTestReportRequest"; + /** + * + *

The HTML body of the message that you sent when you performed the predictive inbox placement test.

+ * + */ + Content: EmailContent | undefined; + + /** + * + *

The email address that the predictive inbox placement test email was sent from.

+ * + */ + FromEmailAddress: string | undefined; + + /** + * + *

A unique name that helps you to identify the predictive inbox placement test when you retrieve the + * results.

+ * + */ + ReportName?: string; + + /** + * + *

An array of objects that define the tags (keys and values) that you want to associate + * with the predictive inbox placement test.

+ * + */ + Tags?: Array; +} + +export namespace CreateDeliverabilityTestReportRequest { + export function isa(o: any): o is CreateDeliverabilityTestReportRequest { + return _smithy.isa(o, "CreateDeliverabilityTestReportRequest"); + } +} + +/** + * + *

Information about the predictive inbox placement test that you created.

+ * + */ +export interface CreateDeliverabilityTestReportResponse + extends $MetadataBearer { + __type?: "CreateDeliverabilityTestReportResponse"; + /** + * + *

The status of the predictive inbox placement test. If the status is IN_PROGRESS, then the predictive inbox placement test + * is currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the + * test. If the status is COMPLETE, then the test is finished, and you can use + * the GetDeliverabilityTestReport to view the results of the test.

+ * + */ + DeliverabilityTestStatus: DeliverabilityTestStatus | string | undefined; + + /** + * + *

A unique string that identifies the predictive inbox placement test.

+ * + */ + ReportId: string | undefined; +} + +export namespace CreateDeliverabilityTestReportResponse { + export function isa(o: any): o is CreateDeliverabilityTestReportResponse { + return _smithy.isa(o, "CreateDeliverabilityTestReportResponse"); + } +} + +/** + * + *

A request to begin the verification process for an email identity (an email address or + * domain).

+ * + */ +export interface CreateEmailIdentityRequest { + __type?: "CreateEmailIdentityRequest"; + /** + * + *

The email address or domain that you want to verify.

+ * + */ + EmailIdentity: string | undefined; + + /** + * + *

An array of objects that define the tags (keys and values) that you want to associate + * with the email identity.

+ * + */ + Tags?: Array; +} + +export namespace CreateEmailIdentityRequest { + export function isa(o: any): o is CreateEmailIdentityRequest { + return _smithy.isa(o, "CreateEmailIdentityRequest"); + } +} + +/** + * + *

If the email identity is a domain, this object contains tokens that you can use to + * create a set of CNAME records. To sucessfully verify your domain, you have to add these + * records to the DNS configuration for your domain.

+ *

If the email identity is an email address, this object is empty.

+ * + */ +export interface CreateEmailIdentityResponse extends $MetadataBearer { + __type?: "CreateEmailIdentityResponse"; + /** + * + *

An object that contains information about the DKIM attributes for the identity. This + * object includes the tokens that you use to create the CNAME records that are required to + * complete the DKIM verification process.

+ * + */ + DkimAttributes?: DkimAttributes; + + /** + * + *

The email identity type.

+ * + */ + IdentityType?: IdentityType | string; + + /** + * + *

Specifies whether or not the identity is verified. In Amazon Pinpoint, you can only send email + * from verified email addresses or domains. For more information about verifying + * identities, see the Amazon Pinpoint User Guide.

+ * + */ + VerifiedForSendingStatus?: boolean; +} + +export namespace CreateEmailIdentityResponse { + export function isa(o: any): o is CreateEmailIdentityResponse { + return _smithy.isa(o, "CreateEmailIdentityResponse"); + } +} + +/** + * + *

An object that contains information about the volume of email sent on each day of the + * analysis period.

+ * + */ +export interface DailyVolume { + __type?: "DailyVolume"; + /** + * + *

An object that contains inbox placement metrics for a specified day in the analysis + * period, broken out by the recipient's email provider.

+ * + */ + DomainIspPlacements?: Array; + + /** + * + *

The date that the DailyVolume metrics apply to, in Unix time.

+ * + */ + StartDate?: Date; + + /** + * + *

An object that contains inbox placement metrics for a specific day in the analysis + * period.

+ * + */ + VolumeStatistics?: VolumeStatistics; +} + +export namespace DailyVolume { + export function isa(o: any): o is DailyVolume { + return _smithy.isa(o, "DailyVolume"); + } +} + +/** + * + *

Contains information about a dedicated IP address that is associated with your Amazon Pinpoint + * account.

+ *

+ * + */ +export interface DedicatedIp { + __type?: "DedicatedIp"; + /** + * + *

An IP address that is reserved for use by your Amazon Pinpoint account.

+ * + */ + Ip: string | undefined; + + /** + * + *

The name of the dedicated IP pool that the IP address is associated with.

+ * + */ + PoolName?: string; + + /** + * + *

Indicates how complete the dedicated IP warm-up process is. When this value equals 1, + * the address has completed the warm-up process and is ready for use.

+ * + */ + WarmupPercentage: number | undefined; + + /** + * + *

The warm-up status of a dedicated IP address. The status can have one of the following + * values:

+ *
    + *
  • + *

    + * IN_PROGRESS – The IP address isn't ready to use because the + * dedicated IP warm-up process is ongoing.

    + *
  • + *
  • + *

    + * DONE – The dedicated IP warm-up process is complete, and + * the IP address is ready to use.

    + *
  • + *
+ * + */ + WarmupStatus: WarmupStatus | string | undefined; +} + +export namespace DedicatedIp { + export function isa(o: any): o is DedicatedIp { + return _smithy.isa(o, "DedicatedIp"); + } +} + +/** + * + *

A request to delete an event destination from a configuration set.

+ * + */ +export interface DeleteConfigurationSetEventDestinationRequest { + __type?: "DeleteConfigurationSetEventDestinationRequest"; + /** + * + *

The name of the configuration set that contains the event destination that you want to + * delete.

+ * + */ + ConfigurationSetName: string | undefined; + + /** + * + *

The name of the event destination that you want to delete.

+ * + */ + EventDestinationName: string | undefined; +} + +export namespace DeleteConfigurationSetEventDestinationRequest { + export function isa( + o: any + ): o is DeleteConfigurationSetEventDestinationRequest { + return _smithy.isa(o, "DeleteConfigurationSetEventDestinationRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface DeleteConfigurationSetEventDestinationResponse + extends $MetadataBearer { + __type?: "DeleteConfigurationSetEventDestinationResponse"; +} + +export namespace DeleteConfigurationSetEventDestinationResponse { + export function isa( + o: any + ): o is DeleteConfigurationSetEventDestinationResponse { + return _smithy.isa(o, "DeleteConfigurationSetEventDestinationResponse"); + } +} + +/** + * + *

A request to delete a configuration set.

+ * + */ +export interface DeleteConfigurationSetRequest { + __type?: "DeleteConfigurationSetRequest"; + /** + * + *

The name of the configuration set that you want to delete.

+ * + */ + ConfigurationSetName: string | undefined; +} + +export namespace DeleteConfigurationSetRequest { + export function isa(o: any): o is DeleteConfigurationSetRequest { + return _smithy.isa(o, "DeleteConfigurationSetRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface DeleteConfigurationSetResponse extends $MetadataBearer { + __type?: "DeleteConfigurationSetResponse"; +} + +export namespace DeleteConfigurationSetResponse { + export function isa(o: any): o is DeleteConfigurationSetResponse { + return _smithy.isa(o, "DeleteConfigurationSetResponse"); + } +} + +/** + * + *

A request to delete a dedicated IP pool.

+ * + */ +export interface DeleteDedicatedIpPoolRequest { + __type?: "DeleteDedicatedIpPoolRequest"; + /** + * + *

The name of the dedicated IP pool that you want to delete.

+ * + */ + PoolName: string | undefined; +} + +export namespace DeleteDedicatedIpPoolRequest { + export function isa(o: any): o is DeleteDedicatedIpPoolRequest { + return _smithy.isa(o, "DeleteDedicatedIpPoolRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface DeleteDedicatedIpPoolResponse extends $MetadataBearer { + __type?: "DeleteDedicatedIpPoolResponse"; +} + +export namespace DeleteDedicatedIpPoolResponse { + export function isa(o: any): o is DeleteDedicatedIpPoolResponse { + return _smithy.isa(o, "DeleteDedicatedIpPoolResponse"); + } +} + +/** + * + *

A request to delete an existing email identity. When you delete an identity, you lose + * the ability to use Amazon Pinpoint to send email from that identity. You can restore your ability + * to send email by completing the verification process for the identity again.

+ * + */ +export interface DeleteEmailIdentityRequest { + __type?: "DeleteEmailIdentityRequest"; + /** + * + *

The identity (that is, the email address or domain) that you want to delete from your + * Amazon Pinpoint account.

+ * + */ + EmailIdentity: string | undefined; +} + +export namespace DeleteEmailIdentityRequest { + export function isa(o: any): o is DeleteEmailIdentityRequest { + return _smithy.isa(o, "DeleteEmailIdentityRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface DeleteEmailIdentityResponse extends $MetadataBearer { + __type?: "DeleteEmailIdentityResponse"; +} + +export namespace DeleteEmailIdentityResponse { + export function isa(o: any): o is DeleteEmailIdentityResponse { + return _smithy.isa(o, "DeleteEmailIdentityResponse"); + } +} + +export enum DeliverabilityDashboardAccountStatus { + ACTIVE = "ACTIVE", + DISABLED = "DISABLED", + PENDING_EXPIRATION = "PENDING_EXPIRATION" +} + +/** + * + *

An object that contains metadata related to a predictive inbox placement test.

+ * + */ +export interface DeliverabilityTestReport { + __type?: "DeliverabilityTestReport"; + /** + * + *

The date and time when the predictive inbox placement test was created, in Unix time format.

+ * + */ + CreateDate?: Date; + + /** + * + *

The status of the predictive inbox placement test. If the status is IN_PROGRESS, then the predictive inbox placement test + * is currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the + * test. If the status is COMPLETE, then the test is finished, and you can use + * the GetDeliverabilityTestReport to view the results of the test.

+ * + */ + DeliverabilityTestStatus?: DeliverabilityTestStatus | string; + + /** + * + *

The sender address that you specified for the predictive inbox placement test.

+ * + */ + FromEmailAddress?: string; + + /** + * + *

A unique string that identifies the predictive inbox placement test.

+ * + */ + ReportId?: string; + + /** + * + *

A name that helps you identify a predictive inbox placement test report.

+ * + */ + ReportName?: string; + + /** + * + *

The subject line for an email that you submitted in a predictive inbox placement test.

+ * + */ + Subject?: string; +} + +export namespace DeliverabilityTestReport { + export function isa(o: any): o is DeliverabilityTestReport { + return _smithy.isa(o, "DeliverabilityTestReport"); + } +} + +export enum DeliverabilityTestStatus { + COMPLETED = "COMPLETED", + IN_PROGRESS = "IN_PROGRESS" +} + +/** + * + *

Used to associate a configuration set with a dedicated IP pool.

+ * + */ +export interface DeliveryOptions { + __type?: "DeliveryOptions"; + /** + * + *

The name of the dedicated IP pool that you want to associate with the configuration + * set.

+ * + */ + SendingPoolName?: string; + + /** + * + *

Specifies whether messages that use the configuration set are required to use + * Transport Layer Security (TLS). If the value is Require, messages are only + * delivered if a TLS connection can be established. If the value is Optional, + * messages can be delivered in plain text if a TLS connection can't be established.

+ * + */ + TlsPolicy?: TlsPolicy | string; +} + +export namespace DeliveryOptions { + export function isa(o: any): o is DeliveryOptions { + return _smithy.isa(o, "DeliveryOptions"); + } +} + +/** + * + *

An object that describes the recipients for an email.

+ * + */ +export interface Destination { + __type?: "Destination"; + /** + * + *

An array that contains the email addresses of the "BCC" (blind carbon copy) recipients + * for the email.

+ * + */ + BccAddresses?: Array; + + /** + * + *

An array that contains the email addresses of the "CC" (carbon copy) recipients for + * the email.

+ * + */ + CcAddresses?: Array; + + /** + * + *

An array that contains the email addresses of the "To" recipients for the + * email.

+ * + */ + ToAddresses?: Array; +} + +export namespace Destination { + export function isa(o: any): o is Destination { + return _smithy.isa(o, "Destination"); + } +} + +export enum DimensionValueSource { + EMAIL_HEADER = "EMAIL_HEADER", + LINK_TAG = "LINK_TAG", + MESSAGE_TAG = "MESSAGE_TAG" +} + +/** + * + *

An object that contains information about the DKIM configuration for an email + * identity.

+ * + */ +export interface DkimAttributes { + __type?: "DkimAttributes"; + /** + * + *

If the value is true, then the messages that Amazon Pinpoint sends from the + * identity are DKIM-signed. If the value is false, then the messages that + * Amazon Pinpoint sends from the identity aren't DKIM-signed.

+ * + */ + SigningEnabled?: boolean; + + /** + * + *

Describes whether or not Amazon Pinpoint has successfully located the DKIM records in the DNS + * records for the domain. The status can be one of the following:

+ *
    + *
  • + *

    + * PENDING – Amazon Pinpoint hasn't yet located the DKIM records in the + * DNS configuration for the domain, but will continue to attempt to locate + * them.

    + *
  • + *
  • + *

    + * SUCCESS – Amazon Pinpoint located the DKIM records in the DNS + * configuration for the domain and determined that they're correct. Amazon Pinpoint can now + * send DKIM-signed email from the identity.

    + *
  • + *
  • + *

    + * FAILED – Amazon Pinpoint was unable to locate the DKIM records in the + * DNS settings for the domain, and won't continue to search for them.

    + *
  • + *
  • + *

    + * TEMPORARY_FAILURE – A temporary issue occurred, which + * prevented Amazon Pinpoint from determining the DKIM status for the domain.

    + *
  • + *
  • + *

    + * NOT_STARTED – Amazon Pinpoint hasn't yet started searching for the + * DKIM records in the DKIM records for the domain.

    + *
  • + *
+ * + */ + Status?: DkimStatus | string; + + /** + * + *

A set of unique strings that you use to create a set of CNAME records that you add to + * the DNS configuration for your domain. When Amazon Pinpoint detects these records in the DNS + * configuration for your domain, the DKIM authentication process is complete. Amazon Pinpoint + * usually detects these records within about 72 hours of adding them to the DNS + * configuration for your domain.

+ * + */ + Tokens?: Array; +} + +export namespace DkimAttributes { + export function isa(o: any): o is DkimAttributes { + return _smithy.isa(o, "DkimAttributes"); + } +} + +export enum DkimStatus { + FAILED = "FAILED", + NOT_STARTED = "NOT_STARTED", + PENDING = "PENDING", + SUCCESS = "SUCCESS", + TEMPORARY_FAILURE = "TEMPORARY_FAILURE" +} + +/** + * + *

An object that contains the deliverability data for a specific campaign. This data is + * available for a campaign only if the campaign sent email by using a domain that the + * Deliverability dashboard is enabled for (PutDeliverabilityDashboardOption + * operation).

+ * + */ +export interface DomainDeliverabilityCampaign { + __type?: "DomainDeliverabilityCampaign"; + /** + * + *

The unique identifier for the campaign. Amazon Pinpoint automatically generates and assigns this + * identifier to a campaign. This value is not the same as the campaign identifier that + * Amazon Pinpoint assigns to campaigns that you create and manage by using the Amazon Pinpoint API or the + * Amazon Pinpoint console.

+ * + */ + CampaignId?: string; + + /** + * + *

The percentage of email messages that were deleted by recipients, without being opened + * first. Due to technical limitations, this value only includes recipients who opened the + * message by using an email client that supports images.

+ * + */ + DeleteRate?: number; + + /** + * + *

The major email providers who handled the email message.

+ * + */ + Esps?: Array; + + /** + * + *

The first time, in Unix time format, when the email message was delivered to any + * recipient's inbox. This value can help you determine how long it took for a campaign to + * deliver an email message.

+ * + */ + FirstSeenDateTime?: Date; + + /** + * + *

The verified email address that the email message was sent from.

+ * + */ + FromAddress?: string; + + /** + * + *

The URL of an image that contains a snapshot of the email message that was + * sent.

+ * + */ + ImageUrl?: string; + + /** + * + *

The number of email messages that were delivered to recipients’ inboxes.

+ * + */ + InboxCount?: number; + + /** + * + *

The last time, in Unix time format, when the email message was delivered to any + * recipient's inbox. This value can help you determine how long it took for a campaign to + * deliver an email message.

+ * + */ + LastSeenDateTime?: Date; + + /** + * + *

The projected number of recipients that the email message was sent to.

+ * + */ + ProjectedVolume?: number; + + /** + * + *

The percentage of email messages that were opened and then deleted by recipients. Due + * to technical limitations, this value only includes recipients who opened the message by + * using an email client that supports images.

+ * + */ + ReadDeleteRate?: number; + + /** + * + *

The percentage of email messages that were opened by recipients. Due to technical + * limitations, this value only includes recipients who opened the message by using an + * email client that supports images.

+ * + */ + ReadRate?: number; + + /** + * + *

The IP addresses that were used to send the email message.

+ * + */ + SendingIps?: Array; + + /** + * + *

The number of email messages that were delivered to recipients' spam or junk mail + * folders.

+ * + */ + SpamCount?: number; + + /** + * + *

The subject line, or title, of the email message.

+ * + */ + Subject?: string; +} + +export namespace DomainDeliverabilityCampaign { + export function isa(o: any): o is DomainDeliverabilityCampaign { + return _smithy.isa(o, "DomainDeliverabilityCampaign"); + } +} + +/** + * + *

An object that contains information about the Deliverability dashboard subscription for a + * verified domain that you use to send email and currently has an active Deliverability dashboard + * subscription. If a Deliverability dashboard subscription is active for a domain, you gain access + * to reputation, inbox placement, and other metrics for the domain.

+ * + */ +export interface DomainDeliverabilityTrackingOption { + __type?: "DomainDeliverabilityTrackingOption"; + /** + * + *

A verified domain that’s associated with your AWS account and currently has an + * active Deliverability dashboard subscription.

+ * + */ + Domain?: string; + + /** + * + *

An object that contains information about the inbox placement data settings for the + * domain.

+ * + */ + InboxPlacementTrackingOption?: InboxPlacementTrackingOption; + + /** + * + *

The date, in Unix time format, when you enabled the Deliverability dashboard for the + * domain.

+ * + */ + SubscriptionStartDate?: Date; +} + +export namespace DomainDeliverabilityTrackingOption { + export function isa(o: any): o is DomainDeliverabilityTrackingOption { + return _smithy.isa(o, "DomainDeliverabilityTrackingOption"); + } +} + +/** + * + *

An object that contains inbox placement data for email sent from one of your email + * domains to a specific email provider.

+ * + */ +export interface DomainIspPlacement { + __type?: "DomainIspPlacement"; + /** + * + *

The percentage of messages that were sent from the selected domain to the specified + * email provider that arrived in recipients' inboxes.

+ * + */ + InboxPercentage?: number; + + /** + * + *

The total number of messages that were sent from the selected domain to the specified + * email provider that arrived in recipients' inboxes.

+ * + */ + InboxRawCount?: number; + + /** + * + *

The name of the email provider that the inbox placement data applies to.

+ * + */ + IspName?: string; + + /** + * + *

The percentage of messages that were sent from the selected domain to the specified + * email provider that arrived in recipients' spam or junk mail folders.

+ * + */ + SpamPercentage?: number; + + /** + * + *

The total number of messages that were sent from the selected domain to the specified + * email provider that arrived in recipients' spam or junk mail folders.

+ * + */ + SpamRawCount?: number; +} + +export namespace DomainIspPlacement { + export function isa(o: any): o is DomainIspPlacement { + return _smithy.isa(o, "DomainIspPlacement"); + } +} + +/** + * + *

An object that defines the entire content of the email, including the message headers + * and the body content. You can create a simple email message, in which you specify the + * subject and the text and HTML versions of the message body. You can also create raw + * messages, in which you specify a complete MIME-formatted message. Raw messages can + * include attachments and custom headers.

+ * + */ +export interface EmailContent { + __type?: "EmailContent"; + /** + * + *

The raw email message. The message has to meet the following criteria:

+ *
    + *
  • + *

    The message has to contain a header and a body, separated by one blank + * line.

    + *
  • + *
  • + *

    All of the required header fields must be present in the message.

    + *
  • + *
  • + *

    Each part of a multipart MIME message must be formatted properly.

    + *
  • + *
  • + *

    If you include attachments, they must be in a file format that Amazon Pinpoint supports. + *

    + *
  • + *
  • + *

    The entire message must be Base64 encoded.

    + *
  • + *
  • + *

    If any of the MIME parts in your message contain content that is outside of + * the 7-bit ASCII character range, you should encode that content to ensure that + * recipients' email clients render the message properly.

    + *
  • + *
  • + *

    The length of any single line of text in the message can't exceed 1,000 + * characters. This restriction is defined in RFC 5321.

    + *
  • + *
+ * + */ + Raw?: RawMessage; + + /** + * + *

The simple email message. The message consists of a subject and a message body.

+ * + */ + Simple?: Message; + + /** + * + *

The template to use for the email message.

+ * + */ + Template?: Template; +} + +export namespace EmailContent { + export function isa(o: any): o is EmailContent { + return _smithy.isa(o, "EmailContent"); + } +} + +/** + * + *

In Amazon Pinpoint, events include message sends, deliveries, opens, + * clicks, bounces, and complaints. Event destinations are places that + * you can send information about these events to. For example, you can send event data to + * Amazon SNS to receive notifications when you receive bounces or complaints, or you can use + * Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

+ * + */ +export interface EventDestination { + __type?: "EventDestination"; + /** + * + *

An object that defines an Amazon CloudWatch destination for email events. You can use Amazon CloudWatch to + * monitor and gain insights on your email sending metrics.

+ * + */ + CloudWatchDestination?: CloudWatchDestination; + + /** + * + *

If true, the event destination is enabled. When the event destination is + * enabled, the specified event types are sent to the destinations in this + * EventDestinationDefinition.

+ *

If false, the event destination is disabled. When the event destination + * is disabled, events aren't sent to the specified destinations.

+ * + */ + Enabled?: boolean; + + /** + * + *

An object that defines an Amazon Kinesis Data Firehose destination for email events. You can use Amazon Kinesis Data Firehose to + * stream data to other services, such as Amazon S3 and Amazon Redshift.

+ * + */ + KinesisFirehoseDestination?: KinesisFirehoseDestination; + + /** + * + *

The types of events that Amazon Pinpoint sends to the specified event destinations.

+ * + */ + MatchingEventTypes: Array | undefined; + + /** + * + *

A name that identifies the event destination.

+ * + */ + Name: string | undefined; + + /** + * + *

An object that defines a Amazon Pinpoint destination for email events. You can use Amazon Pinpoint events + * to create attributes in Amazon Pinpoint projects. You can use these attributes to create segments + * for your campaigns.

+ * + */ + PinpointDestination?: PinpointDestination; + + /** + * + *

An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to + * send notification when certain email events occur.

+ * + */ + SnsDestination?: SnsDestination; +} + +export namespace EventDestination { + export function isa(o: any): o is EventDestination { + return _smithy.isa(o, "EventDestination"); + } +} + +/** + * + *

An object that defines the event destination. Specifically, it defines which services + * receive events from emails sent using the configuration set that the event destination + * is associated with. Also defines the types of events that are sent to the event + * destination.

+ * + */ +export interface EventDestinationDefinition { + __type?: "EventDestinationDefinition"; + /** + * + *

An object that defines an Amazon CloudWatch destination for email events. You can use Amazon CloudWatch to + * monitor and gain insights on your email sending metrics.

+ * + */ + CloudWatchDestination?: CloudWatchDestination; + + /** + * + *

If true, the event destination is enabled. When the event destination is + * enabled, the specified event types are sent to the destinations in this + * EventDestinationDefinition.

+ *

If false, the event destination is disabled. When the event destination + * is disabled, events aren't sent to the specified destinations.

+ * + */ + Enabled?: boolean; + + /** + * + *

An object that defines an Amazon Kinesis Data Firehose destination for email events. You can use Amazon Kinesis Data Firehose to + * stream data to other services, such as Amazon S3 and Amazon Redshift.

+ * + */ + KinesisFirehoseDestination?: KinesisFirehoseDestination; + + /** + * + *

An array that specifies which events Amazon Pinpoint should send to the destinations in this + * EventDestinationDefinition.

+ * + */ + MatchingEventTypes?: Array; + + /** + * + *

An object that defines a Amazon Pinpoint destination for email events. You can use Amazon Pinpoint events + * to create attributes in Amazon Pinpoint projects. You can use these attributes to create segments + * for your campaigns.

+ * + */ + PinpointDestination?: PinpointDestination; + + /** + * + *

An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to + * send notification when certain email events occur.

+ * + */ + SnsDestination?: SnsDestination; +} + +export namespace EventDestinationDefinition { + export function isa(o: any): o is EventDestinationDefinition { + return _smithy.isa(o, "EventDestinationDefinition"); + } +} + +export enum EventType { + BOUNCE = "BOUNCE", + CLICK = "CLICK", + COMPLAINT = "COMPLAINT", + DELIVERY = "DELIVERY", + OPEN = "OPEN", + REJECT = "REJECT", + RENDERING_FAILURE = "RENDERING_FAILURE", + SEND = "SEND" +} + +/** + * + *

A request to obtain information about the email-sending capabilities of your Amazon Pinpoint + * account.

+ * + */ +export interface GetAccountRequest { + __type?: "GetAccountRequest"; +} + +export namespace GetAccountRequest { + export function isa(o: any): o is GetAccountRequest { + return _smithy.isa(o, "GetAccountRequest"); + } +} + +/** + * + *

A list of details about the email-sending capabilities of your Amazon Pinpoint account in the + * current AWS Region.

+ * + */ +export interface GetAccountResponse extends $MetadataBearer { + __type?: "GetAccountResponse"; + /** + * + *

Indicates whether or not the automatic warm-up feature is enabled for dedicated IP + * addresses that are associated with your account.

+ * + */ + DedicatedIpAutoWarmupEnabled?: boolean; + + /** + * + *

The reputation status of your Amazon Pinpoint account. The status can be one of the + * following:

+ *
    + *
  • + *

    + * HEALTHY – There are no reputation-related issues that + * currently impact your account.

    + *
  • + *
  • + *

    + * PROBATION – We've identified some issues with your Amazon Pinpoint + * account. We're placing your account under review while you work on correcting + * these issues.

    + *
  • + *
  • + *

    + * SHUTDOWN – Your account's ability to send email is + * currently paused because of an issue with the email sent from your account. When + * you correct the issue, you can contact us and request that your account's + * ability to send email is resumed.

    + *
  • + *
+ * + */ + EnforcementStatus?: string; + + /** + * + *

Indicates whether or not your account has production access in the current AWS + * Region.

+ *

If the value is false, then your account is in the + * sandbox. When your account is in the sandbox, you can only send + * email to verified identities. Additionally, the maximum number of emails you can send in + * a 24-hour period (your sending quota) is 200, and the maximum number of emails you can + * send per second (your maximum sending rate) is 1.

+ *

If the value is true, then your account has production access. When your + * account has production access, you can send email to any address. The sending quota and + * maximum sending rate for your account vary based on your specific use case.

+ * + */ + ProductionAccessEnabled?: boolean; + + /** + * + *

An object that contains information about the per-day and per-second sending limits + * for your Amazon Pinpoint account in the current AWS Region.

+ * + */ + SendQuota?: SendQuota; + + /** + * + *

Indicates whether or not email sending is enabled for your Amazon Pinpoint account in the + * current AWS Region.

+ * + */ + SendingEnabled?: boolean; +} + +export namespace GetAccountResponse { + export function isa(o: any): o is GetAccountResponse { + return _smithy.isa(o, "GetAccountResponse"); + } +} + +/** + * + *

A request to retrieve a list of the blacklists that your dedicated IP addresses appear + * on.

+ * + */ +export interface GetBlacklistReportsRequest { + __type?: "GetBlacklistReportsRequest"; + /** + * + *

A list of IP addresses that you want to retrieve blacklist information about. You can + * only specify the dedicated IP addresses that you use to send email using Amazon Pinpoint or + * Amazon SES.

+ * + */ + BlacklistItemNames: Array | undefined; +} + +export namespace GetBlacklistReportsRequest { + export function isa(o: any): o is GetBlacklistReportsRequest { + return _smithy.isa(o, "GetBlacklistReportsRequest"); + } +} + +/** + * + *

An object that contains information about blacklist events.

+ * + */ +export interface GetBlacklistReportsResponse extends $MetadataBearer { + __type?: "GetBlacklistReportsResponse"; + /** + * + *

An object that contains information about a blacklist that one of your dedicated IP + * addresses appears on.

+ * + */ + BlacklistReport: { [key: string]: Array } | undefined; +} + +export namespace GetBlacklistReportsResponse { + export function isa(o: any): o is GetBlacklistReportsResponse { + return _smithy.isa(o, "GetBlacklistReportsResponse"); + } +} + +/** + * + *

A request to obtain information about the event destinations for a configuration + * set.

+ * + */ +export interface GetConfigurationSetEventDestinationsRequest { + __type?: "GetConfigurationSetEventDestinationsRequest"; + /** + * + *

The name of the configuration set that contains the event destination.

+ * + */ + ConfigurationSetName: string | undefined; +} + +export namespace GetConfigurationSetEventDestinationsRequest { + export function isa( + o: any + ): o is GetConfigurationSetEventDestinationsRequest { + return _smithy.isa(o, "GetConfigurationSetEventDestinationsRequest"); + } +} + +/** + * + *

Information about an event destination for a configuration set.

+ * + */ +export interface GetConfigurationSetEventDestinationsResponse + extends $MetadataBearer { + __type?: "GetConfigurationSetEventDestinationsResponse"; + /** + * + *

An array that includes all of the events destinations that have been configured for + * the configuration set.

+ * + */ + EventDestinations?: Array; +} + +export namespace GetConfigurationSetEventDestinationsResponse { + export function isa( + o: any + ): o is GetConfigurationSetEventDestinationsResponse { + return _smithy.isa(o, "GetConfigurationSetEventDestinationsResponse"); + } +} + +/** + * + *

A request to obtain information about a configuration set.

+ * + */ +export interface GetConfigurationSetRequest { + __type?: "GetConfigurationSetRequest"; + /** + * + *

The name of the configuration set that you want to obtain more information + * about.

+ * + */ + ConfigurationSetName: string | undefined; +} + +export namespace GetConfigurationSetRequest { + export function isa(o: any): o is GetConfigurationSetRequest { + return _smithy.isa(o, "GetConfigurationSetRequest"); + } +} + +/** + * + *

Information about a configuration set.

+ * + */ +export interface GetConfigurationSetResponse extends $MetadataBearer { + __type?: "GetConfigurationSetResponse"; + /** + * + *

The name of the configuration set.

+ * + */ + ConfigurationSetName?: string; + + /** + * + *

An object that defines the dedicated IP pool that is used to send emails that you send + * using the configuration set.

+ * + */ + DeliveryOptions?: DeliveryOptions; + + /** + * + *

An object that defines whether or not Amazon Pinpoint collects reputation metrics for the emails + * that you send that use the configuration set.

+ * + */ + ReputationOptions?: ReputationOptions; + + /** + * + *

An object that defines whether or not Amazon Pinpoint can send email that you send using the + * configuration set.

+ * + */ + SendingOptions?: SendingOptions; + + /** + * + *

An array of objects that define the tags (keys and values) that are associated with + * the configuration set.

+ * + */ + Tags?: Array; + + /** + * + *

An object that defines the open and click tracking options for emails that you send + * using the configuration set.

+ * + */ + TrackingOptions?: TrackingOptions; +} + +export namespace GetConfigurationSetResponse { + export function isa(o: any): o is GetConfigurationSetResponse { + return _smithy.isa(o, "GetConfigurationSetResponse"); + } +} + +/** + * + *

A request to obtain more information about a dedicated IP address.

+ * + */ +export interface GetDedicatedIpRequest { + __type?: "GetDedicatedIpRequest"; + /** + * + *

The IP address that you want to obtain more information about. The value you specify + * has to be a dedicated IP address that's assocaited with your Amazon Pinpoint account.

+ * + */ + Ip: string | undefined; +} + +export namespace GetDedicatedIpRequest { + export function isa(o: any): o is GetDedicatedIpRequest { + return _smithy.isa(o, "GetDedicatedIpRequest"); + } +} + +/** + * + *

Information about a dedicated IP address.

+ * + */ +export interface GetDedicatedIpResponse extends $MetadataBearer { + __type?: "GetDedicatedIpResponse"; + /** + * + *

An object that contains information about a dedicated IP address.

+ * + */ + DedicatedIp?: DedicatedIp; +} + +export namespace GetDedicatedIpResponse { + export function isa(o: any): o is GetDedicatedIpResponse { + return _smithy.isa(o, "GetDedicatedIpResponse"); + } +} + +/** + * + *

A request to obtain more information about dedicated IP pools.

+ * + */ +export interface GetDedicatedIpsRequest { + __type?: "GetDedicatedIpsRequest"; + /** + * + *

A token returned from a previous call to GetDedicatedIps to indicate the + * position of the dedicated IP pool in the list of IP pools.

+ * + */ + NextToken?: string; + + /** + * + *

The number of results to show in a single call to GetDedicatedIpsRequest. + * If the number of results is larger than the number you specified in this parameter, then + * the response includes a NextToken element, which you can use to obtain + * additional results.

+ * + */ + PageSize?: number; + + /** + * + *

The name of the IP pool that the dedicated IP address is associated with.

+ * + */ + PoolName?: string; +} + +export namespace GetDedicatedIpsRequest { + export function isa(o: any): o is GetDedicatedIpsRequest { + return _smithy.isa(o, "GetDedicatedIpsRequest"); + } +} + +/** + * + *

Information about the dedicated IP addresses that are associated with your Amazon Pinpoint + * account.

+ * + */ +export interface GetDedicatedIpsResponse extends $MetadataBearer { + __type?: "GetDedicatedIpsResponse"; + /** + * + *

A list of dedicated IP addresses that are reserved for use by your Amazon Pinpoint + * account.

+ * + */ + DedicatedIps?: Array; + + /** + * + *

A token that indicates that there are additional dedicated IP addresses to list. To + * view additional addresses, issue another request to GetDedicatedIps, + * passing this token in the NextToken parameter.

+ * + */ + NextToken?: string; +} + +export namespace GetDedicatedIpsResponse { + export function isa(o: any): o is GetDedicatedIpsResponse { + return _smithy.isa(o, "GetDedicatedIpsResponse"); + } +} + +/** + * + *

Retrieve information about the status of the Deliverability dashboard for your Amazon Pinpoint account. + * When the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and + * other metrics for the domains that you use to send email using Amazon Pinpoint. You also gain the + * ability to perform predictive inbox placement tests.

+ *

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition + * to any other fees that you accrue by using Amazon Pinpoint. For more information about the + * features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

+ * + */ +export interface GetDeliverabilityDashboardOptionsRequest { + __type?: "GetDeliverabilityDashboardOptionsRequest"; +} + +export namespace GetDeliverabilityDashboardOptionsRequest { + export function isa(o: any): o is GetDeliverabilityDashboardOptionsRequest { + return _smithy.isa(o, "GetDeliverabilityDashboardOptionsRequest"); + } +} + +/** + * + *

An object that shows the status of the Deliverability dashboard for your Amazon Pinpoint account.

+ * + */ +export interface GetDeliverabilityDashboardOptionsResponse + extends $MetadataBearer { + __type?: "GetDeliverabilityDashboardOptionsResponse"; + /** + * + *

The current status of your Deliverability dashboard subscription. If this value is + * PENDING_EXPIRATION, your subscription is scheduled to expire at the end + * of the current calendar month.

+ * + */ + AccountStatus?: DeliverabilityDashboardAccountStatus | string; + + /** + * + *

An array of objects, one for each verified domain that you use to send email and + * currently has an active Deliverability dashboard subscription that isn’t scheduled to expire at + * the end of the current calendar month.

+ * + */ + ActiveSubscribedDomains?: Array; + + /** + * + *

Specifies whether the Deliverability dashboard is enabled for your Amazon Pinpoint account. If this value + * is true, the dashboard is enabled.

+ * + */ + DashboardEnabled: boolean | undefined; + + /** + * + *

An array of objects, one for each verified domain that you use to send email and + * currently has an active Deliverability dashboard subscription that's scheduled to expire at the + * end of the current calendar month.

+ * + */ + PendingExpirationSubscribedDomains?: Array< + DomainDeliverabilityTrackingOption + >; + + /** + * + *

The date, in Unix time format, when your current subscription to the Deliverability dashboard + * is scheduled to expire, if your subscription is scheduled to expire at the end of the + * current calendar month. This value is null if you have an active subscription that isn’t + * due to expire at the end of the month.

+ * + */ + SubscriptionExpiryDate?: Date; +} + +export namespace GetDeliverabilityDashboardOptionsResponse { + export function isa(o: any): o is GetDeliverabilityDashboardOptionsResponse { + return _smithy.isa(o, "GetDeliverabilityDashboardOptionsResponse"); + } +} + +/** + * + *

A request to retrieve the results of a predictive inbox placement test.

+ * + */ +export interface GetDeliverabilityTestReportRequest { + __type?: "GetDeliverabilityTestReportRequest"; + /** + * + *

A unique string that identifies the predictive inbox placement test.

+ * + */ + ReportId: string | undefined; +} + +export namespace GetDeliverabilityTestReportRequest { + export function isa(o: any): o is GetDeliverabilityTestReportRequest { + return _smithy.isa(o, "GetDeliverabilityTestReportRequest"); + } +} + +/** + * + *

The results of the predictive inbox placement test.

+ * + */ +export interface GetDeliverabilityTestReportResponse extends $MetadataBearer { + __type?: "GetDeliverabilityTestReportResponse"; + /** + * + *

An object that contains the results of the predictive inbox placement test.

+ * + */ + DeliverabilityTestReport: DeliverabilityTestReport | undefined; + + /** + * + *

An object that describes how the test email was handled by several email providers, + * including Gmail, Hotmail, Yahoo, AOL, and others.

+ * + */ + IspPlacements: Array | undefined; + + /** + * + *

An object that contains the message that you sent when you performed this + * predictive inbox placement test.

+ * + */ + Message?: string; + + /** + * + *

An object that specifies how many test messages that were sent during the predictive inbox placement test were + * delivered to recipients' inboxes, how many were sent to recipients' spam folders, and + * how many weren't delivered.

+ * + */ + OverallPlacement: PlacementStatistics | undefined; + + /** + * + *

An array of objects that define the tags (keys and values) that are associated with + * the predictive inbox placement test.

+ * + */ + Tags?: Array; +} + +export namespace GetDeliverabilityTestReportResponse { + export function isa(o: any): o is GetDeliverabilityTestReportResponse { + return _smithy.isa(o, "GetDeliverabilityTestReportResponse"); + } +} + +/** + * + *

Retrieve all the deliverability data for a specific campaign. This data is available + * for a campaign only if the campaign sent email by using a domain that the + * Deliverability dashboard is enabled for (PutDeliverabilityDashboardOption + * operation).

+ * + */ +export interface GetDomainDeliverabilityCampaignRequest { + __type?: "GetDomainDeliverabilityCampaignRequest"; + /** + * + *

The unique identifier for the campaign. Amazon Pinpoint automatically generates and assigns this + * identifier to a campaign. This value is not the same as the campaign identifier that + * Amazon Pinpoint assigns to campaigns that you create and manage by using the Amazon Pinpoint API or the + * Amazon Pinpoint console.

+ * + */ + CampaignId: string | undefined; +} + +export namespace GetDomainDeliverabilityCampaignRequest { + export function isa(o: any): o is GetDomainDeliverabilityCampaignRequest { + return _smithy.isa(o, "GetDomainDeliverabilityCampaignRequest"); + } +} + +/** + * + *

An object that contains all the deliverability data for a specific campaign. This data + * is available for a campaign only if the campaign sent email by using a domain that the + * Deliverability dashboard is enabled for (PutDeliverabilityDashboardOption + * operation).

+ * + */ +export interface GetDomainDeliverabilityCampaignResponse + extends $MetadataBearer { + __type?: "GetDomainDeliverabilityCampaignResponse"; + /** + * + *

An object that contains the deliverability data for the campaign.

+ * + */ + DomainDeliverabilityCampaign: DomainDeliverabilityCampaign | undefined; +} + +export namespace GetDomainDeliverabilityCampaignResponse { + export function isa(o: any): o is GetDomainDeliverabilityCampaignResponse { + return _smithy.isa(o, "GetDomainDeliverabilityCampaignResponse"); + } +} + +/** + * + *

A request to obtain deliverability metrics for a domain.

+ * + */ +export interface GetDomainStatisticsReportRequest { + __type?: "GetDomainStatisticsReportRequest"; + /** + * + *

The domain that you want to obtain deliverability metrics for.

+ * + */ + Domain: string | undefined; + + /** + * + *

The last day (in Unix time) that you want to obtain domain deliverability metrics for. + * The EndDate that you specify has to be less than or equal to 30 days after + * the StartDate.

+ * + */ + EndDate: Date | undefined; + + /** + * + *

The first day (in Unix time) that you want to obtain domain deliverability metrics + * for.

+ * + */ + StartDate: Date | undefined; +} + +export namespace GetDomainStatisticsReportRequest { + export function isa(o: any): o is GetDomainStatisticsReportRequest { + return _smithy.isa(o, "GetDomainStatisticsReportRequest"); + } +} + +/** + * + *

An object that includes statistics that are related to the domain that you + * specified.

+ * + */ +export interface GetDomainStatisticsReportResponse extends $MetadataBearer { + __type?: "GetDomainStatisticsReportResponse"; + /** + * + *

An object that contains deliverability metrics for the domain that you specified. This + * object contains data for each day, starting on the StartDate and ending on + * the EndDate.

+ * + */ + DailyVolumes: Array | undefined; + + /** + * + *

An object that contains deliverability metrics for the domain that you specified. The + * data in this object is a summary of all of the data that was collected from the + * StartDate to the EndDate.

+ * + */ + OverallVolume: OverallVolume | undefined; +} + +export namespace GetDomainStatisticsReportResponse { + export function isa(o: any): o is GetDomainStatisticsReportResponse { + return _smithy.isa(o, "GetDomainStatisticsReportResponse"); + } +} + +/** + * + *

A request to return details about an email identity.

+ * + */ +export interface GetEmailIdentityRequest { + __type?: "GetEmailIdentityRequest"; + /** + * + *

The email identity that you want to retrieve details for.

+ * + */ + EmailIdentity: string | undefined; +} + +export namespace GetEmailIdentityRequest { + export function isa(o: any): o is GetEmailIdentityRequest { + return _smithy.isa(o, "GetEmailIdentityRequest"); + } +} + +/** + * + *

Details about an email identity.

+ * + */ +export interface GetEmailIdentityResponse extends $MetadataBearer { + __type?: "GetEmailIdentityResponse"; + /** + * + *

An object that contains information about the DKIM attributes for the identity. This + * object includes the tokens that you use to create the CNAME records that are required to + * complete the DKIM verification process.

+ * + */ + DkimAttributes?: DkimAttributes; + + /** + * + *

The feedback forwarding configuration for the identity.

+ *

If the value is true, Amazon Pinpoint sends you email notifications when bounce or + * complaint events occur. Amazon Pinpoint sends this notification to the address that you specified + * in the Return-Path header of the original email.

+ *

When you set this value to false, Amazon Pinpoint sends notifications through other + * mechanisms, such as by notifying an Amazon SNS topic or another event destination. You're + * required to have a method of tracking bounces and complaints. If you haven't set up + * another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email + * notification when these events occur (even if this setting is disabled).

+ * + */ + FeedbackForwardingStatus?: boolean; + + /** + * + *

The email identity type.

+ * + */ + IdentityType?: IdentityType | string; + + /** + * + *

An object that contains information about the Mail-From attributes for the email + * identity.

+ * + */ + MailFromAttributes?: MailFromAttributes; + + /** + * + *

An array of objects that define the tags (keys and values) that are associated with + * the email identity.

+ * + */ + Tags?: Array; + + /** + * + *

Specifies whether or not the identity is verified. In Amazon Pinpoint, you can only send email + * from verified email addresses or domains. For more information about verifying + * identities, see the Amazon Pinpoint User Guide.

+ * + */ + VerifiedForSendingStatus?: boolean; +} + +export namespace GetEmailIdentityResponse { + export function isa(o: any): o is GetEmailIdentityResponse { + return _smithy.isa(o, "GetEmailIdentityResponse"); + } +} + +/** + * + *

Information about an email identity.

+ * + */ +export interface IdentityInfo { + __type?: "IdentityInfo"; + /** + * + *

The address or domain of the identity.

+ * + */ + IdentityName?: string; + + /** + * + *

The email identity type. The identity type can be one of the following:

+ *
    + *
  • + *

    + * EMAIL_ADDRESS – The identity is an email address.

    + *
  • + *
  • + *

    + * DOMAIN – The identity is a domain.

    + *
  • + *
  • + *

    + * MANAGED_DOMAIN – The identity is a domain that is managed + * by AWS.

    + *
  • + *
+ * + */ + IdentityType?: IdentityType | string; + + /** + * + *

Indicates whether or not you can send email from the identity.

+ *

In Amazon Pinpoint, an identity is an email address or domain that you send email from. Before + * you can send email from an identity, you have to demostrate that you own the identity, + * and that you authorize Amazon Pinpoint to send email from that identity.

+ * + */ + SendingEnabled?: boolean; +} + +export namespace IdentityInfo { + export function isa(o: any): o is IdentityInfo { + return _smithy.isa(o, "IdentityInfo"); + } +} + +export enum IdentityType { + DOMAIN = "DOMAIN", + EMAIL_ADDRESS = "EMAIL_ADDRESS", + MANAGED_DOMAIN = "MANAGED_DOMAIN" +} + +/** + * + *

An object that contains information about the inbox placement data settings for a + * verified domain that’s associated with your AWS account. This data is available only + * if you enabled the Deliverability dashboard for the domain + * (PutDeliverabilityDashboardOption operation).

+ * + */ +export interface InboxPlacementTrackingOption { + __type?: "InboxPlacementTrackingOption"; + /** + * + *

Specifies whether inbox placement data is being tracked for the domain.

+ * + */ + Global?: boolean; + + /** + * + *

An array of strings, one for each major email provider that the inbox placement data + * applies to.

+ * + */ + TrackedIsps?: Array; +} + +export namespace InboxPlacementTrackingOption { + export function isa(o: any): o is InboxPlacementTrackingOption { + return _smithy.isa(o, "InboxPlacementTrackingOption"); + } +} + +/** + * + *

An object that describes how email sent during the predictive inbox placement test was handled by a certain + * email provider.

+ * + */ +export interface IspPlacement { + __type?: "IspPlacement"; + /** + * + *

The name of the email provider that the inbox placement data applies to.

+ * + */ + IspName?: string; + + /** + * + *

An object that contains inbox placement metrics for a specific email provider.

+ * + */ + PlacementStatistics?: PlacementStatistics; +} + +export namespace IspPlacement { + export function isa(o: any): o is IspPlacement { + return _smithy.isa(o, "IspPlacement"); + } +} + +/** + * + *

An object that defines an Amazon Kinesis Data Firehose destination for email events. You can use Amazon Kinesis Data Firehose to + * stream data to other services, such as Amazon S3 and Amazon Redshift.

+ * + */ +export interface KinesisFirehoseDestination { + __type?: "KinesisFirehoseDestination"; + /** + * + *

The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose stream that Amazon Pinpoint sends email events + * to.

+ * + */ + DeliveryStreamArn: string | undefined; + + /** + * + *

The Amazon Resource Name (ARN) of the IAM role that Amazon Pinpoint uses when sending email + * events to the Amazon Kinesis Data Firehose stream.

+ * + */ + IamRoleArn: string | undefined; +} + +export namespace KinesisFirehoseDestination { + export function isa(o: any): o is KinesisFirehoseDestination { + return _smithy.isa(o, "KinesisFirehoseDestination"); + } +} + +/** + * + *

There are too many instances of the specified resource type.

+ * + */ +export interface LimitExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "LimitExceededException"; + $fault: "client"; + message?: string; +} + +export namespace LimitExceededException { + export function isa(o: any): o is LimitExceededException { + return _smithy.isa(o, "LimitExceededException"); + } +} + +/** + * + *

A request to obtain a list of configuration sets for your Amazon Pinpoint account in the current + * AWS Region.

+ * + */ +export interface ListConfigurationSetsRequest { + __type?: "ListConfigurationSetsRequest"; + /** + * + *

A token returned from a previous call to ListConfigurationSets to + * indicate the position in the list of configuration sets.

+ * + */ + NextToken?: string; + + /** + * + *

The number of results to show in a single call to ListConfigurationSets. + * If the number of results is larger than the number you specified in this parameter, then + * the response includes a NextToken element, which you can use to obtain + * additional results.

+ * + */ + PageSize?: number; +} + +export namespace ListConfigurationSetsRequest { + export function isa(o: any): o is ListConfigurationSetsRequest { + return _smithy.isa(o, "ListConfigurationSetsRequest"); + } +} + +/** + * + *

A list of configuration sets in your Amazon Pinpoint account in the current AWS Region.

+ * + */ +export interface ListConfigurationSetsResponse extends $MetadataBearer { + __type?: "ListConfigurationSetsResponse"; + /** + * + *

An array that contains all of the configuration sets in your Amazon Pinpoint account in the + * current AWS Region.

+ * + */ + ConfigurationSets?: Array; + + /** + * + *

A token that indicates that there are additional configuration sets to list. To view + * additional configuration sets, issue another request to + * ListConfigurationSets, and pass this token in the + * NextToken parameter.

+ * + */ + NextToken?: string; +} + +export namespace ListConfigurationSetsResponse { + export function isa(o: any): o is ListConfigurationSetsResponse { + return _smithy.isa(o, "ListConfigurationSetsResponse"); + } +} + +/** + * + *

A request to obtain a list of dedicated IP pools.

+ * + */ +export interface ListDedicatedIpPoolsRequest { + __type?: "ListDedicatedIpPoolsRequest"; + /** + * + *

A token returned from a previous call to ListDedicatedIpPools to indicate + * the position in the list of dedicated IP pools.

+ * + */ + NextToken?: string; + + /** + * + *

The number of results to show in a single call to ListDedicatedIpPools. + * If the number of results is larger than the number you specified in this parameter, then + * the response includes a NextToken element, which you can use to obtain + * additional results.

+ * + */ + PageSize?: number; +} + +export namespace ListDedicatedIpPoolsRequest { + export function isa(o: any): o is ListDedicatedIpPoolsRequest { + return _smithy.isa(o, "ListDedicatedIpPoolsRequest"); + } +} + +/** + * + *

A list of dedicated IP pools.

+ * + */ +export interface ListDedicatedIpPoolsResponse extends $MetadataBearer { + __type?: "ListDedicatedIpPoolsResponse"; + /** + * + *

A list of all of the dedicated IP pools that are associated with your Amazon Pinpoint + * account.

+ * + */ + DedicatedIpPools?: Array; + + /** + * + *

A token that indicates that there are additional IP pools to list. To view additional + * IP pools, issue another request to ListDedicatedIpPools, passing this token + * in the NextToken parameter.

+ * + */ + NextToken?: string; +} + +export namespace ListDedicatedIpPoolsResponse { + export function isa(o: any): o is ListDedicatedIpPoolsResponse { + return _smithy.isa(o, "ListDedicatedIpPoolsResponse"); + } +} + +/** + * + *

A request to list all of the predictive inbox placement tests that you've performed.

+ * + */ +export interface ListDeliverabilityTestReportsRequest { + __type?: "ListDeliverabilityTestReportsRequest"; + /** + * + *

A token returned from a previous call to ListDeliverabilityTestReports to + * indicate the position in the list of predictive inbox placement tests.

+ * + */ + NextToken?: string; + + /** + * + *

The number of results to show in a single call to + * ListDeliverabilityTestReports. If the number of results is larger than + * the number you specified in this parameter, then the response includes a + * NextToken element, which you can use to obtain additional + * results.

+ *

The value you specify has to be at least 0, and can be no more than 1000.

+ * + */ + PageSize?: number; +} + +export namespace ListDeliverabilityTestReportsRequest { + export function isa(o: any): o is ListDeliverabilityTestReportsRequest { + return _smithy.isa(o, "ListDeliverabilityTestReportsRequest"); + } +} + +/** + * + *

A list of the predictive inbox placement test reports that are available for your account, regardless of + * whether or not those tests are complete.

+ * + */ +export interface ListDeliverabilityTestReportsResponse extends $MetadataBearer { + __type?: "ListDeliverabilityTestReportsResponse"; + /** + * + *

An object that contains a lists of predictive inbox placement tests that you've performed.

+ * + */ + DeliverabilityTestReports: Array | undefined; + + /** + * + *

A token that indicates that there are additional predictive inbox placement tests to list. To view additional + * predictive inbox placement tests, issue another request to ListDeliverabilityTestReports, and pass + * this token in the NextToken parameter.

+ * + */ + NextToken?: string; +} + +export namespace ListDeliverabilityTestReportsResponse { + export function isa(o: any): o is ListDeliverabilityTestReportsResponse { + return _smithy.isa(o, "ListDeliverabilityTestReportsResponse"); + } +} + +/** + * + *

Retrieve deliverability data for all the campaigns that used a specific domain to send + * email during a specified time range. This data is available for a domain only if you + * enabled the Deliverability dashboard (PutDeliverabilityDashboardOption operation) + * for the domain.

+ * + */ +export interface ListDomainDeliverabilityCampaignsRequest { + __type?: "ListDomainDeliverabilityCampaignsRequest"; + /** + * + *

The last day, in Unix time format, that you want to obtain deliverability data for. + * This value has to be less than or equal to 30 days after the value of the + * StartDate parameter.

+ * + */ + EndDate: Date | undefined; + + /** + * + *

A token that’s returned from a previous call to the + * ListDomainDeliverabilityCampaigns operation. This token indicates the + * position of a campaign in the list of campaigns.

+ * + */ + NextToken?: string; + + /** + * + *

The maximum number of results to include in response to a single call to the + * ListDomainDeliverabilityCampaigns operation. If the number of results + * is larger than the number that you specify in this parameter, the response includes a + * NextToken element, which you can use to obtain additional + * results.

+ * + */ + PageSize?: number; + + /** + * + *

The first day, in Unix time format, that you want to obtain deliverability data + * for.

+ * + */ + StartDate: Date | undefined; + + /** + * + *

The domain to obtain deliverability data for.

+ * + */ + SubscribedDomain: string | undefined; +} + +export namespace ListDomainDeliverabilityCampaignsRequest { + export function isa(o: any): o is ListDomainDeliverabilityCampaignsRequest { + return _smithy.isa(o, "ListDomainDeliverabilityCampaignsRequest"); + } +} + +/** + * + *

An array of objects that provide deliverability data for all the campaigns that used a + * specific domain to send email during a specified time range. This data is available for + * a domain only if you enabled the Deliverability dashboard + * (PutDeliverabilityDashboardOption operation) for the domain.

+ * + */ +export interface ListDomainDeliverabilityCampaignsResponse + extends $MetadataBearer { + __type?: "ListDomainDeliverabilityCampaignsResponse"; + /** + * + *

An array of responses, one for each campaign that used the domain to send email during + * the specified time range.

+ * + */ + DomainDeliverabilityCampaigns: + | Array + | undefined; + + /** + * + *

A token that’s returned from a previous call to the + * ListDomainDeliverabilityCampaigns operation. This token indicates the + * position of the campaign in the list of campaigns.

+ * + */ + NextToken?: string; +} + +export namespace ListDomainDeliverabilityCampaignsResponse { + export function isa(o: any): o is ListDomainDeliverabilityCampaignsResponse { + return _smithy.isa(o, "ListDomainDeliverabilityCampaignsResponse"); + } +} + +/** + * + *

A request to list all of the email identities associated with your Amazon Pinpoint account. This + * list includes identities that you've already verified, identities that are unverified, + * and identities that were verified in the past, but are no longer verified.

+ * + */ +export interface ListEmailIdentitiesRequest { + __type?: "ListEmailIdentitiesRequest"; + /** + * + *

A token returned from a previous call to ListEmailIdentities to indicate + * the position in the list of identities.

+ * + */ + NextToken?: string; + + /** + * + *

The number of results to show in a single call to ListEmailIdentities. If + * the number of results is larger than the number you specified in this parameter, then + * the response includes a NextToken element, which you can use to obtain + * additional results.

+ *

The value you specify has to be at least 0, and can be no more than 1000.

+ * + */ + PageSize?: number; +} + +export namespace ListEmailIdentitiesRequest { + export function isa(o: any): o is ListEmailIdentitiesRequest { + return _smithy.isa(o, "ListEmailIdentitiesRequest"); + } +} + +/** + * + *

A list of all of the identities that you've attempted to verify for use with Amazon Pinpoint, + * regardless of whether or not those identities were successfully verified.

+ * + */ +export interface ListEmailIdentitiesResponse extends $MetadataBearer { + __type?: "ListEmailIdentitiesResponse"; + /** + * + *

An array that includes all of the identities associated with your Amazon Pinpoint + * account.

+ * + */ + EmailIdentities?: Array; + + /** + * + *

A token that indicates that there are additional configuration sets to list. To view + * additional configuration sets, issue another request to + * ListEmailIdentities, and pass this token in the NextToken + * parameter.

+ * + */ + NextToken?: string; +} + +export namespace ListEmailIdentitiesResponse { + export function isa(o: any): o is ListEmailIdentitiesResponse { + return _smithy.isa(o, "ListEmailIdentitiesResponse"); + } +} + +export interface ListTagsForResourceRequest { + __type?: "ListTagsForResourceRequest"; + /** + * + *

The Amazon Resource Name (ARN) of the resource that you want to retrieve tag + * information for.

+ * + */ + ResourceArn: string | undefined; +} + +export namespace ListTagsForResourceRequest { + export function isa(o: any): o is ListTagsForResourceRequest { + return _smithy.isa(o, "ListTagsForResourceRequest"); + } +} + +export interface ListTagsForResourceResponse extends $MetadataBearer { + __type?: "ListTagsForResourceResponse"; + /** + * + *

An array that lists all the tags that are associated with the resource. Each tag + * consists of a required tag key (Key) and an associated tag value + * (Value)

+ * + */ + Tags: Array | undefined; +} + +export namespace ListTagsForResourceResponse { + export function isa(o: any): o is ListTagsForResourceResponse { + return _smithy.isa(o, "ListTagsForResourceResponse"); + } +} + +/** + * + *

A list of attributes that are associated with a MAIL FROM domain.

+ * + */ +export interface MailFromAttributes { + __type?: "MailFromAttributes"; + /** + * + *

The action that Amazon Pinpoint to takes if it can't read the required MX record for a custom + * MAIL FROM domain. When you set this value to UseDefaultValue, Amazon Pinpoint uses + * amazonses.com as the MAIL FROM domain. When you set this value + * to RejectMessage, Amazon Pinpoint returns a MailFromDomainNotVerified + * error, and doesn't attempt to deliver the email.

+ *

These behaviors are taken when the custom MAIL FROM domain configuration is in the + * Pending, Failed, and TemporaryFailure + * states.

+ * + */ + BehaviorOnMxFailure: BehaviorOnMxFailure | string | undefined; + + /** + * + *

The name of a domain that an email identity uses as a custom MAIL FROM domain.

+ * + */ + MailFromDomain: string | undefined; + + /** + * + *

The status of the MAIL FROM domain. This status can have the following values:

+ *
    + *
  • + *

    + * PENDING – Amazon Pinpoint hasn't started searching for the MX record + * yet.

    + *
  • + *
  • + *

    + * SUCCESS – Amazon Pinpoint detected the required MX record for the + * MAIL FROM domain.

    + *
  • + *
  • + *

    + * FAILED – Amazon Pinpoint can't find the required MX record, or the + * record no longer exists.

    + *
  • + *
  • + *

    + * TEMPORARY_FAILURE – A temporary issue occurred, which + * prevented Amazon Pinpoint from determining the status of the MAIL FROM domain.

    + *
  • + *
+ * + */ + MailFromDomainStatus: MailFromDomainStatus | string | undefined; +} + +export namespace MailFromAttributes { + export function isa(o: any): o is MailFromAttributes { + return _smithy.isa(o, "MailFromAttributes"); + } +} + +/** + * + *

The message can't be sent because the sending domain isn't verified.

+ * + */ +export interface MailFromDomainNotVerifiedException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "MailFromDomainNotVerifiedException"; + $fault: "client"; + message?: string; +} + +export namespace MailFromDomainNotVerifiedException { + export function isa(o: any): o is MailFromDomainNotVerifiedException { + return _smithy.isa(o, "MailFromDomainNotVerifiedException"); + } +} + +export enum MailFromDomainStatus { + FAILED = "FAILED", + PENDING = "PENDING", + SUCCESS = "SUCCESS", + TEMPORARY_FAILURE = "TEMPORARY_FAILURE" +} + +/** + * + *

Represents the email message that you're sending. The Message object + * consists of a subject line and a message body.

+ * + */ +export interface Message { + __type?: "Message"; + /** + * + *

The body of the message. You can specify an HTML version of the message, a text-only + * version of the message, or both.

+ * + */ + Body: Body | undefined; + + /** + * + *

The subject line of the email. The subject line can only contain 7-bit ASCII + * characters. However, you can specify non-ASCII characters in the subject line by using + * encoded-word syntax, as described in RFC 2047.

+ * + */ + Subject: Content | undefined; +} + +export namespace Message { + export function isa(o: any): o is Message { + return _smithy.isa(o, "Message"); + } +} + +/** + * + *

The message can't be sent because it contains invalid content.

+ * + */ +export interface MessageRejected + extends _smithy.SmithyException, + $MetadataBearer { + __type: "MessageRejected"; + $fault: "client"; + message?: string; +} + +export namespace MessageRejected { + export function isa(o: any): o is MessageRejected { + return _smithy.isa(o, "MessageRejected"); + } +} + +/** + * + *

Contains the name and value of a tag that you apply to an email. You can use message + * tags when you publish email sending events. + *

+ * + */ +export interface MessageTag { + __type?: "MessageTag"; + /** + * + *

The name of the message tag. The message tag name has to meet the following + * criteria:

+ *
    + *
  • + *

    It can only contain ASCII letters (a–z, A–Z), numbers (0–9), + * underscores (_), or dashes (-).

    + *
  • + *
  • + *

    It can contain no more than 256 characters.

    + *
  • + *
+ * + */ + Name: string | undefined; + + /** + * + *

The value of the message tag. The message tag value has to meet the following + * criteria:

+ *
    + *
  • + *

    It can only contain ASCII letters (a–z, A–Z), numbers (0–9), + * underscores (_), or dashes (-).

    + *
  • + *
  • + *

    It can contain no more than 256 characters.

    + *
  • + *
+ * + */ + Value: string | undefined; +} + +export namespace MessageTag { + export function isa(o: any): o is MessageTag { + return _smithy.isa(o, "MessageTag"); + } +} + +/** + * + *

The resource you attempted to access doesn't exist.

+ * + */ +export interface NotFoundException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "NotFoundException"; + $fault: "client"; + message?: string; +} + +export namespace NotFoundException { + export function isa(o: any): o is NotFoundException { + return _smithy.isa(o, "NotFoundException"); + } +} + +/** + * + *

An object that contains information about email that was sent from the selected + * domain.

+ * + */ +export interface OverallVolume { + __type?: "OverallVolume"; + /** + * + *

An object that contains inbox and junk mail placement metrics for individual email + * providers.

+ * + */ + DomainIspPlacements?: Array; + + /** + * + *

The percentage of emails that were sent from the domain that were read by their + * recipients.

+ * + */ + ReadRatePercent?: number; + + /** + * + *

An object that contains information about the numbers of messages that arrived in + * recipients' inboxes and junk mail folders.

+ * + */ + VolumeStatistics?: VolumeStatistics; +} + +export namespace OverallVolume { + export function isa(o: any): o is OverallVolume { + return _smithy.isa(o, "OverallVolume"); + } +} + +/** + * + *

An object that defines a Amazon Pinpoint destination for email events. You can use Amazon Pinpoint events + * to create attributes in Amazon Pinpoint projects. You can use these attributes to create segments + * for your campaigns.

+ * + */ +export interface PinpointDestination { + __type?: "PinpointDestination"; + /** + * + *

The Amazon Resource Name (ARN) of the Amazon Pinpoint project that you want to send email + * events to.

+ * + */ + ApplicationArn?: string; +} + +export namespace PinpointDestination { + export function isa(o: any): o is PinpointDestination { + return _smithy.isa(o, "PinpointDestination"); + } +} + +/** + * + *

An object that contains inbox placement data for an email provider.

+ * + */ +export interface PlacementStatistics { + __type?: "PlacementStatistics"; + /** + * + *

The percentage of emails that were authenticated by using DomainKeys Identified Mail + * (DKIM) during the predictive inbox placement test.

+ * + */ + DkimPercentage?: number; + + /** + * + *

The percentage of emails that arrived in recipients' inboxes during the predictive inbox placement test.

+ * + */ + InboxPercentage?: number; + + /** + * + *

The percentage of emails that didn't arrive in recipients' inboxes at all during the + * predictive inbox placement test.

+ * + */ + MissingPercentage?: number; + + /** + * + *

The percentage of emails that arrived in recipients' spam or junk mail folders during + * the predictive inbox placement test.

+ * + */ + SpamPercentage?: number; + + /** + * + *

The percentage of emails that were authenticated by using Sender Policy Framework + * (SPF) during the predictive inbox placement test.

+ * + */ + SpfPercentage?: number; +} + +export namespace PlacementStatistics { + export function isa(o: any): o is PlacementStatistics { + return _smithy.isa(o, "PlacementStatistics"); + } +} + +/** + * + *

A request to enable or disable the automatic IP address warm-up feature.

+ * + */ +export interface PutAccountDedicatedIpWarmupAttributesRequest { + __type?: "PutAccountDedicatedIpWarmupAttributesRequest"; + /** + * + *

Enables or disables the automatic warm-up feature for dedicated IP addresses that are + * associated with your Amazon Pinpoint account in the current AWS Region. Set to true + * to enable the automatic warm-up feature, or set to false to disable + * it.

+ * + */ + AutoWarmupEnabled?: boolean; +} + +export namespace PutAccountDedicatedIpWarmupAttributesRequest { + export function isa( + o: any + ): o is PutAccountDedicatedIpWarmupAttributesRequest { + return _smithy.isa(o, "PutAccountDedicatedIpWarmupAttributesRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutAccountDedicatedIpWarmupAttributesResponse + extends $MetadataBearer { + __type?: "PutAccountDedicatedIpWarmupAttributesResponse"; +} + +export namespace PutAccountDedicatedIpWarmupAttributesResponse { + export function isa( + o: any + ): o is PutAccountDedicatedIpWarmupAttributesResponse { + return _smithy.isa(o, "PutAccountDedicatedIpWarmupAttributesResponse"); + } +} + +/** + * + *

A request to change the ability of your account to send email.

+ * + */ +export interface PutAccountSendingAttributesRequest { + __type?: "PutAccountSendingAttributesRequest"; + /** + * + *

Enables or disables your account's ability to send email. Set to true to + * enable email sending, or set to false to disable email sending.

+ * + *

If AWS paused your account's ability to send email, you can't use this operation + * to resume your account's ability to send email.

+ *
+ * + */ + SendingEnabled?: boolean; +} + +export namespace PutAccountSendingAttributesRequest { + export function isa(o: any): o is PutAccountSendingAttributesRequest { + return _smithy.isa(o, "PutAccountSendingAttributesRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutAccountSendingAttributesResponse extends $MetadataBearer { + __type?: "PutAccountSendingAttributesResponse"; +} + +export namespace PutAccountSendingAttributesResponse { + export function isa(o: any): o is PutAccountSendingAttributesResponse { + return _smithy.isa(o, "PutAccountSendingAttributesResponse"); + } +} + +/** + * + *

A request to associate a configuration set with a dedicated IP pool.

+ * + */ +export interface PutConfigurationSetDeliveryOptionsRequest { + __type?: "PutConfigurationSetDeliveryOptionsRequest"; + /** + * + *

The name of the configuration set that you want to associate with a dedicated IP + * pool.

+ * + */ + ConfigurationSetName: string | undefined; + + /** + * + *

The name of the dedicated IP pool that you want to associate with the configuration + * set.

+ * + */ + SendingPoolName?: string; + + /** + * + *

Specifies whether messages that use the configuration set are required to use + * Transport Layer Security (TLS). If the value is Require, messages are only + * delivered if a TLS connection can be established. If the value is Optional, + * messages can be delivered in plain text if a TLS connection can't be established.

+ * + */ + TlsPolicy?: TlsPolicy | string; +} + +export namespace PutConfigurationSetDeliveryOptionsRequest { + export function isa(o: any): o is PutConfigurationSetDeliveryOptionsRequest { + return _smithy.isa(o, "PutConfigurationSetDeliveryOptionsRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutConfigurationSetDeliveryOptionsResponse + extends $MetadataBearer { + __type?: "PutConfigurationSetDeliveryOptionsResponse"; +} + +export namespace PutConfigurationSetDeliveryOptionsResponse { + export function isa(o: any): o is PutConfigurationSetDeliveryOptionsResponse { + return _smithy.isa(o, "PutConfigurationSetDeliveryOptionsResponse"); + } +} + +/** + * + *

A request to enable or disable tracking of reputation metrics for a configuration + * set.

+ * + */ +export interface PutConfigurationSetReputationOptionsRequest { + __type?: "PutConfigurationSetReputationOptionsRequest"; + /** + * + *

The name of the configuration set that you want to enable or disable reputation metric + * tracking for.

+ * + */ + ConfigurationSetName: string | undefined; + + /** + * + *

If true, tracking of reputation metrics is enabled for the configuration + * set. If false, tracking of reputation metrics is disabled for the + * configuration set.

+ * + */ + ReputationMetricsEnabled?: boolean; +} + +export namespace PutConfigurationSetReputationOptionsRequest { + export function isa( + o: any + ): o is PutConfigurationSetReputationOptionsRequest { + return _smithy.isa(o, "PutConfigurationSetReputationOptionsRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutConfigurationSetReputationOptionsResponse + extends $MetadataBearer { + __type?: "PutConfigurationSetReputationOptionsResponse"; +} + +export namespace PutConfigurationSetReputationOptionsResponse { + export function isa( + o: any + ): o is PutConfigurationSetReputationOptionsResponse { + return _smithy.isa(o, "PutConfigurationSetReputationOptionsResponse"); + } +} + +/** + * + *

A request to enable or disable the ability of Amazon Pinpoint to send emails that use a specific + * configuration set.

+ * + */ +export interface PutConfigurationSetSendingOptionsRequest { + __type?: "PutConfigurationSetSendingOptionsRequest"; + /** + * + *

The name of the configuration set that you want to enable or disable email sending + * for.

+ * + */ + ConfigurationSetName: string | undefined; + + /** + * + *

If true, email sending is enabled for the configuration set. If + * false, email sending is disabled for the configuration set.

+ * + */ + SendingEnabled?: boolean; +} + +export namespace PutConfigurationSetSendingOptionsRequest { + export function isa(o: any): o is PutConfigurationSetSendingOptionsRequest { + return _smithy.isa(o, "PutConfigurationSetSendingOptionsRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutConfigurationSetSendingOptionsResponse + extends $MetadataBearer { + __type?: "PutConfigurationSetSendingOptionsResponse"; +} + +export namespace PutConfigurationSetSendingOptionsResponse { + export function isa(o: any): o is PutConfigurationSetSendingOptionsResponse { + return _smithy.isa(o, "PutConfigurationSetSendingOptionsResponse"); + } +} + +/** + * + *

A request to add a custom domain for tracking open and click events to a configuration + * set.

+ * + */ +export interface PutConfigurationSetTrackingOptionsRequest { + __type?: "PutConfigurationSetTrackingOptionsRequest"; + /** + * + *

The name of the configuration set that you want to add a custom tracking domain + * to.

+ * + */ + ConfigurationSetName: string | undefined; + + /** + * + *

The domain that you want to use to track open and click events.

+ * + */ + CustomRedirectDomain?: string; +} + +export namespace PutConfigurationSetTrackingOptionsRequest { + export function isa(o: any): o is PutConfigurationSetTrackingOptionsRequest { + return _smithy.isa(o, "PutConfigurationSetTrackingOptionsRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutConfigurationSetTrackingOptionsResponse + extends $MetadataBearer { + __type?: "PutConfigurationSetTrackingOptionsResponse"; +} + +export namespace PutConfigurationSetTrackingOptionsResponse { + export function isa(o: any): o is PutConfigurationSetTrackingOptionsResponse { + return _smithy.isa(o, "PutConfigurationSetTrackingOptionsResponse"); + } +} + +/** + * + *

A request to move a dedicated IP address to a dedicated IP pool.

+ * + */ +export interface PutDedicatedIpInPoolRequest { + __type?: "PutDedicatedIpInPoolRequest"; + /** + * + *

The name of the IP pool that you want to add the dedicated IP address to. You have to + * specify an IP pool that already exists.

+ * + */ + DestinationPoolName: string | undefined; + + /** + * + *

The IP address that you want to move to the dedicated IP pool. The value you specify + * has to be a dedicated IP address that's associated with your Amazon Pinpoint account.

+ * + */ + Ip: string | undefined; +} + +export namespace PutDedicatedIpInPoolRequest { + export function isa(o: any): o is PutDedicatedIpInPoolRequest { + return _smithy.isa(o, "PutDedicatedIpInPoolRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutDedicatedIpInPoolResponse extends $MetadataBearer { + __type?: "PutDedicatedIpInPoolResponse"; +} + +export namespace PutDedicatedIpInPoolResponse { + export function isa(o: any): o is PutDedicatedIpInPoolResponse { + return _smithy.isa(o, "PutDedicatedIpInPoolResponse"); + } +} + +/** + * + *

A request to change the warm-up attributes for a dedicated IP address. This operation + * is useful when you want to resume the warm-up process for an existing IP address.

+ * + */ +export interface PutDedicatedIpWarmupAttributesRequest { + __type?: "PutDedicatedIpWarmupAttributesRequest"; + /** + * + *

The dedicated IP address that you want to update the warm-up attributes for.

+ * + */ + Ip: string | undefined; + + /** + * + *

The warm-up percentage that you want to associate with the dedicated IP + * address.

+ * + */ + WarmupPercentage: number | undefined; +} + +export namespace PutDedicatedIpWarmupAttributesRequest { + export function isa(o: any): o is PutDedicatedIpWarmupAttributesRequest { + return _smithy.isa(o, "PutDedicatedIpWarmupAttributesRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutDedicatedIpWarmupAttributesResponse + extends $MetadataBearer { + __type?: "PutDedicatedIpWarmupAttributesResponse"; +} + +export namespace PutDedicatedIpWarmupAttributesResponse { + export function isa(o: any): o is PutDedicatedIpWarmupAttributesResponse { + return _smithy.isa(o, "PutDedicatedIpWarmupAttributesResponse"); + } +} + +/** + * + *

Enable or disable the Deliverability dashboard for your Amazon Pinpoint account. When you enable the + * Deliverability dashboard, you gain access to reputation, deliverability, and other metrics for + * the domains that you use to send email using Amazon Pinpoint. You also gain the ability to perform + * predictive inbox placement tests.

+ *

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition + * to any other fees that you accrue by using Amazon Pinpoint. For more information about the + * features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

+ * + */ +export interface PutDeliverabilityDashboardOptionRequest { + __type?: "PutDeliverabilityDashboardOptionRequest"; + /** + * + *

Specifies whether to enable the Deliverability dashboard for your Amazon Pinpoint account. To enable the + * dashboard, set this value to true.

+ * + */ + DashboardEnabled: boolean | undefined; + + /** + * + *

An array of objects, one for each verified domain that you use to send email and + * enabled the Deliverability dashboard for.

+ * + */ + SubscribedDomains?: Array; +} + +export namespace PutDeliverabilityDashboardOptionRequest { + export function isa(o: any): o is PutDeliverabilityDashboardOptionRequest { + return _smithy.isa(o, "PutDeliverabilityDashboardOptionRequest"); + } +} + +/** + * + *

A response that indicates whether the Deliverability dashboard is enabled for your Amazon Pinpoint + * account.

+ * + */ +export interface PutDeliverabilityDashboardOptionResponse + extends $MetadataBearer { + __type?: "PutDeliverabilityDashboardOptionResponse"; +} + +export namespace PutDeliverabilityDashboardOptionResponse { + export function isa(o: any): o is PutDeliverabilityDashboardOptionResponse { + return _smithy.isa(o, "PutDeliverabilityDashboardOptionResponse"); + } +} + +/** + * + *

A request to enable or disable DKIM signing of email that you send from an email + * identity.

+ * + */ +export interface PutEmailIdentityDkimAttributesRequest { + __type?: "PutEmailIdentityDkimAttributesRequest"; + /** + * + *

The email identity that you want to change the DKIM settings for.

+ * + */ + EmailIdentity: string | undefined; + + /** + * + *

Sets the DKIM signing configuration for the identity.

+ *

When you set this value true, then the messages that Amazon Pinpoint sends from the + * identity are DKIM-signed. When you set this value to false, then the + * messages that Amazon Pinpoint sends from the identity aren't DKIM-signed.

+ * + */ + SigningEnabled?: boolean; +} + +export namespace PutEmailIdentityDkimAttributesRequest { + export function isa(o: any): o is PutEmailIdentityDkimAttributesRequest { + return _smithy.isa(o, "PutEmailIdentityDkimAttributesRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutEmailIdentityDkimAttributesResponse + extends $MetadataBearer { + __type?: "PutEmailIdentityDkimAttributesResponse"; +} + +export namespace PutEmailIdentityDkimAttributesResponse { + export function isa(o: any): o is PutEmailIdentityDkimAttributesResponse { + return _smithy.isa(o, "PutEmailIdentityDkimAttributesResponse"); + } +} + +/** + * + *

A request to set the attributes that control how bounce and complaint events are + * processed.

+ * + */ +export interface PutEmailIdentityFeedbackAttributesRequest { + __type?: "PutEmailIdentityFeedbackAttributesRequest"; + /** + * + *

Sets the feedback forwarding configuration for the identity.

+ *

If the value is true, Amazon Pinpoint sends you email notifications when bounce or + * complaint events occur. Amazon Pinpoint sends this notification to the address that you specified + * in the Return-Path header of the original email.

+ *

When you set this value to false, Amazon Pinpoint sends notifications through other + * mechanisms, such as by notifying an Amazon SNS topic or another event destination. You're + * required to have a method of tracking bounces and complaints. If you haven't set up + * another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email + * notification when these events occur (even if this setting is disabled).

+ * + */ + EmailForwardingEnabled?: boolean; + + /** + * + *

The email identity that you want to configure bounce and complaint feedback forwarding + * for.

+ * + */ + EmailIdentity: string | undefined; +} + +export namespace PutEmailIdentityFeedbackAttributesRequest { + export function isa(o: any): o is PutEmailIdentityFeedbackAttributesRequest { + return _smithy.isa(o, "PutEmailIdentityFeedbackAttributesRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutEmailIdentityFeedbackAttributesResponse + extends $MetadataBearer { + __type?: "PutEmailIdentityFeedbackAttributesResponse"; +} + +export namespace PutEmailIdentityFeedbackAttributesResponse { + export function isa(o: any): o is PutEmailIdentityFeedbackAttributesResponse { + return _smithy.isa(o, "PutEmailIdentityFeedbackAttributesResponse"); + } +} + +/** + * + *

A request to configure the custom MAIL FROM domain for a verified identity.

+ * + */ +export interface PutEmailIdentityMailFromAttributesRequest { + __type?: "PutEmailIdentityMailFromAttributesRequest"; + /** + * + *

The action that you want Amazon Pinpoint to take if it can't read the required MX record when + * you send an email. When you set this value to UseDefaultValue, Amazon Pinpoint uses + * amazonses.com as the MAIL FROM domain. When you set this value + * to RejectMessage, Amazon Pinpoint returns a MailFromDomainNotVerified + * error, and doesn't attempt to deliver the email.

+ *

These behaviors are taken when the custom MAIL FROM domain configuration is in the + * Pending, Failed, and TemporaryFailure + * states.

+ * + */ + BehaviorOnMxFailure?: BehaviorOnMxFailure | string; + + /** + * + *

The verified email identity that you want to set up the custom MAIL FROM domain + * for.

+ * + */ + EmailIdentity: string | undefined; + + /** + * + *

The custom MAIL FROM domain that you want the verified identity to use. The MAIL FROM + * domain must meet the following criteria:

+ *
    + *
  • + *

    It has to be a subdomain of the verified identity.

    + *
  • + *
  • + *

    It can't be used to receive email.

    + *
  • + *
  • + *

    It can't be used in a "From" address if the MAIL FROM domain is a destination + * for feedback forwarding emails.

    + *
  • + *
+ * + */ + MailFromDomain?: string; +} + +export namespace PutEmailIdentityMailFromAttributesRequest { + export function isa(o: any): o is PutEmailIdentityMailFromAttributesRequest { + return _smithy.isa(o, "PutEmailIdentityMailFromAttributesRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface PutEmailIdentityMailFromAttributesResponse + extends $MetadataBearer { + __type?: "PutEmailIdentityMailFromAttributesResponse"; +} + +export namespace PutEmailIdentityMailFromAttributesResponse { + export function isa(o: any): o is PutEmailIdentityMailFromAttributesResponse { + return _smithy.isa(o, "PutEmailIdentityMailFromAttributesResponse"); + } +} + +/** + * + *

The raw email message.

+ * + */ +export interface RawMessage { + __type?: "RawMessage"; + /** + * + *

The raw email message. The message has to meet the following criteria:

+ *
    + *
  • + *

    The message has to contain a header and a body, separated by one blank + * line.

    + *
  • + *
  • + *

    All of the required header fields must be present in the message.

    + *
  • + *
  • + *

    Each part of a multipart MIME message must be formatted properly.

    + *
  • + *
  • + *

    Attachments must be in a file format that Amazon Pinpoint supports. + *

    + *
  • + *
  • + *

    The entire message must be Base64 encoded.

    + *
  • + *
  • + *

    If any of the MIME parts in your message contain content that is outside of + * the 7-bit ASCII character range, you should encode that content to ensure that + * recipients' email clients render the message properly.

    + *
  • + *
  • + *

    The length of any single line of text in the message can't exceed 1,000 + * characters. This restriction is defined in RFC 5321.

    + *
  • + *
+ * + */ + Data: Uint8Array | undefined; +} + +export namespace RawMessage { + export function isa(o: any): o is RawMessage { + return _smithy.isa(o, "RawMessage"); + } +} + +/** + * + *

Enable or disable collection of reputation metrics for emails that you send using this + * configuration set in the current AWS Region.

+ * + */ +export interface ReputationOptions { + __type?: "ReputationOptions"; + /** + * + *

The date and time (in Unix time) when the reputation metrics were last given a fresh + * start. When your account is given a fresh start, your reputation metrics are calculated + * starting from the date of the fresh start.

+ * + */ + LastFreshStart?: Date; + + /** + * + *

If true, tracking of reputation metrics is enabled for the configuration + * set. If false, tracking of reputation metrics is disabled for the + * configuration set.

+ * + */ + ReputationMetricsEnabled?: boolean; +} + +export namespace ReputationOptions { + export function isa(o: any): o is ReputationOptions { + return _smithy.isa(o, "ReputationOptions"); + } +} + +/** + * + *

A request to send an email message.

+ * + */ +export interface SendEmailRequest { + __type?: "SendEmailRequest"; + /** + * + *

The name of the configuration set that you want to use when sending the email.

+ * + * + */ + ConfigurationSetName?: string; + + /** + * + *

An object that contains the body of the message. You can send either a Simple message + * or a Raw message.

+ * + */ + Content: EmailContent | undefined; + + /** + * + *

An object that contains the recipients of the email message.

+ * + */ + Destination: Destination | undefined; + + /** + * + *

A list of tags, in the form of name/value pairs, to apply to an email that you send + * using the SendEmail operation. Tags correspond to characteristics of the + * email that you define, so that you can publish email sending events.

+ * + */ + EmailTags?: Array; + + /** + * + *

The address that Amazon Pinpoint should send bounce and complaint notifications to.

+ * + */ + FeedbackForwardingEmailAddress?: string; + + /** + * + *

The email address that you want to use as the "From" address for the email. The + * address that you specify has to be verified. + *

+ * + */ + FromEmailAddress?: string; + + /** + * + *

The "Reply-to" email addresses for the message. When the recipient replies to the + * message, each Reply-to address receives the reply.

+ * + */ + ReplyToAddresses?: Array; +} + +export namespace SendEmailRequest { + export function isa(o: any): o is SendEmailRequest { + return _smithy.isa(o, "SendEmailRequest"); + } +} + +/** + * + *

A unique message ID that you receive when Amazon Pinpoint accepts an email for sending.

+ * + */ +export interface SendEmailResponse extends $MetadataBearer { + __type?: "SendEmailResponse"; + /** + * + *

A unique identifier for the message that is generated when Amazon Pinpoint accepts the + * message.

+ * + *

It is possible for Amazon Pinpoint to accept a message without sending it. This can happen + * when the message you're trying to send has an attachment doesn't pass a virus check, + * or when you send a templated email that contains invalid personalization content, + * for example.

+ *
+ * + */ + MessageId?: string; +} + +export namespace SendEmailResponse { + export function isa(o: any): o is SendEmailResponse { + return _smithy.isa(o, "SendEmailResponse"); + } +} + +/** + * + *

An object that contains information about the per-day and per-second sending limits + * for your Amazon Pinpoint account in the current AWS Region.

+ * + */ +export interface SendQuota { + __type?: "SendQuota"; + /** + * + *

The maximum number of emails that you can send in the current AWS Region over a + * 24-hour period. This value is also called your sending + * quota.

+ * + */ + Max24HourSend?: number; + + /** + * + *

The maximum number of emails that you can send per second in the current AWS Region. + * This value is also called your maximum sending rate or your + * maximum TPS (transactions per second) rate.

+ * + */ + MaxSendRate?: number; + + /** + * + *

The number of emails sent from your Amazon Pinpoint account in the current AWS Region over the + * past 24 hours.

+ * + */ + SentLast24Hours?: number; +} + +export namespace SendQuota { + export function isa(o: any): o is SendQuota { + return _smithy.isa(o, "SendQuota"); + } +} + +/** + * + *

Used to enable or disable email sending for messages that use this configuration set + * in the current AWS Region.

+ * + */ +export interface SendingOptions { + __type?: "SendingOptions"; + /** + * + *

If true, email sending is enabled for the configuration set. If + * false, email sending is disabled for the configuration set.

+ * + */ + SendingEnabled?: boolean; +} + +export namespace SendingOptions { + export function isa(o: any): o is SendingOptions { + return _smithy.isa(o, "SendingOptions"); + } +} + +/** + * + *

The message can't be sent because the account's ability to send email is currently + * paused.

+ * + */ +export interface SendingPausedException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "SendingPausedException"; + $fault: "client"; + message?: string; +} + +export namespace SendingPausedException { + export function isa(o: any): o is SendingPausedException { + return _smithy.isa(o, "SendingPausedException"); + } +} + +/** + * + *

An object that defines an Amazon SNS destination for email events. You can use Amazon SNS to + * send notification when certain email events occur.

+ * + */ +export interface SnsDestination { + __type?: "SnsDestination"; + /** + * + *

The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish email + * events to. For more information about Amazon SNS topics, see the Amazon SNS Developer + * Guide.

+ * + */ + TopicArn: string | undefined; +} + +export namespace SnsDestination { + export function isa(o: any): o is SnsDestination { + return _smithy.isa(o, "SnsDestination"); + } +} + +export interface TagResourceRequest { + __type?: "TagResourceRequest"; + /** + * + *

The Amazon Resource Name (ARN) of the resource that you want to add one or more tags + * to.

+ * + */ + ResourceArn: string | undefined; + + /** + * + *

A list of the tags that you want to add to the resource. A tag consists of a required + * tag key (Key) and an associated tag value (Value). The maximum + * length of a tag key is 128 characters. The maximum length of a tag value is 256 + * characters.

+ * + */ + Tags: Array | undefined; +} + +export namespace TagResourceRequest { + export function isa(o: any): o is TagResourceRequest { + return _smithy.isa(o, "TagResourceRequest"); + } +} + +export interface TagResourceResponse extends $MetadataBearer { + __type?: "TagResourceResponse"; +} + +export namespace TagResourceResponse { + export function isa(o: any): o is TagResourceResponse { + return _smithy.isa(o, "TagResourceResponse"); + } +} + +export interface Template { + __type?: "Template"; + /** + * + *

The Amazon Resource Name (ARN) of the template.

+ * + */ + TemplateArn?: string; + + /** + * + *

An object that defines the values to use for message variables in the template. This object is a set of key-value pairs. Each key defines a message variable in the template. The corresponding value defines the value to use for that variable.

+ * + */ + TemplateData?: string; +} + +export namespace Template { + export function isa(o: any): o is Template { + return _smithy.isa(o, "Template"); + } +} + +export enum TlsPolicy { + OPTIONAL = "OPTIONAL", + REQUIRE = "REQUIRE" +} + +/** + * + *

Too many requests have been made to the operation.

+ * + */ +export interface TooManyRequestsException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "TooManyRequestsException"; + $fault: "client"; + message?: string; +} + +export namespace TooManyRequestsException { + export function isa(o: any): o is TooManyRequestsException { + return _smithy.isa(o, "TooManyRequestsException"); + } +} + +/** + * + *

An object that defines the tracking options for a configuration set. When you use + * Amazon Pinpoint to send an email, it contains an invisible image that's used to track when + * recipients open your email. If your email contains links, those links are changed + * slightly in order to track when recipients click them.

+ *

These images and links include references to a domain operated by AWS. You can + * optionally configure Amazon Pinpoint to use a domain that you operate for these images and + * links.

+ * + */ +export interface TrackingOptions { + __type?: "TrackingOptions"; + /** + * + *

The domain that you want to use for tracking open and click events.

+ * + */ + CustomRedirectDomain: string | undefined; +} + +export namespace TrackingOptions { + export function isa(o: any): o is TrackingOptions { + return _smithy.isa(o, "TrackingOptions"); + } +} + +export interface UntagResourceRequest { + __type?: "UntagResourceRequest"; + /** + * + *

The Amazon Resource Name (ARN) of the resource that you want to remove one or more + * tags from.

+ * + */ + ResourceArn: string | undefined; + + /** + * + *

The tags (tag keys) that you want to remove from the resource. When you specify a tag + * key, the action removes both that key and its associated tag value.

+ *

To remove more than one tag from the resource, append the TagKeys + * parameter and argument for each additional tag to remove, separated by an ampersand. For + * example: + * /v1/email/tags?ResourceArn=ResourceArn&TagKeys=Key1&TagKeys=Key2 + *

+ * + */ + TagKeys: Array | undefined; +} + +export namespace UntagResourceRequest { + export function isa(o: any): o is UntagResourceRequest { + return _smithy.isa(o, "UntagResourceRequest"); + } +} + +export interface UntagResourceResponse extends $MetadataBearer { + __type?: "UntagResourceResponse"; +} + +export namespace UntagResourceResponse { + export function isa(o: any): o is UntagResourceResponse { + return _smithy.isa(o, "UntagResourceResponse"); + } +} + +/** + * + *

A request to change the settings for an event destination for a configuration + * set.

+ * + */ +export interface UpdateConfigurationSetEventDestinationRequest { + __type?: "UpdateConfigurationSetEventDestinationRequest"; + /** + * + *

The name of the configuration set that contains the event destination that you want to + * modify.

+ * + */ + ConfigurationSetName: string | undefined; + + /** + * + *

An object that defines the event destination.

+ * + */ + EventDestination: EventDestinationDefinition | undefined; + + /** + * + *

The name of the event destination that you want to modify.

+ * + */ + EventDestinationName: string | undefined; +} + +export namespace UpdateConfigurationSetEventDestinationRequest { + export function isa( + o: any + ): o is UpdateConfigurationSetEventDestinationRequest { + return _smithy.isa(o, "UpdateConfigurationSetEventDestinationRequest"); + } +} + +/** + * + *

An HTTP 200 response if the request succeeds, or an error message if the request + * fails.

+ * + */ +export interface UpdateConfigurationSetEventDestinationResponse + extends $MetadataBearer { + __type?: "UpdateConfigurationSetEventDestinationResponse"; +} + +export namespace UpdateConfigurationSetEventDestinationResponse { + export function isa( + o: any + ): o is UpdateConfigurationSetEventDestinationResponse { + return _smithy.isa(o, "UpdateConfigurationSetEventDestinationResponse"); + } +} + +/** + * + *

An object that contains information about the amount of email that was delivered to + * recipients.

+ * + */ +export interface VolumeStatistics { + __type?: "VolumeStatistics"; + /** + * + *

The total number of emails that arrived in recipients' inboxes.

+ * + */ + InboxRawCount?: number; + + /** + * + *

An estimate of the percentage of emails sent from the current domain that will arrive + * in recipients' inboxes.

+ * + */ + ProjectedInbox?: number; + + /** + * + *

An estimate of the percentage of emails sent from the current domain that will arrive + * in recipients' spam or junk mail folders.

+ * + */ + ProjectedSpam?: number; + + /** + * + *

The total number of emails that arrived in recipients' spam or junk mail + * folders.

+ * + */ + SpamRawCount?: number; +} + +export namespace VolumeStatistics { + export function isa(o: any): o is VolumeStatistics { + return _smithy.isa(o, "VolumeStatistics"); + } +} + +export enum WarmupStatus { + DONE = "DONE", + IN_PROGRESS = "IN_PROGRESS" +} diff --git a/clients/client-pinpoint-email/package.json b/clients/client-pinpoint-email/package.json new file mode 100644 index 000000000000..6c06d9e636a2 --- /dev/null +++ b/clients/client-pinpoint-email/package.json @@ -0,0 +1,75 @@ +{ + "name": "@aws-sdk/client-pinpoint-email", + "description": "@aws-sdk/client-pinpoint-email client", + "version": "0.1.0-preview.1", + "scripts": { + "clean": "npm run remove-definitions && npm run remove-dist && npm run remove-js && npm run remove-maps", + "build-documentation": "npm run clean && typedoc ./", + "prepublishOnly": "yarn build", + "pretest": "tsc", + "remove-definitions": "rimraf ./types", + "remove-dist": "rimraf ./dist", + "remove-documentation": "rimraf ./docs", + "remove-js": "rimraf *.js && rimraf ./commands/*.js && rimraf ./models/*.js && rimraf ./protocols/*.js", + "remove-maps": "rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./models/*.js.map && rimraf ./protocols/*.js.map", + "test": "exit 0", + "smoke-test": "npm run pretest && node ./test/smoke/index.spec.js", + "build:es": "tsc -p tsconfig.es.json", + "build": "yarn pretest && yarn build:es" + }, + "main": "./dist/cjs/index.js", + "types": "./types/index.d.ts", + "module": "./dist/es/index.js", + "browser": { + "./runtimeConfig": "./runtimeConfig.browser" + }, + "sideEffects": false, + "dependencies": { + "tslib": "^1.8.0", + "@aws-crypto/sha256-browser": "^0.1.0-preview.1", + "@aws-sdk/config-resolver": "^0.1.0-preview.5", + "@aws-sdk/credential-provider-node": "^0.1.0-preview.7", + "@aws-sdk/fetch-http-handler": "^0.1.0-preview.5", + "@aws-sdk/hash-node": "^0.1.0-preview.5", + "@aws-sdk/invalid-dependency": "^0.1.0-preview.1", + "@aws-sdk/middleware-content-length": "^0.1.0-preview.5", + "@aws-sdk/middleware-host-header": "^0.1.0-preview.1", + "@aws-sdk/middleware-retry": "^0.1.0-preview.5", + "@aws-sdk/middleware-serde": "^0.1.0-preview.1", + "@aws-sdk/middleware-signing": "^0.1.0-preview.7", + "@aws-sdk/middleware-stack": "^0.1.0-preview.6", + "@aws-sdk/middleware-user-agent": "^0.1.0-preview.1", + "@aws-sdk/node-http-handler": "^0.1.0-preview.6", + "@aws-sdk/protocol-http": "^0.1.0-preview.1", + "@aws-sdk/region-provider": "^0.1.0-preview.5", + "@aws-sdk/smithy-client": "^0.1.0-preview.1", + "@aws-sdk/stream-collector-browser": "^0.1.0-preview.5", + "@aws-sdk/stream-collector-node": "^0.1.0-preview.6", + "@aws-sdk/types": "^0.1.0-preview.5", + "@aws-sdk/url-parser-browser": "^0.1.0-preview.5", + "@aws-sdk/url-parser-node": "^0.1.0-preview.5", + "@aws-sdk/util-base64-browser": "^0.1.0-preview.3", + "@aws-sdk/util-base64-node": "^0.1.0-preview.3", + "@aws-sdk/util-body-length-browser": "^0.1.0-preview.3", + "@aws-sdk/util-body-length-node": "^0.1.0-preview.4", + "@aws-sdk/util-user-agent-browser": "^0.1.0-preview.6", + "@aws-sdk/util-user-agent-node": "^0.1.0-preview.6", + "@aws-sdk/util-utf8-browser": "^0.1.0-preview.3", + "@aws-sdk/util-utf8-node": "^0.1.0-preview.3" + }, + "devDependencies": { + "rimraf": "^3.0.0", + "typedoc": "^0.15.0", + "typescript": "^3.6.3", + "@types/node": "^12.7.5", + "tslib": "^1.8.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0" +} diff --git a/clients/client-pinpoint-email/protocols/Aws_restJson1_1.ts b/clients/client-pinpoint-email/protocols/Aws_restJson1_1.ts new file mode 100644 index 000000000000..25686dedfe1f --- /dev/null +++ b/clients/client-pinpoint-email/protocols/Aws_restJson1_1.ts @@ -0,0 +1,6036 @@ +import { + CreateConfigurationSetCommandInput, + CreateConfigurationSetCommandOutput +} from "../commands/CreateConfigurationSetCommand"; +import { + CreateConfigurationSetEventDestinationCommandInput, + CreateConfigurationSetEventDestinationCommandOutput +} from "../commands/CreateConfigurationSetEventDestinationCommand"; +import { + CreateDedicatedIpPoolCommandInput, + CreateDedicatedIpPoolCommandOutput +} from "../commands/CreateDedicatedIpPoolCommand"; +import { + CreateDeliverabilityTestReportCommandInput, + CreateDeliverabilityTestReportCommandOutput +} from "../commands/CreateDeliverabilityTestReportCommand"; +import { + CreateEmailIdentityCommandInput, + CreateEmailIdentityCommandOutput +} from "../commands/CreateEmailIdentityCommand"; +import { + DeleteConfigurationSetCommandInput, + DeleteConfigurationSetCommandOutput +} from "../commands/DeleteConfigurationSetCommand"; +import { + DeleteConfigurationSetEventDestinationCommandInput, + DeleteConfigurationSetEventDestinationCommandOutput +} from "../commands/DeleteConfigurationSetEventDestinationCommand"; +import { + DeleteDedicatedIpPoolCommandInput, + DeleteDedicatedIpPoolCommandOutput +} from "../commands/DeleteDedicatedIpPoolCommand"; +import { + DeleteEmailIdentityCommandInput, + DeleteEmailIdentityCommandOutput +} from "../commands/DeleteEmailIdentityCommand"; +import { + GetAccountCommandInput, + GetAccountCommandOutput +} from "../commands/GetAccountCommand"; +import { + GetBlacklistReportsCommandInput, + GetBlacklistReportsCommandOutput +} from "../commands/GetBlacklistReportsCommand"; +import { + GetConfigurationSetCommandInput, + GetConfigurationSetCommandOutput +} from "../commands/GetConfigurationSetCommand"; +import { + GetConfigurationSetEventDestinationsCommandInput, + GetConfigurationSetEventDestinationsCommandOutput +} from "../commands/GetConfigurationSetEventDestinationsCommand"; +import { + GetDedicatedIpCommandInput, + GetDedicatedIpCommandOutput +} from "../commands/GetDedicatedIpCommand"; +import { + GetDedicatedIpsCommandInput, + GetDedicatedIpsCommandOutput +} from "../commands/GetDedicatedIpsCommand"; +import { + GetDeliverabilityDashboardOptionsCommandInput, + GetDeliverabilityDashboardOptionsCommandOutput +} from "../commands/GetDeliverabilityDashboardOptionsCommand"; +import { + GetDeliverabilityTestReportCommandInput, + GetDeliverabilityTestReportCommandOutput +} from "../commands/GetDeliverabilityTestReportCommand"; +import { + GetDomainDeliverabilityCampaignCommandInput, + GetDomainDeliverabilityCampaignCommandOutput +} from "../commands/GetDomainDeliverabilityCampaignCommand"; +import { + GetDomainStatisticsReportCommandInput, + GetDomainStatisticsReportCommandOutput +} from "../commands/GetDomainStatisticsReportCommand"; +import { + GetEmailIdentityCommandInput, + GetEmailIdentityCommandOutput +} from "../commands/GetEmailIdentityCommand"; +import { + ListConfigurationSetsCommandInput, + ListConfigurationSetsCommandOutput +} from "../commands/ListConfigurationSetsCommand"; +import { + ListDedicatedIpPoolsCommandInput, + ListDedicatedIpPoolsCommandOutput +} from "../commands/ListDedicatedIpPoolsCommand"; +import { + ListDeliverabilityTestReportsCommandInput, + ListDeliverabilityTestReportsCommandOutput +} from "../commands/ListDeliverabilityTestReportsCommand"; +import { + ListDomainDeliverabilityCampaignsCommandInput, + ListDomainDeliverabilityCampaignsCommandOutput +} from "../commands/ListDomainDeliverabilityCampaignsCommand"; +import { + ListEmailIdentitiesCommandInput, + ListEmailIdentitiesCommandOutput +} from "../commands/ListEmailIdentitiesCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput +} from "../commands/ListTagsForResourceCommand"; +import { + PutAccountDedicatedIpWarmupAttributesCommandInput, + PutAccountDedicatedIpWarmupAttributesCommandOutput +} from "../commands/PutAccountDedicatedIpWarmupAttributesCommand"; +import { + PutAccountSendingAttributesCommandInput, + PutAccountSendingAttributesCommandOutput +} from "../commands/PutAccountSendingAttributesCommand"; +import { + PutConfigurationSetDeliveryOptionsCommandInput, + PutConfigurationSetDeliveryOptionsCommandOutput +} from "../commands/PutConfigurationSetDeliveryOptionsCommand"; +import { + PutConfigurationSetReputationOptionsCommandInput, + PutConfigurationSetReputationOptionsCommandOutput +} from "../commands/PutConfigurationSetReputationOptionsCommand"; +import { + PutConfigurationSetSendingOptionsCommandInput, + PutConfigurationSetSendingOptionsCommandOutput +} from "../commands/PutConfigurationSetSendingOptionsCommand"; +import { + PutConfigurationSetTrackingOptionsCommandInput, + PutConfigurationSetTrackingOptionsCommandOutput +} from "../commands/PutConfigurationSetTrackingOptionsCommand"; +import { + PutDedicatedIpInPoolCommandInput, + PutDedicatedIpInPoolCommandOutput +} from "../commands/PutDedicatedIpInPoolCommand"; +import { + PutDedicatedIpWarmupAttributesCommandInput, + PutDedicatedIpWarmupAttributesCommandOutput +} from "../commands/PutDedicatedIpWarmupAttributesCommand"; +import { + PutDeliverabilityDashboardOptionCommandInput, + PutDeliverabilityDashboardOptionCommandOutput +} from "../commands/PutDeliverabilityDashboardOptionCommand"; +import { + PutEmailIdentityDkimAttributesCommandInput, + PutEmailIdentityDkimAttributesCommandOutput +} from "../commands/PutEmailIdentityDkimAttributesCommand"; +import { + PutEmailIdentityFeedbackAttributesCommandInput, + PutEmailIdentityFeedbackAttributesCommandOutput +} from "../commands/PutEmailIdentityFeedbackAttributesCommand"; +import { + PutEmailIdentityMailFromAttributesCommandInput, + PutEmailIdentityMailFromAttributesCommandOutput +} from "../commands/PutEmailIdentityMailFromAttributesCommand"; +import { + SendEmailCommandInput, + SendEmailCommandOutput +} from "../commands/SendEmailCommand"; +import { + TagResourceCommandInput, + TagResourceCommandOutput +} from "../commands/TagResourceCommand"; +import { + UntagResourceCommandInput, + UntagResourceCommandOutput +} from "../commands/UntagResourceCommand"; +import { + UpdateConfigurationSetEventDestinationCommandInput, + UpdateConfigurationSetEventDestinationCommandOutput +} from "../commands/UpdateConfigurationSetEventDestinationCommand"; +import { + AccountSuspendedException, + AlreadyExistsException, + BadRequestException, + BlacklistEntry, + Body, + CloudWatchDestination, + CloudWatchDimensionConfiguration, + ConcurrentModificationException, + Content, + DailyVolume, + DedicatedIp, + DeliverabilityTestReport, + DeliveryOptions, + Destination, + DkimAttributes, + DomainDeliverabilityCampaign, + DomainDeliverabilityTrackingOption, + DomainIspPlacement, + EmailContent, + EventDestination, + EventDestinationDefinition, + EventType, + IdentityInfo, + InboxPlacementTrackingOption, + IspPlacement, + KinesisFirehoseDestination, + LimitExceededException, + MailFromAttributes, + MailFromDomainNotVerifiedException, + Message, + MessageRejected, + MessageTag, + NotFoundException, + OverallVolume, + PinpointDestination, + PlacementStatistics, + RawMessage, + ReputationOptions, + SendQuota, + SendingOptions, + SendingPausedException, + SnsDestination, + Tag, + Template, + TooManyRequestsException, + TrackingOptions, + VolumeStatistics +} from "../models/index"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { SmithyException as __SmithyException } from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext +} from "@aws-sdk/types"; + +export async function serializeAws_restJson1_1CreateConfigurationSetCommand( + input: CreateConfigurationSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/configuration-sets"; + let body: any = {}; + const bodyParams: any = {}; + if (input.ConfigurationSetName !== undefined) { + bodyParams["ConfigurationSetName"] = input.ConfigurationSetName; + } + if (input.DeliveryOptions !== undefined) { + bodyParams["DeliveryOptions"] = serializeAws_restJson1_1DeliveryOptions( + input.DeliveryOptions, + context + ); + } + if (input.ReputationOptions !== undefined) { + bodyParams["ReputationOptions"] = serializeAws_restJson1_1ReputationOptions( + input.ReputationOptions, + context + ); + } + if (input.SendingOptions !== undefined) { + bodyParams["SendingOptions"] = serializeAws_restJson1_1SendingOptions( + input.SendingOptions, + context + ); + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context); + } + if (input.TrackingOptions !== undefined) { + bodyParams["TrackingOptions"] = serializeAws_restJson1_1TrackingOptions( + input.TrackingOptions, + context + ); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1CreateConfigurationSetEventDestinationCommand( + input: CreateConfigurationSetEventDestinationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = + "/v1/email/configuration-sets/{ConfigurationSetName}/event-destinations"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.EventDestination !== undefined) { + bodyParams[ + "EventDestination" + ] = serializeAws_restJson1_1EventDestinationDefinition( + input.EventDestination, + context + ); + } + if (input.EventDestinationName !== undefined) { + bodyParams["EventDestinationName"] = input.EventDestinationName; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1CreateDedicatedIpPoolCommand( + input: CreateDedicatedIpPoolCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/dedicated-ip-pools"; + let body: any = {}; + const bodyParams: any = {}; + if (input.PoolName !== undefined) { + bodyParams["PoolName"] = input.PoolName; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1CreateDeliverabilityTestReportCommand( + input: CreateDeliverabilityTestReportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/deliverability-dashboard/test"; + let body: any = {}; + const bodyParams: any = {}; + if (input.Content !== undefined) { + bodyParams["Content"] = serializeAws_restJson1_1EmailContent( + input.Content, + context + ); + } + if (input.FromEmailAddress !== undefined) { + bodyParams["FromEmailAddress"] = input.FromEmailAddress; + } + if (input.ReportName !== undefined) { + bodyParams["ReportName"] = input.ReportName; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1CreateEmailIdentityCommand( + input: CreateEmailIdentityCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/identities"; + let body: any = {}; + const bodyParams: any = {}; + if (input.EmailIdentity !== undefined) { + bodyParams["EmailIdentity"] = input.EmailIdentity; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1DeleteConfigurationSetCommand( + input: DeleteConfigurationSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/configuration-sets/{ConfigurationSetName}"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1DeleteConfigurationSetEventDestinationCommand( + input: DeleteConfigurationSetEventDestinationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = + "/v1/email/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + if (input.EventDestinationName !== undefined) { + const labelValue: any = input.EventDestinationName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: EventDestinationName." + ); + } + resolvedPath = resolvedPath.replace("{EventDestinationName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: EventDestinationName." + ); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1DeleteDedicatedIpPoolCommand( + input: DeleteDedicatedIpPoolCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/dedicated-ip-pools/{PoolName}"; + if (input.PoolName !== undefined) { + const labelValue: any = input.PoolName.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: PoolName."); + } + resolvedPath = resolvedPath.replace("{PoolName}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: PoolName."); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1DeleteEmailIdentityCommand( + input: DeleteEmailIdentityCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/identities/{EmailIdentity}"; + if (input.EmailIdentity !== undefined) { + const labelValue: any = input.EmailIdentity.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: EmailIdentity." + ); + } + resolvedPath = resolvedPath.replace("{EmailIdentity}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: EmailIdentity."); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1GetAccountCommand( + input: GetAccountCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/account"; + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1GetBlacklistReportsCommand( + input: GetBlacklistReportsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/deliverability-dashboard/blacklist-report"; + const query: any = {}; + if (input.BlacklistItemNames !== undefined) { + query["BlacklistItemNames"] = input.BlacklistItemNames; + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1GetConfigurationSetCommand( + input: GetConfigurationSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/configuration-sets/{ConfigurationSetName}"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1GetConfigurationSetEventDestinationsCommand( + input: GetConfigurationSetEventDestinationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = + "/v1/email/configuration-sets/{ConfigurationSetName}/event-destinations"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1GetDedicatedIpCommand( + input: GetDedicatedIpCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/dedicated-ips/{Ip}"; + if (input.Ip !== undefined) { + const labelValue: any = input.Ip.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Ip."); + } + resolvedPath = resolvedPath.replace("{Ip}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: Ip."); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1GetDedicatedIpsCommand( + input: GetDedicatedIpsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/dedicated-ips"; + const query: any = {}; + if (input.NextToken !== undefined) { + query["NextToken"] = input.NextToken.toString(); + } + if (input.PageSize !== undefined) { + query["PageSize"] = input.PageSize.toString(); + } + if (input.PoolName !== undefined) { + query["PoolName"] = input.PoolName.toString(); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1GetDeliverabilityDashboardOptionsCommand( + input: GetDeliverabilityDashboardOptionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/deliverability-dashboard"; + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1GetDeliverabilityTestReportCommand( + input: GetDeliverabilityTestReportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = + "/v1/email/deliverability-dashboard/test-reports/{ReportId}"; + if (input.ReportId !== undefined) { + const labelValue: any = input.ReportId.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: ReportId."); + } + resolvedPath = resolvedPath.replace("{ReportId}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: ReportId."); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1GetDomainDeliverabilityCampaignCommand( + input: GetDomainDeliverabilityCampaignCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = + "/v1/email/deliverability-dashboard/campaigns/{CampaignId}"; + if (input.CampaignId !== undefined) { + const labelValue: any = input.CampaignId.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: CampaignId."); + } + resolvedPath = resolvedPath.replace("{CampaignId}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: CampaignId."); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1GetDomainStatisticsReportCommand( + input: GetDomainStatisticsReportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = + "/v1/email/deliverability-dashboard/statistics-report/{Domain}"; + if (input.Domain !== undefined) { + const labelValue: any = input.Domain.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Domain."); + } + resolvedPath = resolvedPath.replace("{Domain}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: Domain."); + } + const query: any = {}; + if (input.EndDate !== undefined) { + query["EndDate"] = input.EndDate.toISOString(); + } + if (input.StartDate !== undefined) { + query["StartDate"] = input.StartDate.toISOString(); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1GetEmailIdentityCommand( + input: GetEmailIdentityCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/identities/{EmailIdentity}"; + if (input.EmailIdentity !== undefined) { + const labelValue: any = input.EmailIdentity.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: EmailIdentity." + ); + } + resolvedPath = resolvedPath.replace("{EmailIdentity}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: EmailIdentity."); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath + }); +} + +export async function serializeAws_restJson1_1ListConfigurationSetsCommand( + input: ListConfigurationSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/configuration-sets"; + const query: any = {}; + if (input.NextToken !== undefined) { + query["NextToken"] = input.NextToken.toString(); + } + if (input.PageSize !== undefined) { + query["PageSize"] = input.PageSize.toString(); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1ListDedicatedIpPoolsCommand( + input: ListDedicatedIpPoolsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/dedicated-ip-pools"; + const query: any = {}; + if (input.NextToken !== undefined) { + query["NextToken"] = input.NextToken.toString(); + } + if (input.PageSize !== undefined) { + query["PageSize"] = input.PageSize.toString(); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1ListDeliverabilityTestReportsCommand( + input: ListDeliverabilityTestReportsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/deliverability-dashboard/test-reports"; + const query: any = {}; + if (input.NextToken !== undefined) { + query["NextToken"] = input.NextToken.toString(); + } + if (input.PageSize !== undefined) { + query["PageSize"] = input.PageSize.toString(); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1ListDomainDeliverabilityCampaignsCommand( + input: ListDomainDeliverabilityCampaignsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = + "/v1/email/deliverability-dashboard/domains/{SubscribedDomain}/campaigns"; + if (input.SubscribedDomain !== undefined) { + const labelValue: any = input.SubscribedDomain.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: SubscribedDomain." + ); + } + resolvedPath = resolvedPath.replace("{SubscribedDomain}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: SubscribedDomain." + ); + } + const query: any = {}; + if (input.EndDate !== undefined) { + query["EndDate"] = input.EndDate.toISOString(); + } + if (input.NextToken !== undefined) { + query["NextToken"] = input.NextToken.toString(); + } + if (input.PageSize !== undefined) { + query["PageSize"] = input.PageSize.toString(); + } + if (input.StartDate !== undefined) { + query["StartDate"] = input.StartDate.toISOString(); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1ListEmailIdentitiesCommand( + input: ListEmailIdentitiesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/identities"; + const query: any = {}; + if (input.NextToken !== undefined) { + query["NextToken"] = input.NextToken.toString(); + } + if (input.PageSize !== undefined) { + query["PageSize"] = input.PageSize.toString(); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1ListTagsForResourceCommand( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/tags"; + const query: any = {}; + if (input.ResourceArn !== undefined) { + query["ResourceArn"] = input.ResourceArn.toString(); + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "GET", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1PutAccountDedicatedIpWarmupAttributesCommand( + input: PutAccountDedicatedIpWarmupAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/account/dedicated-ips/warmup"; + let body: any = {}; + const bodyParams: any = {}; + if (input.AutoWarmupEnabled !== undefined) { + bodyParams["AutoWarmupEnabled"] = input.AutoWarmupEnabled; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutAccountSendingAttributesCommand( + input: PutAccountSendingAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/account/sending"; + let body: any = {}; + const bodyParams: any = {}; + if (input.SendingEnabled !== undefined) { + bodyParams["SendingEnabled"] = input.SendingEnabled; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutConfigurationSetDeliveryOptionsCommand( + input: PutConfigurationSetDeliveryOptionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = + "/v1/email/configuration-sets/{ConfigurationSetName}/delivery-options"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.SendingPoolName !== undefined) { + bodyParams["SendingPoolName"] = input.SendingPoolName; + } + if (input.TlsPolicy !== undefined) { + bodyParams["TlsPolicy"] = input.TlsPolicy; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutConfigurationSetReputationOptionsCommand( + input: PutConfigurationSetReputationOptionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = + "/v1/email/configuration-sets/{ConfigurationSetName}/reputation-options"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.ReputationMetricsEnabled !== undefined) { + bodyParams["ReputationMetricsEnabled"] = input.ReputationMetricsEnabled; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutConfigurationSetSendingOptionsCommand( + input: PutConfigurationSetSendingOptionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = + "/v1/email/configuration-sets/{ConfigurationSetName}/sending"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.SendingEnabled !== undefined) { + bodyParams["SendingEnabled"] = input.SendingEnabled; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutConfigurationSetTrackingOptionsCommand( + input: PutConfigurationSetTrackingOptionsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = + "/v1/email/configuration-sets/{ConfigurationSetName}/tracking-options"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.CustomRedirectDomain !== undefined) { + bodyParams["CustomRedirectDomain"] = input.CustomRedirectDomain; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutDedicatedIpInPoolCommand( + input: PutDedicatedIpInPoolCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/dedicated-ips/{Ip}/pool"; + if (input.Ip !== undefined) { + const labelValue: any = input.Ip.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Ip."); + } + resolvedPath = resolvedPath.replace("{Ip}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: Ip."); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.DestinationPoolName !== undefined) { + bodyParams["DestinationPoolName"] = input.DestinationPoolName; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutDedicatedIpWarmupAttributesCommand( + input: PutDedicatedIpWarmupAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/dedicated-ips/{Ip}/warmup"; + if (input.Ip !== undefined) { + const labelValue: any = input.Ip.toString(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: Ip."); + } + resolvedPath = resolvedPath.replace("{Ip}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: Ip."); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.WarmupPercentage !== undefined) { + bodyParams["WarmupPercentage"] = input.WarmupPercentage; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutDeliverabilityDashboardOptionCommand( + input: PutDeliverabilityDashboardOptionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/deliverability-dashboard"; + let body: any = {}; + const bodyParams: any = {}; + if (input.DashboardEnabled !== undefined) { + bodyParams["DashboardEnabled"] = input.DashboardEnabled; + } + if (input.SubscribedDomains !== undefined) { + bodyParams[ + "SubscribedDomains" + ] = serializeAws_restJson1_1DomainDeliverabilityTrackingOptions( + input.SubscribedDomains, + context + ); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutEmailIdentityDkimAttributesCommand( + input: PutEmailIdentityDkimAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/identities/{EmailIdentity}/dkim"; + if (input.EmailIdentity !== undefined) { + const labelValue: any = input.EmailIdentity.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: EmailIdentity." + ); + } + resolvedPath = resolvedPath.replace("{EmailIdentity}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: EmailIdentity."); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.SigningEnabled !== undefined) { + bodyParams["SigningEnabled"] = input.SigningEnabled; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutEmailIdentityFeedbackAttributesCommand( + input: PutEmailIdentityFeedbackAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/identities/{EmailIdentity}/feedback"; + if (input.EmailIdentity !== undefined) { + const labelValue: any = input.EmailIdentity.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: EmailIdentity." + ); + } + resolvedPath = resolvedPath.replace("{EmailIdentity}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: EmailIdentity."); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.EmailForwardingEnabled !== undefined) { + bodyParams["EmailForwardingEnabled"] = input.EmailForwardingEnabled; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1PutEmailIdentityMailFromAttributesCommand( + input: PutEmailIdentityMailFromAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/identities/{EmailIdentity}/mail-from"; + if (input.EmailIdentity !== undefined) { + const labelValue: any = input.EmailIdentity.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: EmailIdentity." + ); + } + resolvedPath = resolvedPath.replace("{EmailIdentity}", labelValue); + } else { + throw new Error("No value provided for input HTTP label: EmailIdentity."); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.BehaviorOnMxFailure !== undefined) { + bodyParams["BehaviorOnMxFailure"] = input.BehaviorOnMxFailure; + } + if (input.MailFromDomain !== undefined) { + bodyParams["MailFromDomain"] = input.MailFromDomain; + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1SendEmailCommand( + input: SendEmailCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/outbound-emails"; + let body: any = {}; + const bodyParams: any = {}; + if (input.ConfigurationSetName !== undefined) { + bodyParams["ConfigurationSetName"] = input.ConfigurationSetName; + } + if (input.Content !== undefined) { + bodyParams["Content"] = serializeAws_restJson1_1EmailContent( + input.Content, + context + ); + } + if (input.Destination !== undefined) { + bodyParams["Destination"] = serializeAws_restJson1_1Destination( + input.Destination, + context + ); + } + if (input.EmailTags !== undefined) { + bodyParams["EmailTags"] = serializeAws_restJson1_1MessageTagList( + input.EmailTags, + context + ); + } + if (input.FeedbackForwardingEmailAddress !== undefined) { + bodyParams["FeedbackForwardingEmailAddress"] = + input.FeedbackForwardingEmailAddress; + } + if (input.FromEmailAddress !== undefined) { + bodyParams["FromEmailAddress"] = input.FromEmailAddress; + } + if (input.ReplyToAddresses !== undefined) { + bodyParams["ReplyToAddresses"] = serializeAws_restJson1_1EmailAddressList( + input.ReplyToAddresses, + context + ); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1TagResourceCommand( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = "/v1/email/tags"; + let body: any = {}; + const bodyParams: any = {}; + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_restJson1_1TagList(input.Tags, context); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function serializeAws_restJson1_1UntagResourceCommand( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = ""; + let resolvedPath = "/v1/email/tags"; + const query: any = {}; + if (input.ResourceArn !== undefined) { + query["ResourceArn"] = input.ResourceArn.toString(); + } + if (input.TagKeys !== undefined) { + query["TagKeys"] = input.TagKeys; + } + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "DELETE", + headers: headers, + path: resolvedPath, + query: query + }); +} + +export async function serializeAws_restJson1_1UpdateConfigurationSetEventDestinationCommand( + input: UpdateConfigurationSetEventDestinationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/json"; + let resolvedPath = + "/v1/email/configuration-sets/{ConfigurationSetName}/event-destinations/{EventDestinationName}"; + if (input.ConfigurationSetName !== undefined) { + const labelValue: any = input.ConfigurationSetName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: ConfigurationSetName." + ); + } + resolvedPath = resolvedPath.replace("{ConfigurationSetName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: ConfigurationSetName." + ); + } + if (input.EventDestinationName !== undefined) { + const labelValue: any = input.EventDestinationName.toString(); + if (labelValue.length <= 0) { + throw new Error( + "Empty value provided for input HTTP label: EventDestinationName." + ); + } + resolvedPath = resolvedPath.replace("{EventDestinationName}", labelValue); + } else { + throw new Error( + "No value provided for input HTTP label: EventDestinationName." + ); + } + let body: any = {}; + const bodyParams: any = {}; + if (input.EventDestination !== undefined) { + bodyParams[ + "EventDestination" + ] = serializeAws_restJson1_1EventDestinationDefinition( + input.EventDestination, + context + ); + } + body = JSON.stringify(bodyParams); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "PUT", + headers: headers, + path: resolvedPath, + body: body + }); +} + +export async function deserializeAws_restJson1_1CreateConfigurationSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1CreateConfigurationSetCommandError( + output, + context + ); + } + const contents: CreateConfigurationSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateConfigurationSetResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateConfigurationSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazon.bacon.pinpoint.frontend.svc#AlreadyExistsException": + response = await deserializeAws_restJson1_1AlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "LimitExceededException": + case "com.amazon.bacon.pinpoint.frontend.svc#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateConfigurationSetEventDestinationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1CreateConfigurationSetEventDestinationCommandError( + output, + context + ); + } + const contents: CreateConfigurationSetEventDestinationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateConfigurationSetEventDestinationResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateConfigurationSetEventDestinationCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazon.bacon.pinpoint.frontend.svc#AlreadyExistsException": + response = await deserializeAws_restJson1_1AlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "LimitExceededException": + case "com.amazon.bacon.pinpoint.frontend.svc#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateDedicatedIpPoolCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1CreateDedicatedIpPoolCommandError( + output, + context + ); + } + const contents: CreateDedicatedIpPoolCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateDedicatedIpPoolResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateDedicatedIpPoolCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazon.bacon.pinpoint.frontend.svc#AlreadyExistsException": + response = await deserializeAws_restJson1_1AlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "LimitExceededException": + case "com.amazon.bacon.pinpoint.frontend.svc#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateDeliverabilityTestReportCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1CreateDeliverabilityTestReportCommandError( + output, + context + ); + } + const contents: CreateDeliverabilityTestReportCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateDeliverabilityTestReportResponse", + DeliverabilityTestStatus: undefined, + ReportId: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DeliverabilityTestStatus !== undefined) { + contents.DeliverabilityTestStatus = data.DeliverabilityTestStatus; + } + if (data.ReportId !== undefined) { + contents.ReportId = data.ReportId; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateDeliverabilityTestReportCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "AccountSuspendedException": + case "com.amazon.bacon.pinpoint.frontend.svc#AccountSuspendedException": + response = await deserializeAws_restJson1_1AccountSuspendedExceptionResponse( + parsedOutput, + context + ); + break; + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "LimitExceededException": + case "com.amazon.bacon.pinpoint.frontend.svc#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "MailFromDomainNotVerifiedException": + case "com.amazon.bacon.pinpoint.frontend.svc#MailFromDomainNotVerifiedException": + response = await deserializeAws_restJson1_1MailFromDomainNotVerifiedExceptionResponse( + parsedOutput, + context + ); + break; + case "MessageRejected": + case "com.amazon.bacon.pinpoint.frontend.svc#MessageRejected": + response = await deserializeAws_restJson1_1MessageRejectedResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "SendingPausedException": + case "com.amazon.bacon.pinpoint.frontend.svc#SendingPausedException": + response = await deserializeAws_restJson1_1SendingPausedExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1CreateEmailIdentityCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1CreateEmailIdentityCommandError( + output, + context + ); + } + const contents: CreateEmailIdentityCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateEmailIdentityResponse", + DkimAttributes: undefined, + IdentityType: undefined, + VerifiedForSendingStatus: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DkimAttributes !== undefined) { + contents.DkimAttributes = deserializeAws_restJson1_1DkimAttributes( + data.DkimAttributes, + context + ); + } + if (data.IdentityType !== undefined) { + contents.IdentityType = data.IdentityType; + } + if (data.VerifiedForSendingStatus !== undefined) { + contents.VerifiedForSendingStatus = data.VerifiedForSendingStatus; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1CreateEmailIdentityCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "LimitExceededException": + case "com.amazon.bacon.pinpoint.frontend.svc#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteConfigurationSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1DeleteConfigurationSetCommandError( + output, + context + ); + } + const contents: DeleteConfigurationSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteConfigurationSetResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteConfigurationSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteConfigurationSetEventDestinationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1DeleteConfigurationSetEventDestinationCommandError( + output, + context + ); + } + const contents: DeleteConfigurationSetEventDestinationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteConfigurationSetEventDestinationResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteConfigurationSetEventDestinationCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteDedicatedIpPoolCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1DeleteDedicatedIpPoolCommandError( + output, + context + ); + } + const contents: DeleteDedicatedIpPoolCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteDedicatedIpPoolResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteDedicatedIpPoolCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1DeleteEmailIdentityCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1DeleteEmailIdentityCommandError( + output, + context + ); + } + const contents: DeleteEmailIdentityCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteEmailIdentityResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1DeleteEmailIdentityCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetAccountCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetAccountCommandError(output, context); + } + const contents: GetAccountCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetAccountResponse", + DedicatedIpAutoWarmupEnabled: undefined, + EnforcementStatus: undefined, + ProductionAccessEnabled: undefined, + SendQuota: undefined, + SendingEnabled: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DedicatedIpAutoWarmupEnabled !== undefined) { + contents.DedicatedIpAutoWarmupEnabled = data.DedicatedIpAutoWarmupEnabled; + } + if (data.EnforcementStatus !== undefined) { + contents.EnforcementStatus = data.EnforcementStatus; + } + if (data.ProductionAccessEnabled !== undefined) { + contents.ProductionAccessEnabled = data.ProductionAccessEnabled; + } + if (data.SendQuota !== undefined) { + contents.SendQuota = deserializeAws_restJson1_1SendQuota( + data.SendQuota, + context + ); + } + if (data.SendingEnabled !== undefined) { + contents.SendingEnabled = data.SendingEnabled; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetAccountCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetBlacklistReportsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetBlacklistReportsCommandError( + output, + context + ); + } + const contents: GetBlacklistReportsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetBlacklistReportsResponse", + BlacklistReport: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.BlacklistReport !== undefined) { + contents.BlacklistReport = deserializeAws_restJson1_1BlacklistReport( + data.BlacklistReport, + context + ); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetBlacklistReportsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetConfigurationSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetConfigurationSetCommandError( + output, + context + ); + } + const contents: GetConfigurationSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetConfigurationSetResponse", + ConfigurationSetName: undefined, + DeliveryOptions: undefined, + ReputationOptions: undefined, + SendingOptions: undefined, + Tags: undefined, + TrackingOptions: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.ConfigurationSetName !== undefined) { + contents.ConfigurationSetName = data.ConfigurationSetName; + } + if (data.DeliveryOptions !== undefined) { + contents.DeliveryOptions = deserializeAws_restJson1_1DeliveryOptions( + data.DeliveryOptions, + context + ); + } + if (data.ReputationOptions !== undefined) { + contents.ReputationOptions = deserializeAws_restJson1_1ReputationOptions( + data.ReputationOptions, + context + ); + } + if (data.SendingOptions !== undefined) { + contents.SendingOptions = deserializeAws_restJson1_1SendingOptions( + data.SendingOptions, + context + ); + } + if (data.Tags !== undefined) { + contents.Tags = deserializeAws_restJson1_1TagList(data.Tags, context); + } + if (data.TrackingOptions !== undefined) { + contents.TrackingOptions = deserializeAws_restJson1_1TrackingOptions( + data.TrackingOptions, + context + ); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetConfigurationSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetConfigurationSetEventDestinationsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetConfigurationSetEventDestinationsCommandError( + output, + context + ); + } + const contents: GetConfigurationSetEventDestinationsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetConfigurationSetEventDestinationsResponse", + EventDestinations: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.EventDestinations !== undefined) { + contents.EventDestinations = deserializeAws_restJson1_1EventDestinations( + data.EventDestinations, + context + ); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetConfigurationSetEventDestinationsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDedicatedIpCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDedicatedIpCommandError( + output, + context + ); + } + const contents: GetDedicatedIpCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetDedicatedIpResponse", + DedicatedIp: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DedicatedIp !== undefined) { + contents.DedicatedIp = deserializeAws_restJson1_1DedicatedIp( + data.DedicatedIp, + context + ); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDedicatedIpCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDedicatedIpsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDedicatedIpsCommandError( + output, + context + ); + } + const contents: GetDedicatedIpsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetDedicatedIpsResponse", + DedicatedIps: undefined, + NextToken: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DedicatedIps !== undefined) { + contents.DedicatedIps = deserializeAws_restJson1_1DedicatedIpList( + data.DedicatedIps, + context + ); + } + if (data.NextToken !== undefined) { + contents.NextToken = data.NextToken; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDedicatedIpsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDeliverabilityDashboardOptionsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDeliverabilityDashboardOptionsCommandError( + output, + context + ); + } + const contents: GetDeliverabilityDashboardOptionsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetDeliverabilityDashboardOptionsResponse", + AccountStatus: undefined, + ActiveSubscribedDomains: undefined, + DashboardEnabled: undefined, + PendingExpirationSubscribedDomains: undefined, + SubscriptionExpiryDate: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.AccountStatus !== undefined) { + contents.AccountStatus = data.AccountStatus; + } + if (data.ActiveSubscribedDomains !== undefined) { + contents.ActiveSubscribedDomains = deserializeAws_restJson1_1DomainDeliverabilityTrackingOptions( + data.ActiveSubscribedDomains, + context + ); + } + if (data.DashboardEnabled !== undefined) { + contents.DashboardEnabled = data.DashboardEnabled; + } + if (data.PendingExpirationSubscribedDomains !== undefined) { + contents.PendingExpirationSubscribedDomains = deserializeAws_restJson1_1DomainDeliverabilityTrackingOptions( + data.PendingExpirationSubscribedDomains, + context + ); + } + if (data.SubscriptionExpiryDate !== undefined) { + contents.SubscriptionExpiryDate = new Date( + data.SubscriptionExpiryDate % 1 != 0 + ? Math.round(data.SubscriptionExpiryDate * 1000) + : data.SubscriptionExpiryDate + ); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDeliverabilityDashboardOptionsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "LimitExceededException": + case "com.amazon.bacon.pinpoint.frontend.svc#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDeliverabilityTestReportCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDeliverabilityTestReportCommandError( + output, + context + ); + } + const contents: GetDeliverabilityTestReportCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetDeliverabilityTestReportResponse", + DeliverabilityTestReport: undefined, + IspPlacements: undefined, + Message: undefined, + OverallPlacement: undefined, + Tags: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DeliverabilityTestReport !== undefined) { + contents.DeliverabilityTestReport = deserializeAws_restJson1_1DeliverabilityTestReport( + data.DeliverabilityTestReport, + context + ); + } + if (data.IspPlacements !== undefined) { + contents.IspPlacements = deserializeAws_restJson1_1IspPlacements( + data.IspPlacements, + context + ); + } + if (data.Message !== undefined) { + contents.Message = data.Message; + } + if (data.OverallPlacement !== undefined) { + contents.OverallPlacement = deserializeAws_restJson1_1PlacementStatistics( + data.OverallPlacement, + context + ); + } + if (data.Tags !== undefined) { + contents.Tags = deserializeAws_restJson1_1TagList(data.Tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDeliverabilityTestReportCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDomainDeliverabilityCampaignCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDomainDeliverabilityCampaignCommandError( + output, + context + ); + } + const contents: GetDomainDeliverabilityCampaignCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetDomainDeliverabilityCampaignResponse", + DomainDeliverabilityCampaign: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DomainDeliverabilityCampaign !== undefined) { + contents.DomainDeliverabilityCampaign = deserializeAws_restJson1_1DomainDeliverabilityCampaign( + data.DomainDeliverabilityCampaign, + context + ); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDomainDeliverabilityCampaignCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetDomainStatisticsReportCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetDomainStatisticsReportCommandError( + output, + context + ); + } + const contents: GetDomainStatisticsReportCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetDomainStatisticsReportResponse", + DailyVolumes: undefined, + OverallVolume: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DailyVolumes !== undefined) { + contents.DailyVolumes = deserializeAws_restJson1_1DailyVolumes( + data.DailyVolumes, + context + ); + } + if (data.OverallVolume !== undefined) { + contents.OverallVolume = deserializeAws_restJson1_1OverallVolume( + data.OverallVolume, + context + ); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetDomainStatisticsReportCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1GetEmailIdentityCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1GetEmailIdentityCommandError( + output, + context + ); + } + const contents: GetEmailIdentityCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetEmailIdentityResponse", + DkimAttributes: undefined, + FeedbackForwardingStatus: undefined, + IdentityType: undefined, + MailFromAttributes: undefined, + Tags: undefined, + VerifiedForSendingStatus: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DkimAttributes !== undefined) { + contents.DkimAttributes = deserializeAws_restJson1_1DkimAttributes( + data.DkimAttributes, + context + ); + } + if (data.FeedbackForwardingStatus !== undefined) { + contents.FeedbackForwardingStatus = data.FeedbackForwardingStatus; + } + if (data.IdentityType !== undefined) { + contents.IdentityType = data.IdentityType; + } + if (data.MailFromAttributes !== undefined) { + contents.MailFromAttributes = deserializeAws_restJson1_1MailFromAttributes( + data.MailFromAttributes, + context + ); + } + if (data.Tags !== undefined) { + contents.Tags = deserializeAws_restJson1_1TagList(data.Tags, context); + } + if (data.VerifiedForSendingStatus !== undefined) { + contents.VerifiedForSendingStatus = data.VerifiedForSendingStatus; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1GetEmailIdentityCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ListConfigurationSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1ListConfigurationSetsCommandError( + output, + context + ); + } + const contents: ListConfigurationSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListConfigurationSetsResponse", + ConfigurationSets: undefined, + NextToken: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.ConfigurationSets !== undefined) { + contents.ConfigurationSets = deserializeAws_restJson1_1ConfigurationSetNameList( + data.ConfigurationSets, + context + ); + } + if (data.NextToken !== undefined) { + contents.NextToken = data.NextToken; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ListConfigurationSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ListDedicatedIpPoolsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1ListDedicatedIpPoolsCommandError( + output, + context + ); + } + const contents: ListDedicatedIpPoolsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListDedicatedIpPoolsResponse", + DedicatedIpPools: undefined, + NextToken: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DedicatedIpPools !== undefined) { + contents.DedicatedIpPools = deserializeAws_restJson1_1ListOfDedicatedIpPools( + data.DedicatedIpPools, + context + ); + } + if (data.NextToken !== undefined) { + contents.NextToken = data.NextToken; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ListDedicatedIpPoolsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ListDeliverabilityTestReportsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1ListDeliverabilityTestReportsCommandError( + output, + context + ); + } + const contents: ListDeliverabilityTestReportsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListDeliverabilityTestReportsResponse", + DeliverabilityTestReports: undefined, + NextToken: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DeliverabilityTestReports !== undefined) { + contents.DeliverabilityTestReports = deserializeAws_restJson1_1DeliverabilityTestReports( + data.DeliverabilityTestReports, + context + ); + } + if (data.NextToken !== undefined) { + contents.NextToken = data.NextToken; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ListDeliverabilityTestReportsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ListDomainDeliverabilityCampaignsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1ListDomainDeliverabilityCampaignsCommandError( + output, + context + ); + } + const contents: ListDomainDeliverabilityCampaignsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListDomainDeliverabilityCampaignsResponse", + DomainDeliverabilityCampaigns: undefined, + NextToken: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.DomainDeliverabilityCampaigns !== undefined) { + contents.DomainDeliverabilityCampaigns = deserializeAws_restJson1_1DomainDeliverabilityCampaignList( + data.DomainDeliverabilityCampaigns, + context + ); + } + if (data.NextToken !== undefined) { + contents.NextToken = data.NextToken; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ListDomainDeliverabilityCampaignsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ListEmailIdentitiesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1ListEmailIdentitiesCommandError( + output, + context + ); + } + const contents: ListEmailIdentitiesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListEmailIdentitiesResponse", + EmailIdentities: undefined, + NextToken: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.EmailIdentities !== undefined) { + contents.EmailIdentities = deserializeAws_restJson1_1IdentityInfoList( + data.EmailIdentities, + context + ); + } + if (data.NextToken !== undefined) { + contents.NextToken = data.NextToken; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ListEmailIdentitiesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1ListTagsForResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1ListTagsForResourceCommandError( + output, + context + ); + } + const contents: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListTagsForResourceResponse", + Tags: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.Tags !== undefined) { + contents.Tags = deserializeAws_restJson1_1TagList(data.Tags, context); + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1ListTagsForResourceCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutAccountDedicatedIpWarmupAttributesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutAccountDedicatedIpWarmupAttributesCommandError( + output, + context + ); + } + const contents: PutAccountDedicatedIpWarmupAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutAccountDedicatedIpWarmupAttributesResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutAccountDedicatedIpWarmupAttributesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutAccountSendingAttributesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutAccountSendingAttributesCommandError( + output, + context + ); + } + const contents: PutAccountSendingAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutAccountSendingAttributesResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutAccountSendingAttributesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutConfigurationSetDeliveryOptionsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutConfigurationSetDeliveryOptionsCommandError( + output, + context + ); + } + const contents: PutConfigurationSetDeliveryOptionsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutConfigurationSetDeliveryOptionsResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutConfigurationSetDeliveryOptionsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutConfigurationSetReputationOptionsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutConfigurationSetReputationOptionsCommandError( + output, + context + ); + } + const contents: PutConfigurationSetReputationOptionsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutConfigurationSetReputationOptionsResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutConfigurationSetReputationOptionsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutConfigurationSetSendingOptionsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutConfigurationSetSendingOptionsCommandError( + output, + context + ); + } + const contents: PutConfigurationSetSendingOptionsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutConfigurationSetSendingOptionsResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutConfigurationSetSendingOptionsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutConfigurationSetTrackingOptionsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutConfigurationSetTrackingOptionsCommandError( + output, + context + ); + } + const contents: PutConfigurationSetTrackingOptionsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutConfigurationSetTrackingOptionsResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutConfigurationSetTrackingOptionsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutDedicatedIpInPoolCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutDedicatedIpInPoolCommandError( + output, + context + ); + } + const contents: PutDedicatedIpInPoolCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutDedicatedIpInPoolResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutDedicatedIpInPoolCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutDedicatedIpWarmupAttributesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutDedicatedIpWarmupAttributesCommandError( + output, + context + ); + } + const contents: PutDedicatedIpWarmupAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutDedicatedIpWarmupAttributesResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutDedicatedIpWarmupAttributesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutDeliverabilityDashboardOptionCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutDeliverabilityDashboardOptionCommandError( + output, + context + ); + } + const contents: PutDeliverabilityDashboardOptionCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutDeliverabilityDashboardOptionResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutDeliverabilityDashboardOptionCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "AlreadyExistsException": + case "com.amazon.bacon.pinpoint.frontend.svc#AlreadyExistsException": + response = await deserializeAws_restJson1_1AlreadyExistsExceptionResponse( + parsedOutput, + context + ); + break; + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "LimitExceededException": + case "com.amazon.bacon.pinpoint.frontend.svc#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutEmailIdentityDkimAttributesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutEmailIdentityDkimAttributesCommandError( + output, + context + ); + } + const contents: PutEmailIdentityDkimAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutEmailIdentityDkimAttributesResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutEmailIdentityDkimAttributesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutEmailIdentityFeedbackAttributesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutEmailIdentityFeedbackAttributesCommandError( + output, + context + ); + } + const contents: PutEmailIdentityFeedbackAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutEmailIdentityFeedbackAttributesResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutEmailIdentityFeedbackAttributesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1PutEmailIdentityMailFromAttributesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1PutEmailIdentityMailFromAttributesCommandError( + output, + context + ); + } + const contents: PutEmailIdentityMailFromAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutEmailIdentityMailFromAttributesResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1PutEmailIdentityMailFromAttributesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1SendEmailCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1SendEmailCommandError(output, context); + } + const contents: SendEmailCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "SendEmailResponse", + MessageId: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.MessageId !== undefined) { + contents.MessageId = data.MessageId; + } + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1SendEmailCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "AccountSuspendedException": + case "com.amazon.bacon.pinpoint.frontend.svc#AccountSuspendedException": + response = await deserializeAws_restJson1_1AccountSuspendedExceptionResponse( + parsedOutput, + context + ); + break; + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "LimitExceededException": + case "com.amazon.bacon.pinpoint.frontend.svc#LimitExceededException": + response = await deserializeAws_restJson1_1LimitExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "MailFromDomainNotVerifiedException": + case "com.amazon.bacon.pinpoint.frontend.svc#MailFromDomainNotVerifiedException": + response = await deserializeAws_restJson1_1MailFromDomainNotVerifiedExceptionResponse( + parsedOutput, + context + ); + break; + case "MessageRejected": + case "com.amazon.bacon.pinpoint.frontend.svc#MessageRejected": + response = await deserializeAws_restJson1_1MessageRejectedResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "SendingPausedException": + case "com.amazon.bacon.pinpoint.frontend.svc#SendingPausedException": + response = await deserializeAws_restJson1_1SendingPausedExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1TagResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1TagResourceCommandError(output, context); + } + const contents: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "TagResourceResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1TagResourceCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UntagResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UntagResourceCommandError(output, context); + } + const contents: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UntagResourceResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UntagResourceCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "ConcurrentModificationException": + case "com.amazon.bacon.pinpoint.frontend.svc#ConcurrentModificationException": + response = await deserializeAws_restJson1_1ConcurrentModificationExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_restJson1_1UpdateConfigurationSetEventDestinationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode !== 200) { + return deserializeAws_restJson1_1UpdateConfigurationSetEventDestinationCommandError( + output, + context + ); + } + const contents: UpdateConfigurationSetEventDestinationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateConfigurationSetEventDestinationResponse" + }; + return Promise.resolve(contents); +} + +async function deserializeAws_restJson1_1UpdateConfigurationSetEventDestinationCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + errorCode = output.headers["x-amzn-errortype"].split(":")[0]; + switch (errorCode) { + case "BadRequestException": + case "com.amazon.bacon.pinpoint.frontend.svc#BadRequestException": + response = await deserializeAws_restJson1_1BadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "NotFoundException": + case "com.amazon.bacon.pinpoint.frontend.svc#NotFoundException": + response = await deserializeAws_restJson1_1NotFoundExceptionResponse( + parsedOutput, + context + ); + break; + case "TooManyRequestsException": + case "com.amazon.bacon.pinpoint.frontend.svc#TooManyRequestsException": + response = await deserializeAws_restJson1_1TooManyRequestsExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazon.bacon.pinpoint.frontend.svc#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +const deserializeAws_restJson1_1AccountSuspendedExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: AccountSuspendedException = { + __type: "AccountSuspendedException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1AlreadyExistsExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: AlreadyExistsException = { + __type: "AlreadyExistsException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1BadRequestExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: BadRequestException = { + __type: "BadRequestException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1ConcurrentModificationExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: ConcurrentModificationException = { + __type: "ConcurrentModificationException", + $fault: "server", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1LimitExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: LimitExceededException = { + __type: "LimitExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1MailFromDomainNotVerifiedExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: MailFromDomainNotVerifiedException = { + __type: "MailFromDomainNotVerifiedException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1MessageRejectedResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: MessageRejected = { + __type: "MessageRejected", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1NotFoundExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: NotFoundException = { + __type: "NotFoundException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1SendingPausedExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: SendingPausedException = { + __type: "SendingPausedException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const deserializeAws_restJson1_1TooManyRequestsExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const contents: TooManyRequestsException = { + __type: "TooManyRequestsException", + $fault: "client", + $metadata: deserializeMetadata(output), + message: undefined + }; + const data: any = await parseBody(output.body, context); + if (data.message !== undefined) { + contents.message = data.message; + } + return contents; +}; + +const serializeAws_restJson1_1Tag = ( + input: Tag, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Key !== undefined) { + bodyParams["Key"] = input.Key; + } + if (input.Value !== undefined) { + bodyParams["Value"] = input.Value; + } + return bodyParams; +}; + +const serializeAws_restJson1_1TagList = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_restJson1_1Tag(entry, context) + ); +}; + +const serializeAws_restJson1_1Body = ( + input: Body, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Html !== undefined) { + bodyParams["Html"] = serializeAws_restJson1_1Content(input.Html, context); + } + if (input.Text !== undefined) { + bodyParams["Text"] = serializeAws_restJson1_1Content(input.Text, context); + } + return bodyParams; +}; + +const serializeAws_restJson1_1CloudWatchDestination = ( + input: CloudWatchDestination, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DimensionConfigurations !== undefined) { + bodyParams[ + "DimensionConfigurations" + ] = serializeAws_restJson1_1CloudWatchDimensionConfigurations( + input.DimensionConfigurations, + context + ); + } + return bodyParams; +}; + +const serializeAws_restJson1_1CloudWatchDimensionConfiguration = ( + input: CloudWatchDimensionConfiguration, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DefaultDimensionValue !== undefined) { + bodyParams["DefaultDimensionValue"] = input.DefaultDimensionValue; + } + if (input.DimensionName !== undefined) { + bodyParams["DimensionName"] = input.DimensionName; + } + if (input.DimensionValueSource !== undefined) { + bodyParams["DimensionValueSource"] = input.DimensionValueSource; + } + return bodyParams; +}; + +const serializeAws_restJson1_1CloudWatchDimensionConfigurations = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_restJson1_1CloudWatchDimensionConfiguration(entry, context) + ); +}; + +const serializeAws_restJson1_1Content = ( + input: Content, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Charset !== undefined) { + bodyParams["Charset"] = input.Charset; + } + if (input.Data !== undefined) { + bodyParams["Data"] = input.Data; + } + return bodyParams; +}; + +const serializeAws_restJson1_1DeliveryOptions = ( + input: DeliveryOptions, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SendingPoolName !== undefined) { + bodyParams["SendingPoolName"] = input.SendingPoolName; + } + if (input.TlsPolicy !== undefined) { + bodyParams["TlsPolicy"] = input.TlsPolicy; + } + return bodyParams; +}; + +const serializeAws_restJson1_1Destination = ( + input: Destination, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.BccAddresses !== undefined) { + bodyParams["BccAddresses"] = serializeAws_restJson1_1EmailAddressList( + input.BccAddresses, + context + ); + } + if (input.CcAddresses !== undefined) { + bodyParams["CcAddresses"] = serializeAws_restJson1_1EmailAddressList( + input.CcAddresses, + context + ); + } + if (input.ToAddresses !== undefined) { + bodyParams["ToAddresses"] = serializeAws_restJson1_1EmailAddressList( + input.ToAddresses, + context + ); + } + return bodyParams; +}; + +const serializeAws_restJson1_1DomainDeliverabilityTrackingOption = ( + input: DomainDeliverabilityTrackingOption, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Domain !== undefined) { + bodyParams["Domain"] = input.Domain; + } + if (input.InboxPlacementTrackingOption !== undefined) { + bodyParams[ + "InboxPlacementTrackingOption" + ] = serializeAws_restJson1_1InboxPlacementTrackingOption( + input.InboxPlacementTrackingOption, + context + ); + } + if (input.SubscriptionStartDate !== undefined) { + bodyParams["SubscriptionStartDate"] = Math.round( + input.SubscriptionStartDate.getTime() / 1000 + ); + } + return bodyParams; +}; + +const serializeAws_restJson1_1DomainDeliverabilityTrackingOptions = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_restJson1_1DomainDeliverabilityTrackingOption(entry, context) + ); +}; + +const serializeAws_restJson1_1EmailAddressList = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_restJson1_1EmailContent = ( + input: EmailContent, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Raw !== undefined) { + bodyParams["Raw"] = serializeAws_restJson1_1RawMessage(input.Raw, context); + } + if (input.Simple !== undefined) { + bodyParams["Simple"] = serializeAws_restJson1_1Message( + input.Simple, + context + ); + } + if (input.Template !== undefined) { + bodyParams["Template"] = serializeAws_restJson1_1Template( + input.Template, + context + ); + } + return bodyParams; +}; + +const serializeAws_restJson1_1EventDestinationDefinition = ( + input: EventDestinationDefinition, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CloudWatchDestination !== undefined) { + bodyParams[ + "CloudWatchDestination" + ] = serializeAws_restJson1_1CloudWatchDestination( + input.CloudWatchDestination, + context + ); + } + if (input.Enabled !== undefined) { + bodyParams["Enabled"] = input.Enabled; + } + if (input.KinesisFirehoseDestination !== undefined) { + bodyParams[ + "KinesisFirehoseDestination" + ] = serializeAws_restJson1_1KinesisFirehoseDestination( + input.KinesisFirehoseDestination, + context + ); + } + if (input.MatchingEventTypes !== undefined) { + bodyParams["MatchingEventTypes"] = serializeAws_restJson1_1EventTypes( + input.MatchingEventTypes, + context + ); + } + if (input.PinpointDestination !== undefined) { + bodyParams[ + "PinpointDestination" + ] = serializeAws_restJson1_1PinpointDestination( + input.PinpointDestination, + context + ); + } + if (input.SnsDestination !== undefined) { + bodyParams["SnsDestination"] = serializeAws_restJson1_1SnsDestination( + input.SnsDestination, + context + ); + } + return bodyParams; +}; + +const serializeAws_restJson1_1EventTypes = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_restJson1_1InboxPlacementTrackingOption = ( + input: InboxPlacementTrackingOption, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Global !== undefined) { + bodyParams["Global"] = input.Global; + } + if (input.TrackedIsps !== undefined) { + bodyParams["TrackedIsps"] = serializeAws_restJson1_1IspNameList( + input.TrackedIsps, + context + ); + } + return bodyParams; +}; + +const serializeAws_restJson1_1IspNameList = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_restJson1_1KinesisFirehoseDestination = ( + input: KinesisFirehoseDestination, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DeliveryStreamArn !== undefined) { + bodyParams["DeliveryStreamArn"] = input.DeliveryStreamArn; + } + if (input.IamRoleArn !== undefined) { + bodyParams["IamRoleArn"] = input.IamRoleArn; + } + return bodyParams; +}; + +const serializeAws_restJson1_1Message = ( + input: Message, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Body !== undefined) { + bodyParams["Body"] = serializeAws_restJson1_1Body(input.Body, context); + } + if (input.Subject !== undefined) { + bodyParams["Subject"] = serializeAws_restJson1_1Content( + input.Subject, + context + ); + } + return bodyParams; +}; + +const serializeAws_restJson1_1MessageTag = ( + input: MessageTag, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.Value !== undefined) { + bodyParams["Value"] = input.Value; + } + return bodyParams; +}; + +const serializeAws_restJson1_1MessageTagList = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_restJson1_1MessageTag(entry, context) + ); +}; + +const serializeAws_restJson1_1PinpointDestination = ( + input: PinpointDestination, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ApplicationArn !== undefined) { + bodyParams["ApplicationArn"] = input.ApplicationArn; + } + return bodyParams; +}; + +const serializeAws_restJson1_1RawMessage = ( + input: RawMessage, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Data !== undefined) { + bodyParams["Data"] = context.base64Encoder(input.Data); + } + return bodyParams; +}; + +const serializeAws_restJson1_1ReputationOptions = ( + input: ReputationOptions, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.LastFreshStart !== undefined) { + bodyParams["LastFreshStart"] = Math.round( + input.LastFreshStart.getTime() / 1000 + ); + } + if (input.ReputationMetricsEnabled !== undefined) { + bodyParams["ReputationMetricsEnabled"] = input.ReputationMetricsEnabled; + } + return bodyParams; +}; + +const serializeAws_restJson1_1SendingOptions = ( + input: SendingOptions, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SendingEnabled !== undefined) { + bodyParams["SendingEnabled"] = input.SendingEnabled; + } + return bodyParams; +}; + +const serializeAws_restJson1_1SnsDestination = ( + input: SnsDestination, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.TopicArn !== undefined) { + bodyParams["TopicArn"] = input.TopicArn; + } + return bodyParams; +}; + +const serializeAws_restJson1_1Template = ( + input: Template, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.TemplateArn !== undefined) { + bodyParams["TemplateArn"] = input.TemplateArn; + } + if (input.TemplateData !== undefined) { + bodyParams["TemplateData"] = input.TemplateData; + } + return bodyParams; +}; + +const serializeAws_restJson1_1TrackingOptions = ( + input: TrackingOptions, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.CustomRedirectDomain !== undefined) { + bodyParams["CustomRedirectDomain"] = input.CustomRedirectDomain; + } + return bodyParams; +}; + +const deserializeAws_restJson1_1Tag = ( + output: any, + context: __SerdeContext +): Tag => { + let contents: any = { + __type: "Tag", + Key: undefined, + Value: undefined + }; + if (output.Key !== undefined) { + contents.Key = output.Key; + } + if (output.Value !== undefined) { + contents.Value = output.Value; + } + return contents; +}; + +const deserializeAws_restJson1_1TagList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1Tag(entry, context) + ); +}; + +const deserializeAws_restJson1_1BlacklistEntries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1BlacklistEntry(entry, context) + ); +}; + +const deserializeAws_restJson1_1BlacklistEntry = ( + output: any, + context: __SerdeContext +): BlacklistEntry => { + let contents: any = { + __type: "BlacklistEntry", + Description: undefined, + ListingTime: undefined, + RblName: undefined + }; + if (output.Description !== undefined) { + contents.Description = output.Description; + } + if (output.ListingTime !== undefined) { + contents.ListingTime = new Date( + output.ListingTime % 1 != 0 + ? Math.round(output.ListingTime * 1000) + : output.ListingTime + ); + } + if (output.RblName !== undefined) { + contents.RblName = output.RblName; + } + return contents; +}; + +const deserializeAws_restJson1_1BlacklistReport = ( + output: any, + context: __SerdeContext +): { [key: string]: Array } => { + let mapParams: any = {}; + Object.keys(output).forEach(key => { + mapParams[key] = deserializeAws_restJson1_1BlacklistEntries( + output[key], + context + ); + }); + return mapParams; +}; + +const deserializeAws_restJson1_1CloudWatchDestination = ( + output: any, + context: __SerdeContext +): CloudWatchDestination => { + let contents: any = { + __type: "CloudWatchDestination", + DimensionConfigurations: undefined + }; + if (output.DimensionConfigurations !== undefined) { + contents.DimensionConfigurations = deserializeAws_restJson1_1CloudWatchDimensionConfigurations( + output.DimensionConfigurations, + context + ); + } + return contents; +}; + +const deserializeAws_restJson1_1CloudWatchDimensionConfiguration = ( + output: any, + context: __SerdeContext +): CloudWatchDimensionConfiguration => { + let contents: any = { + __type: "CloudWatchDimensionConfiguration", + DefaultDimensionValue: undefined, + DimensionName: undefined, + DimensionValueSource: undefined + }; + if (output.DefaultDimensionValue !== undefined) { + contents.DefaultDimensionValue = output.DefaultDimensionValue; + } + if (output.DimensionName !== undefined) { + contents.DimensionName = output.DimensionName; + } + if (output.DimensionValueSource !== undefined) { + contents.DimensionValueSource = output.DimensionValueSource; + } + return contents; +}; + +const deserializeAws_restJson1_1CloudWatchDimensionConfigurations = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1CloudWatchDimensionConfiguration(entry, context) + ); +}; + +const deserializeAws_restJson1_1ConfigurationSetNameList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_restJson1_1DailyVolume = ( + output: any, + context: __SerdeContext +): DailyVolume => { + let contents: any = { + __type: "DailyVolume", + DomainIspPlacements: undefined, + StartDate: undefined, + VolumeStatistics: undefined + }; + if (output.DomainIspPlacements !== undefined) { + contents.DomainIspPlacements = deserializeAws_restJson1_1DomainIspPlacements( + output.DomainIspPlacements, + context + ); + } + if (output.StartDate !== undefined) { + contents.StartDate = new Date( + output.StartDate % 1 != 0 + ? Math.round(output.StartDate * 1000) + : output.StartDate + ); + } + if (output.VolumeStatistics !== undefined) { + contents.VolumeStatistics = deserializeAws_restJson1_1VolumeStatistics( + output.VolumeStatistics, + context + ); + } + return contents; +}; + +const deserializeAws_restJson1_1DailyVolumes = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DailyVolume(entry, context) + ); +}; + +const deserializeAws_restJson1_1DedicatedIp = ( + output: any, + context: __SerdeContext +): DedicatedIp => { + let contents: any = { + __type: "DedicatedIp", + Ip: undefined, + PoolName: undefined, + WarmupPercentage: undefined, + WarmupStatus: undefined + }; + if (output.Ip !== undefined) { + contents.Ip = output.Ip; + } + if (output.PoolName !== undefined) { + contents.PoolName = output.PoolName; + } + if (output.WarmupPercentage !== undefined) { + contents.WarmupPercentage = output.WarmupPercentage; + } + if (output.WarmupStatus !== undefined) { + contents.WarmupStatus = output.WarmupStatus; + } + return contents; +}; + +const deserializeAws_restJson1_1DedicatedIpList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DedicatedIp(entry, context) + ); +}; + +const deserializeAws_restJson1_1DeliverabilityTestReport = ( + output: any, + context: __SerdeContext +): DeliverabilityTestReport => { + let contents: any = { + __type: "DeliverabilityTestReport", + CreateDate: undefined, + DeliverabilityTestStatus: undefined, + FromEmailAddress: undefined, + ReportId: undefined, + ReportName: undefined, + Subject: undefined + }; + if (output.CreateDate !== undefined) { + contents.CreateDate = new Date( + output.CreateDate % 1 != 0 + ? Math.round(output.CreateDate * 1000) + : output.CreateDate + ); + } + if (output.DeliverabilityTestStatus !== undefined) { + contents.DeliverabilityTestStatus = output.DeliverabilityTestStatus; + } + if (output.FromEmailAddress !== undefined) { + contents.FromEmailAddress = output.FromEmailAddress; + } + if (output.ReportId !== undefined) { + contents.ReportId = output.ReportId; + } + if (output.ReportName !== undefined) { + contents.ReportName = output.ReportName; + } + if (output.Subject !== undefined) { + contents.Subject = output.Subject; + } + return contents; +}; + +const deserializeAws_restJson1_1DeliverabilityTestReports = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DeliverabilityTestReport(entry, context) + ); +}; + +const deserializeAws_restJson1_1DeliveryOptions = ( + output: any, + context: __SerdeContext +): DeliveryOptions => { + let contents: any = { + __type: "DeliveryOptions", + SendingPoolName: undefined, + TlsPolicy: undefined + }; + if (output.SendingPoolName !== undefined) { + contents.SendingPoolName = output.SendingPoolName; + } + if (output.TlsPolicy !== undefined) { + contents.TlsPolicy = output.TlsPolicy; + } + return contents; +}; + +const deserializeAws_restJson1_1DkimAttributes = ( + output: any, + context: __SerdeContext +): DkimAttributes => { + let contents: any = { + __type: "DkimAttributes", + SigningEnabled: undefined, + Status: undefined, + Tokens: undefined + }; + if (output.SigningEnabled !== undefined) { + contents.SigningEnabled = output.SigningEnabled; + } + if (output.Status !== undefined) { + contents.Status = output.Status; + } + if (output.Tokens !== undefined) { + contents.Tokens = deserializeAws_restJson1_1DnsTokenList( + output.Tokens, + context + ); + } + return contents; +}; + +const deserializeAws_restJson1_1DnsTokenList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_restJson1_1DomainDeliverabilityCampaign = ( + output: any, + context: __SerdeContext +): DomainDeliverabilityCampaign => { + let contents: any = { + __type: "DomainDeliverabilityCampaign", + CampaignId: undefined, + DeleteRate: undefined, + Esps: undefined, + FirstSeenDateTime: undefined, + FromAddress: undefined, + ImageUrl: undefined, + InboxCount: undefined, + LastSeenDateTime: undefined, + ProjectedVolume: undefined, + ReadDeleteRate: undefined, + ReadRate: undefined, + SendingIps: undefined, + SpamCount: undefined, + Subject: undefined + }; + if (output.CampaignId !== undefined) { + contents.CampaignId = output.CampaignId; + } + if (output.DeleteRate !== undefined) { + contents.DeleteRate = output.DeleteRate; + } + if (output.Esps !== undefined) { + contents.Esps = deserializeAws_restJson1_1Esps(output.Esps, context); + } + if (output.FirstSeenDateTime !== undefined) { + contents.FirstSeenDateTime = new Date( + output.FirstSeenDateTime % 1 != 0 + ? Math.round(output.FirstSeenDateTime * 1000) + : output.FirstSeenDateTime + ); + } + if (output.FromAddress !== undefined) { + contents.FromAddress = output.FromAddress; + } + if (output.ImageUrl !== undefined) { + contents.ImageUrl = output.ImageUrl; + } + if (output.InboxCount !== undefined) { + contents.InboxCount = output.InboxCount; + } + if (output.LastSeenDateTime !== undefined) { + contents.LastSeenDateTime = new Date( + output.LastSeenDateTime % 1 != 0 + ? Math.round(output.LastSeenDateTime * 1000) + : output.LastSeenDateTime + ); + } + if (output.ProjectedVolume !== undefined) { + contents.ProjectedVolume = output.ProjectedVolume; + } + if (output.ReadDeleteRate !== undefined) { + contents.ReadDeleteRate = output.ReadDeleteRate; + } + if (output.ReadRate !== undefined) { + contents.ReadRate = output.ReadRate; + } + if (output.SendingIps !== undefined) { + contents.SendingIps = deserializeAws_restJson1_1IpList( + output.SendingIps, + context + ); + } + if (output.SpamCount !== undefined) { + contents.SpamCount = output.SpamCount; + } + if (output.Subject !== undefined) { + contents.Subject = output.Subject; + } + return contents; +}; + +const deserializeAws_restJson1_1DomainDeliverabilityCampaignList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DomainDeliverabilityCampaign(entry, context) + ); +}; + +const deserializeAws_restJson1_1DomainDeliverabilityTrackingOption = ( + output: any, + context: __SerdeContext +): DomainDeliverabilityTrackingOption => { + let contents: any = { + __type: "DomainDeliverabilityTrackingOption", + Domain: undefined, + InboxPlacementTrackingOption: undefined, + SubscriptionStartDate: undefined + }; + if (output.Domain !== undefined) { + contents.Domain = output.Domain; + } + if (output.InboxPlacementTrackingOption !== undefined) { + contents.InboxPlacementTrackingOption = deserializeAws_restJson1_1InboxPlacementTrackingOption( + output.InboxPlacementTrackingOption, + context + ); + } + if (output.SubscriptionStartDate !== undefined) { + contents.SubscriptionStartDate = new Date( + output.SubscriptionStartDate % 1 != 0 + ? Math.round(output.SubscriptionStartDate * 1000) + : output.SubscriptionStartDate + ); + } + return contents; +}; + +const deserializeAws_restJson1_1DomainDeliverabilityTrackingOptions = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DomainDeliverabilityTrackingOption(entry, context) + ); +}; + +const deserializeAws_restJson1_1DomainIspPlacement = ( + output: any, + context: __SerdeContext +): DomainIspPlacement => { + let contents: any = { + __type: "DomainIspPlacement", + InboxPercentage: undefined, + InboxRawCount: undefined, + IspName: undefined, + SpamPercentage: undefined, + SpamRawCount: undefined + }; + if (output.InboxPercentage !== undefined) { + contents.InboxPercentage = output.InboxPercentage; + } + if (output.InboxRawCount !== undefined) { + contents.InboxRawCount = output.InboxRawCount; + } + if (output.IspName !== undefined) { + contents.IspName = output.IspName; + } + if (output.SpamPercentage !== undefined) { + contents.SpamPercentage = output.SpamPercentage; + } + if (output.SpamRawCount !== undefined) { + contents.SpamRawCount = output.SpamRawCount; + } + return contents; +}; + +const deserializeAws_restJson1_1DomainIspPlacements = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1DomainIspPlacement(entry, context) + ); +}; + +const deserializeAws_restJson1_1Esps = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_restJson1_1EventDestination = ( + output: any, + context: __SerdeContext +): EventDestination => { + let contents: any = { + __type: "EventDestination", + CloudWatchDestination: undefined, + Enabled: undefined, + KinesisFirehoseDestination: undefined, + MatchingEventTypes: undefined, + Name: undefined, + PinpointDestination: undefined, + SnsDestination: undefined + }; + if (output.CloudWatchDestination !== undefined) { + contents.CloudWatchDestination = deserializeAws_restJson1_1CloudWatchDestination( + output.CloudWatchDestination, + context + ); + } + if (output.Enabled !== undefined) { + contents.Enabled = output.Enabled; + } + if (output.KinesisFirehoseDestination !== undefined) { + contents.KinesisFirehoseDestination = deserializeAws_restJson1_1KinesisFirehoseDestination( + output.KinesisFirehoseDestination, + context + ); + } + if (output.MatchingEventTypes !== undefined) { + contents.MatchingEventTypes = deserializeAws_restJson1_1EventTypes( + output.MatchingEventTypes, + context + ); + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.PinpointDestination !== undefined) { + contents.PinpointDestination = deserializeAws_restJson1_1PinpointDestination( + output.PinpointDestination, + context + ); + } + if (output.SnsDestination !== undefined) { + contents.SnsDestination = deserializeAws_restJson1_1SnsDestination( + output.SnsDestination, + context + ); + } + return contents; +}; + +const deserializeAws_restJson1_1EventDestinations = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1EventDestination(entry, context) + ); +}; + +const deserializeAws_restJson1_1EventTypes = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_restJson1_1IdentityInfo = ( + output: any, + context: __SerdeContext +): IdentityInfo => { + let contents: any = { + __type: "IdentityInfo", + IdentityName: undefined, + IdentityType: undefined, + SendingEnabled: undefined + }; + if (output.IdentityName !== undefined) { + contents.IdentityName = output.IdentityName; + } + if (output.IdentityType !== undefined) { + contents.IdentityType = output.IdentityType; + } + if (output.SendingEnabled !== undefined) { + contents.SendingEnabled = output.SendingEnabled; + } + return contents; +}; + +const deserializeAws_restJson1_1IdentityInfoList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1IdentityInfo(entry, context) + ); +}; + +const deserializeAws_restJson1_1InboxPlacementTrackingOption = ( + output: any, + context: __SerdeContext +): InboxPlacementTrackingOption => { + let contents: any = { + __type: "InboxPlacementTrackingOption", + Global: undefined, + TrackedIsps: undefined + }; + if (output.Global !== undefined) { + contents.Global = output.Global; + } + if (output.TrackedIsps !== undefined) { + contents.TrackedIsps = deserializeAws_restJson1_1IspNameList( + output.TrackedIsps, + context + ); + } + return contents; +}; + +const deserializeAws_restJson1_1IpList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_restJson1_1IspNameList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_restJson1_1IspPlacement = ( + output: any, + context: __SerdeContext +): IspPlacement => { + let contents: any = { + __type: "IspPlacement", + IspName: undefined, + PlacementStatistics: undefined + }; + if (output.IspName !== undefined) { + contents.IspName = output.IspName; + } + if (output.PlacementStatistics !== undefined) { + contents.PlacementStatistics = deserializeAws_restJson1_1PlacementStatistics( + output.PlacementStatistics, + context + ); + } + return contents; +}; + +const deserializeAws_restJson1_1IspPlacements = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_restJson1_1IspPlacement(entry, context) + ); +}; + +const deserializeAws_restJson1_1KinesisFirehoseDestination = ( + output: any, + context: __SerdeContext +): KinesisFirehoseDestination => { + let contents: any = { + __type: "KinesisFirehoseDestination", + DeliveryStreamArn: undefined, + IamRoleArn: undefined + }; + if (output.DeliveryStreamArn !== undefined) { + contents.DeliveryStreamArn = output.DeliveryStreamArn; + } + if (output.IamRoleArn !== undefined) { + contents.IamRoleArn = output.IamRoleArn; + } + return contents; +}; + +const deserializeAws_restJson1_1ListOfDedicatedIpPools = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_restJson1_1MailFromAttributes = ( + output: any, + context: __SerdeContext +): MailFromAttributes => { + let contents: any = { + __type: "MailFromAttributes", + BehaviorOnMxFailure: undefined, + MailFromDomain: undefined, + MailFromDomainStatus: undefined + }; + if (output.BehaviorOnMxFailure !== undefined) { + contents.BehaviorOnMxFailure = output.BehaviorOnMxFailure; + } + if (output.MailFromDomain !== undefined) { + contents.MailFromDomain = output.MailFromDomain; + } + if (output.MailFromDomainStatus !== undefined) { + contents.MailFromDomainStatus = output.MailFromDomainStatus; + } + return contents; +}; + +const deserializeAws_restJson1_1OverallVolume = ( + output: any, + context: __SerdeContext +): OverallVolume => { + let contents: any = { + __type: "OverallVolume", + DomainIspPlacements: undefined, + ReadRatePercent: undefined, + VolumeStatistics: undefined + }; + if (output.DomainIspPlacements !== undefined) { + contents.DomainIspPlacements = deserializeAws_restJson1_1DomainIspPlacements( + output.DomainIspPlacements, + context + ); + } + if (output.ReadRatePercent !== undefined) { + contents.ReadRatePercent = output.ReadRatePercent; + } + if (output.VolumeStatistics !== undefined) { + contents.VolumeStatistics = deserializeAws_restJson1_1VolumeStatistics( + output.VolumeStatistics, + context + ); + } + return contents; +}; + +const deserializeAws_restJson1_1PinpointDestination = ( + output: any, + context: __SerdeContext +): PinpointDestination => { + let contents: any = { + __type: "PinpointDestination", + ApplicationArn: undefined + }; + if (output.ApplicationArn !== undefined) { + contents.ApplicationArn = output.ApplicationArn; + } + return contents; +}; + +const deserializeAws_restJson1_1PlacementStatistics = ( + output: any, + context: __SerdeContext +): PlacementStatistics => { + let contents: any = { + __type: "PlacementStatistics", + DkimPercentage: undefined, + InboxPercentage: undefined, + MissingPercentage: undefined, + SpamPercentage: undefined, + SpfPercentage: undefined + }; + if (output.DkimPercentage !== undefined) { + contents.DkimPercentage = output.DkimPercentage; + } + if (output.InboxPercentage !== undefined) { + contents.InboxPercentage = output.InboxPercentage; + } + if (output.MissingPercentage !== undefined) { + contents.MissingPercentage = output.MissingPercentage; + } + if (output.SpamPercentage !== undefined) { + contents.SpamPercentage = output.SpamPercentage; + } + if (output.SpfPercentage !== undefined) { + contents.SpfPercentage = output.SpfPercentage; + } + return contents; +}; + +const deserializeAws_restJson1_1ReputationOptions = ( + output: any, + context: __SerdeContext +): ReputationOptions => { + let contents: any = { + __type: "ReputationOptions", + LastFreshStart: undefined, + ReputationMetricsEnabled: undefined + }; + if (output.LastFreshStart !== undefined) { + contents.LastFreshStart = new Date( + output.LastFreshStart % 1 != 0 + ? Math.round(output.LastFreshStart * 1000) + : output.LastFreshStart + ); + } + if (output.ReputationMetricsEnabled !== undefined) { + contents.ReputationMetricsEnabled = output.ReputationMetricsEnabled; + } + return contents; +}; + +const deserializeAws_restJson1_1SendQuota = ( + output: any, + context: __SerdeContext +): SendQuota => { + let contents: any = { + __type: "SendQuota", + Max24HourSend: undefined, + MaxSendRate: undefined, + SentLast24Hours: undefined + }; + if (output.Max24HourSend !== undefined) { + contents.Max24HourSend = output.Max24HourSend; + } + if (output.MaxSendRate !== undefined) { + contents.MaxSendRate = output.MaxSendRate; + } + if (output.SentLast24Hours !== undefined) { + contents.SentLast24Hours = output.SentLast24Hours; + } + return contents; +}; + +const deserializeAws_restJson1_1SendingOptions = ( + output: any, + context: __SerdeContext +): SendingOptions => { + let contents: any = { + __type: "SendingOptions", + SendingEnabled: undefined + }; + if (output.SendingEnabled !== undefined) { + contents.SendingEnabled = output.SendingEnabled; + } + return contents; +}; + +const deserializeAws_restJson1_1SnsDestination = ( + output: any, + context: __SerdeContext +): SnsDestination => { + let contents: any = { + __type: "SnsDestination", + TopicArn: undefined + }; + if (output.TopicArn !== undefined) { + contents.TopicArn = output.TopicArn; + } + return contents; +}; + +const deserializeAws_restJson1_1TrackingOptions = ( + output: any, + context: __SerdeContext +): TrackingOptions => { + let contents: any = { + __type: "TrackingOptions", + CustomRedirectDomain: undefined + }; + if (output.CustomRedirectDomain !== undefined) { + contents.CustomRedirectDomain = output.CustomRedirectDomain; + } + return contents; +}; + +const deserializeAws_restJson1_1VolumeStatistics = ( + output: any, + context: __SerdeContext +): VolumeStatistics => { + let contents: any = { + __type: "VolumeStatistics", + InboxRawCount: undefined, + ProjectedInbox: undefined, + ProjectedSpam: undefined, + SpamRawCount: undefined + }; + if (output.InboxRawCount !== undefined) { + contents.InboxRawCount = output.InboxRawCount; + } + if (output.ProjectedInbox !== undefined) { + contents.ProjectedInbox = output.ProjectedInbox; + } + if (output.ProjectedSpam !== undefined) { + contents.ProjectedSpam = output.ProjectedSpam; + } + if (output.SpamRawCount !== undefined) { + contents.SpamRawCount = output.SpamRawCount; + } + return contents; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + httpHeaders: output.headers, + requestId: output.headers["x-amzn-requestid"] +}); + +const parseBody = (streamBody: any, context: __SerdeContext): any => { + return context.streamCollector(streamBody).then((body: any) => { + const encoded = context.utf8Encoder(body); + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); +}; diff --git a/clients/client-pinpoint-email/runtimeConfig.browser.ts b/clients/client-pinpoint-email/runtimeConfig.browser.ts new file mode 100644 index 000000000000..43bea9004620 --- /dev/null +++ b/clients/client-pinpoint-email/runtimeConfig.browser.ts @@ -0,0 +1,30 @@ +import { invalidFunction } from "@aws-sdk/invalid-dependency"; +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler"; +import { parseUrl } from "@aws-sdk/url-parser-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { streamCollector } from "@aws-sdk/stream-collector-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { name, version } from "./package.json"; +import { ClientDefaults } from "./PinpointEmailClient"; +import { ClientSharedValues } from "./runtimeConfig.shared"; + +export const ClientDefaultValues: Required = { + ...ClientSharedValues, + requestHandler: new FetchHttpHandler(), + sha256: Sha256, + urlParser: parseUrl, + bodyLengthChecker: calculateBodyLength, + streamCollector, + base64Decoder: fromBase64, + base64Encoder: toBase64, + utf8Decoder: fromUtf8, + utf8Encoder: toUtf8, + defaultUserAgent: defaultUserAgent(name, version), + runtime: "browser", + signingName: "ses", + credentialDefaultProvider: invalidFunction("Credential is missing") as any, + regionDefaultProvider: invalidFunction("Region is missing") as any +}; diff --git a/clients/client-pinpoint-email/runtimeConfig.shared.ts b/clients/client-pinpoint-email/runtimeConfig.shared.ts new file mode 100644 index 000000000000..da5f00e4b9c7 --- /dev/null +++ b/clients/client-pinpoint-email/runtimeConfig.shared.ts @@ -0,0 +1,7 @@ +import { defaultRegionInfoProvider } from "./endpoints"; + +export const ClientSharedValues = { + apiVersion: "2018-07-26", + signingName: "ses", + regionInfoProvider: defaultRegionInfoProvider +}; diff --git a/clients/client-pinpoint-email/runtimeConfig.ts b/clients/client-pinpoint-email/runtimeConfig.ts new file mode 100644 index 000000000000..ff8b9d46a0cd --- /dev/null +++ b/clients/client-pinpoint-email/runtimeConfig.ts @@ -0,0 +1,31 @@ +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider"; +import { Hash } from "@aws-sdk/hash-node"; +import { NodeHttpHandler } from "@aws-sdk/node-http-handler"; +import { parseUrl } from "@aws-sdk/url-parser-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { streamCollector } from "@aws-sdk/stream-collector-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { name, version } from "./package.json"; +import { ClientDefaults } from "./PinpointEmailClient"; +import { ClientSharedValues } from "./runtimeConfig.shared"; + +export const ClientDefaultValues: Required = { + ...ClientSharedValues, + requestHandler: new NodeHttpHandler(), + sha256: Hash.bind(null, "sha256"), + urlParser: parseUrl, + bodyLengthChecker: calculateBodyLength, + streamCollector, + base64Decoder: fromBase64, + base64Encoder: toBase64, + utf8Decoder: fromUtf8, + utf8Encoder: toUtf8, + defaultUserAgent: defaultUserAgent(name, version), + runtime: "node", + signingName: "ses", + credentialDefaultProvider, + regionDefaultProvider +}; diff --git a/clients/client-pinpoint-email/tsconfig.es.json b/clients/client-pinpoint-email/tsconfig.es.json new file mode 100644 index 000000000000..9add6a7c2445 --- /dev/null +++ b/clients/client-pinpoint-email/tsconfig.es.json @@ -0,0 +1,19 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "declaration": false, + "declarationDir": null, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "outDir": "dist/es" + } +} diff --git a/clients/client-pinpoint-email/tsconfig.json b/clients/client-pinpoint-email/tsconfig.json new file mode 100644 index 000000000000..ca2fadc08187 --- /dev/null +++ b/clients/client-pinpoint-email/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "target": "es2017", + "module": "commonjs", + "declaration": true, + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "declarationDir": "./types", + "outDir": "dist/cjs" + }, + "typedocOptions": { + "exclude": "**/node_modules/**", + "excludedNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "mode": "file", + "out": "./docs", + "plugin": "@aws-sdk/client-documentation-generator" + } +}