1 /*
2  * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5  * the License. A copy of the License is located at
6  * 
7  * http://aws.amazon.com/apache2.0
8  * 
9  * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10  * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11  * and limitations under the License.
12  */

13 package com.amazonaws.services.simpleemail;
14
15 import org.w3c.dom.*;
16
17 import java.net.*;
18 import java.util.*;
19
20 import javax.annotation.Generated;
21
22 import org.apache.commons.logging.*;
23
24 import com.amazonaws.*;
25 import com.amazonaws.annotation.SdkInternalApi;
26 import com.amazonaws.auth.*;
27
28 import com.amazonaws.handlers.*;
29 import com.amazonaws.http.*;
30 import com.amazonaws.internal.*;
31 import com.amazonaws.internal.auth.*;
32 import com.amazonaws.metrics.*;
33 import com.amazonaws.regions.*;
34 import com.amazonaws.transform.*;
35 import com.amazonaws.util.*;
36 import com.amazonaws.protocol.json.*;
37 import com.amazonaws.util.AWSRequestMetrics.Field;
38 import com.amazonaws.annotation.ThreadSafe;
39 import com.amazonaws.client.AwsSyncClientParams;
40 import com.amazonaws.client.builder.AdvancedConfig;
41
42 import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClientBuilder;
43 import com.amazonaws.services.simpleemail.waiters.AmazonSimpleEmailServiceWaiters;
44
45 import com.amazonaws.AmazonServiceException;
46
47 import com.amazonaws.services.simpleemail.model.*;
48 import com.amazonaws.services.simpleemail.model.transform.*;
49
50 /**
51  * Client for accessing Amazon SES. All service calls made using this client are blocking, and will not return until the
52  * service call completes.
53  * <p>
54  * <fullname>Amazon Simple Email Service</fullname>
55  * <p>
56  * This document contains reference information for the <a href="https://aws.amazon.com/ses/">Amazon Simple Email
57  * Service</a> (Amazon SES) API, version 2010-12-01. This document is best used in conjunction with the <a
58  * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html">Amazon SES Developer Guide</a>.
59  * </p>
60  * <note>
61  * <p>
62  * For a list of Amazon SES endpoints to use in service requests, see <a
63  * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/regions.html">Regions and Amazon SES</a> in the <a
64  * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html">Amazon SES Developer Guide</a>.
65  * </p>
66  * </note>
67  */

68 @ThreadSafe
69 @Generated("com.amazonaws:aws-java-sdk-code-generator")
70 public class AmazonSimpleEmailServiceClient extends AmazonWebServiceClient implements AmazonSimpleEmailService {
71
72     /** Provider for AWS credentials. */
73     private final AWSCredentialsProvider awsCredentialsProvider;
74
75     private static final Log log = LogFactory.getLog(AmazonSimpleEmailService.class);
76
77     /** Default signing name for the service. */
78     private static final String DEFAULT_SIGNING_NAME = "ses";
79
80     private volatile AmazonSimpleEmailServiceWaiters waiters;
81
82     /** Client configuration factory providing ClientConfigurations tailored to this client */
83     protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory();
84
85     private final AdvancedConfig advancedConfig;
86
87     /**
88      * List of exception unmarshallers for all modeled exceptions
89      */

90     protected final List<Unmarshaller<AmazonServiceException, Node>> exceptionUnmarshallers = new ArrayList<Unmarshaller<AmazonServiceException, Node>>();
91
92     /**
93      * Constructs a new client to invoke service methods on Amazon SES. A credentials provider chain will be used that
94      * searches for credentials in this order:
95      * <ul>
96      * <li>Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY</li>
97      * <li>Java System Properties - aws.accessKeyId and aws.secretKey</li>
98      * <li>Instance profile credentials delivered through the Amazon EC2 metadata service</li>
99      * </ul>
100      *
101      * <p>
102      * All service calls made using this new client object are blocking, and will not return until the service call
103      * completes.
104      *
105      * @see DefaultAWSCredentialsProviderChain
106      * @deprecated use {@link AmazonSimpleEmailServiceClientBuilder#defaultClient()}
107      */

108     @Deprecated
109     public AmazonSimpleEmailServiceClient() {
110         this(DefaultAWSCredentialsProviderChain.getInstance(), configFactory.getConfig());
111     }
112
113     /**
114      * Constructs a new client to invoke service methods on Amazon SES. A credentials provider chain will be used that
115      * searches for credentials in this order:
116      * <ul>
117      * <li>Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY</li>
118      * <li>Java System Properties - aws.accessKeyId and aws.secretKey</li>
119      * <li>Instance profile credentials delivered through the Amazon EC2 metadata service</li>
120      * </ul>
121      *
122      * <p>
123      * All service calls made using this new client object are blocking, and will not return until the service call
124      * completes.
125      *
126      * @param clientConfiguration
127      *        The client configuration options controlling how this client connects to Amazon SES (ex: proxy settings,
128      *        retry counts, etc.).
129      *
130      * @see DefaultAWSCredentialsProviderChain
131      * @deprecated use {@link AmazonSimpleEmailServiceClientBuilder#withClientConfiguration(ClientConfiguration)}
132      */

133     @Deprecated
134     public AmazonSimpleEmailServiceClient(ClientConfiguration clientConfiguration) {
135         this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration);
136     }
137
138     /**
139      * Constructs a new client to invoke service methods on Amazon SES using the specified AWS account credentials.
140      *
141      * <p>
142      * All service calls made using this new client object are blocking, and will not return until the service call
143      * completes.
144      *
145      * @param awsCredentials
146      *        The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
147      * @deprecated use {@link AmazonSimpleEmailServiceClientBuilder#withCredentials(AWSCredentialsProvider)} for
148      *             example:
149      *             {@code AmazonSimpleEmailServiceClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();}
150      */

151     @Deprecated
152     public AmazonSimpleEmailServiceClient(AWSCredentials awsCredentials) {
153         this(awsCredentials, configFactory.getConfig());
154     }
155
156     /**
157      * Constructs a new client to invoke service methods on Amazon SES using the specified AWS account credentials and
158      * client configuration options.
159      *
160      * <p>
161      * All service calls made using this new client object are blocking, and will not return until the service call
162      * completes.
163      *
164      * @param awsCredentials
165      *        The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
166      * @param clientConfiguration
167      *        The client configuration options controlling how this client connects to Amazon SES (ex: proxy settings,
168      *        retry counts, etc.).
169      * @deprecated use {@link AmazonSimpleEmailServiceClientBuilder#withCredentials(AWSCredentialsProvider)} and
170      *             {@link AmazonSimpleEmailServiceClientBuilder#withClientConfiguration(ClientConfiguration)}
171      */

172     @Deprecated
173     public AmazonSimpleEmailServiceClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) {
174         super(clientConfiguration);
175         this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials);
176         this.advancedConfig = AdvancedConfig.EMPTY;
177         init();
178     }
179
180     /**
181      * Constructs a new client to invoke service methods on Amazon SES using the specified AWS account credentials
182      * provider.
183      *
184      * <p>
185      * All service calls made using this new client object are blocking, and will not return until the service call
186      * completes.
187      *
188      * @param awsCredentialsProvider
189      *        The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
190      * @deprecated use {@link AmazonSimpleEmailServiceClientBuilder#withCredentials(AWSCredentialsProvider)}
191      */

192     @Deprecated
193     public AmazonSimpleEmailServiceClient(AWSCredentialsProvider awsCredentialsProvider) {
194         this(awsCredentialsProvider, configFactory.getConfig());
195     }
196
197     /**
198      * Constructs a new client to invoke service methods on Amazon SES using the specified AWS account credentials
199      * provider and client configuration options.
200      *
201      * <p>
202      * All service calls made using this new client object are blocking, and will not return until the service call
203      * completes.
204      *
205      * @param awsCredentialsProvider
206      *        The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
207      * @param clientConfiguration
208      *        The client configuration options controlling how this client connects to Amazon SES (ex: proxy settings,
209      *        retry counts, etc.).
210      * @deprecated use {@link AmazonSimpleEmailServiceClientBuilder#withCredentials(AWSCredentialsProvider)} and
211      *             {@link AmazonSimpleEmailServiceClientBuilder#withClientConfiguration(ClientConfiguration)}
212      */

213     @Deprecated
214     public AmazonSimpleEmailServiceClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) {
215         this(awsCredentialsProvider, clientConfiguration, null);
216     }
217
218     /**
219      * Constructs a new client to invoke service methods on Amazon SES using the specified AWS account credentials
220      * provider, client configuration options, and request metric collector.
221      *
222      * <p>
223      * All service calls made using this new client object are blocking, and will not return until the service call
224      * completes.
225      *
226      * @param awsCredentialsProvider
227      *        The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
228      * @param clientConfiguration
229      *        The client configuration options controlling how this client connects to Amazon SES (ex: proxy settings,
230      *        retry counts, etc.).
231      * @param requestMetricCollector
232      *        optional request metric collector
233      * @deprecated use {@link AmazonSimpleEmailServiceClientBuilder#withCredentials(AWSCredentialsProvider)} and
234      *             {@link AmazonSimpleEmailServiceClientBuilder#withClientConfiguration(ClientConfiguration)} and
235      *             {@link AmazonSimpleEmailServiceClientBuilder#withMetricsCollector(RequestMetricCollector)}
236      */

237     @Deprecated
238     public AmazonSimpleEmailServiceClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration,
239             RequestMetricCollector requestMetricCollector) {
240         super(clientConfiguration, requestMetricCollector);
241         this.awsCredentialsProvider = awsCredentialsProvider;
242         this.advancedConfig = AdvancedConfig.EMPTY;
243         init();
244     }
245
246     public static AmazonSimpleEmailServiceClientBuilder builder() {
247         return AmazonSimpleEmailServiceClientBuilder.standard();
248     }
249
250     /**
251      * Constructs a new client to invoke service methods on Amazon SES using the specified parameters.
252      *
253      * <p>
254      * All service calls made using this new client object are blocking, and will not return until the service call
255      * completes.
256      *
257      * @param clientParams
258      *        Object providing client parameters.
259      */

260     AmazonSimpleEmailServiceClient(AwsSyncClientParams clientParams) {
261         this(clientParams, false);
262     }
263
264     /**
265      * Constructs a new client to invoke service methods on Amazon SES using the specified parameters.
266      *
267      * <p>
268      * All service calls made using this new client object are blocking, and will not return until the service call
269      * completes.
270      *
271      * @param clientParams
272      *        Object providing client parameters.
273      */

274     AmazonSimpleEmailServiceClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {
275         super(clientParams);
276         this.awsCredentialsProvider = clientParams.getCredentialsProvider();
277         this.advancedConfig = clientParams.getAdvancedConfig();
278         init();
279     }
280
281     private void init() {
282         exceptionUnmarshallers.add(new InvalidFirehoseDestinationExceptionUnmarshaller());
283         exceptionUnmarshallers.add(new InvalidS3ConfigurationExceptionUnmarshaller());
284         exceptionUnmarshallers.add(new InvalidDeliveryOptionsExceptionUnmarshaller());
285         exceptionUnmarshallers.add(new InvalidSNSDestinationExceptionUnmarshaller());
286         exceptionUnmarshallers.add(new InvalidRenderingParameterExceptionUnmarshaller());
287         exceptionUnmarshallers.add(new MessageRejectedExceptionUnmarshaller());
288         exceptionUnmarshallers.add(new InvalidCloudWatchDestinationExceptionUnmarshaller());
289         exceptionUnmarshallers.add(new AccountSendingPausedExceptionUnmarshaller());
290         exceptionUnmarshallers.add(new RuleSetDoesNotExistExceptionUnmarshaller());
291         exceptionUnmarshallers.add(new InvalidSnsTopicExceptionUnmarshaller());
292         exceptionUnmarshallers.add(new LimitExceededExceptionUnmarshaller());
293         exceptionUnmarshallers.add(new ConfigurationSetSendingPausedExceptionUnmarshaller());
294         exceptionUnmarshallers.add(new EventDestinationDoesNotExistExceptionUnmarshaller());
295         exceptionUnmarshallers.add(new InvalidLambdaFunctionExceptionUnmarshaller());
296         exceptionUnmarshallers.add(new TemplateDoesNotExistExceptionUnmarshaller());
297         exceptionUnmarshallers.add(new MissingRenderingAttributeExceptionUnmarshaller());
298         exceptionUnmarshallers.add(new AlreadyExistsExceptionUnmarshaller());
299         exceptionUnmarshallers.add(new CannotDeleteExceptionUnmarshaller());
300         exceptionUnmarshallers.add(new TrackingOptionsAlreadyExistsExceptionUnmarshaller());
301         exceptionUnmarshallers.add(new ConfigurationSetAlreadyExistsExceptionUnmarshaller());
302         exceptionUnmarshallers.add(new CustomVerificationEmailInvalidContentExceptionUnmarshaller());
303         exceptionUnmarshallers.add(new InvalidTemplateExceptionUnmarshaller());
304         exceptionUnmarshallers.add(new MailFromDomainNotVerifiedExceptionUnmarshaller());
305         exceptionUnmarshallers.add(new ConfigurationSetDoesNotExistExceptionUnmarshaller());
306         exceptionUnmarshallers.add(new ProductionAccessNotGrantedExceptionUnmarshaller());
307         exceptionUnmarshallers.add(new InvalidTrackingOptionsExceptionUnmarshaller());
308         exceptionUnmarshallers.add(new TrackingOptionsDoesNotExistExceptionUnmarshaller());
309         exceptionUnmarshallers.add(new EventDestinationAlreadyExistsExceptionUnmarshaller());
310         exceptionUnmarshallers.add(new FromEmailAddressNotVerifiedExceptionUnmarshaller());
311         exceptionUnmarshallers.add(new RuleDoesNotExistExceptionUnmarshaller());
312         exceptionUnmarshallers.add(new InvalidConfigurationSetExceptionUnmarshaller());
313         exceptionUnmarshallers.add(new CustomVerificationEmailTemplateDoesNotExistExceptionUnmarshaller());
314         exceptionUnmarshallers.add(new InvalidPolicyExceptionUnmarshaller());
315         exceptionUnmarshallers.add(new CustomVerificationEmailTemplateAlreadyExistsExceptionUnmarshaller());
316         exceptionUnmarshallers.add(new StandardErrorUnmarshaller(com.amazonaws.services.simpleemail.model.AmazonSimpleEmailServiceException.class));
317
318         setServiceNameIntern(DEFAULT_SIGNING_NAME);
319         setEndpointPrefix(ENDPOINT_PREFIX);
320         // calling this.setEndPoint(...) will also modify the signer accordingly
321         this.setEndpoint("https://email.us-east-1.amazonaws.com");
322         HandlerChainFactory chainFactory = new HandlerChainFactory();
323         requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/simpleemail/request.handlers"));
324         requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/simpleemail/request.handler2s"));
325         requestHandler2s.addAll(chainFactory.getGlobalHandlers());
326     }
327
328     /**
329      * <p>
330      * Creates a receipt rule set by cloning an existing one. All receipt rules and configurations are copied to the new
331      * receipt rule set and are completely independent of the source rule set.
332      * </p>
333      * <p>
334      * For information about setting up rule sets, see the <a
335      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html">Amazon SES
336      * Developer Guide</a>.
337      * </p>
338      * <p>
339      * You can execute this operation no more than once per second.
340      * </p>
341      * 
342      * @param cloneReceiptRuleSetRequest
343      *        Represents a request to create a receipt rule set by cloning an existing one. You use receipt rule sets to
344      *        receive email with Amazon SES. For more information, see the <a
345      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
346      *        Developer Guide</a>.
347      * @return Result of the CloneReceiptRuleSet operation returned by the service.
348      * @throws RuleSetDoesNotExistException
349      *         Indicates that the provided receipt rule set does not exist.
350      * @throws AlreadyExistsException
351      *         Indicates that a resource could not be created because of a naming conflict.
352      * @throws LimitExceededException
353      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
354      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
355      *         Developer Guide</a>.
356      * @sample AmazonSimpleEmailService.CloneReceiptRuleSet
357      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CloneReceiptRuleSet" target="_top">AWS API
358      *      Documentation</a>
359      */

360     @Override
361     public CloneReceiptRuleSetResult cloneReceiptRuleSet(CloneReceiptRuleSetRequest request) {
362         request = beforeClientExecution(request);
363         return executeCloneReceiptRuleSet(request);
364     }
365
366     @SdkInternalApi
367     final CloneReceiptRuleSetResult executeCloneReceiptRuleSet(CloneReceiptRuleSetRequest cloneReceiptRuleSetRequest) {
368
369         ExecutionContext executionContext = createExecutionContext(cloneReceiptRuleSetRequest);
370         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
371         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
372         Request<CloneReceiptRuleSetRequest> request = null;
373         Response<CloneReceiptRuleSetResult> response = null;
374
375         try {
376             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
377             try {
378                 request = new CloneReceiptRuleSetRequestMarshaller().marshall(super.beforeMarshalling(cloneReceiptRuleSetRequest));
379                 // Binds the request metrics to the current request.
380                 request.setAWSRequestMetrics(awsRequestMetrics);
381                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
382                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
383                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CloneReceiptRuleSet");
384                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
385
386             } finally {
387                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
388             }
389
390             StaxResponseHandler<CloneReceiptRuleSetResult> responseHandler = new StaxResponseHandler<CloneReceiptRuleSetResult>(
391                     new CloneReceiptRuleSetResultStaxUnmarshaller());
392             response = invoke(request, responseHandler, executionContext);
393
394             return response.getAwsResponse();
395
396         } finally {
397
398             endClientExecution(awsRequestMetrics, request, response);
399         }
400     }
401
402     /**
403      * <p>
404      * Creates a configuration set.
405      * </p>
406      * <p>
407      * Configuration sets enable you to publish email sending events. For information about using configuration sets,
408      * see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
409      * Developer Guide</a>.
410      * </p>
411      * <p>
412      * You can execute this operation no more than once per second.
413      * </p>
414      * 
415      * @param createConfigurationSetRequest
416      *        Represents a request to create a configuration set. Configuration sets enable you to publish email sending
417      *        events. For information about using configuration sets, see the <a
418      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
419      *        Developer Guide</a>.
420      * @return Result of the CreateConfigurationSet operation returned by the service.
421      * @throws ConfigurationSetAlreadyExistsException
422      *         Indicates that the configuration set could not be created because of a naming conflict.
423      * @throws InvalidConfigurationSetException
424      *         Indicates that the configuration set is invalid. See the error message for details.
425      * @throws LimitExceededException
426      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
427      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
428      *         Developer Guide</a>.
429      * @sample AmazonSimpleEmailService.CreateConfigurationSet
430      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSet" target="_top">AWS
431      *      API Documentation</a>
432      */

433     @Override
434     public CreateConfigurationSetResult createConfigurationSet(CreateConfigurationSetRequest request) {
435         request = beforeClientExecution(request);
436         return executeCreateConfigurationSet(request);
437     }
438
439     @SdkInternalApi
440     final CreateConfigurationSetResult executeCreateConfigurationSet(CreateConfigurationSetRequest createConfigurationSetRequest) {
441
442         ExecutionContext executionContext = createExecutionContext(createConfigurationSetRequest);
443         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
444         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
445         Request<CreateConfigurationSetRequest> request = null;
446         Response<CreateConfigurationSetResult> response = null;
447
448         try {
449             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
450             try {
451                 request = new CreateConfigurationSetRequestMarshaller().marshall(super.beforeMarshalling(createConfigurationSetRequest));
452                 // Binds the request metrics to the current request.
453                 request.setAWSRequestMetrics(awsRequestMetrics);
454                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
455                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
456                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateConfigurationSet");
457                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
458
459             } finally {
460                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
461             }
462
463             StaxResponseHandler<CreateConfigurationSetResult> responseHandler = new StaxResponseHandler<CreateConfigurationSetResult>(
464                     new CreateConfigurationSetResultStaxUnmarshaller());
465             response = invoke(request, responseHandler, executionContext);
466
467             return response.getAwsResponse();
468
469         } finally {
470
471             endClientExecution(awsRequestMetrics, request, response);
472         }
473     }
474
475     /**
476      * <p>
477      * Creates a configuration set event destination.
478      * </p>
479      * <note>
480      * <p>
481      * When you create or update an event destination, you must provide one, and only one, destination. The destination
482      * can be CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS).
483      * </p>
484      * </note>
485      * <p>
486      * An event destination is the AWS service to which Amazon SES publishes the email sending events associated with a
487      * configuration set. For information about using configuration sets, see the <a
488      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer
489      * Guide</a>.
490      * </p>
491      * <p>
492      * You can execute this operation no more than once per second.
493      * </p>
494      * 
495      * @param createConfigurationSetEventDestinationRequest
496      *        Represents a request to create a configuration set event destination. A configuration set event
497      *        destination, which can be either Amazon CloudWatch or Amazon Kinesis Firehose, describes an AWS service in
498      *        which Amazon SES publishes the email sending events associated with a configuration set. For information
499      *        about using configuration sets, see the <a
500      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
501      *        Developer Guide</a>.
502      * @return Result of the CreateConfigurationSetEventDestination operation returned by the service.
503      * @throws ConfigurationSetDoesNotExistException
504      *         Indicates that the configuration set does not exist.
505      * @throws EventDestinationAlreadyExistsException
506      *         Indicates that the event destination could not be created because of a naming conflict.
507      * @throws InvalidCloudWatchDestinationException
508      *         Indicates that the Amazon CloudWatch destination is invalid. See the error message for details.
509      * @throws InvalidFirehoseDestinationException
510      *         Indicates that the Amazon Kinesis Firehose destination is invalid. See the error message for details.
511      * @throws InvalidSNSDestinationException
512      *         Indicates that the Amazon Simple Notification Service (Amazon SNS) destination is invalid. See the error
513      *         message for details.
514      * @throws LimitExceededException
515      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
516      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
517      *         Developer Guide</a>.
518      * @sample AmazonSimpleEmailService.CreateConfigurationSetEventDestination
519      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetEventDestination"
520      *      target="_top">AWS API Documentation</a>
521      */

522     @Override
523     public CreateConfigurationSetEventDestinationResult createConfigurationSetEventDestination(CreateConfigurationSetEventDestinationRequest request) {
524         request = beforeClientExecution(request);
525         return executeCreateConfigurationSetEventDestination(request);
526     }
527
528     @SdkInternalApi
529     final CreateConfigurationSetEventDestinationResult executeCreateConfigurationSetEventDestination(
530             CreateConfigurationSetEventDestinationRequest createConfigurationSetEventDestinationRequest) {
531
532         ExecutionContext executionContext = createExecutionContext(createConfigurationSetEventDestinationRequest);
533         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
534         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
535         Request<CreateConfigurationSetEventDestinationRequest> request = null;
536         Response<CreateConfigurationSetEventDestinationResult> response = null;
537
538         try {
539             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
540             try {
541                 request = new CreateConfigurationSetEventDestinationRequestMarshaller().marshall(super
542                         .beforeMarshalling(createConfigurationSetEventDestinationRequest));
543                 // Binds the request metrics to the current request.
544                 request.setAWSRequestMetrics(awsRequestMetrics);
545                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
546                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
547                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateConfigurationSetEventDestination");
548                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
549
550             } finally {
551                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
552             }
553
554             StaxResponseHandler<CreateConfigurationSetEventDestinationResult> responseHandler = new StaxResponseHandler<CreateConfigurationSetEventDestinationResult>(
555                     new CreateConfigurationSetEventDestinationResultStaxUnmarshaller());
556             response = invoke(request, responseHandler, executionContext);
557
558             return response.getAwsResponse();
559
560         } finally {
561
562             endClientExecution(awsRequestMetrics, request, response);
563         }
564     }
565
566     /**
567      * <p>
568      * Creates an association between a configuration set and a custom domain for open and click event tracking.
569      * </p>
570      * <p>
571      * By default, images and links used for tracking open and click events are hosted on domains operated by Amazon
572      * SES. You can configure a subdomain of your own to handle these events. For information about using custom
573      * domains, see the <a
574      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html">Amazon SES
575      * Developer Guide</a>.
576      * </p>
577      * 
578      * @param createConfigurationSetTrackingOptionsRequest
579      *        Represents a request to create an open and click tracking option object in a configuration set.
580      * @return Result of the CreateConfigurationSetTrackingOptions operation returned by the service.
581      * @throws ConfigurationSetDoesNotExistException
582      *         Indicates that the configuration set does not exist.
583      * @throws TrackingOptionsAlreadyExistsException
584      *         Indicates that the configuration set you specified already contains a TrackingOptions object.
585      * @throws InvalidTrackingOptionsException
586      *         Indicates that the custom domain to be used for open and click tracking redirects is invalid. This error
587      *         appears most often in the following situations:</p>
588      *         <ul>
589      *         <li>
590      *         <p>
591      *         When the tracking domain you specified is not verified in Amazon SES.
592      *         </p>
593      *         </li>
594      *         <li>
595      *         <p>
596      *         When the tracking domain you specified is not a valid domain or subdomain.
597      *         </p>
598      *         </li>
599      * @sample AmazonSimpleEmailService.CreateConfigurationSetTrackingOptions
600      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateConfigurationSetTrackingOptions"
601      *      target="_top">AWS API Documentation</a>
602      */

603     @Override
604     public CreateConfigurationSetTrackingOptionsResult createConfigurationSetTrackingOptions(CreateConfigurationSetTrackingOptionsRequest request) {
605         request = beforeClientExecution(request);
606         return executeCreateConfigurationSetTrackingOptions(request);
607     }
608
609     @SdkInternalApi
610     final CreateConfigurationSetTrackingOptionsResult executeCreateConfigurationSetTrackingOptions(
611             CreateConfigurationSetTrackingOptionsRequest createConfigurationSetTrackingOptionsRequest) {
612
613         ExecutionContext executionContext = createExecutionContext(createConfigurationSetTrackingOptionsRequest);
614         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
615         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
616         Request<CreateConfigurationSetTrackingOptionsRequest> request = null;
617         Response<CreateConfigurationSetTrackingOptionsResult> response = null;
618
619         try {
620             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
621             try {
622                 request = new CreateConfigurationSetTrackingOptionsRequestMarshaller().marshall(super
623                         .beforeMarshalling(createConfigurationSetTrackingOptionsRequest));
624                 // Binds the request metrics to the current request.
625                 request.setAWSRequestMetrics(awsRequestMetrics);
626                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
627                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
628                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateConfigurationSetTrackingOptions");
629                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
630
631             } finally {
632                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
633             }
634
635             StaxResponseHandler<CreateConfigurationSetTrackingOptionsResult> responseHandler = new StaxResponseHandler<CreateConfigurationSetTrackingOptionsResult>(
636                     new CreateConfigurationSetTrackingOptionsResultStaxUnmarshaller());
637             response = invoke(request, responseHandler, executionContext);
638
639             return response.getAwsResponse();
640
641         } finally {
642
643             endClientExecution(awsRequestMetrics, request, response);
644         }
645     }
646
647     /**
648      * <p>
649      * Creates a new custom verification email template.
650      * </p>
651      * <p>
652      * For more information about custom verification email templates, see <a
653      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html">Using Custom
654      * Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.
655      * </p>
656      * <p>
657      * You can execute this operation no more than once per second.
658      * </p>
659      * 
660      * @param createCustomVerificationEmailTemplateRequest
661      *        Represents a request to create a custom verification email template.
662      * @return Result of the CreateCustomVerificationEmailTemplate operation returned by the service.
663      * @throws CustomVerificationEmailTemplateAlreadyExistsException
664      *         Indicates that a custom verification email template with the name you specified already exists.
665      * @throws FromEmailAddressNotVerifiedException
666      *         Indicates that the sender address specified for a custom verification email is not verified, and is
667      *         therefore not eligible to send the custom verification email.
668      * @throws CustomVerificationEmailInvalidContentException
669      *         Indicates that custom verification email template provided content is invalid.
670      * @throws LimitExceededException
671      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
672      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
673      *         Developer Guide</a>.
674      * @sample AmazonSimpleEmailService.CreateCustomVerificationEmailTemplate
675      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateCustomVerificationEmailTemplate"
676      *      target="_top">AWS API Documentation</a>
677      */

