/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace WorkMailMessageFlow { /** *

The WorkMail Message Flow API provides access to email messages as they are * being sent and received by a WorkMail organization.

*/ class AWS_WORKMAILMESSAGEFLOW_API WorkMailMessageFlowClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods { public: typedef Aws::Client::AWSJsonClient BASECLASS; static const char* SERVICE_NAME; static const char* ALLOCATION_TAG; typedef WorkMailMessageFlowClientConfiguration ClientConfigurationType; typedef WorkMailMessageFlowEndpointProvider EndpointProviderType; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ WorkMailMessageFlowClient(const Aws::WorkMailMessageFlow::WorkMailMessageFlowClientConfiguration& clientConfiguration = Aws::WorkMailMessageFlow::WorkMailMessageFlowClientConfiguration(), std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG)); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ WorkMailMessageFlowClient(const Aws::Auth::AWSCredentials& credentials, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::WorkMailMessageFlow::WorkMailMessageFlowClientConfiguration& clientConfiguration = Aws::WorkMailMessageFlow::WorkMailMessageFlowClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ WorkMailMessageFlowClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::WorkMailMessageFlow::WorkMailMessageFlowClientConfiguration& clientConfiguration = Aws::WorkMailMessageFlow::WorkMailMessageFlowClientConfiguration()); /* Legacy constructors due deprecation */ /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ WorkMailMessageFlowClient(const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ WorkMailMessageFlowClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ WorkMailMessageFlowClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration); /* End of legacy constructors due deprecation */ virtual ~WorkMailMessageFlowClient(); /** *

Retrieves the raw content of an in-transit email message, in MIME * format.

See Also:

AWS * API Reference

*/ virtual Model::GetRawMessageContentOutcome GetRawMessageContent(const Model::GetRawMessageContentRequest& request) const; /** * A Callable wrapper for GetRawMessageContent that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetRawMessageContentOutcomeCallable GetRawMessageContentCallable(const GetRawMessageContentRequestT& request) const { return SubmitCallable(&WorkMailMessageFlowClient::GetRawMessageContent, request); } /** * An Async wrapper for GetRawMessageContent that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetRawMessageContentAsync(const GetRawMessageContentRequestT& request, const GetRawMessageContentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&WorkMailMessageFlowClient::GetRawMessageContent, request, handler, context); } /** *

Updates the raw content of an in-transit email message, in MIME format.

*

This example describes how to update in-transit email message. For more * information and examples for using this API, see * Updating message content with AWS Lambda.

Updates to an * in-transit message only appear when you call PutRawMessageContent * from an AWS Lambda function configured with a synchronous * Run Lambda rule. If you call PutRawMessageContent on a * delivered or sent message, the message remains unchanged, even though GetRawMessageContent * returns an updated message.

See Also:

AWS * API Reference

*/ virtual Model::PutRawMessageContentOutcome PutRawMessageContent(const Model::PutRawMessageContentRequest& request) const; /** * A Callable wrapper for PutRawMessageContent that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::PutRawMessageContentOutcomeCallable PutRawMessageContentCallable(const PutRawMessageContentRequestT& request) const { return SubmitCallable(&WorkMailMessageFlowClient::PutRawMessageContent, request); } /** * An Async wrapper for PutRawMessageContent that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void PutRawMessageContentAsync(const PutRawMessageContentRequestT& request, const PutRawMessageContentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&WorkMailMessageFlowClient::PutRawMessageContent, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const WorkMailMessageFlowClientConfiguration& clientConfiguration); WorkMailMessageFlowClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace WorkMailMessageFlow } // namespace Aws