678     @Override
679     public CreateCustomVerificationEmailTemplateResult createCustomVerificationEmailTemplate(CreateCustomVerificationEmailTemplateRequest request) {
680         request = beforeClientExecution(request);
681         return executeCreateCustomVerificationEmailTemplate(request);
682     }
683
684     @SdkInternalApi
685     final CreateCustomVerificationEmailTemplateResult executeCreateCustomVerificationEmailTemplate(
686             CreateCustomVerificationEmailTemplateRequest createCustomVerificationEmailTemplateRequest) {
687
688         ExecutionContext executionContext = createExecutionContext(createCustomVerificationEmailTemplateRequest);
689         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
690         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
691         Request<CreateCustomVerificationEmailTemplateRequest> request = null;
692         Response<CreateCustomVerificationEmailTemplateResult> response = null;
693
694         try {
695             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
696             try {
697                 request = new CreateCustomVerificationEmailTemplateRequestMarshaller().marshall(super
698                         .beforeMarshalling(createCustomVerificationEmailTemplateRequest));
699                 // Binds the request metrics to the current request.
700                 request.setAWSRequestMetrics(awsRequestMetrics);
701                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
702                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
703                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCustomVerificationEmailTemplate");
704                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
705
706             } finally {
707                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
708             }
709
710             StaxResponseHandler<CreateCustomVerificationEmailTemplateResult> responseHandler = new StaxResponseHandler<CreateCustomVerificationEmailTemplateResult>(
711                     new CreateCustomVerificationEmailTemplateResultStaxUnmarshaller());
712             response = invoke(request, responseHandler, executionContext);
713
714             return response.getAwsResponse();
715
716         } finally {
717
718             endClientExecution(awsRequestMetrics, request, response);
719         }
720     }
721
722     /**
723      * <p>
724      * Creates a new IP address filter.
725      * </p>
726      * <p>
727      * For information about setting up IP address filters, see the <a
728      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-ip-filters.html">Amazon SES Developer
729      * Guide</a>.
730      * </p>
731      * <p>
732      * You can execute this operation no more than once per second.
733      * </p>
734      * 
735      * @param createReceiptFilterRequest
736      *        Represents a request to create a new IP address filter. You use IP address filters when you receive email
737      *        with Amazon SES. For more information, see the <a
738      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
739      *        Developer Guide</a>.
740      * @return Result of the CreateReceiptFilter operation returned by the service.
741      * @throws LimitExceededException
742      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
743      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
744      *         Developer Guide</a>.
745      * @throws AlreadyExistsException
746      *         Indicates that a resource could not be created because of a naming conflict.
747      * @sample AmazonSimpleEmailService.CreateReceiptFilter
748      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptFilter" target="_top">AWS API
749      *      Documentation</a>
750      */

751     @Override
752     public CreateReceiptFilterResult createReceiptFilter(CreateReceiptFilterRequest request) {
753         request = beforeClientExecution(request);
754         return executeCreateReceiptFilter(request);
755     }
756
757     @SdkInternalApi
758     final CreateReceiptFilterResult executeCreateReceiptFilter(CreateReceiptFilterRequest createReceiptFilterRequest) {
759
760         ExecutionContext executionContext = createExecutionContext(createReceiptFilterRequest);
761         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
762         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
763         Request<CreateReceiptFilterRequest> request = null;
764         Response<CreateReceiptFilterResult> response = null;
765
766         try {
767             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
768             try {
769                 request = new CreateReceiptFilterRequestMarshaller().marshall(super.beforeMarshalling(createReceiptFilterRequest));
770                 // Binds the request metrics to the current request.
771                 request.setAWSRequestMetrics(awsRequestMetrics);
772                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
773                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
774                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateReceiptFilter");
775                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
776
777             } finally {
778                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
779             }
780
781             StaxResponseHandler<CreateReceiptFilterResult> responseHandler = new StaxResponseHandler<CreateReceiptFilterResult>(
782                     new CreateReceiptFilterResultStaxUnmarshaller());
783             response = invoke(request, responseHandler, executionContext);
784
785             return response.getAwsResponse();
786
787         } finally {
788
789             endClientExecution(awsRequestMetrics, request, response);
790         }
791     }
792
793     /**
794      * <p>
795      * Creates a receipt rule.
796      * </p>
797      * <p>
798      * For information about setting up receipt rules, see the <a
799      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html">Amazon SES
800      * Developer Guide</a>.
801      * </p>
802      * <p>
803      * You can execute this operation no more than once per second.
804      * </p>
805      * 
806      * @param createReceiptRuleRequest
807      *        Represents a request to create a receipt rule. You use receipt rules to receive email with Amazon SES. For
808      *        more information, see the <a
809      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
810      *        Developer Guide</a>.
811      * @return Result of the CreateReceiptRule operation returned by the service.
812      * @throws InvalidSnsTopicException
813      *         Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES could not publish to the
814      *         topic, possibly due to permissions issues. For information about giving permissions, see the <a
815      *         href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES
816      *         Developer Guide</a>.
817      * @throws InvalidS3ConfigurationException
818      *         Indicates that the provided Amazon S3 bucket or AWS KMS encryption key is invalid, or that Amazon SES
819      *         could not publish to the bucket, possibly due to permissions issues. For information about giving
820      *         permissions, see the <a
821      *         href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES
822      *         Developer Guide</a>.
823      * @throws InvalidLambdaFunctionException
824      *         Indicates that the provided AWS Lambda function is invalid, or that Amazon SES could not execute the
825      *         provided function, possibly due to permissions issues. For information about giving permissions, see the
826      *         <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon
827      *         SES Developer Guide</a>.
828      * @throws AlreadyExistsException
829      *         Indicates that a resource could not be created because of a naming conflict.
830      * @throws RuleDoesNotExistException
831      *         Indicates that the provided receipt rule does not exist.
832      * @throws RuleSetDoesNotExistException
833      *         Indicates that the provided receipt rule set does not exist.
834      * @throws LimitExceededException
835      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
836      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
837      *         Developer Guide</a>.
838      * @sample AmazonSimpleEmailService.CreateReceiptRule
839      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptRule" target="_top">AWS API
840      *      Documentation</a>
841      */

842     @Override
843     public CreateReceiptRuleResult createReceiptRule(CreateReceiptRuleRequest request) {
844         request = beforeClientExecution(request);
845         return executeCreateReceiptRule(request);
846     }
847
848     @SdkInternalApi
849     final CreateReceiptRuleResult executeCreateReceiptRule(CreateReceiptRuleRequest createReceiptRuleRequest) {
850
851         ExecutionContext executionContext = createExecutionContext(createReceiptRuleRequest);
852         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
853         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
854         Request<CreateReceiptRuleRequest> request = null;
855         Response<CreateReceiptRuleResult> response = null;
856
857         try {
858             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
859             try {
860                 request = new CreateReceiptRuleRequestMarshaller().marshall(super.beforeMarshalling(createReceiptRuleRequest));
861                 // Binds the request metrics to the current request.
862                 request.setAWSRequestMetrics(awsRequestMetrics);
863                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
864                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
865                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateReceiptRule");
866                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
867
868             } finally {
869                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
870             }
871
872             StaxResponseHandler<CreateReceiptRuleResult> responseHandler = new StaxResponseHandler<CreateReceiptRuleResult>(
873                     new CreateReceiptRuleResultStaxUnmarshaller());
874             response = invoke(request, responseHandler, executionContext);
875
876             return response.getAwsResponse();
877
878         } finally {
879
880             endClientExecution(awsRequestMetrics, request, response);
881         }
882     }
883
884     /**
885      * <p>
886      * Creates an empty receipt rule set.
887      * </p>
888      * <p>
889      * For information about setting up receipt rule sets, see the <a
890      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html">Amazon SES
891      * Developer Guide</a>.
892      * </p>
893      * <p>
894      * You can execute this operation no more than once per second.
895      * </p>
896      * 
897      * @param createReceiptRuleSetRequest
898      *        Represents a request to create an empty receipt rule set. You use receipt rule sets to receive email with
899      *        Amazon SES. For more information, see the <a
900      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
901      *        Developer Guide</a>.
902      * @return Result of the CreateReceiptRuleSet operation returned by the service.
903      * @throws AlreadyExistsException
904      *         Indicates that a resource could not be created because of a naming conflict.
905      * @throws LimitExceededException
906      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
907      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
908      *         Developer Guide</a>.
909      * @sample AmazonSimpleEmailService.CreateReceiptRuleSet
910      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateReceiptRuleSet" target="_top">AWS API
911      *      Documentation</a>
912      */

913     @Override
914     public CreateReceiptRuleSetResult createReceiptRuleSet(CreateReceiptRuleSetRequest request) {
915         request = beforeClientExecution(request);
916         return executeCreateReceiptRuleSet(request);
917     }
918
919     @SdkInternalApi
920     final CreateReceiptRuleSetResult executeCreateReceiptRuleSet(CreateReceiptRuleSetRequest createReceiptRuleSetRequest) {
921
922         ExecutionContext executionContext = createExecutionContext(createReceiptRuleSetRequest);
923         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
924         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
925         Request<CreateReceiptRuleSetRequest> request = null;
926         Response<CreateReceiptRuleSetResult> response = null;
927
928         try {
929             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
930             try {
931                 request = new CreateReceiptRuleSetRequestMarshaller().marshall(super.beforeMarshalling(createReceiptRuleSetRequest));
932                 // Binds the request metrics to the current request.
933                 request.setAWSRequestMetrics(awsRequestMetrics);
934                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
935                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
936                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateReceiptRuleSet");
937                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
938
939             } finally {
940                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
941             }
942
943             StaxResponseHandler<CreateReceiptRuleSetResult> responseHandler = new StaxResponseHandler<CreateReceiptRuleSetResult>(
944                     new CreateReceiptRuleSetResultStaxUnmarshaller());
945             response = invoke(request, responseHandler, executionContext);
946
947             return response.getAwsResponse();
948
949         } finally {
950
951             endClientExecution(awsRequestMetrics, request, response);
952         }
953     }
954
955     /**
956      * <p>
957      * Creates an email template. Email templates enable you to send personalized email to one or more destinations in a
958      * single API operation. For more information, see the <a
959      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html">Amazon SES
960      * Developer Guide</a>.
961      * </p>
962      * <p>
963      * You can execute this operation no more than once per second.
964      * </p>
965      * 
966      * @param createTemplateRequest
967      *        Represents a request to create an email template. For more information, see the <a
968      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html">Amazon SES
969      *        Developer Guide</a>.
970      * @return Result of the CreateTemplate operation returned by the service.
971      * @throws AlreadyExistsException
972      *         Indicates that a resource could not be created because of a naming conflict.
973      * @throws InvalidTemplateException
974      *         Indicates that the template that you specified could not be rendered. This issue may occur when a
975      *         template refers to a partial that does not exist.
976      * @throws LimitExceededException
977      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
978      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
979      *         Developer Guide</a>.
980      * @sample AmazonSimpleEmailService.CreateTemplate
981      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/CreateTemplate" target="_top">AWS API
982      *      Documentation</a>
983      */

984     @Override
985     public CreateTemplateResult createTemplate(CreateTemplateRequest request) {
986         request = beforeClientExecution(request);
987         return executeCreateTemplate(request);
988     }
989
990     @SdkInternalApi
991     final CreateTemplateResult executeCreateTemplate(CreateTemplateRequest createTemplateRequest) {
992
993         ExecutionContext executionContext = createExecutionContext(createTemplateRequest);
994         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
995         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
996         Request<CreateTemplateRequest> request = null;
997         Response<CreateTemplateResult> response = null;
998
999         try {
1000             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1001             try {
1002                 request = new CreateTemplateRequestMarshaller().marshall(super.beforeMarshalling(createTemplateRequest));
1003                 // Binds the request metrics to the current request.
1004                 request.setAWSRequestMetrics(awsRequestMetrics);
1005                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1006                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1007                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTemplate");
1008                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1009
1010             } finally {
1011                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1012             }
1013
1014             StaxResponseHandler<CreateTemplateResult> responseHandler = new StaxResponseHandler<CreateTemplateResult>(
1015                     new CreateTemplateResultStaxUnmarshaller());
1016             response = invoke(request, responseHandler, executionContext);
1017
1018             return response.getAwsResponse();
1019
1020         } finally {
1021
1022             endClientExecution(awsRequestMetrics, request, response);
1023         }
1024     }
1025
1026     /**
1027      * <p>
1028      * Deletes a configuration set. Configuration sets enable you to publish email sending events. For information about
1029      * using configuration sets, see the <a
1030      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer
1031      * Guide</a>.
1032      * </p>
1033      * <p>
1034      * You can execute this operation no more than once per second.
1035      * </p>
1036      * 
1037      * @param deleteConfigurationSetRequest
1038      *        Represents a request to delete a configuration set. Configuration sets enable you to publish email sending
1039      *        events. For information about using configuration sets, see the <a
1040      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
1041      *        Developer Guide</a>.
1042      * @return Result of the DeleteConfigurationSet operation returned by the service.
1043      * @throws ConfigurationSetDoesNotExistException
1044      *         Indicates that the configuration set does not exist.
1045      * @sample AmazonSimpleEmailService.DeleteConfigurationSet
1046      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSet" target="_top">AWS
1047      *      API Documentation</a>
1048      */

1049     @Override
1050     public DeleteConfigurationSetResult deleteConfigurationSet(DeleteConfigurationSetRequest request) {
1051         request = beforeClientExecution(request);
1052         return executeDeleteConfigurationSet(request);
1053     }
1054
1055     @SdkInternalApi
1056     final DeleteConfigurationSetResult executeDeleteConfigurationSet(DeleteConfigurationSetRequest deleteConfigurationSetRequest) {
1057
1058         ExecutionContext executionContext = createExecutionContext(deleteConfigurationSetRequest);
1059         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1060         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1061         Request<DeleteConfigurationSetRequest> request = null;
1062         Response<DeleteConfigurationSetResult> response = null;
1063
1064         try {
1065             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1066             try {
1067                 request = new DeleteConfigurationSetRequestMarshaller().marshall(super.beforeMarshalling(deleteConfigurationSetRequest));
1068                 // Binds the request metrics to the current request.
1069                 request.setAWSRequestMetrics(awsRequestMetrics);
1070                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1071                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1072                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConfigurationSet");
1073                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1074
1075             } finally {
1076                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1077             }
1078
1079             StaxResponseHandler<DeleteConfigurationSetResult> responseHandler = new StaxResponseHandler<DeleteConfigurationSetResult>(
1080                     new DeleteConfigurationSetResultStaxUnmarshaller());
1081             response = invoke(request, responseHandler, executionContext);
1082
1083             return response.getAwsResponse();
1084
1085         } finally {
1086
1087             endClientExecution(awsRequestMetrics, request, response);
1088         }
1089     }
1090
1091     /**
1092      * <p>
1093      * Deletes a configuration set event destination. Configuration set event destinations are associated with
1094      * configuration sets, which enable you to publish email sending events. For information about using configuration
1095      * sets, see the <a
1096      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES Developer
1097      * Guide</a>.
1098      * </p>
1099      * <p>
1100      * You can execute this operation no more than once per second.
1101      * </p>
1102      * 
1103      * @param deleteConfigurationSetEventDestinationRequest
1104      *        Represents a request to delete a configuration set event destination. Configuration set event destinations
1105      *        are associated with configuration sets, which enable you to publish email sending events. For information
1106      *        about using configuration sets, see the <a
1107      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
1108      *        Developer Guide</a>.
1109      * @return Result of the DeleteConfigurationSetEventDestination operation returned by the service.
1110      * @throws ConfigurationSetDoesNotExistException
1111      *         Indicates that the configuration set does not exist.
1112      * @throws EventDestinationDoesNotExistException
1113      *         Indicates that the event destination does not exist.
1114      * @sample AmazonSimpleEmailService.DeleteConfigurationSetEventDestination
1115      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetEventDestination"
1116      *      target="_top">AWS API Documentation</a>
1117      */

1118     @Override
1119     public DeleteConfigurationSetEventDestinationResult deleteConfigurationSetEventDestination(DeleteConfigurationSetEventDestinationRequest request) {
1120         request = beforeClientExecution(request);
1121         return executeDeleteConfigurationSetEventDestination(request);
1122     }
1123
1124     @SdkInternalApi
1125     final DeleteConfigurationSetEventDestinationResult executeDeleteConfigurationSetEventDestination(
1126             DeleteConfigurationSetEventDestinationRequest deleteConfigurationSetEventDestinationRequest) {
1127
1128         ExecutionContext executionContext = createExecutionContext(deleteConfigurationSetEventDestinationRequest);
1129         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1130         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1131         Request<DeleteConfigurationSetEventDestinationRequest> request = null;
1132         Response<DeleteConfigurationSetEventDestinationResult> response = null;
1133
1134         try {
1135             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1136             try {
1137                 request = new DeleteConfigurationSetEventDestinationRequestMarshaller().marshall(super
1138                         .beforeMarshalling(deleteConfigurationSetEventDestinationRequest));
1139                 // Binds the request metrics to the current request.
1140                 request.setAWSRequestMetrics(awsRequestMetrics);
1141                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1142                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1143                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConfigurationSetEventDestination");
1144                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1145
1146             } finally {
1147                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1148             }
1149
1150             StaxResponseHandler<DeleteConfigurationSetEventDestinationResult> responseHandler = new StaxResponseHandler<DeleteConfigurationSetEventDestinationResult>(
1151                     new DeleteConfigurationSetEventDestinationResultStaxUnmarshaller());
1152             response = invoke(request, responseHandler, executionContext);
1153
1154             return response.getAwsResponse();
1155
1156         } finally {
1157
1158             endClientExecution(awsRequestMetrics, request, response);
1159         }
1160     }
1161
1162     /**
1163      * <p>
1164      * Deletes an association between a configuration set and a custom domain for open and click event tracking.
1165      * </p>
1166      * <p>
1167      * By default, images and links used for tracking open and click events are hosted on domains operated by Amazon
1168      * SES. You can configure a subdomain of your own to handle these events. For information about using custom
1169      * domains, see the <a
1170      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html">Amazon SES
1171      * Developer Guide</a>.
1172      * </p>
1173      * <note>
1174      * <p>
1175      * Deleting this kind of association will result in emails sent using the specified configuration set to capture
1176      * open and click events using the standard, Amazon SES-operated domains.
1177      * </p>
1178      * </note>
1179      * 
1180      * @param deleteConfigurationSetTrackingOptionsRequest
1181      *        Represents a request to delete open and click tracking options in a configuration set.
1182      * @return Result of the DeleteConfigurationSetTrackingOptions operation returned by the service.
1183      * @throws ConfigurationSetDoesNotExistException
1184      *         Indicates that the configuration set does not exist.
1185      * @throws TrackingOptionsDoesNotExistException
1186      *         Indicates that the TrackingOptions object you specified does not exist.
1187      * @sample AmazonSimpleEmailService.DeleteConfigurationSetTrackingOptions
1188      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteConfigurationSetTrackingOptions"
1189      *      target="_top">AWS API Documentation</a>
1190      */

1191     @Override
1192     public DeleteConfigurationSetTrackingOptionsResult deleteConfigurationSetTrackingOptions(DeleteConfigurationSetTrackingOptionsRequest request) {
1193         request = beforeClientExecution(request);
1194         return executeDeleteConfigurationSetTrackingOptions(request);
1195     }
1196
1197     @SdkInternalApi
1198     final DeleteConfigurationSetTrackingOptionsResult executeDeleteConfigurationSetTrackingOptions(
1199             DeleteConfigurationSetTrackingOptionsRequest deleteConfigurationSetTrackingOptionsRequest) {
1200
1201         ExecutionContext executionContext = createExecutionContext(deleteConfigurationSetTrackingOptionsRequest);
1202         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1203         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1204         Request<DeleteConfigurationSetTrackingOptionsRequest> request = null;
1205         Response<DeleteConfigurationSetTrackingOptionsResult> response = null;
1206
1207         try {
1208             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1209             try {
1210                 request = new DeleteConfigurationSetTrackingOptionsRequestMarshaller().marshall(super
1211                         .beforeMarshalling(deleteConfigurationSetTrackingOptionsRequest));
1212                 // Binds the request metrics to the current request.
1213                 request.setAWSRequestMetrics(awsRequestMetrics);
1214                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1215                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1216                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConfigurationSetTrackingOptions");
1217                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1218
1219             } finally {
1220                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1221             }
1222
1223             StaxResponseHandler<DeleteConfigurationSetTrackingOptionsResult> responseHandler = new StaxResponseHandler<DeleteConfigurationSetTrackingOptionsResult>(
1224                     new DeleteConfigurationSetTrackingOptionsResultStaxUnmarshaller());
1225             response = invoke(request, responseHandler, executionContext);
1226
1227             return response.getAwsResponse();
1228
1229         } finally {
1230
1231             endClientExecution(awsRequestMetrics, request, response);
1232         }
1233     }
1234
1235     /**
1236      * <p>
1237      * Deletes an existing custom verification email template.
1238      * </p>
1239      * <p>
1240      * For more information about custom verification email templates, see <a
1241      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html">Using Custom
1242      * Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.
1243      * </p>
1244      * <p>
1245      * You can execute this operation no more than once per second.
1246      * </p>
1247      * 
1248      * @param deleteCustomVerificationEmailTemplateRequest
1249      *        Represents a request to delete an existing custom verification email template.
1250      * @return Result of the DeleteCustomVerificationEmailTemplate operation returned by the service.
1251      * @sample AmazonSimpleEmailService.DeleteCustomVerificationEmailTemplate
1252      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteCustomVerificationEmailTemplate"
1253      *      target="_top">AWS API Documentation</a>
1254      */

1255     @Override
1256     public DeleteCustomVerificationEmailTemplateResult deleteCustomVerificationEmailTemplate(DeleteCustomVerificationEmailTemplateRequest request) {
1257         request = beforeClientExecution(request);
1258         return executeDeleteCustomVerificationEmailTemplate(request);
1259     }
1260
1261     @SdkInternalApi
1262     final DeleteCustomVerificationEmailTemplateResult executeDeleteCustomVerificationEmailTemplate(
1263             DeleteCustomVerificationEmailTemplateRequest deleteCustomVerificationEmailTemplateRequest) {
1264
1265         ExecutionContext executionContext = createExecutionContext(deleteCustomVerificationEmailTemplateRequest);
1266         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1267         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1268         Request<DeleteCustomVerificationEmailTemplateRequest> request = null;
1269         Response<DeleteCustomVerificationEmailTemplateResult> response = null;
1270
1271         try {
1272             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1273             try {
1274                 request = new DeleteCustomVerificationEmailTemplateRequestMarshaller().marshall(super
1275                         .beforeMarshalling(deleteCustomVerificationEmailTemplateRequest));
1276                 // Binds the request metrics to the current request.
1277                 request.setAWSRequestMetrics(awsRequestMetrics);
1278                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1279                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1280                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCustomVerificationEmailTemplate");
1281                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1282
1283             } finally {
1284                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1285             }
1286
1287             StaxResponseHandler<DeleteCustomVerificationEmailTemplateResult> responseHandler = new StaxResponseHandler<DeleteCustomVerificationEmailTemplateResult>(
1288                     new DeleteCustomVerificationEmailTemplateResultStaxUnmarshaller());
1289             response = invoke(request, responseHandler, executionContext);
1290
1291             return response.getAwsResponse();
1292
1293         } finally {
1294
1295             endClientExecution(awsRequestMetrics, request, response);
1296         }
1297     }
1298
1299     /**
1300      * <p>
1301      * Deletes the specified identity (an email address or a domain) from the list of verified identities.
1302      * </p>
1303      * <p>
1304      * You can execute this operation no more than once per second.
1305      * </p>
1306      * 
1307      * @param deleteIdentityRequest
1308      *        Represents a request to delete one of your Amazon SES identities (an email address or domain).
1309      * @return Result of the DeleteIdentity operation returned by the service.
1310      * @sample AmazonSimpleEmailService.DeleteIdentity
1311      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteIdentity" target="_top">AWS API
1312      *      Documentation</a>
1313      */

1314     @Override
1315     public DeleteIdentityResult deleteIdentity(DeleteIdentityRequest request) {
1316         request = beforeClientExecution(request);
1317         return executeDeleteIdentity(request);
1318     }
1319
1320     @SdkInternalApi
1321     final DeleteIdentityResult executeDeleteIdentity(DeleteIdentityRequest deleteIdentityRequest) {
1322
1323         ExecutionContext executionContext = createExecutionContext(deleteIdentityRequest);
1324         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1325         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1326         Request<DeleteIdentityRequest> request = null;
1327         Response<DeleteIdentityResult> response = null;
1328
1329         try {
1330             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1331             try {
1332                 request = new DeleteIdentityRequestMarshaller().marshall(super.beforeMarshalling(deleteIdentityRequest));
1333                 // Binds the request metrics to the current request.
1334                 request.setAWSRequestMetrics(awsRequestMetrics);
1335                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1336                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1337                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteIdentity");
1338                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1339
1340             } finally {
1341                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1342             }
1343
1344             StaxResponseHandler<DeleteIdentityResult> responseHandler = new StaxResponseHandler<DeleteIdentityResult>(
1345                     new DeleteIdentityResultStaxUnmarshaller());
1346             response = invoke(request, responseHandler, executionContext);
1347
1348             return response.getAwsResponse();
1349
1350         } finally {
1351
1352             endClientExecution(awsRequestMetrics, request, response);
1353         }
1354     }
1355
1356     /**
1357      * <p>
1358      * Deletes the specified sending authorization policy for the given identity (an email address or a domain). This
1359      * API returns successfully even if a policy with the specified name does not exist.
1360      * </p>
1361      * <note>
1362      * <p>
1363      * This API is for the identity owner only. If you have not verified the identity, this API will return an error.
1364      * </p>
1365      * </note>
1366      * <p>
1367      * Sending authorization is a feature that enables an identity owner to authorize other senders to use its
1368      * identities. For information about using sending authorization, see the <a
1369      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer
1370      * Guide</a>.
1371      * </p>
1372      * <p>
1373      * You can execute this operation no more than once per second.
1374      * </p>
1375      * 
1376      * @param deleteIdentityPolicyRequest
1377      *        Represents a request to delete a sending authorization policy for an identity. Sending authorization is an
1378      *        Amazon SES feature that enables you to authorize other senders to use your identities. For information,
1379      *        see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon
1380      *        SES Developer Guide</a>.
1381      * @return Result of the DeleteIdentityPolicy operation returned by the service.
1382      * @sample AmazonSimpleEmailService.DeleteIdentityPolicy
1383      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteIdentityPolicy" target="_top">AWS API
1384      *      Documentation</a>
1385      */

1386     @Override
1387     public DeleteIdentityPolicyResult deleteIdentityPolicy(DeleteIdentityPolicyRequest request) {
1388         request = beforeClientExecution(request);
1389         return executeDeleteIdentityPolicy(request);
1390     }
1391
1392     @SdkInternalApi
1393     final DeleteIdentityPolicyResult executeDeleteIdentityPolicy(DeleteIdentityPolicyRequest deleteIdentityPolicyRequest) {
1394
1395         ExecutionContext executionContext = createExecutionContext(deleteIdentityPolicyRequest);
1396         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1397         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1398         Request<DeleteIdentityPolicyRequest> request = null;
1399         Response<DeleteIdentityPolicyResult> response = null;
1400
1401         try {
1402             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1403             try {
1404                 request = new DeleteIdentityPolicyRequestMarshaller().marshall(super.beforeMarshalling(deleteIdentityPolicyRequest));
1405                 // Binds the request metrics to the current request.
1406                 request.setAWSRequestMetrics(awsRequestMetrics);
1407                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1408                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1409                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteIdentityPolicy");
1410                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1411
1412             } finally {
1413                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1414             }
1415
1416             StaxResponseHandler<DeleteIdentityPolicyResult> responseHandler = new StaxResponseHandler<DeleteIdentityPolicyResult>(
1417                     new DeleteIdentityPolicyResultStaxUnmarshaller());
1418             response = invoke(request, responseHandler, executionContext);
1419
1420             return response.getAwsResponse();
1421
1422         } finally {
1423
1424             endClientExecution(awsRequestMetrics, request, response);
1425         }
1426     }
1427
1428     /**
1429      * <p>
1430      * Deletes the specified IP address filter.
1431      * </p>
1432      * <p>
1433      * For information about managing IP address filters, see the <a
1434      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html">Amazon SES
1435      * Developer Guide</a>.
1436      * </p>
1437      * <p>
1438      * You can execute this operation no more than once per second.
1439      * </p>
1440      * 
1441      * @param deleteReceiptFilterRequest
1442      *        Represents a request to delete an IP address filter. You use IP address filters when you receive email
1443      *        with Amazon SES. For more information, see the <a
1444      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
1445      *        Developer Guide</a>.
1446      * @return Result of the DeleteReceiptFilter operation returned by the service.
1447      * @sample AmazonSimpleEmailService.DeleteReceiptFilter
1448      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptFilter" target="_top">AWS API
1449      *      Documentation</a>
1450      */

1451     @Override
1452     public DeleteReceiptFilterResult deleteReceiptFilter(DeleteReceiptFilterRequest request) {
1453         request = beforeClientExecution(request);
1454         return executeDeleteReceiptFilter(request);
1455     }
1456
1457     @SdkInternalApi
1458     final DeleteReceiptFilterResult executeDeleteReceiptFilter(DeleteReceiptFilterRequest deleteReceiptFilterRequest) {
1459
1460         ExecutionContext executionContext = createExecutionContext(deleteReceiptFilterRequest);
1461         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1462         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1463         Request<DeleteReceiptFilterRequest> request = null;
1464         Response<DeleteReceiptFilterResult> response = null;
1465
1466         try {
1467             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1468             try {
1469                 request = new DeleteReceiptFilterRequestMarshaller().marshall(super.beforeMarshalling(deleteReceiptFilterRequest));
1470                 // Binds the request metrics to the current request.
1471                 request.setAWSRequestMetrics(awsRequestMetrics);
1472                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1473                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1474                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteReceiptFilter");
1475                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1476
1477             } finally {
1478                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1479             }
1480
1481             StaxResponseHandler<DeleteReceiptFilterResult> responseHandler = new StaxResponseHandler<DeleteReceiptFilterResult>(
1482                     new DeleteReceiptFilterResultStaxUnmarshaller());
1483             response = invoke(request, responseHandler, executionContext);
1484
1485             return response.getAwsResponse();
1486
1487         } finally {
1488
1489             endClientExecution(awsRequestMetrics, request, response);
1490         }
1491     }
1492
1493     /**
1494      * <p>
1495      * Deletes the specified receipt rule.
1496      * </p>
1497      * <p>
1498      * For information about managing receipt rules, see the <a
1499      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html">Amazon
1500      * SES Developer Guide</a>.
1501      * </p>
1502      * <p>
1503      * You can execute this operation no more than once per second.
1504      * </p>
1505      * 
1506      * @param deleteReceiptRuleRequest
1507      *        Represents a request to delete a receipt rule. You use receipt rules to receive email with Amazon SES. For
1508      *        more information, see the <a
1509      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
1510      *        Developer Guide</a>.
1511      * @return Result of the DeleteReceiptRule operation returned by the service.
1512      * @throws RuleSetDoesNotExistException
1513      *         Indicates that the provided receipt rule set does not exist.
1514      * @sample AmazonSimpleEmailService.DeleteReceiptRule
1515      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptRule" target="_top">AWS API
1516      *      Documentation</a>
1517      */

1518     @Override
1519     public DeleteReceiptRuleResult deleteReceiptRule(DeleteReceiptRuleRequest request) {
1520         request = beforeClientExecution(request);
1521         return executeDeleteReceiptRule(request);
1522     }
1523
1524     @SdkInternalApi
1525     final DeleteReceiptRuleResult executeDeleteReceiptRule(DeleteReceiptRuleRequest deleteReceiptRuleRequest) {
1526
1527         ExecutionContext executionContext = createExecutionContext(deleteReceiptRuleRequest);
1528         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1529         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1530         Request<DeleteReceiptRuleRequest> request = null;
1531         Response<DeleteReceiptRuleResult> response = null;
1532
1533         try {
1534             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1535             try {
1536                 request = new DeleteReceiptRuleRequestMarshaller().marshall(super.beforeMarshalling(deleteReceiptRuleRequest));
1537                 // Binds the request metrics to the current request.
1538                 request.setAWSRequestMetrics(awsRequestMetrics);
1539                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1540                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1541                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteReceiptRule");
1542                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1543
1544             } finally {
1545                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1546             }
1547
1548             StaxResponseHandler<DeleteReceiptRuleResult> responseHandler = new StaxResponseHandler<DeleteReceiptRuleResult>(
1549                     new DeleteReceiptRuleResultStaxUnmarshaller());
1550             response = invoke(request, responseHandler, executionContext);
1551
1552             return response.getAwsResponse();
1553
1554         } finally {
1555
1556             endClientExecution(awsRequestMetrics, request, response);
1557         }
1558     }
1559
1560     /**
1561      * <p>
1562      * Deletes the specified receipt rule set and all of the receipt rules it contains.
1563      * </p>
1564      * <note>
1565      * <p>
1566      * The currently active rule set cannot be deleted.
1567      * </p>
1568      * </note>
1569      * <p>
1570      * For information about managing receipt rule sets, see the <a
1571      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html"
1572      * >Amazon SES Developer Guide</a>.
1573      * </p>
1574      * <p>
1575      * You can execute this operation no more than once per second.
1576      * </p>
1577      * 
1578      * @param deleteReceiptRuleSetRequest
1579      *        Represents a request to delete a receipt rule set and all of the receipt rules it contains. You use
1580      *        receipt rule sets to receive email with Amazon SES. For more information, see the <a
1581      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
1582      *        Developer Guide</a>.
1583      * @return Result of the DeleteReceiptRuleSet operation returned by the service.
1584      * @throws CannotDeleteException
1585      *         Indicates that the delete operation could not be completed.
1586      * @sample AmazonSimpleEmailService.DeleteReceiptRuleSet
1587      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteReceiptRuleSet" target="_top">AWS API
1588      *      Documentation</a>
1589      */

1590     @Override
1591     public DeleteReceiptRuleSetResult deleteReceiptRuleSet(DeleteReceiptRuleSetRequest request) {
1592         request = beforeClientExecution(request);
1593         return executeDeleteReceiptRuleSet(request);
1594     }
1595
1596     @SdkInternalApi
1597     final DeleteReceiptRuleSetResult executeDeleteReceiptRuleSet(DeleteReceiptRuleSetRequest deleteReceiptRuleSetRequest) {
1598
1599         ExecutionContext executionContext = createExecutionContext(deleteReceiptRuleSetRequest);
1600         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1601         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1602         Request<DeleteReceiptRuleSetRequest> request = null;
1603         Response<DeleteReceiptRuleSetResult> response = null;
1604
1605         try {
1606             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1607             try {
1608                 request = new DeleteReceiptRuleSetRequestMarshaller().marshall(super.beforeMarshalling(deleteReceiptRuleSetRequest));
1609                 // Binds the request metrics to the current request.
1610                 request.setAWSRequestMetrics(awsRequestMetrics);
1611                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1612                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1613                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteReceiptRuleSet");
1614                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1615
1616             } finally {
1617                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1618             }
1619
1620             StaxResponseHandler<DeleteReceiptRuleSetResult> responseHandler = new StaxResponseHandler<DeleteReceiptRuleSetResult>(
1621                     new DeleteReceiptRuleSetResultStaxUnmarshaller());
1622             response = invoke(request, responseHandler, executionContext);
1623
1624             return response.getAwsResponse();
1625
1626         } finally {
1627
1628             endClientExecution(awsRequestMetrics, request, response);
1629         }
1630     }
1631
1632     /**
1633      * <p>
1634      * Deletes an email template.
1635      * </p>
1636      * <p>
1637      * You can execute this operation no more than once per second.
1638      * </p>
1639      * 
1640      * @param deleteTemplateRequest
1641      *        Represents a request to delete an email template. For more information, see the <a
1642      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html">Amazon SES
1643      *        Developer Guide</a>.
1644      * @return Result of the DeleteTemplate operation returned by the service.
1645      * @sample AmazonSimpleEmailService.DeleteTemplate
1646      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteTemplate" target="_top">AWS API
1647      *      Documentation</a>
1648      */

1649     @Override
1650     public DeleteTemplateResult deleteTemplate(DeleteTemplateRequest request) {
1651         request = beforeClientExecution(request);
1652         return executeDeleteTemplate(request);
1653     }
1654
1655     @SdkInternalApi
1656     final DeleteTemplateResult executeDeleteTemplate(DeleteTemplateRequest deleteTemplateRequest) {
1657
1658         ExecutionContext executionContext = createExecutionContext(deleteTemplateRequest);
1659         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1660         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1661         Request<DeleteTemplateRequest> request = null;
1662         Response<DeleteTemplateResult> response = null;
1663
1664         try {
1665             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1666             try {
1667                 request = new DeleteTemplateRequestMarshaller().marshall(super.beforeMarshalling(deleteTemplateRequest));
1668                 // Binds the request metrics to the current request.
1669                 request.setAWSRequestMetrics(awsRequestMetrics);
1670                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1671                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1672                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTemplate");
1673                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1674
1675             } finally {
1676                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1677             }
1678
1679             StaxResponseHandler<DeleteTemplateResult> responseHandler = new StaxResponseHandler<DeleteTemplateResult>(
1680                     new DeleteTemplateResultStaxUnmarshaller());
1681             response = invoke(request, responseHandler, executionContext);
1682
1683             return response.getAwsResponse();
1684
1685         } finally {
1686
1687             endClientExecution(awsRequestMetrics, request, response);
1688         }
1689     }
1690
1691     /**
1692      * <p>
1693      * Deprecated. Use the <code>DeleteIdentity</code> operation to delete email addresses and domains.
1694      * </p>
1695      * 
1696      * @param deleteVerifiedEmailAddressRequest
1697      *        Represents a request to delete an email address from the list of email addresses you have attempted to
1698      *        verify under your AWS account.
1699      * @return Result of the DeleteVerifiedEmailAddress operation returned by the service.
1700      * @sample AmazonSimpleEmailService.DeleteVerifiedEmailAddress
1701      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DeleteVerifiedEmailAddress"
1702      *      target="_top">AWS API Documentation</a>
1703      */

1704     @Override
1705     public DeleteVerifiedEmailAddressResult deleteVerifiedEmailAddress(DeleteVerifiedEmailAddressRequest request) {
1706         request = beforeClientExecution(request);
1707         return executeDeleteVerifiedEmailAddress(request);
1708     }
1709
1710     @SdkInternalApi
1711     final DeleteVerifiedEmailAddressResult executeDeleteVerifiedEmailAddress(DeleteVerifiedEmailAddressRequest deleteVerifiedEmailAddressRequest) {
1712
1713         ExecutionContext executionContext = createExecutionContext(deleteVerifiedEmailAddressRequest);
1714         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1715         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1716         Request<DeleteVerifiedEmailAddressRequest> request = null;
1717         Response<DeleteVerifiedEmailAddressResult> response = null;
1718
1719         try {
1720             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1721             try {
1722                 request = new DeleteVerifiedEmailAddressRequestMarshaller().marshall(super.beforeMarshalling(deleteVerifiedEmailAddressRequest));
1723                 // Binds the request metrics to the current request.
1724                 request.setAWSRequestMetrics(awsRequestMetrics);
1725                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1726                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1727                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteVerifiedEmailAddress");
1728                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1729
1730             } finally {
1731                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1732             }
1733
1734             StaxResponseHandler<DeleteVerifiedEmailAddressResult> responseHandler = new StaxResponseHandler<DeleteVerifiedEmailAddressResult>(
1735                     new DeleteVerifiedEmailAddressResultStaxUnmarshaller());
1736             response = invoke(request, responseHandler, executionContext);
1737
1738             return response.getAwsResponse();
1739
1740         } finally {
1741
1742             endClientExecution(awsRequestMetrics, request, response);
1743         }
1744     }
1745
1746     /**
1747      * <p>
1748      * Returns the metadata and receipt rules for the receipt rule set that is currently active.
1749      * </p>
1750      * <p>
1751      * For information about setting up receipt rule sets, see the <a
1752      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rule-set.html">Amazon SES
1753      * Developer Guide</a>.
1754      * </p>
1755      * <p>
1756      * You can execute this operation no more than once per second.
1757      * </p>
1758      * 
1759      * @param describeActiveReceiptRuleSetRequest
1760      *        Represents a request to return the metadata and receipt rules for the receipt rule set that is currently
1761      *        active. You use receipt rule sets to receive email with Amazon SES. For more information, see the <a
1762      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
1763      *        Developer Guide</a>.
1764      * @return Result of the DescribeActiveReceiptRuleSet operation returned by the service.
1765      * @sample AmazonSimpleEmailService.DescribeActiveReceiptRuleSet
1766      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeActiveReceiptRuleSet"
1767      *      target="_top">AWS API Documentation</a>
1768      */

1769     @Override
1770     public DescribeActiveReceiptRuleSetResult describeActiveReceiptRuleSet(DescribeActiveReceiptRuleSetRequest request) {
1771         request = beforeClientExecution(request);
1772         return executeDescribeActiveReceiptRuleSet(request);
1773     }
1774
1775     @SdkInternalApi
1776     final DescribeActiveReceiptRuleSetResult executeDescribeActiveReceiptRuleSet(DescribeActiveReceiptRuleSetRequest describeActiveReceiptRuleSetRequest) {
1777
1778         ExecutionContext executionContext = createExecutionContext(describeActiveReceiptRuleSetRequest);
1779         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1780         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1781         Request<DescribeActiveReceiptRuleSetRequest> request = null;
1782         Response<DescribeActiveReceiptRuleSetResult> response = null;
1783
1784         try {
1785             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1786             try {
1787                 request = new DescribeActiveReceiptRuleSetRequestMarshaller().marshall(super.beforeMarshalling(describeActiveReceiptRuleSetRequest));
1788                 // Binds the request metrics to the current request.
1789                 request.setAWSRequestMetrics(awsRequestMetrics);
1790                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1791                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1792                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeActiveReceiptRuleSet");
1793                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1794
1795             } finally {
1796                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1797             }
1798
1799             StaxResponseHandler<DescribeActiveReceiptRuleSetResult> responseHandler = new StaxResponseHandler<DescribeActiveReceiptRuleSetResult>(
1800                     new DescribeActiveReceiptRuleSetResultStaxUnmarshaller());
1801             response = invoke(request, responseHandler, executionContext);
1802
1803             return response.getAwsResponse();
1804
1805         } finally {
1806
1807             endClientExecution(awsRequestMetrics, request, response);
1808         }
1809     }
1810
1811     /**
1812      * <p>
1813      * Returns the details of the specified configuration set. For information about using configuration sets, see the
1814      * <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
1815      * Developer Guide</a>.
1816      * </p>
1817      * <p>
1818      * You can execute this operation no more than once per second.
1819      * </p>
1820      * 
1821      * @param describeConfigurationSetRequest
1822      *        Represents a request to return the details of a configuration set. Configuration sets enable you to
1823      *        publish email sending events. For information about using configuration sets, see the <a
1824      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
1825      *        Developer Guide</a>.
1826      * @return Result of the DescribeConfigurationSet operation returned by the service.
1827      * @throws ConfigurationSetDoesNotExistException
1828      *         Indicates that the configuration set does not exist.
1829      * @sample AmazonSimpleEmailService.DescribeConfigurationSet
1830      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeConfigurationSet" target="_top">AWS
1831      *      API Documentation</a>
1832      */

1833     @Override
1834     public DescribeConfigurationSetResult describeConfigurationSet(DescribeConfigurationSetRequest request) {
1835         request = beforeClientExecution(request);
1836         return executeDescribeConfigurationSet(request);
1837     }
1838
1839     @SdkInternalApi
1840     final DescribeConfigurationSetResult executeDescribeConfigurationSet(DescribeConfigurationSetRequest describeConfigurationSetRequest) {
1841
1842         ExecutionContext executionContext = createExecutionContext(describeConfigurationSetRequest);
1843         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1844         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1845         Request<DescribeConfigurationSetRequest> request = null;
1846         Response<DescribeConfigurationSetResult> response = null;
1847
1848         try {
1849             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1850             try {
1851                 request = new DescribeConfigurationSetRequestMarshaller().marshall(super.beforeMarshalling(describeConfigurationSetRequest));
1852                 // Binds the request metrics to the current request.
1853                 request.setAWSRequestMetrics(awsRequestMetrics);
1854                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1855                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1856                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConfigurationSet");
1857                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1858
1859             } finally {
1860                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1861             }
1862
1863             StaxResponseHandler<DescribeConfigurationSetResult> responseHandler = new StaxResponseHandler<DescribeConfigurationSetResult>(
1864                     new DescribeConfigurationSetResultStaxUnmarshaller());
1865             response = invoke(request, responseHandler, executionContext);
1866
1867             return response.getAwsResponse();
1868
1869         } finally {
1870
1871             endClientExecution(awsRequestMetrics, request, response);
1872         }
1873     }
1874
1875     /**
1876      * <p>
1877      * Returns the details of the specified receipt rule.
1878      * </p>
1879      * <p>
1880      * For information about setting up receipt rules, see the <a
1881      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-receipt-rules.html">Amazon SES
1882      * Developer Guide</a>.
1883      * </p>
1884      * <p>
1885      * You can execute this operation no more than once per second.
1886      * </p>
1887      * 
1888      * @param describeReceiptRuleRequest
1889      *        Represents a request to return the details of a receipt rule. You use receipt rules to receive email with
1890      *        Amazon SES. For more information, see the <a
1891      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
1892      *        Developer Guide</a>.
1893      * @return Result of the DescribeReceiptRule operation returned by the service.
1894      * @throws RuleDoesNotExistException
1895      *         Indicates that the provided receipt rule does not exist.
1896      * @throws RuleSetDoesNotExistException
1897      *         Indicates that the provided receipt rule set does not exist.
1898      * @sample AmazonSimpleEmailService.DescribeReceiptRule
1899      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeReceiptRule" target="_top">AWS API
1900      *      Documentation</a>
1901      */

1902     @Override
1903     public DescribeReceiptRuleResult describeReceiptRule(DescribeReceiptRuleRequest request) {
1904         request = beforeClientExecution(request);
1905         return executeDescribeReceiptRule(request);
1906     }
1907
1908     @SdkInternalApi
1909     final DescribeReceiptRuleResult executeDescribeReceiptRule(DescribeReceiptRuleRequest describeReceiptRuleRequest) {
1910
1911         ExecutionContext executionContext = createExecutionContext(describeReceiptRuleRequest);
1912         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1913         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1914         Request<DescribeReceiptRuleRequest> request = null;
1915         Response<DescribeReceiptRuleResult> response = null;
1916
1917         try {
1918             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1919             try {
1920                 request = new DescribeReceiptRuleRequestMarshaller().marshall(super.beforeMarshalling(describeReceiptRuleRequest));
1921                 // Binds the request metrics to the current request.
1922                 request.setAWSRequestMetrics(awsRequestMetrics);
1923                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1924                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1925                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeReceiptRule");
1926                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1927
1928             } finally {
1929                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1930             }
1931
1932             StaxResponseHandler<DescribeReceiptRuleResult> responseHandler = new StaxResponseHandler<DescribeReceiptRuleResult>(
1933                     new DescribeReceiptRuleResultStaxUnmarshaller());
1934             response = invoke(request, responseHandler, executionContext);
1935
1936             return response.getAwsResponse();
1937
1938         } finally {
1939
1940             endClientExecution(awsRequestMetrics, request, response);
1941         }
1942     }
1943
1944     /**
1945      * <p>
1946      * Returns the details of the specified receipt rule set.
1947      * </p>
1948      * <p>
1949      * For information about managing receipt rule sets, see the <a
1950      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html"
1951      * >Amazon SES Developer Guide</a>.
1952      * </p>
1953      * <p>
1954      * You can execute this operation no more than once per second.
1955      * </p>
1956      * 
1957      * @param describeReceiptRuleSetRequest
1958      *        Represents a request to return the details of a receipt rule set. You use receipt rule sets to receive
1959      *        email with Amazon SES. For more information, see the <a
1960      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
1961      *        Developer Guide</a>.
1962      * @return Result of the DescribeReceiptRuleSet operation returned by the service.
1963      * @throws RuleSetDoesNotExistException
1964      *         Indicates that the provided receipt rule set does not exist.
1965      * @sample AmazonSimpleEmailService.DescribeReceiptRuleSet
1966      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/DescribeReceiptRuleSet" target="_top">AWS
1967      *      API Documentation</a>
1968      */

1969     @Override
1970     public DescribeReceiptRuleSetResult describeReceiptRuleSet(DescribeReceiptRuleSetRequest request) {
1971         request = beforeClientExecution(request);
1972         return executeDescribeReceiptRuleSet(request);
1973     }
1974
1975     @SdkInternalApi
1976     final DescribeReceiptRuleSetResult executeDescribeReceiptRuleSet(DescribeReceiptRuleSetRequest describeReceiptRuleSetRequest) {
1977
1978         ExecutionContext executionContext = createExecutionContext(describeReceiptRuleSetRequest);
1979         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1980         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1981         Request<DescribeReceiptRuleSetRequest> request = null;
1982         Response<DescribeReceiptRuleSetResult> response = null;
1983
1984         try {
1985             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1986             try {
1987                 request = new DescribeReceiptRuleSetRequestMarshaller().marshall(super.beforeMarshalling(describeReceiptRuleSetRequest));
1988                 // Binds the request metrics to the current request.
1989                 request.setAWSRequestMetrics(awsRequestMetrics);
1990                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
1991                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
1992                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeReceiptRuleSet");
1993                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1994
1995             } finally {
1996                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1997             }
1998
1999             StaxResponseHandler<DescribeReceiptRuleSetResult> responseHandler = new StaxResponseHandler<DescribeReceiptRuleSetResult>(
2000                     new DescribeReceiptRuleSetResultStaxUnmarshaller());
2001             response = invoke(request, responseHandler, executionContext);
2002
2003             return response.getAwsResponse();
2004
2005         } finally {
2006
2007             endClientExecution(awsRequestMetrics, request, response);
2008         }
2009     }
2010
2011     /**
2012      * <p>
2013      * Returns the email sending status of the Amazon SES account for the current region.
2014      * </p>
2015      * <p>
2016      * You can execute this operation no more than once per second.
2017      * </p>
2018      * 
2019      * @param getAccountSendingEnabledRequest
2020      * @return Result of the GetAccountSendingEnabled operation returned by the service.
2021      * @sample AmazonSimpleEmailService.GetAccountSendingEnabled
2022      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetAccountSendingEnabled" target="_top">AWS
2023      *      API Documentation</a>
2024      */

2025     @Override
2026     public GetAccountSendingEnabledResult getAccountSendingEnabled(GetAccountSendingEnabledRequest request) {
2027         request = beforeClientExecution(request);
2028         return executeGetAccountSendingEnabled(request);
2029     }
2030
2031     @SdkInternalApi
2032     final GetAccountSendingEnabledResult executeGetAccountSendingEnabled(GetAccountSendingEnabledRequest getAccountSendingEnabledRequest) {
2033
2034         ExecutionContext executionContext = createExecutionContext(getAccountSendingEnabledRequest);
2035         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2036         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2037         Request<GetAccountSendingEnabledRequest> request = null;
2038         Response<GetAccountSendingEnabledResult> response = null;
2039
2040         try {
2041             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2042             try {
2043                 request = new GetAccountSendingEnabledRequestMarshaller().marshall(super.beforeMarshalling(getAccountSendingEnabledRequest));
2044                 // Binds the request metrics to the current request.
2045                 request.setAWSRequestMetrics(awsRequestMetrics);
2046                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2047                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2048                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAccountSendingEnabled");
2049                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2050
2051             } finally {
2052                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2053             }
2054
2055             StaxResponseHandler<GetAccountSendingEnabledResult> responseHandler = new StaxResponseHandler<GetAccountSendingEnabledResult>(
2056                     new GetAccountSendingEnabledResultStaxUnmarshaller());
2057             response = invoke(request, responseHandler, executionContext);
2058
2059             return response.getAwsResponse();
2060
2061         } finally {
2062
2063             endClientExecution(awsRequestMetrics, request, response);
2064         }
2065     }
2066
2067     /**
2068      * <p>
2069      * Returns the custom email verification template for the template name you specify.
2070      * </p>
2071      * <p>
2072      * For more information about custom verification email templates, see <a
2073      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html">Using Custom
2074      * Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.
2075      * </p>
2076      * <p>
2077      * You can execute this operation no more than once per second.
2078      * </p>
2079      * 
2080      * @param getCustomVerificationEmailTemplateRequest
2081      *        Represents a request to retrieve an existing custom verification email template.
2082      * @return Result of the GetCustomVerificationEmailTemplate operation returned by the service.
2083      * @throws CustomVerificationEmailTemplateDoesNotExistException
2084      *         Indicates that a custom verification email template with the name you specified does not exist.
2085      * @sample AmazonSimpleEmailService.GetCustomVerificationEmailTemplate
2086      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetCustomVerificationEmailTemplate"
2087      *      target="_top">AWS API Documentation</a>
2088      */

2089     @Override
2090     public GetCustomVerificationEmailTemplateResult getCustomVerificationEmailTemplate(GetCustomVerificationEmailTemplateRequest request) {
2091         request = beforeClientExecution(request);
2092         return executeGetCustomVerificationEmailTemplate(request);
2093     }
2094
2095     @SdkInternalApi
2096     final GetCustomVerificationEmailTemplateResult executeGetCustomVerificationEmailTemplate(
2097             GetCustomVerificationEmailTemplateRequest getCustomVerificationEmailTemplateRequest) {
2098
2099         ExecutionContext executionContext = createExecutionContext(getCustomVerificationEmailTemplateRequest);
2100         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2101         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2102         Request<GetCustomVerificationEmailTemplateRequest> request = null;
2103         Response<GetCustomVerificationEmailTemplateResult> response = null;
2104
2105         try {
2106             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2107             try {
2108                 request = new GetCustomVerificationEmailTemplateRequestMarshaller()
2109                         .marshall(super.beforeMarshalling(getCustomVerificationEmailTemplateRequest));
2110                 // Binds the request metrics to the current request.
2111                 request.setAWSRequestMetrics(awsRequestMetrics);
2112                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2113                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2114                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCustomVerificationEmailTemplate");
2115                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2116
2117             } finally {
2118                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2119             }
2120
2121             StaxResponseHandler<GetCustomVerificationEmailTemplateResult> responseHandler = new StaxResponseHandler<GetCustomVerificationEmailTemplateResult>(
2122                     new GetCustomVerificationEmailTemplateResultStaxUnmarshaller());
2123             response = invoke(request, responseHandler, executionContext);
2124
2125             return response.getAwsResponse();
2126
2127         } finally {
2128
2129             endClientExecution(awsRequestMetrics, request, response);
2130         }
2131     }
2132
2133     /**
2134      * <p>
2135      * Returns the current status of Easy DKIM signing for an entity. For domain name identities, this operation also
2136      * returns the DKIM tokens that are required for Easy DKIM signing, and whether Amazon SES has successfully verified
2137      * that these tokens have been published.
2138      * </p>
2139      * <p>
2140      * This operation takes a list of identities as input and returns the following information for each:
2141      * </p>
2142      * <ul>
2143      * <li>
2144      * <p>
2145      * Whether Easy DKIM signing is enabled or disabled.
2146      * </p>
2147      * </li>
2148      * <li>
2149      * <p>
2150      * A set of DKIM tokens that represent the identity. If the identity is an email address, the tokens represent the
2151      * domain of that address.
2152      * </p>
2153      * </li>
2154      * <li>
2155      * <p>
2156      * Whether Amazon SES has successfully verified the DKIM tokens published in the domain's DNS. This information is
2157      * only returned for domain name identities, not for email addresses.
2158      * </p>
2159      * </li>
2160      * </ul>
2161      * <p>
2162      * This operation is throttled at one request per second and can only get DKIM attributes for up to 100 identities
2163      * at a time.
2164      * </p>
2165      * <p>
2166      * For more information about creating DNS records using DKIM tokens, go to the <a
2167      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim-dns-records.html">Amazon SES Developer
2168      * Guide</a>.
2169      * </p>
2170      * 
2171      * @param getIdentityDkimAttributesRequest
2172      *        Represents a request for the status of Amazon SES Easy DKIM signing for an identity. For domain
2173      *        identities, this request also returns the DKIM tokens that are required for Easy DKIM signing, and whether
2174      *        Amazon SES successfully verified that these tokens were published. For more information about Easy DKIM,
2175      *        see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Amazon SES
2176      *        Developer Guide</a>.
2177      * @return Result of the GetIdentityDkimAttributes operation returned by the service.
2178      * @sample AmazonSimpleEmailService.GetIdentityDkimAttributes
2179      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityDkimAttributes"
2180      *      target="_top">AWS API Documentation</a>
2181      */

2182     @Override
2183     public GetIdentityDkimAttributesResult getIdentityDkimAttributes(GetIdentityDkimAttributesRequest request) {
2184         request = beforeClientExecution(request);
2185         return executeGetIdentityDkimAttributes(request);
2186     }
2187
2188     @SdkInternalApi
2189     final GetIdentityDkimAttributesResult executeGetIdentityDkimAttributes(GetIdentityDkimAttributesRequest getIdentityDkimAttributesRequest) {
2190
2191         ExecutionContext executionContext = createExecutionContext(getIdentityDkimAttributesRequest);
2192         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2193         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2194         Request<GetIdentityDkimAttributesRequest> request = null;
2195         Response<GetIdentityDkimAttributesResult> response = null;
2196
2197         try {
2198             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2199             try {
2200                 request = new GetIdentityDkimAttributesRequestMarshaller().marshall(super.beforeMarshalling(getIdentityDkimAttributesRequest));
2201                 // Binds the request metrics to the current request.
2202                 request.setAWSRequestMetrics(awsRequestMetrics);
2203                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2204                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2205                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetIdentityDkimAttributes");
2206                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2207
2208             } finally {
2209                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2210             }
2211
2212             StaxResponseHandler<GetIdentityDkimAttributesResult> responseHandler = new StaxResponseHandler<GetIdentityDkimAttributesResult>(
2213                     new GetIdentityDkimAttributesResultStaxUnmarshaller());
2214             response = invoke(request, responseHandler, executionContext);
2215
2216             return response.getAwsResponse();
2217
2218         } finally {
2219
2220             endClientExecution(awsRequestMetrics, request, response);
2221         }
2222     }
2223
2224     /**
2225      * <p>
2226      * Returns the custom MAIL FROM attributes for a list of identities (email addresses : domains).
2227      * </p>
2228      * <p>
2229      * This operation is throttled at one request per second and can only get custom MAIL FROM attributes for up to 100
2230      * identities at a time.
2231      * </p>
2232      * 
2233      * @param getIdentityMailFromDomainAttributesRequest
2234      *        Represents a request to return the Amazon SES custom MAIL FROM attributes for a list of identities. For
2235      *        information about using a custom MAIL FROM domain, see the <a
2236      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html">Amazon SES Developer
2237      *        Guide</a>.
2238      * @return Result of the GetIdentityMailFromDomainAttributes operation returned by the service.
2239      * @sample AmazonSimpleEmailService.GetIdentityMailFromDomainAttributes
2240      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityMailFromDomainAttributes"
2241      *      target="_top">AWS API Documentation</a>
2242      */

2243     @Override
2244     public GetIdentityMailFromDomainAttributesResult getIdentityMailFromDomainAttributes(GetIdentityMailFromDomainAttributesRequest request) {
2245         request = beforeClientExecution(request);
2246         return executeGetIdentityMailFromDomainAttributes(request);
2247     }
2248
2249     @SdkInternalApi
2250     final GetIdentityMailFromDomainAttributesResult executeGetIdentityMailFromDomainAttributes(
2251             GetIdentityMailFromDomainAttributesRequest getIdentityMailFromDomainAttributesRequest) {
2252
2253         ExecutionContext executionContext = createExecutionContext(getIdentityMailFromDomainAttributesRequest);
2254         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2255         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2256         Request<GetIdentityMailFromDomainAttributesRequest> request = null;
2257         Response<GetIdentityMailFromDomainAttributesResult> response = null;
2258
2259         try {
2260             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2261             try {
2262                 request = new GetIdentityMailFromDomainAttributesRequestMarshaller().marshall(super
2263                         .beforeMarshalling(getIdentityMailFromDomainAttributesRequest));
2264                 // Binds the request metrics to the current request.
2265                 request.setAWSRequestMetrics(awsRequestMetrics);
2266                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2267                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2268                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetIdentityMailFromDomainAttributes");
2269                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2270
2271             } finally {
2272                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2273             }
2274
2275             StaxResponseHandler<GetIdentityMailFromDomainAttributesResult> responseHandler = new StaxResponseHandler<GetIdentityMailFromDomainAttributesResult>(
2276                     new GetIdentityMailFromDomainAttributesResultStaxUnmarshaller());
2277             response = invoke(request, responseHandler, executionContext);
2278
2279             return response.getAwsResponse();
2280
2281         } finally {
2282
2283             endClientExecution(awsRequestMetrics, request, response);
2284         }
2285     }
2286
2287     /**
2288      * <p>
2289      * Given a list of verified identities (email addresses and/or domains), returns a structure describing identity
2290      * notification attributes.
2291      * </p>
2292      * <p>
2293      * This operation is throttled at one request per second and can only get notification attributes for up to 100
2294      * identities at a time.
2295      * </p>
2296      * <p>
2297      * For more information about using notifications with Amazon SES, see the <a
2298      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html">Amazon SES Developer Guide</a>.
2299      * </p>
2300      * 
2301      * @param getIdentityNotificationAttributesRequest
2302      *        Represents a request to return the notification attributes for a list of identities you verified with
2303      *        Amazon SES. For information about Amazon SES notifications, see the <a
2304      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html">Amazon SES Developer
2305      *        Guide</a>.
2306      * @return Result of the GetIdentityNotificationAttributes operation returned by the service.
2307      * @sample AmazonSimpleEmailService.GetIdentityNotificationAttributes
2308      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityNotificationAttributes"
2309      *      target="_top">AWS API Documentation</a>
2310      */

2311     @Override
2312     public GetIdentityNotificationAttributesResult getIdentityNotificationAttributes(GetIdentityNotificationAttributesRequest request) {
2313         request = beforeClientExecution(request);
2314         return executeGetIdentityNotificationAttributes(request);
2315     }
2316
2317     @SdkInternalApi
2318     final GetIdentityNotificationAttributesResult executeGetIdentityNotificationAttributes(
2319             GetIdentityNotificationAttributesRequest getIdentityNotificationAttributesRequest) {
2320
2321         ExecutionContext executionContext = createExecutionContext(getIdentityNotificationAttributesRequest);
2322         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2323         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2324         Request<GetIdentityNotificationAttributesRequest> request = null;
2325         Response<GetIdentityNotificationAttributesResult> response = null;
2326
2327         try {
2328             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2329             try {
2330                 request = new GetIdentityNotificationAttributesRequestMarshaller().marshall(super.beforeMarshalling(getIdentityNotificationAttributesRequest));
2331                 // Binds the request metrics to the current request.
2332                 request.setAWSRequestMetrics(awsRequestMetrics);
2333                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2334                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2335                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetIdentityNotificationAttributes");
2336                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2337
2338             } finally {
2339                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2340             }
2341
2342             StaxResponseHandler<GetIdentityNotificationAttributesResult> responseHandler = new StaxResponseHandler<GetIdentityNotificationAttributesResult>(
2343                     new GetIdentityNotificationAttributesResultStaxUnmarshaller());
2344             response = invoke(request, responseHandler, executionContext);
2345
2346             return response.getAwsResponse();
2347
2348         } finally {
2349
2350             endClientExecution(awsRequestMetrics, request, response);
2351         }
2352     }
2353
2354     /**
2355      * <p>
2356      * Returns the requested sending authorization policies for the given identity (an email address or a domain). The
2357      * policies are returned as a map of policy names to policy contents. You can retrieve a maximum of 20 policies at a
2358      * time.
2359      * </p>
2360      * <note>
2361      * <p>
2362      * This API is for the identity owner only. If you have not verified the identity, this API will return an error.
2363      * </p>
2364      * </note>
2365      * <p>
2366      * Sending authorization is a feature that enables an identity owner to authorize other senders to use its
2367      * identities. For information about using sending authorization, see the <a
2368      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer
2369      * Guide</a>.
2370      * </p>
2371      * <p>
2372      * You can execute this operation no more than once per second.
2373      * </p>
2374      * 
2375      * @param getIdentityPoliciesRequest
2376      *        Represents a request to return the requested sending authorization policies for an identity. Sending
2377      *        authorization is an Amazon SES feature that enables you to authorize other senders to use your identities.
2378      *        For information, see the <a
2379      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES
2380      *        Developer Guide</a>.
2381      * @return Result of the GetIdentityPolicies operation returned by the service.
2382      * @sample AmazonSimpleEmailService.GetIdentityPolicies
2383      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityPolicies" target="_top">AWS API
2384      *      Documentation</a>
2385      */

2386     @Override
2387     public GetIdentityPoliciesResult getIdentityPolicies(GetIdentityPoliciesRequest request) {
2388         request = beforeClientExecution(request);
2389         return executeGetIdentityPolicies(request);
2390     }
2391
2392     @SdkInternalApi
2393     final GetIdentityPoliciesResult executeGetIdentityPolicies(GetIdentityPoliciesRequest getIdentityPoliciesRequest) {
2394
2395         ExecutionContext executionContext = createExecutionContext(getIdentityPoliciesRequest);
2396         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2397         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2398         Request<GetIdentityPoliciesRequest> request = null;
2399         Response<GetIdentityPoliciesResult> response = null;
2400
2401         try {
2402             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2403             try {
2404                 request = new GetIdentityPoliciesRequestMarshaller().marshall(super.beforeMarshalling(getIdentityPoliciesRequest));
2405                 // Binds the request metrics to the current request.
2406                 request.setAWSRequestMetrics(awsRequestMetrics);
2407                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2408                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2409                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetIdentityPolicies");
2410                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2411
2412             } finally {
2413                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2414             }
2415
2416             StaxResponseHandler<GetIdentityPoliciesResult> responseHandler = new StaxResponseHandler<GetIdentityPoliciesResult>(
2417                     new GetIdentityPoliciesResultStaxUnmarshaller());
2418             response = invoke(request, responseHandler, executionContext);
2419
2420             return response.getAwsResponse();
2421
2422         } finally {
2423
2424             endClientExecution(awsRequestMetrics, request, response);
2425         }
2426     }
2427
2428     /**
2429      * <p>
2430      * Given a list of identities (email addresses and/or domains), returns the verification status and (for domain
2431      * identities) the verification token for each identity.
2432      * </p>
2433      * <p>
2434      * The verification status of an email address is "Pending" until the email address owner clicks the link within the
2435      * verification email that Amazon SES sent to that address. If the email address owner clicks the link within 24
2436      * hours, the verification status of the email address changes to "Success". If the link is not clicked within 24
2437      * hours, the verification status changes to "Failed." In that caseif you still want to verify the email address,
2438      * you must restart the verification process from the beginning.
2439      * </p>
2440      * <p>
2441      * For domain identities, the domain's verification status is "Pending" as Amazon SES searches for the required TXT
2442      * record in the DNS settings of the domain. When Amazon SES detects the record, the domain's verification status
2443      * changes to "Success". If Amazon SES is unable to detect the record within 72 hours, the domain's verification
2444      * status changes to "Failed." In that caseif you still want to verify the domain, you must restart the
2445      * verification process from the beginning.
2446      * </p>
2447      * <p>
2448      * This operation is throttled at one request per second and can only get verification attributes for up to 100
2449      * identities at a time.
2450      * </p>
2451      * 
2452      * @param getIdentityVerificationAttributesRequest
2453      *        Represents a request to return the Amazon SES verification status of a list of identities. For domain
2454      *        identities, this request also returns the verification token. For information about verifying identities
2455      *        with Amazon SES, see the <a
2456      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html">Amazon SES
2457      *        Developer Guide</a>.
2458      * @return Result of the GetIdentityVerificationAttributes operation returned by the service.
2459      * @sample AmazonSimpleEmailService.GetIdentityVerificationAttributes
2460      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetIdentityVerificationAttributes"
2461      *      target="_top">AWS API Documentation</a>
2462      */

2463     @Override
2464     public GetIdentityVerificationAttributesResult getIdentityVerificationAttributes(GetIdentityVerificationAttributesRequest request) {
2465         request = beforeClientExecution(request);
2466         return executeGetIdentityVerificationAttributes(request);
2467     }
2468
2469     @SdkInternalApi
2470     final GetIdentityVerificationAttributesResult executeGetIdentityVerificationAttributes(
2471             GetIdentityVerificationAttributesRequest getIdentityVerificationAttributesRequest) {
2472
2473         ExecutionContext executionContext = createExecutionContext(getIdentityVerificationAttributesRequest);
2474         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2475         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2476         Request<GetIdentityVerificationAttributesRequest> request = null;
2477         Response<GetIdentityVerificationAttributesResult> response = null;
2478
2479         try {
2480             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2481             try {
2482                 request = new GetIdentityVerificationAttributesRequestMarshaller().marshall(super.beforeMarshalling(getIdentityVerificationAttributesRequest));
2483                 // Binds the request metrics to the current request.
2484                 request.setAWSRequestMetrics(awsRequestMetrics);
2485                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2486                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2487                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetIdentityVerificationAttributes");
2488                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2489
2490             } finally {
2491                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2492             }
2493
2494             StaxResponseHandler<GetIdentityVerificationAttributesResult> responseHandler = new StaxResponseHandler<GetIdentityVerificationAttributesResult>(
2495                     new GetIdentityVerificationAttributesResultStaxUnmarshaller());
2496             response = invoke(request, responseHandler, executionContext);
2497
2498             return response.getAwsResponse();
2499
2500         } finally {
2501
2502             endClientExecution(awsRequestMetrics, request, response);
2503         }
2504     }
2505
2506     /**
2507      * <p>
2508      * Provides the sending limits for the Amazon SES account.
2509      * </p>
2510      * <p>
2511      * You can execute this operation no more than once per second.
2512      * </p>
2513      * 
2514      * @param getSendQuotaRequest
2515      * @return Result of the GetSendQuota operation returned by the service.
2516      * @sample AmazonSimpleEmailService.GetSendQuota
2517      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetSendQuota" target="_top">AWS API
2518      *      Documentation</a>
2519      */

2520     @Override
2521     public GetSendQuotaResult getSendQuota(GetSendQuotaRequest request) {
2522         request = beforeClientExecution(request);
2523         return executeGetSendQuota(request);
2524     }
2525
2526     @SdkInternalApi
2527     final GetSendQuotaResult executeGetSendQuota(GetSendQuotaRequest getSendQuotaRequest) {
2528
2529         ExecutionContext executionContext = createExecutionContext(getSendQuotaRequest);
2530         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2531         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2532         Request<GetSendQuotaRequest> request = null;
2533         Response<GetSendQuotaResult> response = null;
2534
2535         try {
2536             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2537             try {
2538                 request = new GetSendQuotaRequestMarshaller().marshall(super.beforeMarshalling(getSendQuotaRequest));
2539                 // Binds the request metrics to the current request.
2540                 request.setAWSRequestMetrics(awsRequestMetrics);
2541                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2542                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2543                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSendQuota");
2544                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2545
2546             } finally {
2547                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2548             }
2549
2550             StaxResponseHandler<GetSendQuotaResult> responseHandler = new StaxResponseHandler<GetSendQuotaResult>(new GetSendQuotaResultStaxUnmarshaller());
2551             response = invoke(request, responseHandler, executionContext);
2552
2553             return response.getAwsResponse();
2554
2555         } finally {
2556
2557             endClientExecution(awsRequestMetrics, request, response);
2558         }
2559     }
2560
2561     @Override
2562     public GetSendQuotaResult getSendQuota() {
2563         return getSendQuota(new GetSendQuotaRequest());
2564     }
2565
2566     /**
2567      * <p>
2568      * Provides sending statistics for the current AWS Region. The result is a list of data points, representing the
2569      * last two weeks of sending activity. Each data point in the list contains statistics for a 15-minute period of
2570      * time.
2571      * </p>
2572      * <p>
2573      * You can execute this operation no more than once per second.
2574      * </p>
2575      * 
2576      * @param getSendStatisticsRequest
2577      * @return Result of the GetSendStatistics operation returned by the service.
2578      * @sample AmazonSimpleEmailService.GetSendStatistics
2579      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetSendStatistics" target="_top">AWS API
2580      *      Documentation</a>
2581      */

2582     @Override
2583     public GetSendStatisticsResult getSendStatistics(GetSendStatisticsRequest request) {
2584         request = beforeClientExecution(request);
2585         return executeGetSendStatistics(request);
2586     }
2587
2588     @SdkInternalApi
2589     final GetSendStatisticsResult executeGetSendStatistics(GetSendStatisticsRequest getSendStatisticsRequest) {
2590
2591         ExecutionContext executionContext = createExecutionContext(getSendStatisticsRequest);
2592         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2593         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2594         Request<GetSendStatisticsRequest> request = null;
2595         Response<GetSendStatisticsResult> response = null;
2596
2597         try {
2598             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2599             try {
2600                 request = new GetSendStatisticsRequestMarshaller().marshall(super.beforeMarshalling(getSendStatisticsRequest));
2601                 // Binds the request metrics to the current request.
2602                 request.setAWSRequestMetrics(awsRequestMetrics);
2603                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2604                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2605                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSendStatistics");
2606                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2607
2608             } finally {
2609                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2610             }
2611
2612             StaxResponseHandler<GetSendStatisticsResult> responseHandler = new StaxResponseHandler<GetSendStatisticsResult>(
2613                     new GetSendStatisticsResultStaxUnmarshaller());
2614             response = invoke(request, responseHandler, executionContext);
2615
2616             return response.getAwsResponse();
2617
2618         } finally {
2619
2620             endClientExecution(awsRequestMetrics, request, response);
2621         }
2622     }
2623
2624     @Override
2625     public GetSendStatisticsResult getSendStatistics() {
2626         return getSendStatistics(new GetSendStatisticsRequest());
2627     }
2628
2629     /**
2630      * <p>
2631      * Displays the template object (which includes the Subject line, HTML part and text part) for the template you
2632      * specify.
2633      * </p>
2634      * <p>
2635      * You can execute this operation no more than once per second.
2636      * </p>
2637      * 
2638      * @param getTemplateRequest
2639      * @return Result of the GetTemplate operation returned by the service.
2640      * @throws TemplateDoesNotExistException
2641      *         Indicates that the Template object you specified does not exist in your Amazon SES account.
2642      * @sample AmazonSimpleEmailService.GetTemplate
2643      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/GetTemplate" target="_top">AWS API
2644      *      Documentation</a>
2645      */

2646     @Override
2647     public GetTemplateResult getTemplate(GetTemplateRequest request) {
2648         request = beforeClientExecution(request);
2649         return executeGetTemplate(request);
2650     }
2651
2652     @SdkInternalApi
2653     final GetTemplateResult executeGetTemplate(GetTemplateRequest getTemplateRequest) {
2654
2655         ExecutionContext executionContext = createExecutionContext(getTemplateRequest);
2656         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2657         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2658         Request<GetTemplateRequest> request = null;
2659         Response<GetTemplateResult> response = null;
2660
2661         try {
2662             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2663             try {
2664                 request = new GetTemplateRequestMarshaller().marshall(super.beforeMarshalling(getTemplateRequest));
2665                 // Binds the request metrics to the current request.
2666                 request.setAWSRequestMetrics(awsRequestMetrics);
2667                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2668                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2669                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTemplate");
2670                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2671
2672             } finally {
2673                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2674             }
2675
2676             StaxResponseHandler<GetTemplateResult> responseHandler = new StaxResponseHandler<GetTemplateResult>(new GetTemplateResultStaxUnmarshaller());
2677             response = invoke(request, responseHandler, executionContext);
2678
2679             return response.getAwsResponse();
2680
2681         } finally {
2682
2683             endClientExecution(awsRequestMetrics, request, response);
2684         }
2685     }
2686
2687     /**
2688      * <p>
2689      * Provides a list of the configuration sets associated with your Amazon SES account in the current AWS Region. For
2690      * information about using configuration sets, see <a
2691      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Monitoring Your Amazon
2692      * SES Sending Activity</a> in the <i>Amazon SES Developer Guide.</i>
2693      * </p>
2694      * <p>
2695      * You can execute this operation no more than once per second. This operation will return up to 1,000 configuration
2696      * sets each time it is run. If your Amazon SES account has more than 1,000 configuration sets, this operation will
2697      * also return a NextToken element. You can then execute the <code>ListConfigurationSets</code> operation again,
2698      * passing the <code>NextToken</code> parameter and the value of the NextToken element to retrieve additional
2699      * results.
2700      * </p>
2701      * 
2702      * @param listConfigurationSetsRequest
2703      *        Represents a request to list the configuration sets associated with your AWS account. Configuration sets
2704      *        enable you to publish email sending events. For information about using configuration sets, see the <a
2705      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
2706      *        Developer Guide</a>.
2707      * @return Result of the ListConfigurationSets operation returned by the service.
2708      * @sample AmazonSimpleEmailService.ListConfigurationSets
2709      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListConfigurationSets" target="_top">AWS
2710      *      API Documentation</a>
2711      */

2712     @Override
2713     public ListConfigurationSetsResult listConfigurationSets(ListConfigurationSetsRequest request) {
2714         request = beforeClientExecution(request);
2715         return executeListConfigurationSets(request);
2716     }
2717
2718     @SdkInternalApi
2719     final ListConfigurationSetsResult executeListConfigurationSets(ListConfigurationSetsRequest listConfigurationSetsRequest) {
2720
2721         ExecutionContext executionContext = createExecutionContext(listConfigurationSetsRequest);
2722         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2723         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2724         Request<ListConfigurationSetsRequest> request = null;
2725         Response<ListConfigurationSetsResult> response = null;
2726
2727         try {
2728             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2729             try {
2730                 request = new ListConfigurationSetsRequestMarshaller().marshall(super.beforeMarshalling(listConfigurationSetsRequest));
2731                 // Binds the request metrics to the current request.
2732                 request.setAWSRequestMetrics(awsRequestMetrics);
2733                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2734                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2735                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConfigurationSets");
2736                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2737
2738             } finally {
2739                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2740             }
2741
2742             StaxResponseHandler<ListConfigurationSetsResult> responseHandler = new StaxResponseHandler<ListConfigurationSetsResult>(
2743                     new ListConfigurationSetsResultStaxUnmarshaller());
2744             response = invoke(request, responseHandler, executionContext);
2745
2746             return response.getAwsResponse();
2747
2748         } finally {
2749
2750             endClientExecution(awsRequestMetrics, request, response);
2751         }
2752     }
2753
2754     /**
2755      * <p>
2756      * Lists the existing custom verification email templates for your account in the current AWS Region.
2757      * </p>
2758      * <p>
2759      * For more information about custom verification email templates, see <a
2760      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html">Using Custom
2761      * Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.
2762      * </p>
2763      * <p>
2764      * You can execute this operation no more than once per second.
2765      * </p>
2766      * 
2767      * @param listCustomVerificationEmailTemplatesRequest
2768      *        Represents a request to list the existing custom verification email templates for your account.</p>
2769      *        <p>
2770      *        For more information about custom verification email templates, see <a
2771      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html">Using Custom
2772      *        Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.
2773      * @return Result of the ListCustomVerificationEmailTemplates operation returned by the service.
2774      * @sample AmazonSimpleEmailService.ListCustomVerificationEmailTemplates
2775      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListCustomVerificationEmailTemplates"
2776      *      target="_top">AWS API Documentation</a>
2777      */

2778     @Override
2779     public ListCustomVerificationEmailTemplatesResult listCustomVerificationEmailTemplates(ListCustomVerificationEmailTemplatesRequest request) {
2780         request = beforeClientExecution(request);
2781         return executeListCustomVerificationEmailTemplates(request);
2782     }
2783
2784     @SdkInternalApi
2785     final ListCustomVerificationEmailTemplatesResult executeListCustomVerificationEmailTemplates(
2786             ListCustomVerificationEmailTemplatesRequest listCustomVerificationEmailTemplatesRequest) {
2787
2788         ExecutionContext executionContext = createExecutionContext(listCustomVerificationEmailTemplatesRequest);
2789         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2790         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2791         Request<ListCustomVerificationEmailTemplatesRequest> request = null;
2792         Response<ListCustomVerificationEmailTemplatesResult> response = null;
2793
2794         try {
2795             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2796             try {
2797                 request = new ListCustomVerificationEmailTemplatesRequestMarshaller().marshall(super
2798                         .beforeMarshalling(listCustomVerificationEmailTemplatesRequest));
2799                 // Binds the request metrics to the current request.
2800                 request.setAWSRequestMetrics(awsRequestMetrics);
2801                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2802                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2803                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListCustomVerificationEmailTemplates");
2804                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2805
2806             } finally {
2807                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2808             }
2809
2810             StaxResponseHandler<ListCustomVerificationEmailTemplatesResult> responseHandler = new StaxResponseHandler<ListCustomVerificationEmailTemplatesResult>(
2811                     new ListCustomVerificationEmailTemplatesResultStaxUnmarshaller());
2812             response = invoke(request, responseHandler, executionContext);
2813
2814             return response.getAwsResponse();
2815
2816         } finally {
2817
2818             endClientExecution(awsRequestMetrics, request, response);
2819         }
2820     }
2821
2822     /**
2823      * <p>
2824      * Returns a list containing all of the identities (email addresses and domains) for your AWS account in the current
2825      * AWS Region, regardless of verification status.
2826      * </p>
2827      * <p>
2828      * You can execute this operation no more than once per second.
2829      * </p>
2830      * 
2831      * @param listIdentitiesRequest
2832      *        Represents a request to return a list of all identities (email addresses and domains) that you have
2833      *        attempted to verify under your AWS account, regardless of verification status.
2834      * @return Result of the ListIdentities operation returned by the service.
2835      * @sample AmazonSimpleEmailService.ListIdentities
2836      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListIdentities" target="_top">AWS API
2837      *      Documentation</a>
2838      */

2839     @Override
2840     public ListIdentitiesResult listIdentities(ListIdentitiesRequest request) {
2841         request = beforeClientExecution(request);
2842         return executeListIdentities(request);
2843     }
2844
2845     @SdkInternalApi
2846     final ListIdentitiesResult executeListIdentities(ListIdentitiesRequest listIdentitiesRequest) {
2847
2848         ExecutionContext executionContext = createExecutionContext(listIdentitiesRequest);
2849         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2850         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2851         Request<ListIdentitiesRequest> request = null;
2852         Response<ListIdentitiesResult> response = null;
2853
2854         try {
2855             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2856             try {
2857                 request = new ListIdentitiesRequestMarshaller().marshall(super.beforeMarshalling(listIdentitiesRequest));
2858                 // Binds the request metrics to the current request.
2859                 request.setAWSRequestMetrics(awsRequestMetrics);
2860                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2861                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2862                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIdentities");
2863                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2864
2865             } finally {
2866                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2867             }
2868
2869             StaxResponseHandler<ListIdentitiesResult> responseHandler = new StaxResponseHandler<ListIdentitiesResult>(
2870                     new ListIdentitiesResultStaxUnmarshaller());
2871             response = invoke(request, responseHandler, executionContext);
2872
2873             return response.getAwsResponse();
2874
2875         } finally {
2876
2877             endClientExecution(awsRequestMetrics, request, response);
2878         }
2879     }
2880
2881     @Override
2882     public ListIdentitiesResult listIdentities() {
2883         return listIdentities(new ListIdentitiesRequest());
2884     }
2885
2886     /**
2887      * <p>
2888      * Returns a list of sending authorization policies that are attached to the given identity (an email address or a
2889      * domain). This API returns only a list. If you want the actual policy content, you can use
2890      * <code>GetIdentityPolicies</code>.
2891      * </p>
2892      * <note>
2893      * <p>
2894      * This API is for the identity owner only. If you have not verified the identity, this API will return an error.
2895      * </p>
2896      * </note>
2897      * <p>
2898      * Sending authorization is a feature that enables an identity owner to authorize other senders to use its
2899      * identities. For information about using sending authorization, see the <a
2900      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer
2901      * Guide</a>.
2902      * </p>
2903      * <p>
2904      * You can execute this operation no more than once per second.
2905      * </p>
2906      * 
2907      * @param listIdentityPoliciesRequest
2908      *        Represents a request to return a list of sending authorization policies that are attached to an identity.
2909      *        Sending authorization is an Amazon SES feature that enables you to authorize other senders to use your
2910      *        identities. For information, see the <a
2911      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES
2912      *        Developer Guide</a>.
2913      * @return Result of the ListIdentityPolicies operation returned by the service.
2914      * @sample AmazonSimpleEmailService.ListIdentityPolicies
2915      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListIdentityPolicies" target="_top">AWS API
2916      *      Documentation</a>
2917      */

2918     @Override
2919     public ListIdentityPoliciesResult listIdentityPolicies(ListIdentityPoliciesRequest request) {
2920         request = beforeClientExecution(request);
2921         return executeListIdentityPolicies(request);
2922     }
2923
2924     @SdkInternalApi
2925     final ListIdentityPoliciesResult executeListIdentityPolicies(ListIdentityPoliciesRequest listIdentityPoliciesRequest) {
2926
2927         ExecutionContext executionContext = createExecutionContext(listIdentityPoliciesRequest);
2928         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2929         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2930         Request<ListIdentityPoliciesRequest> request = null;
2931         Response<ListIdentityPoliciesResult> response = null;
2932
2933         try {
2934             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
2935             try {
2936                 request = new ListIdentityPoliciesRequestMarshaller().marshall(super.beforeMarshalling(listIdentityPoliciesRequest));
2937                 // Binds the request metrics to the current request.
2938                 request.setAWSRequestMetrics(awsRequestMetrics);
2939                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
2940                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
2941                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListIdentityPolicies");
2942                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
2943
2944             } finally {
2945                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
2946             }
2947
2948             StaxResponseHandler<ListIdentityPoliciesResult> responseHandler = new StaxResponseHandler<ListIdentityPoliciesResult>(
2949                     new ListIdentityPoliciesResultStaxUnmarshaller());
2950             response = invoke(request, responseHandler, executionContext);
2951
2952             return response.getAwsResponse();
2953
2954         } finally {
2955
2956             endClientExecution(awsRequestMetrics, request, response);
2957         }
2958     }
2959
2960     /**
2961      * <p>
2962      * Lists the IP address filters associated with your AWS account in the current AWS Region.
2963      * </p>
2964      * <p>
2965      * For information about managing IP address filters, see the <a
2966      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-ip-filters.html">Amazon SES
2967      * Developer Guide</a>.
2968      * </p>
2969      * <p>
2970      * You can execute this operation no more than once per second.
2971      * </p>
2972      * 
2973      * @param listReceiptFiltersRequest
2974      *        Represents a request to list the IP address filters that exist under your AWS account. You use IP address
2975      *        filters when you receive email with Amazon SES. For more information, see the <a
2976      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
2977      *        Developer Guide</a>.
2978      * @return Result of the ListReceiptFilters operation returned by the service.
2979      * @sample AmazonSimpleEmailService.ListReceiptFilters
2980      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListReceiptFilters" target="_top">AWS API
2981      *      Documentation</a>
2982      */

2983     @Override
2984     public ListReceiptFiltersResult listReceiptFilters(ListReceiptFiltersRequest request) {
2985         request = beforeClientExecution(request);
2986         return executeListReceiptFilters(request);
2987     }
2988
2989     @SdkInternalApi
2990     final ListReceiptFiltersResult executeListReceiptFilters(ListReceiptFiltersRequest listReceiptFiltersRequest) {
2991
2992         ExecutionContext executionContext = createExecutionContext(listReceiptFiltersRequest);
2993         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
2994         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
2995         Request<ListReceiptFiltersRequest> request = null;
2996         Response<ListReceiptFiltersResult> response = null;
2997
2998         try {
2999             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3000             try {
3001                 request = new ListReceiptFiltersRequestMarshaller().marshall(super.beforeMarshalling(listReceiptFiltersRequest));
3002                 // Binds the request metrics to the current request.
3003                 request.setAWSRequestMetrics(awsRequestMetrics);
3004                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3005                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3006                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListReceiptFilters");
3007                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3008
3009             } finally {
3010                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3011             }
3012
3013             StaxResponseHandler<ListReceiptFiltersResult> responseHandler = new StaxResponseHandler<ListReceiptFiltersResult>(
3014                     new ListReceiptFiltersResultStaxUnmarshaller());
3015             response = invoke(request, responseHandler, executionContext);
3016
3017             return response.getAwsResponse();
3018
3019         } finally {
3020
3021             endClientExecution(awsRequestMetrics, request, response);
3022         }
3023     }
3024
3025     /**
3026      * <p>
3027      * Lists the receipt rule sets that exist under your AWS account in the current AWS Region. If there are additional
3028      * receipt rule sets to be retrieved, you will receive a <code>NextToken</code> that you can provide to the next
3029      * call to <code>ListReceiptRuleSets</code> to retrieve the additional entries.
3030      * </p>
3031      * <p>
3032      * For information about managing receipt rule sets, see the <a
3033      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html"
3034      * >Amazon SES Developer Guide</a>.
3035      * </p>
3036      * <p>
3037      * You can execute this operation no more than once per second.
3038      * </p>
3039      * 
3040      * @param listReceiptRuleSetsRequest
3041      *        Represents a request to list the receipt rule sets that exist under your AWS account. You use receipt rule
3042      *        sets to receive email with Amazon SES. For more information, see the <a
3043      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
3044      *        Developer Guide</a>.
3045      * @return Result of the ListReceiptRuleSets operation returned by the service.
3046      * @sample AmazonSimpleEmailService.ListReceiptRuleSets
3047      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListReceiptRuleSets" target="_top">AWS API
3048      *      Documentation</a>
3049      */

3050     @Override
3051     public ListReceiptRuleSetsResult listReceiptRuleSets(ListReceiptRuleSetsRequest request) {
3052         request = beforeClientExecution(request);
3053         return executeListReceiptRuleSets(request);
3054     }
3055
3056     @SdkInternalApi
3057     final ListReceiptRuleSetsResult executeListReceiptRuleSets(ListReceiptRuleSetsRequest listReceiptRuleSetsRequest) {
3058
3059         ExecutionContext executionContext = createExecutionContext(listReceiptRuleSetsRequest);
3060         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3061         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3062         Request<ListReceiptRuleSetsRequest> request = null;
3063         Response<ListReceiptRuleSetsResult> response = null;
3064
3065         try {
3066             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3067             try {
3068                 request = new ListReceiptRuleSetsRequestMarshaller().marshall(super.beforeMarshalling(listReceiptRuleSetsRequest));
3069                 // Binds the request metrics to the current request.
3070                 request.setAWSRequestMetrics(awsRequestMetrics);
3071                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3072                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3073                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListReceiptRuleSets");
3074                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3075
3076             } finally {
3077                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3078             }
3079
3080             StaxResponseHandler<ListReceiptRuleSetsResult> responseHandler = new StaxResponseHandler<ListReceiptRuleSetsResult>(
3081                     new ListReceiptRuleSetsResultStaxUnmarshaller());
3082             response = invoke(request, responseHandler, executionContext);
3083
3084             return response.getAwsResponse();
3085
3086         } finally {
3087
3088             endClientExecution(awsRequestMetrics, request, response);
3089         }
3090     }
3091
3092     /**
3093      * <p>
3094      * Lists the email templates present in your Amazon SES account in the current AWS Region.
3095      * </p>
3096      * <p>
3097      * You can execute this operation no more than once per second.
3098      * </p>
3099      * 
3100      * @param listTemplatesRequest
3101      * @return Result of the ListTemplates operation returned by the service.
3102      * @sample AmazonSimpleEmailService.ListTemplates
3103      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListTemplates" target="_top">AWS API
3104      *      Documentation</a>
3105      */

3106     @Override
3107     public ListTemplatesResult listTemplates(ListTemplatesRequest request) {
3108         request = beforeClientExecution(request);
3109         return executeListTemplates(request);
3110     }
3111
3112     @SdkInternalApi
3113     final ListTemplatesResult executeListTemplates(ListTemplatesRequest listTemplatesRequest) {
3114
3115         ExecutionContext executionContext = createExecutionContext(listTemplatesRequest);
3116         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3117         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3118         Request<ListTemplatesRequest> request = null;
3119         Response<ListTemplatesResult> response = null;
3120
3121         try {
3122             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3123             try {
3124                 request = new ListTemplatesRequestMarshaller().marshall(super.beforeMarshalling(listTemplatesRequest));
3125                 // Binds the request metrics to the current request.
3126                 request.setAWSRequestMetrics(awsRequestMetrics);
3127                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3128                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3129                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTemplates");
3130                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3131
3132             } finally {
3133                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3134             }
3135
3136             StaxResponseHandler<ListTemplatesResult> responseHandler = new StaxResponseHandler<ListTemplatesResult>(new ListTemplatesResultStaxUnmarshaller());
3137             response = invoke(request, responseHandler, executionContext);
3138
3139             return response.getAwsResponse();
3140
3141         } finally {
3142
3143             endClientExecution(awsRequestMetrics, request, response);
3144         }
3145     }
3146
3147     /**
3148      * <p>
3149      * Deprecated. Use the <code>ListIdentities</code> operation to list the email addresses and domains associated with
3150      * your account.
3151      * </p>
3152      * 
3153      * @param listVerifiedEmailAddressesRequest
3154      * @return Result of the ListVerifiedEmailAddresses operation returned by the service.
3155      * @sample AmazonSimpleEmailService.ListVerifiedEmailAddresses
3156      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ListVerifiedEmailAddresses"
3157      *      target="_top">AWS API Documentation</a>
3158      */

3159     @Override
3160     public ListVerifiedEmailAddressesResult listVerifiedEmailAddresses(ListVerifiedEmailAddressesRequest request) {
3161         request = beforeClientExecution(request);
3162         return executeListVerifiedEmailAddresses(request);
3163     }
3164
3165     @SdkInternalApi
3166     final ListVerifiedEmailAddressesResult executeListVerifiedEmailAddresses(ListVerifiedEmailAddressesRequest listVerifiedEmailAddressesRequest) {
3167
3168         ExecutionContext executionContext = createExecutionContext(listVerifiedEmailAddressesRequest);
3169         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3170         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3171         Request<ListVerifiedEmailAddressesRequest> request = null;
3172         Response<ListVerifiedEmailAddressesResult> response = null;
3173
3174         try {
3175             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3176             try {
3177                 request = new ListVerifiedEmailAddressesRequestMarshaller().marshall(super.beforeMarshalling(listVerifiedEmailAddressesRequest));
3178                 // Binds the request metrics to the current request.
3179                 request.setAWSRequestMetrics(awsRequestMetrics);
3180                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3181                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3182                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListVerifiedEmailAddresses");
3183                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3184
3185             } finally {
3186                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3187             }
3188
3189             StaxResponseHandler<ListVerifiedEmailAddressesResult> responseHandler = new StaxResponseHandler<ListVerifiedEmailAddressesResult>(
3190                     new ListVerifiedEmailAddressesResultStaxUnmarshaller());
3191             response = invoke(request, responseHandler, executionContext);
3192
3193             return response.getAwsResponse();
3194
3195         } finally {
3196
3197             endClientExecution(awsRequestMetrics, request, response);
3198         }
3199     }
3200
3201     @Override
3202     public ListVerifiedEmailAddressesResult listVerifiedEmailAddresses() {
3203         return listVerifiedEmailAddresses(new ListVerifiedEmailAddressesRequest());
3204     }
3205
3206     /**
3207      * <p>
3208      * Adds or updates the delivery options for a configuration set.
3209      * </p>
3210      * 
3211      * @param putConfigurationSetDeliveryOptionsRequest
3212      *        A request to modify the delivery options for a configuration set.
3213      * @return Result of the PutConfigurationSetDeliveryOptions operation returned by the service.
3214      * @throws ConfigurationSetDoesNotExistException
3215      *         Indicates that the configuration set does not exist.
3216      * @throws InvalidDeliveryOptionsException
3217      *         Indicates that provided delivery option is invalid.
3218      * @sample AmazonSimpleEmailService.PutConfigurationSetDeliveryOptions
3219      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/PutConfigurationSetDeliveryOptions"
3220      *      target="_top">AWS API Documentation</a>
3221      */

3222     @Override
3223     public PutConfigurationSetDeliveryOptionsResult putConfigurationSetDeliveryOptions(PutConfigurationSetDeliveryOptionsRequest request) {
3224         request = beforeClientExecution(request);
3225         return executePutConfigurationSetDeliveryOptions(request);
3226     }
3227
3228     @SdkInternalApi
3229     final PutConfigurationSetDeliveryOptionsResult executePutConfigurationSetDeliveryOptions(
3230             PutConfigurationSetDeliveryOptionsRequest putConfigurationSetDeliveryOptionsRequest) {
3231
3232         ExecutionContext executionContext = createExecutionContext(putConfigurationSetDeliveryOptionsRequest);
3233         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3234         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3235         Request<PutConfigurationSetDeliveryOptionsRequest> request = null;
3236         Response<PutConfigurationSetDeliveryOptionsResult> response = null;
3237
3238         try {
3239             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3240             try {
3241                 request = new PutConfigurationSetDeliveryOptionsRequestMarshaller()
3242                         .marshall(super.beforeMarshalling(putConfigurationSetDeliveryOptionsRequest));
3243                 // Binds the request metrics to the current request.
3244                 request.setAWSRequestMetrics(awsRequestMetrics);
3245                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3246                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3247                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutConfigurationSetDeliveryOptions");
3248                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3249
3250             } finally {
3251                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3252             }
3253
3254             StaxResponseHandler<PutConfigurationSetDeliveryOptionsResult> responseHandler = new StaxResponseHandler<PutConfigurationSetDeliveryOptionsResult>(
3255                     new PutConfigurationSetDeliveryOptionsResultStaxUnmarshaller());
3256             response = invoke(request, responseHandler, executionContext);
3257
3258             return response.getAwsResponse();
3259
3260         } finally {
3261
3262             endClientExecution(awsRequestMetrics, request, response);
3263         }
3264     }
3265
3266     /**
3267      * <p>
3268      * Adds or updates a sending authorization policy for the specified identity (an email address or a domain).
3269      * </p>
3270      * <note>
3271      * <p>
3272      * This API is for the identity owner only. If you have not verified the identity, this API will return an error.
3273      * </p>
3274      * </note>
3275      * <p>
3276      * Sending authorization is a feature that enables an identity owner to authorize other senders to use its
3277      * identities. For information about using sending authorization, see the <a
3278      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer
3279      * Guide</a>.
3280      * </p>
3281      * <p>
3282      * You can execute this operation no more than once per second.
3283      * </p>
3284      * 
3285      * @param putIdentityPolicyRequest
3286      *        Represents a request to add or update a sending authorization policy for an identity. Sending
3287      *        authorization is an Amazon SES feature that enables you to authorize other senders to use your identities.
3288      *        For information, see the <a
3289      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES
3290      *        Developer Guide</a>.
3291      * @return Result of the PutIdentityPolicy operation returned by the service.
3292      * @throws InvalidPolicyException
3293      *         Indicates that the provided policy is invalid. Check the error stack for more information about what
3294      *         caused the error.
3295      * @sample AmazonSimpleEmailService.PutIdentityPolicy
3296      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/PutIdentityPolicy" target="_top">AWS API
3297      *      Documentation</a>
3298      */

3299     @Override
3300     public PutIdentityPolicyResult putIdentityPolicy(PutIdentityPolicyRequest request) {
3301         request = beforeClientExecution(request);
3302         return executePutIdentityPolicy(request);
3303     }
3304
3305     @SdkInternalApi
3306     final PutIdentityPolicyResult executePutIdentityPolicy(PutIdentityPolicyRequest putIdentityPolicyRequest) {
3307
3308         ExecutionContext executionContext = createExecutionContext(putIdentityPolicyRequest);
3309         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3310         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3311         Request<PutIdentityPolicyRequest> request = null;
3312         Response<PutIdentityPolicyResult> response = null;
3313
3314         try {
3315             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3316             try {
3317                 request = new PutIdentityPolicyRequestMarshaller().marshall(super.beforeMarshalling(putIdentityPolicyRequest));
3318                 // Binds the request metrics to the current request.
3319                 request.setAWSRequestMetrics(awsRequestMetrics);
3320                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3321                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3322                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutIdentityPolicy");
3323                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3324
3325             } finally {
3326                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3327             }
3328
3329             StaxResponseHandler<PutIdentityPolicyResult> responseHandler = new StaxResponseHandler<PutIdentityPolicyResult>(
3330                     new PutIdentityPolicyResultStaxUnmarshaller());
3331             response = invoke(request, responseHandler, executionContext);
3332
3333             return response.getAwsResponse();
3334
3335         } finally {
3336
3337             endClientExecution(awsRequestMetrics, request, response);
3338         }
3339     }
3340
3341     /**
3342      * <p>
3343      * Reorders the receipt rules within a receipt rule set.
3344      * </p>
3345      * <note>
3346      * <p>
3347      * All of the rules in the rule set must be represented in this request. That is, this API will return an error if
3348      * the reorder request doesn't explicitly position all of the rules.
3349      * </p>
3350      * </note>
3351      * <p>
3352      * For information about managing receipt rule sets, see the <a
3353      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html"
3354      * >Amazon SES Developer Guide</a>.
3355      * </p>
3356      * <p>
3357      * You can execute this operation no more than once per second.
3358      * </p>
3359      * 
3360      * @param reorderReceiptRuleSetRequest
3361      *        Represents a request to reorder the receipt rules within a receipt rule set. You use receipt rule sets to
3362      *        receive email with Amazon SES. For more information, see the <a
3363      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
3364      *        Developer Guide</a>.
3365      * @return Result of the ReorderReceiptRuleSet operation returned by the service.
3366      * @throws RuleSetDoesNotExistException
3367      *         Indicates that the provided receipt rule set does not exist.
3368      * @throws RuleDoesNotExistException
3369      *         Indicates that the provided receipt rule does not exist.
3370      * @sample AmazonSimpleEmailService.ReorderReceiptRuleSet
3371      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/ReorderReceiptRuleSet" target="_top">AWS
3372      *      API Documentation</a>
3373      */

3374     @Override
3375     public ReorderReceiptRuleSetResult reorderReceiptRuleSet(ReorderReceiptRuleSetRequest request) {
3376         request = beforeClientExecution(request);
3377         return executeReorderReceiptRuleSet(request);
3378     }
3379
3380     @SdkInternalApi
3381     final ReorderReceiptRuleSetResult executeReorderReceiptRuleSet(ReorderReceiptRuleSetRequest reorderReceiptRuleSetRequest) {
3382
3383         ExecutionContext executionContext = createExecutionContext(reorderReceiptRuleSetRequest);
3384         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3385         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3386         Request<ReorderReceiptRuleSetRequest> request = null;
3387         Response<ReorderReceiptRuleSetResult> response = null;
3388
3389         try {
3390             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3391             try {
3392                 request = new ReorderReceiptRuleSetRequestMarshaller().marshall(super.beforeMarshalling(reorderReceiptRuleSetRequest));
3393                 // Binds the request metrics to the current request.
3394                 request.setAWSRequestMetrics(awsRequestMetrics);
3395                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3396                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3397                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ReorderReceiptRuleSet");
3398                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3399
3400             } finally {
3401                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3402             }
3403
3404             StaxResponseHandler<ReorderReceiptRuleSetResult> responseHandler = new StaxResponseHandler<ReorderReceiptRuleSetResult>(
3405                     new ReorderReceiptRuleSetResultStaxUnmarshaller());
3406             response = invoke(request, responseHandler, executionContext);
3407
3408             return response.getAwsResponse();
3409
3410         } finally {
3411
3412             endClientExecution(awsRequestMetrics, request, response);
3413         }
3414     }
3415
3416     /**
3417      * <p>
3418      * Generates and sends a bounce message to the sender of an email you received through Amazon SES. You can only use
3419      * this API on an email up to 24 hours after you receive it.
3420      * </p>
3421      * <note>
3422      * <p>
3423      * You cannot use this API to send generic bounces for mail that was not received by Amazon SES.
3424      * </p>
3425      * </note>
3426      * <p>
3427      * For information about receiving email through Amazon SES, see the <a
3428      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email.html">Amazon SES Developer Guide</a>.
3429      * </p>
3430      * <p>
3431      * You can execute this operation no more than once per second.
3432      * </p>
3433      * 
3434      * @param sendBounceRequest
3435      *        Represents a request to send a bounce message to the sender of an email you received through Amazon SES.
3436      * @return Result of the SendBounce operation returned by the service.
3437      * @throws MessageRejectedException
3438      *         Indicates that the action failed, and the message could not be sent. Check the error stack for more
3439      *         information about what caused the error.
3440      * @sample AmazonSimpleEmailService.SendBounce
3441      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBounce" target="_top">AWS API
3442      *      Documentation</a>
3443      */

3444     @Override
3445     public SendBounceResult sendBounce(SendBounceRequest request) {
3446         request = beforeClientExecution(request);
3447         return executeSendBounce(request);
3448     }
3449
3450     @SdkInternalApi
3451     final SendBounceResult executeSendBounce(SendBounceRequest sendBounceRequest) {
3452
3453         ExecutionContext executionContext = createExecutionContext(sendBounceRequest);
3454         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3455         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3456         Request<SendBounceRequest> request = null;
3457         Response<SendBounceResult> response = null;
3458
3459         try {
3460             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3461             try {
3462                 request = new SendBounceRequestMarshaller().marshall(super.beforeMarshalling(sendBounceRequest));
3463                 // Binds the request metrics to the current request.
3464                 request.setAWSRequestMetrics(awsRequestMetrics);
3465                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3466                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3467                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendBounce");
3468                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3469
3470             } finally {
3471                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3472             }
3473
3474             StaxResponseHandler<SendBounceResult> responseHandler = new StaxResponseHandler<SendBounceResult>(new SendBounceResultStaxUnmarshaller());
3475             response = invoke(request, responseHandler, executionContext);
3476
3477             return response.getAwsResponse();
3478
3479         } finally {
3480
3481             endClientExecution(awsRequestMetrics, request, response);
3482         }
3483     }
3484
3485     /**
3486      * <p>
3487      * Composes an email message to multiple destinations. The message body is created using an email template.
3488      * </p>
3489      * <p>
3490      * In order to send email using the <code>SendBulkTemplatedEmail</code> operation, your call to the API must meet
3491      * the following requirements:
3492      * </p>
3493      * <ul>
3494      * <li>
3495      * <p>
3496      * The call must refer to an existing email template. You can create email templates using the <a>CreateTemplate</a>
3497      * operation.
3498      * </p>
3499      * </li>
3500      * <li>
3501      * <p>
3502      * The message must be sent from a verified email address or domain.
3503      * </p>
3504      * </li>
3505      * <li>
3506      * <p>
3507      * If your account is still in the Amazon SES sandbox, you may only send to verified addresses or domains, or to
3508      * email addresses associated with the Amazon SES Mailbox Simulator. For more information, see <a
3509      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html">Verifying Email
3510      * Addresses and Domains</a> in the <i>Amazon SES Developer Guide.</i>
3511      * </p>
3512      * </li>
3513      * <li>
3514      * <p>
3515      * The maximum message size is 10 MB.
3516      * </p>
3517      * </li>
3518      * <li>
3519      * <p>
3520      * Each <code>Destination</code> parameter must include at least one recipient email address. The recipient address
3521      * can be a To: address, a CC: address, or a BCC: address. If a recipient email address is invalid (that is, it is
3522      * not in the format <i>UserName@[SubDomain.]Domain.TopLevelDomain</i>), the entire message will be rejected, even
3523      * if the message contains other recipients that are valid.
3524      * </p>
3525      * </li>
3526      * <li>
3527      * <p>
3528      * The message may not include more than 50 recipients, across the To:, CC: and BCC: fields. If you need to send an
3529      * email message to a larger audience, you can divide your recipient list into groups of 50 or fewer, and then call
3530      * the <code>SendBulkTemplatedEmail</code> operation several times to send the message to each group.
3531      * </p>
3532      * </li>
3533      * <li>
3534      * <p>
3535      * The number of destinations you can contact in a single call to the API may be limited by your account's maximum
3536      * sending rate.
3537      * </p>
3538      * </li>
3539      * </ul>
3540      * 
3541      * @param sendBulkTemplatedEmailRequest
3542      *        Represents a request to send a templated email to multiple destinations using Amazon SES. For more
3543      *        information, see the <a
3544      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html">Amazon SES
3545      *        Developer Guide</a>.
3546      * @return Result of the SendBulkTemplatedEmail operation returned by the service.
3547      * @throws MessageRejectedException
3548      *         Indicates that the action failed, and the message could not be sent. Check the error stack for more
3549      *         information about what caused the error.
3550      * @throws MailFromDomainNotVerifiedException
3551      *         Indicates that the message could not be sent because Amazon SES could not read the MX record required to
3552      *         use the specified MAIL FROM domain. For information about editing the custom MAIL FROM domain settings
3553      *         for an identity, see the <a
3554      *         href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html">Amazon SES Developer
3555      *         Guide</a>.
3556      * @throws ConfigurationSetDoesNotExistException
3557      *         Indicates that the configuration set does not exist.
3558      * @throws TemplateDoesNotExistException
3559      *         Indicates that the Template object you specified does not exist in your Amazon SES account.
3560      * @throws ConfigurationSetSendingPausedException
3561      *         Indicates that email sending is disabled for the configuration set.</p>
3562      *         <p>
3563      *         You can enable or disable email sending for a configuration set using
3564      *         <a>UpdateConfigurationSetSendingEnabled</a>.
3565      * @throws AccountSendingPausedException
3566      *         Indicates that email sending is disabled for your entire Amazon SES account.
3567      *         </p>
3568      *         <p>
3569      *         You can enable or disable email sending for your Amazon SES account using
3570      *         <a>UpdateAccountSendingEnabled</a>.
3571      * @sample AmazonSimpleEmailService.SendBulkTemplatedEmail
3572      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendBulkTemplatedEmail" target="_top">AWS
3573      *      API Documentation</a>
3574      */

3575     @Override
3576     public SendBulkTemplatedEmailResult sendBulkTemplatedEmail(SendBulkTemplatedEmailRequest request) {
3577         request = beforeClientExecution(request);
3578         return executeSendBulkTemplatedEmail(request);
3579     }
3580
3581     @SdkInternalApi
3582     final SendBulkTemplatedEmailResult executeSendBulkTemplatedEmail(SendBulkTemplatedEmailRequest sendBulkTemplatedEmailRequest) {
3583
3584         ExecutionContext executionContext = createExecutionContext(sendBulkTemplatedEmailRequest);
3585         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3586         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3587         Request<SendBulkTemplatedEmailRequest> request = null;
3588         Response<SendBulkTemplatedEmailResult> response = null;
3589
3590         try {
3591             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3592             try {
3593                 request = new SendBulkTemplatedEmailRequestMarshaller().marshall(super.beforeMarshalling(sendBulkTemplatedEmailRequest));
3594                 // Binds the request metrics to the current request.
3595                 request.setAWSRequestMetrics(awsRequestMetrics);
3596                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3597                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3598                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendBulkTemplatedEmail");
3599                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3600
3601             } finally {
3602                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3603             }
3604
3605             StaxResponseHandler<SendBulkTemplatedEmailResult> responseHandler = new StaxResponseHandler<SendBulkTemplatedEmailResult>(
3606                     new SendBulkTemplatedEmailResultStaxUnmarshaller());
3607             response = invoke(request, responseHandler, executionContext);
3608
3609             return response.getAwsResponse();
3610
3611         } finally {
3612
3613             endClientExecution(awsRequestMetrics, request, response);
3614         }
3615     }
3616
3617     /**
3618      * <p>
3619      * Adds an email address to the list of identities for your Amazon SES account in the current AWS Region and
3620      * attempts to verify it. As a result of executing this operation, a customized verification email is sent to the
3621      * specified address.
3622      * </p>
3623      * <p>
3624      * To use this operation, you must first create a custom verification email template. For more information about
3625      * creating and using custom verification email templates, see <a
3626      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html">Using Custom
3627      * Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.
3628      * </p>
3629      * <p>
3630      * You can execute this operation no more than once per second.
3631      * </p>
3632      * 
3633      * @param sendCustomVerificationEmailRequest
3634      *        Represents a request to send a custom verification email to a specified recipient.
3635      * @return Result of the SendCustomVerificationEmail operation returned by the service.
3636      * @throws MessageRejectedException
3637      *         Indicates that the action failed, and the message could not be sent. Check the error stack for more
3638      *         information about what caused the error.
3639      * @throws ConfigurationSetDoesNotExistException
3640      *         Indicates that the configuration set does not exist.
3641      * @throws CustomVerificationEmailTemplateDoesNotExistException
3642      *         Indicates that a custom verification email template with the name you specified does not exist.
3643      * @throws FromEmailAddressNotVerifiedException
3644      *         Indicates that the sender address specified for a custom verification email is not verified, and is
3645      *         therefore not eligible to send the custom verification email.
3646      * @throws ProductionAccessNotGrantedException
3647      *         Indicates that the account has not been granted production access.
3648      * @sample AmazonSimpleEmailService.SendCustomVerificationEmail
3649      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendCustomVerificationEmail"
3650      *      target="_top">AWS API Documentation</a>
3651      */

3652     @Override
3653     public SendCustomVerificationEmailResult sendCustomVerificationEmail(SendCustomVerificationEmailRequest request) {
3654         request = beforeClientExecution(request);
3655         return executeSendCustomVerificationEmail(request);
3656     }
3657
3658     @SdkInternalApi
3659     final SendCustomVerificationEmailResult executeSendCustomVerificationEmail(SendCustomVerificationEmailRequest sendCustomVerificationEmailRequest) {
3660
3661         ExecutionContext executionContext = createExecutionContext(sendCustomVerificationEmailRequest);
3662         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3663         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3664         Request<SendCustomVerificationEmailRequest> request = null;
3665         Response<SendCustomVerificationEmailResult> response = null;
3666
3667         try {
3668             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3669             try {
3670                 request = new SendCustomVerificationEmailRequestMarshaller().marshall(super.beforeMarshalling(sendCustomVerificationEmailRequest));
3671                 // Binds the request metrics to the current request.
3672                 request.setAWSRequestMetrics(awsRequestMetrics);
3673                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3674                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3675                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendCustomVerificationEmail");
3676                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3677
3678             } finally {
3679                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3680             }
3681
3682             StaxResponseHandler<SendCustomVerificationEmailResult> responseHandler = new StaxResponseHandler<SendCustomVerificationEmailResult>(
3683                     new SendCustomVerificationEmailResultStaxUnmarshaller());
3684             response = invoke(request, responseHandler, executionContext);
3685
3686             return response.getAwsResponse();
3687
3688         } finally {
3689
3690             endClientExecution(awsRequestMetrics, request, response);
3691         }
3692     }
3693
3694     /**
3695      * <p>
3696      * Composes an email message and immediately queues it for sending. In order to send email using the
3697      * <code>SendEmail</code> operation, your message must meet the following requirements:
3698      * </p>
3699      * <ul>
3700      * <li>
3701      * <p>
3702      * The message must be sent from a verified email address or domain. If you attempt to send email using a
3703      * non-verified address or domain, the operation will result in an "Email address not verified" error.
3704      * </p>
3705      * </li>
3706      * <li>
3707      * <p>
3708      * If your account is still in the Amazon SES sandbox, you may only send to verified addresses or domains, or to
3709      * email addresses associated with the Amazon SES Mailbox Simulator. For more information, see <a
3710      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html">Verifying Email
3711      * Addresses and Domains</a> in the <i>Amazon SES Developer Guide.</i>
3712      * </p>
3713      * </li>
3714      * <li>
3715      * <p>
3716      * The maximum message size is 10 MB.
3717      * </p>
3718      * </li>
3719      * <li>
3720      * <p>
3721      * The message must include at least one recipient email address. The recipient address can be a To: address, a CC:
3722      * address, or a BCC: address. If a recipient email address is invalid (that is, it is not in the format
3723      * <i>UserName@[SubDomain.]Domain.TopLevelDomain</i>), the entire message will be rejected, even if the message
3724      * contains other recipients that are valid.
3725      * </p>
3726      * </li>
3727      * <li>
3728      * <p>
3729      * The message may not include more than 50 recipients, across the To:, CC: and BCC: fields. If you need to send an
3730      * email message to a larger audience, you can divide your recipient list into groups of 50 or fewer, and then call
3731      * the <code>SendEmail</code> operation several times to send the message to each group.
3732      * </p>
3733      * </li>
3734      * </ul>
3735      * <important>
3736      * <p>
3737      * For every message that you send, the total number of recipients (including each recipient in the To:, CC: and
3738      * BCC: fields) is counted against the maximum number of emails you can send in a 24-hour period (your <i>sending
3739      * quota</i>). For more information about sending quotas in Amazon SES, see <a
3740      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html">Managing Your Amazon SES
3741      * Sending Limits</a> in the <i>Amazon SES Developer Guide.</i>
3742      * </p>
3743      * </important>
3744      * 
3745      * @param sendEmailRequest
3746      *        Represents a request to send a single formatted email using Amazon SES. For more information, see the <a
3747      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-formatted.html">Amazon SES
3748      *        Developer Guide</a>.
3749      * @return Result of the SendEmail operation returned by the service.
3750      * @throws MessageRejectedException
3751      *         Indicates that the action failed, and the message could not be sent. Check the error stack for more
3752      *         information about what caused the error.
3753      * @throws MailFromDomainNotVerifiedException
3754      *         Indicates that the message could not be sent because Amazon SES could not read the MX record required to
3755      *         use the specified MAIL FROM domain. For information about editing the custom MAIL FROM domain settings
3756      *         for an identity, see the <a
3757      *         href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html">Amazon SES Developer
3758      *         Guide</a>.
3759      * @throws ConfigurationSetDoesNotExistException
3760      *         Indicates that the configuration set does not exist.
3761      * @throws ConfigurationSetSendingPausedException
3762      *         Indicates that email sending is disabled for the configuration set.</p>
3763      *         <p>
3764      *         You can enable or disable email sending for a configuration set using
3765      *         <a>UpdateConfigurationSetSendingEnabled</a>.
3766      * @throws AccountSendingPausedException
3767      *         Indicates that email sending is disabled for your entire Amazon SES account.
3768      *         </p>
3769      *         <p>
3770      *         You can enable or disable email sending for your Amazon SES account using
3771      *         <a>UpdateAccountSendingEnabled</a>.
3772      * @sample AmazonSimpleEmailService.SendEmail
3773      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendEmail" target="_top">AWS API
3774      *      Documentation</a>
3775      */

3776     @Override
3777     public SendEmailResult sendEmail(SendEmailRequest request) {
3778         request = beforeClientExecution(request);
3779         return executeSendEmail(request);
3780     }
3781
3782     @SdkInternalApi
3783     final SendEmailResult executeSendEmail(SendEmailRequest sendEmailRequest) {
3784
3785         ExecutionContext executionContext = createExecutionContext(sendEmailRequest);
3786         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3787         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3788         Request<SendEmailRequest> request = null;
3789         Response<SendEmailResult> response = null;
3790
3791         try {
3792             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3793             try {
3794                 request = new SendEmailRequestMarshaller().marshall(super.beforeMarshalling(sendEmailRequest));
3795                 // Binds the request metrics to the current request.
3796                 request.setAWSRequestMetrics(awsRequestMetrics);
3797                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3798                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
3799                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendEmail");
3800                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
3801
3802             } finally {
3803                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
3804             }
3805
3806             StaxResponseHandler<SendEmailResult> responseHandler = new StaxResponseHandler<SendEmailResult>(new SendEmailResultStaxUnmarshaller());
3807             response = invoke(request, responseHandler, executionContext);
3808
3809             return response.getAwsResponse();
3810
3811         } finally {
3812
3813             endClientExecution(awsRequestMetrics, request, response);
3814         }
3815     }
3816
3817     /**
3818      * <p>
3819      * Composes an email message and immediately queues it for sending.
3820      * </p>
3821      * <p>
3822      * This operation is more flexible than the <code>SendEmail</code> API operation. When you use the
3823      * <code>SendRawEmail</code> operation, you can specify the headers of the message as well as its content. This
3824      * flexibility is useful, for example, when you want to send a multipart MIME email (such a message that contains
3825      * both a text and an HTML version). You can also use this operation to send messages that include attachments.
3826      * </p>
3827      * <p>
3828      * The <code>SendRawEmail</code> operation has the following requirements:
3829      * </p>
3830      * <ul>
3831      * <li>
3832      * <p>
3833      * You can only send email from <a
3834      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html">verified email
3835      * addresses or domains</a>. If you try to send email from an address that isn't verified, the operation results in
3836      * an "Email address not verified" error.
3837      * </p>
3838      * </li>
3839      * <li>
3840      * <p>
3841      * If your account is still in the <a
3842      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html">Amazon SES
3843      * sandbox</a>, you can only send email to other verified addresses in your account, or to addresses that are
3844      * associated with the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mailbox-simulator.html">Amazon
3845      * SES mailbox simulator</a>.
3846      * </p>
3847      * </li>
3848      * <li>
3849      * <p>
3850      * The maximum message size, including attachments, is 10 MB.
3851      * </p>
3852      * </li>
3853      * <li>
3854      * <p>
3855      * Each message has to include at least one recipient address. A recipient address includes any address on the To:,
3856      * CC:, or BCC: lines.
3857      * </p>
3858      * </li>
3859      * <li>
3860      * <p>
3861      * If you send a single message to more than one recipient address, and one of the recipient addresses isn't in a
3862      * valid format (that is, it's not in the format <i>UserName@[SubDomain.]Domain.TopLevelDomain</i>), Amazon SES
3863      * rejects the entire message, even if the other addresses are valid.
3864      * </p>
3865      * </li>
3866      * <li>
3867      * <p>
3868      * Each message can include up to 50 recipient addresses across the To:, CC:, or BCC: lines. If you need to send a
3869      * single message to more than 50 recipients, you have to split the list of recipient addresses into groups of less
3870      * than 50 recipients, and send separate messages to each group.
3871      * </p>
3872      * </li>
3873      * <li>
3874      * <p>
3875      * Amazon SES allows you to specify 8-bit Content-Transfer-Encoding for MIME message parts. However, if Amazon SES
3876      * has to modify the contents of your message (for example, if you use open and click tracking), 8-bit content isn't
3877      * preserved. For this reason, we highly recommend that you encode all content that isn't 7-bit ASCII. For more
3878      * information, see <a
3879      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html#send-email-mime-encoding">MIME
3880      * Encoding</a> in the <i>Amazon SES Developer Guide</i>.
3881      * </p>
3882      * </li>
3883      * </ul>
3884      * <p>
3885      * Additionally, keep the following considerations in mind when using the <code>SendRawEmail</code> operation:
3886      * </p>
3887      * <ul>
3888      * <li>
3889      * <p>
3890      * Although you can customize the message headers when using the <code>SendRawEmail</code> operation, Amazon SES
3891      * will automatically apply its own <code>Message-ID</code> and <code>Date</code> headers; if you passed these
3892      * headers when creating the message, they will be overwritten by the values that Amazon SES provides.
3893      * </p>
3894      * </li>
3895      * <li>
3896      * <p>
3897      * If you are using sending authorization to send on behalf of another user, <code>SendRawEmail</code> enables you
3898      * to specify the cross-account identity for the email's Source, From, and Return-Path parameters in one of two
3899      * ways: you can pass optional parameters <code>SourceArn</code>, <code>FromArn</code>, and/or
3900      * <code>ReturnPathArn</code> to the API, or you can include the following X-headers in the header of your raw
3901      * email:
3902      * </p>
3903      * <ul>
3904      * <li>
3905      * <p>
3906      * <code>X-SES-SOURCE-ARN</code>
3907      * </p>
3908      * </li>
3909      * <li>
3910      * <p>
3911      * <code>X-SES-FROM-ARN</code>
3912      * </p>
3913      * </li>
3914      * <li>
3915      * <p>
3916      * <code>X-SES-RETURN-PATH-ARN</code>
3917      * </p>
3918      * </li>
3919      * </ul>
3920      * <important>
3921      * <p>
3922      * Don't include these X-headers in the DKIM signature. Amazon SES removes these before it sends the email.
3923      * </p>
3924      * </important>
3925      * <p>
3926      * If you only specify the <code>SourceIdentityArn</code> parameter, Amazon SES sets the From and Return-Path
3927      * addresses to the same identity that you specified.
3928      * </p>
3929      * <p>
3930      * For more information about sending authorization, see the <a
3931      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Using Sending
3932      * Authorization with Amazon SES</a> in the <i>Amazon SES Developer Guide.</i>
3933      * </p>
3934      * </li>
3935      * <li>
3936      * <p>
3937      * For every message that you send, the total number of recipients (including each recipient in the To:, CC: and
3938      * BCC: fields) is counted against the maximum number of emails you can send in a 24-hour period (your <i>sending
3939      * quota</i>). For more information about sending quotas in Amazon SES, see <a
3940      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html">Managing Your Amazon SES
3941      * Sending Limits</a> in the <i>Amazon SES Developer Guide.</i>
3942      * </p>
3943      * </li>
3944      * </ul>
3945      * 
3946      * @param sendRawEmailRequest
3947      *        Represents a request to send a single raw email using Amazon SES. For more information, see the <a
3948      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html">Amazon SES Developer
3949      *        Guide</a>.
3950      * @return Result of the SendRawEmail operation returned by the service.
3951      * @throws MessageRejectedException
3952      *         Indicates that the action failed, and the message could not be sent. Check the error stack for more
3953      *         information about what caused the error.
3954      * @throws MailFromDomainNotVerifiedException
3955      *         Indicates that the message could not be sent because Amazon SES could not read the MX record required to
3956      *         use the specified MAIL FROM domain. For information about editing the custom MAIL FROM domain settings
3957      *         for an identity, see the <a
3958      *         href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html">Amazon SES Developer
3959      *         Guide</a>.
3960      * @throws ConfigurationSetDoesNotExistException
3961      *         Indicates that the configuration set does not exist.
3962      * @throws ConfigurationSetSendingPausedException
3963      *         Indicates that email sending is disabled for the configuration set.</p>
3964      *         <p>
3965      *         You can enable or disable email sending for a configuration set using
3966      *         <a>UpdateConfigurationSetSendingEnabled</a>.
3967      * @throws AccountSendingPausedException
3968      *         Indicates that email sending is disabled for your entire Amazon SES account.
3969      *         </p>
3970      *         <p>
3971      *         You can enable or disable email sending for your Amazon SES account using
3972      *         <a>UpdateAccountSendingEnabled</a>.
3973      * @sample AmazonSimpleEmailService.SendRawEmail
3974      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendRawEmail" target="_top">AWS API
3975      *      Documentation</a>
3976      */

3977     @Override
3978     public SendRawEmailResult sendRawEmail(SendRawEmailRequest request) {
3979         request = beforeClientExecution(request);
3980         return executeSendRawEmail(request);
3981     }
3982
3983     @SdkInternalApi
3984     final SendRawEmailResult executeSendRawEmail(SendRawEmailRequest sendRawEmailRequest) {
3985
3986         ExecutionContext executionContext = createExecutionContext(sendRawEmailRequest);
3987         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
3988         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
3989         Request<SendRawEmailRequest> request = null;
3990         Response<SendRawEmailResult> response = null;
3991
3992         try {
3993             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
3994             try {
3995                 request = new SendRawEmailRequestMarshaller().marshall(super.beforeMarshalling(sendRawEmailRequest));
3996                 // Binds the request metrics to the current request.
3997                 request.setAWSRequestMetrics(awsRequestMetrics);
3998                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
3999                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4000                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendRawEmail");
4001                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4002
4003             } finally {
4004                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4005             }
4006
4007             StaxResponseHandler<SendRawEmailResult> responseHandler = new StaxResponseHandler<SendRawEmailResult>(new SendRawEmailResultStaxUnmarshaller());
4008             response = invoke(request, responseHandler, executionContext);
4009
4010             return response.getAwsResponse();
4011
4012         } finally {
4013
4014             endClientExecution(awsRequestMetrics, request, response);
4015         }
4016     }
4017
4018     /**
4019      * <p>
4020      * Composes an email message using an email template and immediately queues it for sending.
4021      * </p>
4022      * <p>
4023      * In order to send email using the <code>SendTemplatedEmail</code> operation, your call to the API must meet the
4024      * following requirements:
4025      * </p>
4026      * <ul>
4027      * <li>
4028      * <p>
4029      * The call must refer to an existing email template. You can create email templates using the <a>CreateTemplate</a>
4030      * operation.
4031      * </p>
4032      * </li>
4033      * <li>
4034      * <p>
4035      * The message must be sent from a verified email address or domain.
4036      * </p>
4037      * </li>
4038      * <li>
4039      * <p>
4040      * If your account is still in the Amazon SES sandbox, you may only send to verified addresses or domains, or to
4041      * email addresses associated with the Amazon SES Mailbox Simulator. For more information, see <a
4042      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html">Verifying Email
4043      * Addresses and Domains</a> in the <i>Amazon SES Developer Guide.</i>
4044      * </p>
4045      * </li>
4046      * <li>
4047      * <p>
4048      * The maximum message size is 10 MB.
4049      * </p>
4050      * </li>
4051      * <li>
4052      * <p>
4053      * Calls to the <code>SendTemplatedEmail</code> operation may only include one <code>Destination</code> parameter. A
4054      * destination is a set of recipients who will receive the same version of the email. The <code>Destination</code>
4055      * parameter can include up to 50 recipients, across the To:, CC: and BCC: fields.
4056      * </p>
4057      * </li>
4058      * <li>
4059      * <p>
4060      * The <code>Destination</code> parameter must include at least one recipient email address. The recipient address
4061      * can be a To: address, a CC: address, or a BCC: address. If a recipient email address is invalid (that is, it is
4062      * not in the format <i>UserName@[SubDomain.]Domain.TopLevelDomain</i>), the entire message will be rejected, even
4063      * if the message contains other recipients that are valid.
4064      * </p>
4065      * </li>
4066      * </ul>
4067      * <important>
4068      * <p>
4069      * If your call to the <code>SendTemplatedEmail</code> operation includes all of the required parameters, Amazon SES
4070      * accepts it and returns a Message ID. However, if Amazon SES can't render the email because the template contains
4071      * errors, it doesn't send the email. Additionally, because it already accepted the message, Amazon SES doesn't
4072      * return a message stating that it was unable to send the email.
4073      * </p>
4074      * <p>
4075      * For these reasons, we highly recommend that you set up Amazon SES to send you notifications when Rendering
4076      * Failure events occur. For more information, see <a
4077      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html">Sending
4078      * Personalized Email Using the Amazon SES API</a> in the <i>Amazon Simple Email Service Developer Guide</i>.
4079      * </p>
4080      * </important>
4081      * 
4082      * @param sendTemplatedEmailRequest
4083      *        Represents a request to send a templated email using Amazon SES. For more information, see the <a
4084      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html">Amazon SES
4085      *        Developer Guide</a>.
4086      * @return Result of the SendTemplatedEmail operation returned by the service.
4087      * @throws MessageRejectedException
4088      *         Indicates that the action failed, and the message could not be sent. Check the error stack for more
4089      *         information about what caused the error.
4090      * @throws MailFromDomainNotVerifiedException
4091      *         Indicates that the message could not be sent because Amazon SES could not read the MX record required to
4092      *         use the specified MAIL FROM domain. For information about editing the custom MAIL FROM domain settings
4093      *         for an identity, see the <a
4094      *         href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html">Amazon SES Developer
4095      *         Guide</a>.
4096      * @throws ConfigurationSetDoesNotExistException
4097      *         Indicates that the configuration set does not exist.
4098      * @throws TemplateDoesNotExistException
4099      *         Indicates that the Template object you specified does not exist in your Amazon SES account.
4100      * @throws ConfigurationSetSendingPausedException
4101      *         Indicates that email sending is disabled for the configuration set.</p>
4102      *         <p>
4103      *         You can enable or disable email sending for a configuration set using
4104      *         <a>UpdateConfigurationSetSendingEnabled</a>.
4105      * @throws AccountSendingPausedException
4106      *         Indicates that email sending is disabled for your entire Amazon SES account.
4107      *         </p>
4108      *         <p>
4109      *         You can enable or disable email sending for your Amazon SES account using
4110      *         <a>UpdateAccountSendingEnabled</a>.
4111      * @sample AmazonSimpleEmailService.SendTemplatedEmail
4112      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SendTemplatedEmail" target="_top">AWS API
4113      *      Documentation</a>
4114      */

4115     @Override
4116     public SendTemplatedEmailResult sendTemplatedEmail(SendTemplatedEmailRequest request) {
4117         request = beforeClientExecution(request);
4118         return executeSendTemplatedEmail(request);
4119     }
4120
4121     @SdkInternalApi
4122     final SendTemplatedEmailResult executeSendTemplatedEmail(SendTemplatedEmailRequest sendTemplatedEmailRequest) {
4123
4124         ExecutionContext executionContext = createExecutionContext(sendTemplatedEmailRequest);
4125         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4126         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4127         Request<SendTemplatedEmailRequest> request = null;
4128         Response<SendTemplatedEmailResult> response = null;
4129
4130         try {
4131             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4132             try {
4133                 request = new SendTemplatedEmailRequestMarshaller().marshall(super.beforeMarshalling(sendTemplatedEmailRequest));
4134                 // Binds the request metrics to the current request.
4135                 request.setAWSRequestMetrics(awsRequestMetrics);
4136                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4137                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4138                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SendTemplatedEmail");
4139                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4140
4141             } finally {
4142                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4143             }
4144
4145             StaxResponseHandler<SendTemplatedEmailResult> responseHandler = new StaxResponseHandler<SendTemplatedEmailResult>(
4146                     new SendTemplatedEmailResultStaxUnmarshaller());
4147             response = invoke(request, responseHandler, executionContext);
4148
4149             return response.getAwsResponse();
4150
4151         } finally {
4152
4153             endClientExecution(awsRequestMetrics, request, response);
4154         }
4155     }
4156
4157     /**
4158      * <p>
4159      * Sets the specified receipt rule set as the active receipt rule set.
4160      * </p>
4161      * <note>
4162      * <p>
4163      * To disable your email-receiving through Amazon SES completely, you can call this API with RuleSetName set to
4164      * null.
4165      * </p>
4166      * </note>
4167      * <p>
4168      * For information about managing receipt rule sets, see the <a
4169      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rule-sets.html"
4170      * >Amazon SES Developer Guide</a>.
4171      * </p>
4172      * <p>
4173      * You can execute this operation no more than once per second.
4174      * </p>
4175      * 
4176      * @param setActiveReceiptRuleSetRequest
4177      *        Represents a request to set a receipt rule set as the active receipt rule set. You use receipt rule sets
4178      *        to receive email with Amazon SES. For more information, see the <a
4179      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
4180      *        Developer Guide</a>.
4181      * @return Result of the SetActiveReceiptRuleSet operation returned by the service.
4182      * @throws RuleSetDoesNotExistException
4183      *         Indicates that the provided receipt rule set does not exist.
4184      * @sample AmazonSimpleEmailService.SetActiveReceiptRuleSet
4185      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetActiveReceiptRuleSet" target="_top">AWS
4186      *      API Documentation</a>
4187      */

4188     @Override
4189     public SetActiveReceiptRuleSetResult setActiveReceiptRuleSet(SetActiveReceiptRuleSetRequest request) {
4190         request = beforeClientExecution(request);
4191         return executeSetActiveReceiptRuleSet(request);
4192     }
4193
4194     @SdkInternalApi
4195     final SetActiveReceiptRuleSetResult executeSetActiveReceiptRuleSet(SetActiveReceiptRuleSetRequest setActiveReceiptRuleSetRequest) {
4196
4197         ExecutionContext executionContext = createExecutionContext(setActiveReceiptRuleSetRequest);
4198         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4199         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4200         Request<SetActiveReceiptRuleSetRequest> request = null;
4201         Response<SetActiveReceiptRuleSetResult> response = null;
4202
4203         try {
4204             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4205             try {
4206                 request = new SetActiveReceiptRuleSetRequestMarshaller().marshall(super.beforeMarshalling(setActiveReceiptRuleSetRequest));
4207                 // Binds the request metrics to the current request.
4208                 request.setAWSRequestMetrics(awsRequestMetrics);
4209                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4210                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4211                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetActiveReceiptRuleSet");
4212                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4213
4214             } finally {
4215                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4216             }
4217
4218             StaxResponseHandler<SetActiveReceiptRuleSetResult> responseHandler = new StaxResponseHandler<SetActiveReceiptRuleSetResult>(
4219                     new SetActiveReceiptRuleSetResultStaxUnmarshaller());
4220             response = invoke(request, responseHandler, executionContext);
4221
4222             return response.getAwsResponse();
4223
4224         } finally {
4225
4226             endClientExecution(awsRequestMetrics, request, response);
4227         }
4228     }
4229
4230     /**
4231      * <p>
4232      * Enables or disables Easy DKIM signing of email sent from an identity. If Easy DKIM signing is enabled for a
4233      * domain, then Amazon SES uses DKIM to sign all email that it sends from addresses on that domain. If Easy DKIM
4234      * signing is enabled for an email address, then Amazon SES uses DKIM to sign all email it sends from that address.
4235      * </p>
4236      * <note>
4237      * <p>
4238      * For email addresses (for example, <code>user@example.com</code>), you can only enable DKIM signing if the
4239      * corresponding domain (in this case, <code>example.com</code>) has been set up to use Easy DKIM.
4240      * </p>
4241      * </note>
4242      * <p>
4243      * You can enable DKIM signing for an identity at any time after you start the verification process for the
4244      * identity, even if the verification process isn't complete.
4245      * </p>
4246      * <p>
4247      * You can execute this operation no more than once per second.
4248      * </p>
4249      * <p>
4250      * For more information about Easy DKIM signing, go to the <a
4251      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Amazon SES Developer Guide</a>.
4252      * </p>
4253      * 
4254      * @param setIdentityDkimEnabledRequest
4255      *        Represents a request to enable or disable Amazon SES Easy DKIM signing for an identity. For more
4256      *        information about setting up Easy DKIM, see the <a
4257      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Amazon SES Developer
4258      *        Guide</a>.
4259      * @return Result of the SetIdentityDkimEnabled operation returned by the service.
4260      * @sample AmazonSimpleEmailService.SetIdentityDkimEnabled
4261      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityDkimEnabled" target="_top">AWS
4262      *      API Documentation</a>
4263      */

4264     @Override
4265     public SetIdentityDkimEnabledResult setIdentityDkimEnabled(SetIdentityDkimEnabledRequest request) {
4266         request = beforeClientExecution(request);
4267         return executeSetIdentityDkimEnabled(request);
4268     }
4269
4270     @SdkInternalApi
4271     final SetIdentityDkimEnabledResult executeSetIdentityDkimEnabled(SetIdentityDkimEnabledRequest setIdentityDkimEnabledRequest) {
4272
4273         ExecutionContext executionContext = createExecutionContext(setIdentityDkimEnabledRequest);
4274         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4275         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4276         Request<SetIdentityDkimEnabledRequest> request = null;
4277         Response<SetIdentityDkimEnabledResult> response = null;
4278
4279         try {
4280             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4281             try {
4282                 request = new SetIdentityDkimEnabledRequestMarshaller().marshall(super.beforeMarshalling(setIdentityDkimEnabledRequest));
4283                 // Binds the request metrics to the current request.
4284                 request.setAWSRequestMetrics(awsRequestMetrics);
4285                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4286                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4287                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetIdentityDkimEnabled");
4288                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4289
4290             } finally {
4291                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4292             }
4293
4294             StaxResponseHandler<SetIdentityDkimEnabledResult> responseHandler = new StaxResponseHandler<SetIdentityDkimEnabledResult>(
4295                     new SetIdentityDkimEnabledResultStaxUnmarshaller());
4296             response = invoke(request, responseHandler, executionContext);
4297
4298             return response.getAwsResponse();
4299
4300         } finally {
4301
4302             endClientExecution(awsRequestMetrics, request, response);
4303         }
4304     }
4305
4306     /**
4307      * <p>
4308      * Given an identity (an email address or a domain), enables or disables whether Amazon SES forwards bounce and
4309      * complaint notifications as email. Feedback forwarding can only be disabled when Amazon Simple Notification
4310      * Service (Amazon SNS) topics are specified for both bounces and complaints.
4311      * </p>
4312      * <note>
4313      * <p>
4314      * Feedback forwarding does not apply to delivery notifications. Delivery notifications are only available through
4315      * Amazon SNS.
4316      * </p>
4317      * </note>
4318      * <p>
4319      * You can execute this operation no more than once per second.
4320      * </p>
4321      * <p>
4322      * For more information about using notifications with Amazon SES, see the <a
4323      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html">Amazon SES Developer Guide</a>.
4324      * </p>
4325      * 
4326      * @param setIdentityFeedbackForwardingEnabledRequest
4327      *        Represents a request to enable or disable whether Amazon SES forwards you bounce and complaint
4328      *        notifications through email. For information about email feedback forwarding, see the <a
4329      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-email.html">Amazon SES
4330      *        Developer Guide</a>.
4331      * @return Result of the SetIdentityFeedbackForwardingEnabled operation returned by the service.
4332      * @sample AmazonSimpleEmailService.SetIdentityFeedbackForwardingEnabled
4333      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityFeedbackForwardingEnabled"
4334      *      target="_top">AWS API Documentation</a>
4335      */

4336     @Override
4337     public SetIdentityFeedbackForwardingEnabledResult setIdentityFeedbackForwardingEnabled(SetIdentityFeedbackForwardingEnabledRequest request) {
4338         request = beforeClientExecution(request);
4339         return executeSetIdentityFeedbackForwardingEnabled(request);
4340     }
4341
4342     @SdkInternalApi
4343     final SetIdentityFeedbackForwardingEnabledResult executeSetIdentityFeedbackForwardingEnabled(
4344             SetIdentityFeedbackForwardingEnabledRequest setIdentityFeedbackForwardingEnabledRequest) {
4345
4346         ExecutionContext executionContext = createExecutionContext(setIdentityFeedbackForwardingEnabledRequest);
4347         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4348         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4349         Request<SetIdentityFeedbackForwardingEnabledRequest> request = null;
4350         Response<SetIdentityFeedbackForwardingEnabledResult> response = null;
4351
4352         try {
4353             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4354             try {
4355                 request = new SetIdentityFeedbackForwardingEnabledRequestMarshaller().marshall(super
4356                         .beforeMarshalling(setIdentityFeedbackForwardingEnabledRequest));
4357                 // Binds the request metrics to the current request.
4358                 request.setAWSRequestMetrics(awsRequestMetrics);
4359                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4360                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4361                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetIdentityFeedbackForwardingEnabled");
4362                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4363
4364             } finally {
4365                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4366             }
4367
4368             StaxResponseHandler<SetIdentityFeedbackForwardingEnabledResult> responseHandler = new StaxResponseHandler<SetIdentityFeedbackForwardingEnabledResult>(
4369                     new SetIdentityFeedbackForwardingEnabledResultStaxUnmarshaller());
4370             response = invoke(request, responseHandler, executionContext);
4371
4372             return response.getAwsResponse();
4373
4374         } finally {
4375
4376             endClientExecution(awsRequestMetrics, request, response);
4377         }
4378     }
4379
4380     /**
4381      * <p>
4382      * Given an identity (an email address or a domain), sets whether Amazon SES includes the original email headers in
4383      * the Amazon Simple Notification Service (Amazon SNS) notifications of a specified type.
4384      * </p>
4385      * <p>
4386      * You can execute this operation no more than once per second.
4387      * </p>
4388      * <p>
4389      * For more information about using notifications with Amazon SES, see the <a
4390      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html">Amazon SES Developer Guide</a>.
4391      * </p>
4392      * 
4393      * @param setIdentityHeadersInNotificationsEnabledRequest
4394      *        Represents a request to set whether Amazon SES includes the original email headers in the Amazon SNS
4395      *        notifications of a specified type. For information about notifications, see the <a
4396      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-sns.html">Amazon SES
4397      *        Developer Guide</a>.
4398      * @return Result of the SetIdentityHeadersInNotificationsEnabled operation returned by the service.
4399      * @sample AmazonSimpleEmailService.SetIdentityHeadersInNotificationsEnabled
4400      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityHeadersInNotificationsEnabled"
4401      *      target="_top">AWS API Documentation</a>
4402      */

4403     @Override
4404     public SetIdentityHeadersInNotificationsEnabledResult setIdentityHeadersInNotificationsEnabled(SetIdentityHeadersInNotificationsEnabledRequest request) {
4405         request = beforeClientExecution(request);
4406         return executeSetIdentityHeadersInNotificationsEnabled(request);
4407     }
4408
4409     @SdkInternalApi
4410     final SetIdentityHeadersInNotificationsEnabledResult executeSetIdentityHeadersInNotificationsEnabled(
4411             SetIdentityHeadersInNotificationsEnabledRequest setIdentityHeadersInNotificationsEnabledRequest) {
4412
4413         ExecutionContext executionContext = createExecutionContext(setIdentityHeadersInNotificationsEnabledRequest);
4414         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4415         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4416         Request<SetIdentityHeadersInNotificationsEnabledRequest> request = null;
4417         Response<SetIdentityHeadersInNotificationsEnabledResult> response = null;
4418
4419         try {
4420             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4421             try {
4422                 request = new SetIdentityHeadersInNotificationsEnabledRequestMarshaller().marshall(super
4423                         .beforeMarshalling(setIdentityHeadersInNotificationsEnabledRequest));
4424                 // Binds the request metrics to the current request.
4425                 request.setAWSRequestMetrics(awsRequestMetrics);
4426                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4427                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4428                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetIdentityHeadersInNotificationsEnabled");
4429                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4430
4431             } finally {
4432                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4433             }
4434
4435             StaxResponseHandler<SetIdentityHeadersInNotificationsEnabledResult> responseHandler = new StaxResponseHandler<SetIdentityHeadersInNotificationsEnabledResult>(
4436                     new SetIdentityHeadersInNotificationsEnabledResultStaxUnmarshaller());
4437             response = invoke(request, responseHandler, executionContext);
4438
4439             return response.getAwsResponse();
4440
4441         } finally {
4442
4443             endClientExecution(awsRequestMetrics, request, response);
4444         }
4445     }
4446
4447     /**
4448      * <p>
4449      * Enables or disables the custom MAIL FROM domain setup for a verified identity (an email address or a domain).
4450      * </p>
4451      * <important>
4452      * <p>
4453      * To send emails using the specified MAIL FROM domain, you must add an MX record to your MAIL FROM domain's DNS
4454      * settings. If you want your emails to pass Sender Policy Framework (SPF) checks, you must also add or update an
4455      * SPF record. For more information, see the <a
4456      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-set.html">Amazon SES Developer Guide</a>.
4457      * </p>
4458      * </important>
4459      * <p>
4460      * You can execute this operation no more than once per second.
4461      * </p>
4462      * 
4463      * @param setIdentityMailFromDomainRequest
4464      *        Represents a request to enable or disable the Amazon SES custom MAIL FROM domain setup for a verified
4465      *        identity. For information about using a custom MAIL FROM domain, see the <a
4466      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from.html">Amazon SES Developer
4467      *        Guide</a>.
4468      * @return Result of the SetIdentityMailFromDomain operation returned by the service.
4469      * @sample AmazonSimpleEmailService.SetIdentityMailFromDomain
4470      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityMailFromDomain"
4471      *      target="_top">AWS API Documentation</a>
4472      */

4473     @Override
4474     public SetIdentityMailFromDomainResult setIdentityMailFromDomain(SetIdentityMailFromDomainRequest request) {
4475         request = beforeClientExecution(request);
4476         return executeSetIdentityMailFromDomain(request);
4477     }
4478
4479     @SdkInternalApi
4480     final SetIdentityMailFromDomainResult executeSetIdentityMailFromDomain(SetIdentityMailFromDomainRequest setIdentityMailFromDomainRequest) {
4481
4482         ExecutionContext executionContext = createExecutionContext(setIdentityMailFromDomainRequest);
4483         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4484         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4485         Request<SetIdentityMailFromDomainRequest> request = null;
4486         Response<SetIdentityMailFromDomainResult> response = null;
4487
4488         try {
4489             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4490             try {
4491                 request = new SetIdentityMailFromDomainRequestMarshaller().marshall(super.beforeMarshalling(setIdentityMailFromDomainRequest));
4492                 // Binds the request metrics to the current request.
4493                 request.setAWSRequestMetrics(awsRequestMetrics);
4494                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4495                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4496                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetIdentityMailFromDomain");
4497                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4498
4499             } finally {
4500                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4501             }
4502
4503             StaxResponseHandler<SetIdentityMailFromDomainResult> responseHandler = new StaxResponseHandler<SetIdentityMailFromDomainResult>(
4504                     new SetIdentityMailFromDomainResultStaxUnmarshaller());
4505             response = invoke(request, responseHandler, executionContext);
4506
4507             return response.getAwsResponse();
4508
4509         } finally {
4510
4511             endClientExecution(awsRequestMetrics, request, response);
4512         }
4513     }
4514
4515     /**
4516      * <p>
4517      * Sets an Amazon Simple Notification Service (Amazon SNS) topic to use when delivering notifications. When you use
4518      * this operation, you specify a verified identity, such as an email address or domain. When you send an email that
4519      * uses the chosen identity in the Source field, Amazon SES sends notifications to the topic you specified. You can
4520      * send bounce, complaint, or delivery notifications (or any combination of the three) to the Amazon SNS topic that
4521      * you specify.
4522      * </p>
4523      * <p>
4524      * You can execute this operation no more than once per second.
4525      * </p>
4526      * <p>
4527      * For more information about feedback notification, see the <a
4528      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html">Amazon SES Developer Guide</a>.
4529      * </p>
4530      * 
4531      * @param setIdentityNotificationTopicRequest
4532      *        Represents a request to specify the Amazon SNS topic to which Amazon SES will publish bounce, complaint,
4533      *        or delivery notifications for emails sent with that identity as the Source. For information about Amazon
4534      *        SES notifications, see the <a
4535      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications-via-sns.html">Amazon SES
4536      *        Developer Guide</a>.
4537      * @return Result of the SetIdentityNotificationTopic operation returned by the service.
4538      * @sample AmazonSimpleEmailService.SetIdentityNotificationTopic
4539      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetIdentityNotificationTopic"
4540      *      target="_top">AWS API Documentation</a>
4541      */

4542     @Override
4543     public SetIdentityNotificationTopicResult setIdentityNotificationTopic(SetIdentityNotificationTopicRequest request) {
4544         request = beforeClientExecution(request);
4545         return executeSetIdentityNotificationTopic(request);
4546     }
4547
4548     @SdkInternalApi
4549     final SetIdentityNotificationTopicResult executeSetIdentityNotificationTopic(SetIdentityNotificationTopicRequest setIdentityNotificationTopicRequest) {
4550
4551         ExecutionContext executionContext = createExecutionContext(setIdentityNotificationTopicRequest);
4552         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4553         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4554         Request<SetIdentityNotificationTopicRequest> request = null;
4555         Response<SetIdentityNotificationTopicResult> response = null;
4556
4557         try {
4558             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4559             try {
4560                 request = new SetIdentityNotificationTopicRequestMarshaller().marshall(super.beforeMarshalling(setIdentityNotificationTopicRequest));
4561                 // Binds the request metrics to the current request.
4562                 request.setAWSRequestMetrics(awsRequestMetrics);
4563                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4564                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4565                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetIdentityNotificationTopic");
4566                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4567
4568             } finally {
4569                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4570             }
4571
4572             StaxResponseHandler<SetIdentityNotificationTopicResult> responseHandler = new StaxResponseHandler<SetIdentityNotificationTopicResult>(
4573                     new SetIdentityNotificationTopicResultStaxUnmarshaller());
4574             response = invoke(request, responseHandler, executionContext);
4575
4576             return response.getAwsResponse();
4577
4578         } finally {
4579
4580             endClientExecution(awsRequestMetrics, request, response);
4581         }
4582     }
4583
4584     /**
4585      * <p>
4586      * Sets the position of the specified receipt rule in the receipt rule set.
4587      * </p>
4588      * <p>
4589      * For information about managing receipt rules, see the <a
4590      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html">Amazon
4591      * SES Developer Guide</a>.
4592      * </p>
4593      * <p>
4594      * You can execute this operation no more than once per second.
4595      * </p>
4596      * 
4597      * @param setReceiptRulePositionRequest
4598      *        Represents a request to set the position of a receipt rule in a receipt rule set. You use receipt rule
4599      *        sets to receive email with Amazon SES. For more information, see the <a
4600      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
4601      *        Developer Guide</a>.
4602      * @return Result of the SetReceiptRulePosition operation returned by the service.
4603      * @throws RuleSetDoesNotExistException
4604      *         Indicates that the provided receipt rule set does not exist.
4605      * @throws RuleDoesNotExistException
4606      *         Indicates that the provided receipt rule does not exist.
4607      * @sample AmazonSimpleEmailService.SetReceiptRulePosition
4608      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/SetReceiptRulePosition" target="_top">AWS
4609      *      API Documentation</a>
4610      */

4611     @Override
4612     public SetReceiptRulePositionResult setReceiptRulePosition(SetReceiptRulePositionRequest request) {
4613         request = beforeClientExecution(request);
4614         return executeSetReceiptRulePosition(request);
4615     }
4616
4617     @SdkInternalApi
4618     final SetReceiptRulePositionResult executeSetReceiptRulePosition(SetReceiptRulePositionRequest setReceiptRulePositionRequest) {
4619
4620         ExecutionContext executionContext = createExecutionContext(setReceiptRulePositionRequest);
4621         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4622         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4623         Request<SetReceiptRulePositionRequest> request = null;
4624         Response<SetReceiptRulePositionResult> response = null;
4625
4626         try {
4627             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4628             try {
4629                 request = new SetReceiptRulePositionRequestMarshaller().marshall(super.beforeMarshalling(setReceiptRulePositionRequest));
4630                 // Binds the request metrics to the current request.
4631                 request.setAWSRequestMetrics(awsRequestMetrics);
4632                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4633                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4634                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetReceiptRulePosition");
4635                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4636
4637             } finally {
4638                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4639             }
4640
4641             StaxResponseHandler<SetReceiptRulePositionResult> responseHandler = new StaxResponseHandler<SetReceiptRulePositionResult>(
4642                     new SetReceiptRulePositionResultStaxUnmarshaller());
4643             response = invoke(request, responseHandler, executionContext);
4644
4645             return response.getAwsResponse();
4646
4647         } finally {
4648
4649             endClientExecution(awsRequestMetrics, request, response);
4650         }
4651     }
4652
4653     /**
4654      * <p>
4655      * Creates a preview of the MIME content of an email when provided with a template and a set of replacement data.
4656      * </p>
4657      * <p>
4658      * You can execute this operation no more than once per second.
4659      * </p>
4660      * 
4661      * @param testRenderTemplateRequest
4662      * @return Result of the TestRenderTemplate operation returned by the service.
4663      * @throws TemplateDoesNotExistException
4664      *         Indicates that the Template object you specified does not exist in your Amazon SES account.
4665      * @throws InvalidRenderingParameterException
4666      *         Indicates that one or more of the replacement values you provided is invalid. This error may occur when
4667      *         the TemplateData object contains invalid JSON.
4668      * @throws MissingRenderingAttributeException
4669      *         Indicates that one or more of the replacement values for the specified template was not specified. Ensure
4670      *         that the TemplateData object contains references to all of the replacement tags in the specified
4671      *         template.
4672      * @sample AmazonSimpleEmailService.TestRenderTemplate
4673      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/TestRenderTemplate" target="_top">AWS API
4674      *      Documentation</a>
4675      */

4676     @Override
4677     public TestRenderTemplateResult testRenderTemplate(TestRenderTemplateRequest request) {
4678         request = beforeClientExecution(request);
4679         return executeTestRenderTemplate(request);
4680     }
4681
4682     @SdkInternalApi
4683     final TestRenderTemplateResult executeTestRenderTemplate(TestRenderTemplateRequest testRenderTemplateRequest) {
4684
4685         ExecutionContext executionContext = createExecutionContext(testRenderTemplateRequest);
4686         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4687         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4688         Request<TestRenderTemplateRequest> request = null;
4689         Response<TestRenderTemplateResult> response = null;
4690
4691         try {
4692             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4693             try {
4694                 request = new TestRenderTemplateRequestMarshaller().marshall(super.beforeMarshalling(testRenderTemplateRequest));
4695                 // Binds the request metrics to the current request.
4696                 request.setAWSRequestMetrics(awsRequestMetrics);
4697                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4698                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4699                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TestRenderTemplate");
4700                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4701
4702             } finally {
4703                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4704             }
4705
4706             StaxResponseHandler<TestRenderTemplateResult> responseHandler = new StaxResponseHandler<TestRenderTemplateResult>(
4707                     new TestRenderTemplateResultStaxUnmarshaller());
4708             response = invoke(request, responseHandler, executionContext);
4709
4710             return response.getAwsResponse();
4711
4712         } finally {
4713
4714             endClientExecution(awsRequestMetrics, request, response);
4715         }
4716     }
4717
4718     /**
4719      * <p>
4720      * Enables or disables email sending across your entire Amazon SES account in the current AWS Region. You can use
4721      * this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending across your Amazon
4722      * SES account in a given AWS Region when reputation metrics (such as your bounce or complaint rates) reach certain
4723      * thresholds.
4724      * </p>
4725      * <p>
4726      * You can execute this operation no more than once per second.
4727      * </p>
4728      * 
4729      * @param updateAccountSendingEnabledRequest
4730      *        Represents a request to enable or disable the email sending capabilities for your entire Amazon SES
4731      *        account.
4732      * @return Result of the UpdateAccountSendingEnabled operation returned by the service.
4733      * @sample AmazonSimpleEmailService.UpdateAccountSendingEnabled
4734      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateAccountSendingEnabled"
4735      *      target="_top">AWS API Documentation</a>
4736      */

4737     @Override
4738     public UpdateAccountSendingEnabledResult updateAccountSendingEnabled(UpdateAccountSendingEnabledRequest request) {
4739         request = beforeClientExecution(request);
4740         return executeUpdateAccountSendingEnabled(request);
4741     }
4742
4743     @SdkInternalApi
4744     final UpdateAccountSendingEnabledResult executeUpdateAccountSendingEnabled(UpdateAccountSendingEnabledRequest updateAccountSendingEnabledRequest) {
4745
4746         ExecutionContext executionContext = createExecutionContext(updateAccountSendingEnabledRequest);
4747         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4748         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4749         Request<UpdateAccountSendingEnabledRequest> request = null;
4750         Response<UpdateAccountSendingEnabledResult> response = null;
4751
4752         try {
4753             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4754             try {
4755                 request = new UpdateAccountSendingEnabledRequestMarshaller().marshall(super.beforeMarshalling(updateAccountSendingEnabledRequest));
4756                 // Binds the request metrics to the current request.
4757                 request.setAWSRequestMetrics(awsRequestMetrics);
4758                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4759                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4760                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAccountSendingEnabled");
4761                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4762
4763             } finally {
4764                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4765             }
4766
4767             StaxResponseHandler<UpdateAccountSendingEnabledResult> responseHandler = new StaxResponseHandler<UpdateAccountSendingEnabledResult>(
4768                     new UpdateAccountSendingEnabledResultStaxUnmarshaller());
4769             response = invoke(request, responseHandler, executionContext);
4770
4771             return response.getAwsResponse();
4772
4773         } finally {
4774
4775             endClientExecution(awsRequestMetrics, request, response);
4776         }
4777     }
4778
4779     /**
4780      * <p>
4781      * Updates the event destination of a configuration set. Event destinations are associated with configuration sets,
4782      * which enable you to publish email sending events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple
4783      * Notification Service (Amazon SNS). For information about using configuration sets, see <a
4784      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Monitoring Your Amazon
4785      * SES Sending Activity</a> in the <i>Amazon SES Developer Guide.</i>
4786      * </p>
4787      * <note>
4788      * <p>
4789      * When you create or update an event destination, you must provide one, and only one, destination. The destination
4790      * can be Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple Notification Service (Amazon SNS).
4791      * </p>
4792      * </note>
4793      * <p>
4794      * You can execute this operation no more than once per second.
4795      * </p>
4796      * 
4797      * @param updateConfigurationSetEventDestinationRequest
4798      *        Represents a request to update the event destination of a configuration set. Configuration sets enable you
4799      *        to publish email sending events. For information about using configuration sets, see the <a
4800      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon SES
4801      *        Developer Guide</a>.
4802      * @return Result of the UpdateConfigurationSetEventDestination operation returned by the service.
4803      * @throws ConfigurationSetDoesNotExistException
4804      *         Indicates that the configuration set does not exist.
4805      * @throws EventDestinationDoesNotExistException
4806      *         Indicates that the event destination does not exist.
4807      * @throws InvalidCloudWatchDestinationException
4808      *         Indicates that the Amazon CloudWatch destination is invalid. See the error message for details.
4809      * @throws InvalidFirehoseDestinationException
4810      *         Indicates that the Amazon Kinesis Firehose destination is invalid. See the error message for details.
4811      * @throws InvalidSNSDestinationException
4812      *         Indicates that the Amazon Simple Notification Service (Amazon SNS) destination is invalid. See the error
4813      *         message for details.
4814      * @sample AmazonSimpleEmailService.UpdateConfigurationSetEventDestination
4815      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetEventDestination"
4816      *      target="_top">AWS API Documentation</a>
4817      */

4818     @Override
4819     public UpdateConfigurationSetEventDestinationResult updateConfigurationSetEventDestination(UpdateConfigurationSetEventDestinationRequest request) {
4820         request = beforeClientExecution(request);
4821         return executeUpdateConfigurationSetEventDestination(request);
4822     }
4823
4824     @SdkInternalApi
4825     final UpdateConfigurationSetEventDestinationResult executeUpdateConfigurationSetEventDestination(
4826             UpdateConfigurationSetEventDestinationRequest updateConfigurationSetEventDestinationRequest) {
4827
4828         ExecutionContext executionContext = createExecutionContext(updateConfigurationSetEventDestinationRequest);
4829         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4830         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4831         Request<UpdateConfigurationSetEventDestinationRequest> request = null;
4832         Response<UpdateConfigurationSetEventDestinationResult> response = null;
4833
4834         try {
4835             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4836             try {
4837                 request = new UpdateConfigurationSetEventDestinationRequestMarshaller().marshall(super
4838                         .beforeMarshalling(updateConfigurationSetEventDestinationRequest));
4839                 // Binds the request metrics to the current request.
4840                 request.setAWSRequestMetrics(awsRequestMetrics);
4841                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4842                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4843                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConfigurationSetEventDestination");
4844                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4845
4846             } finally {
4847                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4848             }
4849
4850             StaxResponseHandler<UpdateConfigurationSetEventDestinationResult> responseHandler = new StaxResponseHandler<UpdateConfigurationSetEventDestinationResult>(
4851                     new UpdateConfigurationSetEventDestinationResultStaxUnmarshaller());
4852             response = invoke(request, responseHandler, executionContext);
4853
4854             return response.getAwsResponse();
4855
4856         } finally {
4857
4858             endClientExecution(awsRequestMetrics, request, response);
4859         }
4860     }
4861
4862     /**
4863      * <p>
4864      * Enables or disables the publishing of reputation metrics for emails sent using a specific configuration set in a
4865      * given AWS Region. Reputation metrics include bounce and complaint rates. These metrics are published to Amazon
4866      * CloudWatch. By using CloudWatch, you can create alarms when bounce or complaint rates exceed certain thresholds.
4867      * </p>
4868      * <p>
4869      * You can execute this operation no more than once per second.
4870      * </p>
4871      * 
4872      * @param updateConfigurationSetReputationMetricsEnabledRequest
4873      *        Represents a request to modify the reputation metric publishing settings for a configuration set.
4874      * @return Result of the UpdateConfigurationSetReputationMetricsEnabled operation returned by the service.
4875      * @throws ConfigurationSetDoesNotExistException
4876      *         Indicates that the configuration set does not exist.
4877      * @sample AmazonSimpleEmailService.UpdateConfigurationSetReputationMetricsEnabled
4878      * @see <a
4879      *      href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetReputationMetricsEnabled"
4880      *      target="_top">AWS API Documentation</a>
4881      */

4882     @Override
4883     public UpdateConfigurationSetReputationMetricsEnabledResult updateConfigurationSetReputationMetricsEnabled(
4884             UpdateConfigurationSetReputationMetricsEnabledRequest request) {
4885         request = beforeClientExecution(request);
4886         return executeUpdateConfigurationSetReputationMetricsEnabled(request);
4887     }
4888
4889     @SdkInternalApi
4890     final UpdateConfigurationSetReputationMetricsEnabledResult executeUpdateConfigurationSetReputationMetricsEnabled(
4891             UpdateConfigurationSetReputationMetricsEnabledRequest updateConfigurationSetReputationMetricsEnabledRequest) {
4892
4893         ExecutionContext executionContext = createExecutionContext(updateConfigurationSetReputationMetricsEnabledRequest);
4894         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4895         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4896         Request<UpdateConfigurationSetReputationMetricsEnabledRequest> request = null;
4897         Response<UpdateConfigurationSetReputationMetricsEnabledResult> response = null;
4898
4899         try {
4900             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4901             try {
4902                 request = new UpdateConfigurationSetReputationMetricsEnabledRequestMarshaller().marshall(super
4903                         .beforeMarshalling(updateConfigurationSetReputationMetricsEnabledRequest));
4904                 // Binds the request metrics to the current request.
4905                 request.setAWSRequestMetrics(awsRequestMetrics);
4906                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4907                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4908                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConfigurationSetReputationMetricsEnabled");
4909                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4910
4911             } finally {
4912                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4913             }
4914
4915             StaxResponseHandler<UpdateConfigurationSetReputationMetricsEnabledResult> responseHandler = new StaxResponseHandler<UpdateConfigurationSetReputationMetricsEnabledResult>(
4916                     new UpdateConfigurationSetReputationMetricsEnabledResultStaxUnmarshaller());
4917             response = invoke(request, responseHandler, executionContext);
4918
4919             return response.getAwsResponse();
4920
4921         } finally {
4922
4923             endClientExecution(awsRequestMetrics, request, response);
4924         }
4925     }
4926
4927     /**
4928      * <p>
4929      * Enables or disables email sending for messages sent using a specific configuration set in a given AWS Region. You
4930      * can use this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending for a
4931      * configuration set when the reputation metrics for that configuration set (such as your bounce on complaint rate)
4932      * exceed certain thresholds.
4933      * </p>
4934      * <p>
4935      * You can execute this operation no more than once per second.
4936      * </p>
4937      * 
4938      * @param updateConfigurationSetSendingEnabledRequest
4939      *        Represents a request to enable or disable the email sending capabilities for a specific configuration set.
4940      * @return Result of the UpdateConfigurationSetSendingEnabled operation returned by the service.
4941      * @throws ConfigurationSetDoesNotExistException
4942      *         Indicates that the configuration set does not exist.
4943      * @sample AmazonSimpleEmailService.UpdateConfigurationSetSendingEnabled
4944      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetSendingEnabled"
4945      *      target="_top">AWS API Documentation</a>
4946      */

4947     @Override
4948     public UpdateConfigurationSetSendingEnabledResult updateConfigurationSetSendingEnabled(UpdateConfigurationSetSendingEnabledRequest request) {
4949         request = beforeClientExecution(request);
4950         return executeUpdateConfigurationSetSendingEnabled(request);
4951     }
4952
4953     @SdkInternalApi
4954     final UpdateConfigurationSetSendingEnabledResult executeUpdateConfigurationSetSendingEnabled(
4955             UpdateConfigurationSetSendingEnabledRequest updateConfigurationSetSendingEnabledRequest) {
4956
4957         ExecutionContext executionContext = createExecutionContext(updateConfigurationSetSendingEnabledRequest);
4958         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
4959         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
4960         Request<UpdateConfigurationSetSendingEnabledRequest> request = null;
4961         Response<UpdateConfigurationSetSendingEnabledResult> response = null;
4962
4963         try {
4964             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
4965             try {
4966                 request = new UpdateConfigurationSetSendingEnabledRequestMarshaller().marshall(super
4967                         .beforeMarshalling(updateConfigurationSetSendingEnabledRequest));
4968                 // Binds the request metrics to the current request.
4969                 request.setAWSRequestMetrics(awsRequestMetrics);
4970                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
4971                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
4972                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConfigurationSetSendingEnabled");
4973                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
4974
4975             } finally {
4976                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
4977             }
4978
4979             StaxResponseHandler<UpdateConfigurationSetSendingEnabledResult> responseHandler = new StaxResponseHandler<UpdateConfigurationSetSendingEnabledResult>(
4980                     new UpdateConfigurationSetSendingEnabledResultStaxUnmarshaller());
4981             response = invoke(request, responseHandler, executionContext);
4982
4983             return response.getAwsResponse();
4984
4985         } finally {
4986
4987             endClientExecution(awsRequestMetrics, request, response);
4988         }
4989     }
4990
4991     /**
4992      * <p>
4993      * Modifies an association between a configuration set and a custom domain for open and click event tracking.
4994      * </p>
4995      * <p>
4996      * By default, images and links used for tracking open and click events are hosted on domains operated by Amazon
4997      * SES. You can configure a subdomain of your own to handle these events. For information about using custom
4998      * domains, see the <a
4999      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/configure-custom-open-click-domains.html">Amazon SES
5000      * Developer Guide</a>.
5001      * </p>
5002      * 
5003      * @param updateConfigurationSetTrackingOptionsRequest
5004      *        Represents a request to update the tracking options for a configuration set.
5005      * @return Result of the UpdateConfigurationSetTrackingOptions operation returned by the service.
5006      * @throws ConfigurationSetDoesNotExistException
5007      *         Indicates that the configuration set does not exist.
5008      * @throws TrackingOptionsDoesNotExistException
5009      *         Indicates that the TrackingOptions object you specified does not exist.
5010      * @throws InvalidTrackingOptionsException
5011      *         Indicates that the custom domain to be used for open and click tracking redirects is invalid. This error
5012      *         appears most often in the following situations:</p>
5013      *         <ul>
5014      *         <li>
5015      *         <p>
5016      *         When the tracking domain you specified is not verified in Amazon SES.
5017      *         </p>
5018      *         </li>
5019      *         <li>
5020      *         <p>
5021      *         When the tracking domain you specified is not a valid domain or subdomain.
5022      *         </p>
5023      *         </li>
5024      * @sample AmazonSimpleEmailService.UpdateConfigurationSetTrackingOptions
5025      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateConfigurationSetTrackingOptions"
5026      *      target="_top">AWS API Documentation</a>
5027      */

5028     @Override
5029     public UpdateConfigurationSetTrackingOptionsResult updateConfigurationSetTrackingOptions(UpdateConfigurationSetTrackingOptionsRequest request) {
5030         request = beforeClientExecution(request);
5031         return executeUpdateConfigurationSetTrackingOptions(request);
5032     }
5033
5034     @SdkInternalApi
5035     final UpdateConfigurationSetTrackingOptionsResult executeUpdateConfigurationSetTrackingOptions(
5036             UpdateConfigurationSetTrackingOptionsRequest updateConfigurationSetTrackingOptionsRequest) {
5037
5038         ExecutionContext executionContext = createExecutionContext(updateConfigurationSetTrackingOptionsRequest);
5039         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
5040         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
5041         Request<UpdateConfigurationSetTrackingOptionsRequest> request = null;
5042         Response<UpdateConfigurationSetTrackingOptionsResult> response = null;
5043
5044         try {
5045             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
5046             try {
5047                 request = new UpdateConfigurationSetTrackingOptionsRequestMarshaller().marshall(super
5048                         .beforeMarshalling(updateConfigurationSetTrackingOptionsRequest));
5049                 // Binds the request metrics to the current request.
5050                 request.setAWSRequestMetrics(awsRequestMetrics);
5051                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
5052                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
5053                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateConfigurationSetTrackingOptions");
5054                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
5055
5056             } finally {
5057                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
5058             }
5059
5060             StaxResponseHandler<UpdateConfigurationSetTrackingOptionsResult> responseHandler = new StaxResponseHandler<UpdateConfigurationSetTrackingOptionsResult>(
5061                     new UpdateConfigurationSetTrackingOptionsResultStaxUnmarshaller());
5062             response = invoke(request, responseHandler, executionContext);
5063
5064             return response.getAwsResponse();
5065
5066         } finally {
5067
5068             endClientExecution(awsRequestMetrics, request, response);
5069         }
5070     }
5071
5072     /**
5073      * <p>
5074      * Updates an existing custom verification email template.
5075      * </p>
5076      * <p>
5077      * For more information about custom verification email templates, see <a
5078      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html">Using Custom
5079      * Verification Email Templates</a> in the <i>Amazon SES Developer Guide</i>.
5080      * </p>
5081      * <p>
5082      * You can execute this operation no more than once per second.
5083      * </p>
5084      * 
5085      * @param updateCustomVerificationEmailTemplateRequest
5086      *        Represents a request to update an existing custom verification email template.
5087      * @return Result of the UpdateCustomVerificationEmailTemplate operation returned by the service.
5088      * @throws CustomVerificationEmailTemplateDoesNotExistException
5089      *         Indicates that a custom verification email template with the name you specified does not exist.
5090      * @throws FromEmailAddressNotVerifiedException
5091      *         Indicates that the sender address specified for a custom verification email is not verified, and is
5092      *         therefore not eligible to send the custom verification email.
5093      * @throws CustomVerificationEmailInvalidContentException
5094      *         Indicates that custom verification email template provided content is invalid.
5095      * @sample AmazonSimpleEmailService.UpdateCustomVerificationEmailTemplate
5096      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateCustomVerificationEmailTemplate"
5097      *      target="_top">AWS API Documentation</a>
5098      */

5099     @Override
5100     public UpdateCustomVerificationEmailTemplateResult updateCustomVerificationEmailTemplate(UpdateCustomVerificationEmailTemplateRequest request) {
5101         request = beforeClientExecution(request);
5102         return executeUpdateCustomVerificationEmailTemplate(request);
5103     }
5104
5105     @SdkInternalApi
5106     final UpdateCustomVerificationEmailTemplateResult executeUpdateCustomVerificationEmailTemplate(
5107             UpdateCustomVerificationEmailTemplateRequest updateCustomVerificationEmailTemplateRequest) {
5108
5109         ExecutionContext executionContext = createExecutionContext(updateCustomVerificationEmailTemplateRequest);
5110         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
5111         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
5112         Request<UpdateCustomVerificationEmailTemplateRequest> request = null;
5113         Response<UpdateCustomVerificationEmailTemplateResult> response = null;
5114
5115         try {
5116             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
5117             try {
5118                 request = new UpdateCustomVerificationEmailTemplateRequestMarshaller().marshall(super
5119                         .beforeMarshalling(updateCustomVerificationEmailTemplateRequest));
5120                 // Binds the request metrics to the current request.
5121                 request.setAWSRequestMetrics(awsRequestMetrics);
5122                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
5123                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
5124                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCustomVerificationEmailTemplate");
5125                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
5126
5127             } finally {
5128                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
5129             }
5130
5131             StaxResponseHandler<UpdateCustomVerificationEmailTemplateResult> responseHandler = new StaxResponseHandler<UpdateCustomVerificationEmailTemplateResult>(
5132                     new UpdateCustomVerificationEmailTemplateResultStaxUnmarshaller());
5133             response = invoke(request, responseHandler, executionContext);
5134
5135             return response.getAwsResponse();
5136
5137         } finally {
5138
5139             endClientExecution(awsRequestMetrics, request, response);
5140         }
5141     }
5142
5143     /**
5144      * <p>
5145      * Updates a receipt rule.
5146      * </p>
5147      * <p>
5148      * For information about managing receipt rules, see the <a
5149      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-managing-receipt-rules.html">Amazon
5150      * SES Developer Guide</a>.
5151      * </p>
5152      * <p>
5153      * You can execute this operation no more than once per second.
5154      * </p>
5155      * 
5156      * @param updateReceiptRuleRequest
5157      *        Represents a request to update a receipt rule. You use receipt rules to receive email with Amazon SES. For
5158      *        more information, see the <a
5159      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-concepts.html">Amazon SES
5160      *        Developer Guide</a>.
5161      * @return Result of the UpdateReceiptRule operation returned by the service.
5162      * @throws InvalidSnsTopicException
5163      *         Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES could not publish to the
5164      *         topic, possibly due to permissions issues. For information about giving permissions, see the <a
5165      *         href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES
5166      *         Developer Guide</a>.
5167      * @throws InvalidS3ConfigurationException
5168      *         Indicates that the provided Amazon S3 bucket or AWS KMS encryption key is invalid, or that Amazon SES
5169      *         could not publish to the bucket, possibly due to permissions issues. For information about giving
5170      *         permissions, see the <a
5171      *         href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon SES
5172      *         Developer Guide</a>.
5173      * @throws InvalidLambdaFunctionException
5174      *         Indicates that the provided AWS Lambda function is invalid, or that Amazon SES could not execute the
5175      *         provided function, possibly due to permissions issues. For information about giving permissions, see the
5176      *         <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html">Amazon
5177      *         SES Developer Guide</a>.
5178      * @throws RuleSetDoesNotExistException
5179      *         Indicates that the provided receipt rule set does not exist.
5180      * @throws RuleDoesNotExistException
5181      *         Indicates that the provided receipt rule does not exist.
5182      * @throws LimitExceededException
5183      *         Indicates that a resource could not be created because of service limits. For a list of Amazon SES
5184      *         limits, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html">Amazon SES
5185      *         Developer Guide</a>.
5186      * @sample AmazonSimpleEmailService.UpdateReceiptRule
5187      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateReceiptRule" target="_top">AWS API
5188      *      Documentation</a>
5189      */

5190     @Override
5191     public UpdateReceiptRuleResult updateReceiptRule(UpdateReceiptRuleRequest request) {
5192         request = beforeClientExecution(request);
5193         return executeUpdateReceiptRule(request);
5194     }
5195
5196     @SdkInternalApi
5197     final UpdateReceiptRuleResult executeUpdateReceiptRule(UpdateReceiptRuleRequest updateReceiptRuleRequest) {
5198
5199         ExecutionContext executionContext = createExecutionContext(updateReceiptRuleRequest);
5200         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
5201         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
5202         Request<UpdateReceiptRuleRequest> request = null;
5203         Response<UpdateReceiptRuleResult> response = null;
5204
5205         try {
5206             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
5207             try {
5208                 request = new UpdateReceiptRuleRequestMarshaller().marshall(super.beforeMarshalling(updateReceiptRuleRequest));
5209                 // Binds the request metrics to the current request.
5210                 request.setAWSRequestMetrics(awsRequestMetrics);
5211                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
5212                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
5213                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateReceiptRule");
5214                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
5215
5216             } finally {
5217                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
5218             }
5219
5220             StaxResponseHandler<UpdateReceiptRuleResult> responseHandler = new StaxResponseHandler<UpdateReceiptRuleResult>(
5221                     new UpdateReceiptRuleResultStaxUnmarshaller());
5222             response = invoke(request, responseHandler, executionContext);
5223
5224             return response.getAwsResponse();
5225
5226         } finally {
5227
5228             endClientExecution(awsRequestMetrics, request, response);
5229         }
5230     }
5231
5232     /**
5233      * <p>
5234      * Updates an email template. Email templates enable you to send personalized email to one or more destinations in a
5235      * single API operation. For more information, see the <a
5236      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html">Amazon SES
5237      * Developer Guide</a>.
5238      * </p>
5239      * <p>
5240      * You can execute this operation no more than once per second.
5241      * </p>
5242      * 
5243      * @param updateTemplateRequest
5244      * @return Result of the UpdateTemplate operation returned by the service.
5245      * @throws TemplateDoesNotExistException
5246      *         Indicates that the Template object you specified does not exist in your Amazon SES account.
5247      * @throws InvalidTemplateException
5248      *         Indicates that the template that you specified could not be rendered. This issue may occur when a
5249      *         template refers to a partial that does not exist.
5250      * @sample AmazonSimpleEmailService.UpdateTemplate
5251      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/UpdateTemplate" target="_top">AWS API
5252      *      Documentation</a>
5253      */

5254     @Override
5255     public UpdateTemplateResult updateTemplate(UpdateTemplateRequest request) {
5256         request = beforeClientExecution(request);
5257         return executeUpdateTemplate(request);
5258     }
5259
5260     @SdkInternalApi
5261     final UpdateTemplateResult executeUpdateTemplate(UpdateTemplateRequest updateTemplateRequest) {
5262
5263         ExecutionContext executionContext = createExecutionContext(updateTemplateRequest);
5264         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
5265         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
5266         Request<UpdateTemplateRequest> request = null;
5267         Response<UpdateTemplateResult> response = null;
5268
5269         try {
5270             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
5271             try {
5272                 request = new UpdateTemplateRequestMarshaller().marshall(super.beforeMarshalling(updateTemplateRequest));
5273                 // Binds the request metrics to the current request.
5274                 request.setAWSRequestMetrics(awsRequestMetrics);
5275                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
5276                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
5277                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateTemplate");
5278                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
5279
5280             } finally {
5281                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
5282             }
5283
5284             StaxResponseHandler<UpdateTemplateResult> responseHandler = new StaxResponseHandler<UpdateTemplateResult>(
5285                     new UpdateTemplateResultStaxUnmarshaller());
5286             response = invoke(request, responseHandler, executionContext);
5287
5288             return response.getAwsResponse();
5289
5290         } finally {
5291
5292             endClientExecution(awsRequestMetrics, request, response);
5293         }
5294     }
5295
5296     /**
5297      * <p>
5298      * Returns a set of DKIM tokens for a domain identity.
5299      * </p>
5300      * <important>
5301      * <p>
5302      * When you execute the <code>VerifyDomainDkim</code> operation, the domain that you specify is added to the list of
5303      * identities that are associated with your account. This is true even if you haven't already associated the domain
5304      * with your account by using the <code>VerifyDomainIdentity</code> operation. However, you can't send email from
5305      * the domain until you either successfully <a
5306      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html">verify it</a> or you
5307      * successfully <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">set up DKIM for
5308      * it</a>.
5309      * </p>
5310      * </important>
5311      * <p>
5312      * You use the tokens that are generated by this operation to create CNAME records. When Amazon SES detects that
5313      * you've added these records to the DNS configuration for a domain, you can start sending email from that domain.
5314      * You can start sending email even if you haven't added the TXT record provided by the VerifyDomainIdentity
5315      * operation to the DNS configuration for your domain. All email that you send from the domain is authenticated
5316      * using DKIM.
5317      * </p>
5318      * <p>
5319      * To create the CNAME records for DKIM authentication, use the following values:
5320      * </p>
5321      * <ul>
5322      * <li>
5323      * <p>
5324      * <b>Name</b>: <i>token</i>._domainkey.<i>example.com</i>
5325      * </p>
5326      * </li>
5327      * <li>
5328      * <p>
5329      * <b>Type</b>: CNAME
5330      * </p>
5331      * </li>
5332      * <li>
5333      * <p>
5334      * <b>Value</b>: <i>token</i>.dkim.amazonses.com
5335      * </p>
5336      * </li>
5337      * </ul>
5338      * <p>
5339      * In the preceding example, replace <i>token</i> with one of the tokens that are generated when you execute this
5340      * operation. Replace <i>example.com</i> with your domain. Repeat this process for each token that's generated by
5341      * this operation.
5342      * </p>
5343      * <p>
5344      * You can execute this operation no more than once per second.
5345      * </p>
5346      * 
5347      * @param verifyDomainDkimRequest
5348      *        Represents a request to generate the CNAME records needed to set up Easy DKIM with Amazon SES. For more
5349      *        information about setting up Easy DKIM, see the <a
5350      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html">Amazon SES Developer
5351      *        Guide</a>.
5352      * @return Result of the VerifyDomainDkim operation returned by the service.
5353      * @sample AmazonSimpleEmailService.VerifyDomainDkim
5354      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyDomainDkim" target="_top">AWS API
5355      *      Documentation</a>
5356      */

5357     @Override
5358     public VerifyDomainDkimResult verifyDomainDkim(VerifyDomainDkimRequest request) {
5359         request = beforeClientExecution(request);
5360         return executeVerifyDomainDkim(request);
5361     }
5362
5363     @SdkInternalApi
5364     final VerifyDomainDkimResult executeVerifyDomainDkim(VerifyDomainDkimRequest verifyDomainDkimRequest) {
5365
5366         ExecutionContext executionContext = createExecutionContext(verifyDomainDkimRequest);
5367         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
5368         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
5369         Request<VerifyDomainDkimRequest> request = null;
5370         Response<VerifyDomainDkimResult> response = null;
5371
5372         try {
5373             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
5374             try {
5375                 request = new VerifyDomainDkimRequestMarshaller().marshall(super.beforeMarshalling(verifyDomainDkimRequest));
5376                 // Binds the request metrics to the current request.
5377                 request.setAWSRequestMetrics(awsRequestMetrics);
5378                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
5379                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
5380                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "VerifyDomainDkim");
5381                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
5382
5383             } finally {
5384                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
5385             }
5386
5387             StaxResponseHandler<VerifyDomainDkimResult> responseHandler = new StaxResponseHandler<VerifyDomainDkimResult>(
5388                     new VerifyDomainDkimResultStaxUnmarshaller());
5389             response = invoke(request, responseHandler, executionContext);
5390
5391             return response.getAwsResponse();
5392
5393         } finally {
5394
5395             endClientExecution(awsRequestMetrics, request, response);
5396         }
5397     }
5398
5399     /**
5400      * <p>
5401      * Adds a domain to the list of identities for your Amazon SES account in the current AWS Region and attempts to
5402      * verify it. For more information about verifying domains, see <a
5403      * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html">Verifying Email
5404      * Addresses and Domains</a> in the <i>Amazon SES Developer Guide.</i>
5405      * </p>
5406      * <p>
5407      * You can execute this operation no more than once per second.
5408      * </p>
5409      * 
5410      * @param verifyDomainIdentityRequest
5411      *        Represents a request to begin Amazon SES domain verification and to generate the TXT records that you must
5412      *        publish to the DNS server of your domain to complete the verification. For information about domain
5413      *        verification, see the <a
5414      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html">Amazon SES Developer
5415      *        Guide</a>.
5416      * @return Result of the VerifyDomainIdentity operation returned by the service.
5417      * @sample AmazonSimpleEmailService.VerifyDomainIdentity
5418      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyDomainIdentity" target="_top">AWS API
5419      *      Documentation</a>
5420      */

5421     @Override
5422     public VerifyDomainIdentityResult verifyDomainIdentity(VerifyDomainIdentityRequest request) {
5423         request = beforeClientExecution(request);
5424         return executeVerifyDomainIdentity(request);
5425     }
5426
5427     @SdkInternalApi
5428     final VerifyDomainIdentityResult executeVerifyDomainIdentity(VerifyDomainIdentityRequest verifyDomainIdentityRequest) {
5429
5430         ExecutionContext executionContext = createExecutionContext(verifyDomainIdentityRequest);
5431         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
5432         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
5433         Request<VerifyDomainIdentityRequest> request = null;
5434         Response<VerifyDomainIdentityResult> response = null;
5435
5436         try {
5437             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
5438             try {
5439                 request = new VerifyDomainIdentityRequestMarshaller().marshall(super.beforeMarshalling(verifyDomainIdentityRequest));
5440                 // Binds the request metrics to the current request.
5441                 request.setAWSRequestMetrics(awsRequestMetrics);
5442                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
5443                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
5444                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "VerifyDomainIdentity");
5445                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
5446
5447             } finally {
5448                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
5449             }
5450
5451             StaxResponseHandler<VerifyDomainIdentityResult> responseHandler = new StaxResponseHandler<VerifyDomainIdentityResult>(
5452                     new VerifyDomainIdentityResultStaxUnmarshaller());
5453             response = invoke(request, responseHandler, executionContext);
5454
5455             return response.getAwsResponse();
5456
5457         } finally {
5458
5459             endClientExecution(awsRequestMetrics, request, response);
5460         }
5461     }
5462
5463     /**
5464      * <p>
5465      * Deprecated. Use the <code>VerifyEmailIdentity</code> operation to verify a new email address.
5466      * </p>
5467      * 
5468      * @param verifyEmailAddressRequest
5469      *        Represents a request to begin email address verification with Amazon SES. For information about email
5470      *        address verification, see the <a
5471      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html">Amazon SES
5472      *        Developer Guide</a>.
5473      * @return Result of the VerifyEmailAddress operation returned by the service.
5474      * @sample AmazonSimpleEmailService.VerifyEmailAddress
5475      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyEmailAddress" target="_top">AWS API
5476      *      Documentation</a>
5477      */

5478     @Override
5479     public VerifyEmailAddressResult verifyEmailAddress(VerifyEmailAddressRequest request) {
5480         request = beforeClientExecution(request);
5481         return executeVerifyEmailAddress(request);
5482     }
5483
5484     @SdkInternalApi
5485     final VerifyEmailAddressResult executeVerifyEmailAddress(VerifyEmailAddressRequest verifyEmailAddressRequest) {
5486
5487         ExecutionContext executionContext = createExecutionContext(verifyEmailAddressRequest);
5488         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
5489         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
5490         Request<VerifyEmailAddressRequest> request = null;
5491         Response<VerifyEmailAddressResult> response = null;
5492
5493         try {
5494             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
5495             try {
5496                 request = new VerifyEmailAddressRequestMarshaller().marshall(super.beforeMarshalling(verifyEmailAddressRequest));
5497                 // Binds the request metrics to the current request.
5498                 request.setAWSRequestMetrics(awsRequestMetrics);
5499                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
5500                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
5501                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "VerifyEmailAddress");
5502                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
5503
5504             } finally {
5505                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
5506             }
5507
5508             StaxResponseHandler<VerifyEmailAddressResult> responseHandler = new StaxResponseHandler<VerifyEmailAddressResult>(
5509                     new VerifyEmailAddressResultStaxUnmarshaller());
5510             response = invoke(request, responseHandler, executionContext);
5511
5512             return response.getAwsResponse();
5513
5514         } finally {
5515
5516             endClientExecution(awsRequestMetrics, request, response);
5517         }
5518     }
5519
5520     /**
5521      * <p>
5522      * Adds an email address to the list of identities for your Amazon SES account in the current AWS region and
5523      * attempts to verify it. As a result of executing this operation, a verification email is sent to the specified
5524      * address.
5525      * </p>
5526      * <p>
5527      * You can execute this operation no more than once per second.
5528      * </p>
5529      * 
5530      * @param verifyEmailIdentityRequest
5531      *        Represents a request to begin email address verification with Amazon SES. For information about email
5532      *        address verification, see the <a
5533      *        href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses.html">Amazon SES
5534      *        Developer Guide</a>.
5535      * @return Result of the VerifyEmailIdentity operation returned by the service.
5536      * @sample AmazonSimpleEmailService.VerifyEmailIdentity
5537      * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/VerifyEmailIdentity" target="_top">AWS API
5538      *      Documentation</a>
5539      */

5540     @Override
5541     public VerifyEmailIdentityResult verifyEmailIdentity(VerifyEmailIdentityRequest request) {
5542         request = beforeClientExecution(request);
5543         return executeVerifyEmailIdentity(request);
5544     }
5545
5546     @SdkInternalApi
5547     final VerifyEmailIdentityResult executeVerifyEmailIdentity(VerifyEmailIdentityRequest verifyEmailIdentityRequest) {
5548
5549         ExecutionContext executionContext = createExecutionContext(verifyEmailIdentityRequest);
5550         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
5551         awsRequestMetrics.startEvent(Field.ClientExecuteTime);
5552         Request<VerifyEmailIdentityRequest> request = null;
5553         Response<VerifyEmailIdentityResult> response = null;
5554
5555         try {
5556             awsRequestMetrics.startEvent(Field.RequestMarshallTime);
5557             try {
5558                 request = new VerifyEmailIdentityRequestMarshaller().marshall(super.beforeMarshalling(verifyEmailIdentityRequest));
5559                 // Binds the request metrics to the current request.
5560                 request.setAWSRequestMetrics(awsRequestMetrics);
5561                 request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
5562                 request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SES");
5563                 request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "VerifyEmailIdentity");
5564                 request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
5565
5566             } finally {
5567                 awsRequestMetrics.endEvent(Field.RequestMarshallTime);
5568             }
5569
5570             StaxResponseHandler<VerifyEmailIdentityResult> responseHandler = new StaxResponseHandler<VerifyEmailIdentityResult>(
5571                     new VerifyEmailIdentityResultStaxUnmarshaller());
5572             response = invoke(request, responseHandler, executionContext);
5573
5574             return response.getAwsResponse();
5575
5576         } finally {
5577
5578             endClientExecution(awsRequestMetrics, request, response);
5579         }
5580     }
5581
5582     /**
5583      * Returns additional metadata for a previously executed successful, request, typically used for debugging issues
5584      * where a service isn't acting as expected. This data isn't considered part of the result data returned by an
5585      * operation, so it's available through this separate, diagnostic interface.
5586      * <p>
5587      * Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
5588      * information for an executed request, you should use this method to retrieve it as soon as possible after
5589      * executing the request.
5590      *
5591      * @param request
5592      *        The originally executed request
5593      *
5594      * @return The response metadata for the specified request, or null if none is available.
5595      */

5596     public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
5597         return client.getResponseMetadataForRequest(request);
5598     }
5599
5600     /**
5601      * Normal invoke with authentication. Credentials are required and may be overriden at the request level.
5602      **/

5603     private <X, Y extends AmazonWebServiceRequest> Response<X> invoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,
5604             ExecutionContext executionContext) {
5605
5606         return invoke(request, responseHandler, executionContext, nullnull);
5607     }
5608
5609     /**
5610      * Normal invoke with authentication. Credentials are required and may be overriden at the request level.
5611      **/

5612     private <X, Y extends AmazonWebServiceRequest> Response<X> invoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,
5613             ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) {
5614
5615         executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider));
5616
5617         return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait);
5618     }
5619
5620     /**
5621      * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will
5622      * be ignored for this operation.
5623      **/

5624     private <X, Y extends AmazonWebServiceRequest> Response<X> anonymousInvoke(Request<Y> request,
5625             HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler, ExecutionContext executionContext) {
5626
5627         return doInvoke(request, responseHandler, executionContext, nullnull);
5628     }
5629
5630     /**
5631      * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the
5632      * ExecutionContext beforehand.
5633      **/

5634     private <X, Y extends AmazonWebServiceRequest> Response<X> doInvoke(Request<Y> request, HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,
5635             ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) {
5636
5637         if (discoveredEndpoint != null) {
5638             request.setEndpoint(discoveredEndpoint);
5639             request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery");
5640         } else if (uriFromEndpointTrait != null) {
5641             request.setEndpoint(uriFromEndpointTrait);
5642         } else {
5643             request.setEndpoint(endpoint);
5644         }
5645
5646         request.setTimeOffset(timeOffset);
5647
5648         DefaultErrorResponseHandler errorResponseHandler = new DefaultErrorResponseHandler(exceptionUnmarshallers);
5649
5650         return client.execute(request, responseHandler, errorResponseHandler, executionContext);
5651     }
5652
5653     @Override
5654     public AmazonSimpleEmailServiceWaiters waiters() {
5655         if (waiters == null) {
5656             synchronized (this) {
5657                 if (waiters == null) {
5658                     waiters = new AmazonSimpleEmailServiceWaiters(this);
5659                 }
5660             }
5661         }
5662         return waiters;
5663     }
5664
5665     @Override
5666     public void shutdown() {
5667         super.shutdown();
5668         if (waiters != null) {
5669             waiters.shutdown();
5670         }
5671     }
5672
5673 }
5674