/**
* 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 ConnectParticipant
{
/**
* Amazon Connect is an easy-to-use omnichannel cloud contact center service
* that enables companies of any size to deliver superior customer service at a
* lower cost. Amazon Connect communications capabilities make it easy for
* companies to deliver personalized interactions across communication channels,
* including chat.
Use the Amazon Connect Participant Service to manage
* participants (for example, agents, customers, and managers listening in), and to
* send messages and events within a chat contact. The APIs in the service enable
* the following: sending chat messages, attachment sharing, managing a
* participant's connection state and message events, and retrieving chat
* transcripts.
*/
class AWS_CONNECTPARTICIPANT_API ConnectParticipantClient : 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 ConnectParticipantClientConfiguration ClientConfigurationType;
typedef ConnectParticipantEndpointProvider 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.
*/
ConnectParticipantClient(const Aws::ConnectParticipant::ConnectParticipantClientConfiguration& clientConfiguration = Aws::ConnectParticipant::ConnectParticipantClientConfiguration(),
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.
*/
ConnectParticipantClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::ConnectParticipant::ConnectParticipantClientConfiguration& clientConfiguration = Aws::ConnectParticipant::ConnectParticipantClientConfiguration());
/**
* 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
*/
ConnectParticipantClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::ConnectParticipant::ConnectParticipantClientConfiguration& clientConfiguration = Aws::ConnectParticipant::ConnectParticipantClientConfiguration());
/* 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.
*/
ConnectParticipantClient(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.
*/
ConnectParticipantClient(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
*/
ConnectParticipantClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~ConnectParticipantClient();
/**
* Allows you to confirm that the attachment has been uploaded using the
* pre-signed URL provided in StartAttachmentUpload API.
* ConnectionToken
is used for invoking this API instead of
* ParticipantToken
.
The Amazon Connect Participant
* Service APIs do not use Signature
* Version 4 authentication.
See Also:
AWS
* API Reference
*/
virtual Model::CompleteAttachmentUploadOutcome CompleteAttachmentUpload(const Model::CompleteAttachmentUploadRequest& request) const;
/**
* A Callable wrapper for CompleteAttachmentUpload that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CompleteAttachmentUploadOutcomeCallable CompleteAttachmentUploadCallable(const CompleteAttachmentUploadRequestT& request) const
{
return SubmitCallable(&ConnectParticipantClient::CompleteAttachmentUpload, request);
}
/**
* An Async wrapper for CompleteAttachmentUpload that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CompleteAttachmentUploadAsync(const CompleteAttachmentUploadRequestT& request, const CompleteAttachmentUploadResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ConnectParticipantClient::CompleteAttachmentUpload, request, handler, context);
}
/**
* Creates the participant's connection.
* ParticipantToken
is used for invoking this API instead of
* ConnectionToken
.
The participant token is valid for
* the lifetime of the participant – until they are part of a contact.
The
* response URL for WEBSOCKET
Type has a connect expiry timeout of
* 100s. Clients must manually connect to the returned websocket URL and subscribe
* to the desired topic.
For chat, you need to publish the following on the
* established websocket connection:
* {"topic":"aws/subscribe","content":{"topics":["aws/chat"]}}
* Upon websocket URL expiry, as specified in the response ConnectionExpiry
* parameter, clients need to call this API again to obtain a new websocket URL and
* perform the same steps as before.
Message streaming support: This
* API can also be used together with the StartContactStreaming
* API to create a participant connection for chat contacts that are not using a
* websocket. For more information about message streaming, Enable
* real-time chat message streaming in the Amazon Connect Administrator
* Guide.
Feature specifications: For information about feature
* specifications, such as the allowed number of open websocket connections per
* participant, see Feature
* specifications in the Amazon Connect Administrator Guide.
* The Amazon Connect Participant Service APIs do not use Signature
* Version 4 authentication.
See Also:
AWS
* API Reference
*/
virtual Model::CreateParticipantConnectionOutcome CreateParticipantConnection(const Model::CreateParticipantConnectionRequest& request) const;
/**
* A Callable wrapper for CreateParticipantConnection that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateParticipantConnectionOutcomeCallable CreateParticipantConnectionCallable(const CreateParticipantConnectionRequestT& request) const
{
return SubmitCallable(&ConnectParticipantClient::CreateParticipantConnection, request);
}
/**
* An Async wrapper for CreateParticipantConnection that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateParticipantConnectionAsync(const CreateParticipantConnectionRequestT& request, const CreateParticipantConnectionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ConnectParticipantClient::CreateParticipantConnection, request, handler, context);
}
/**
* Disconnects a participant.
ConnectionToken
is
* used for invoking this API instead of ParticipantToken
.
* The Amazon Connect Participant Service APIs do not use Signature
* Version 4 authentication.
See Also:
AWS
* API Reference
*/
virtual Model::DisconnectParticipantOutcome DisconnectParticipant(const Model::DisconnectParticipantRequest& request) const;
/**
* A Callable wrapper for DisconnectParticipant that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DisconnectParticipantOutcomeCallable DisconnectParticipantCallable(const DisconnectParticipantRequestT& request) const
{
return SubmitCallable(&ConnectParticipantClient::DisconnectParticipant, request);
}
/**
* An Async wrapper for DisconnectParticipant that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DisconnectParticipantAsync(const DisconnectParticipantRequestT& request, const DisconnectParticipantResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ConnectParticipantClient::DisconnectParticipant, request, handler, context);
}
/**
* Provides a pre-signed URL for download of a completed attachment. This is an
* asynchronous API for use with active contacts.
* ConnectionToken
is used for invoking this API instead of
* ParticipantToken
.
The Amazon Connect Participant
* Service APIs do not use Signature
* Version 4 authentication.
See Also:
AWS
* API Reference
*/
virtual Model::GetAttachmentOutcome GetAttachment(const Model::GetAttachmentRequest& request) const;
/**
* A Callable wrapper for GetAttachment that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetAttachmentOutcomeCallable GetAttachmentCallable(const GetAttachmentRequestT& request) const
{
return SubmitCallable(&ConnectParticipantClient::GetAttachment, request);
}
/**
* An Async wrapper for GetAttachment that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetAttachmentAsync(const GetAttachmentRequestT& request, const GetAttachmentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ConnectParticipantClient::GetAttachment, request, handler, context);
}
/**
* Retrieves a transcript of the session, including details about any
* attachments. For information about accessing past chat contact transcripts for a
* persistent chat, see Enable
* persistent chat.
ConnectionToken
is used for
* invoking this API instead of ParticipantToken
.
The
* Amazon Connect Participant Service APIs do not use Signature
* Version 4 authentication.
See Also:
AWS
* API Reference
*/
virtual Model::GetTranscriptOutcome GetTranscript(const Model::GetTranscriptRequest& request) const;
/**
* A Callable wrapper for GetTranscript that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetTranscriptOutcomeCallable GetTranscriptCallable(const GetTranscriptRequestT& request) const
{
return SubmitCallable(&ConnectParticipantClient::GetTranscript, request);
}
/**
* An Async wrapper for GetTranscript that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetTranscriptAsync(const GetTranscriptRequestT& request, const GetTranscriptResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ConnectParticipantClient::GetTranscript, request, handler, context);
}
/**
* Sends an event.
ConnectionToken
is used for
* invoking this API instead of ParticipantToken
.
The
* Amazon Connect Participant Service APIs do not use Signature
* Version 4 authentication.
See Also:
AWS
* API Reference
*/
virtual Model::SendEventOutcome SendEvent(const Model::SendEventRequest& request) const;
/**
* A Callable wrapper for SendEvent that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::SendEventOutcomeCallable SendEventCallable(const SendEventRequestT& request) const
{
return SubmitCallable(&ConnectParticipantClient::SendEvent, request);
}
/**
* An Async wrapper for SendEvent that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void SendEventAsync(const SendEventRequestT& request, const SendEventResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ConnectParticipantClient::SendEvent, request, handler, context);
}
/**
* Sends a message.
ConnectionToken
is used for
* invoking this API instead of ParticipantToken
.
The
* Amazon Connect Participant Service APIs do not use Signature
* Version 4 authentication.
See Also:
AWS
* API Reference
*/
virtual Model::SendMessageOutcome SendMessage(const Model::SendMessageRequest& request) const;
/**
* A Callable wrapper for SendMessage that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::SendMessageOutcomeCallable SendMessageCallable(const SendMessageRequestT& request) const
{
return SubmitCallable(&ConnectParticipantClient::SendMessage, request);
}
/**
* An Async wrapper for SendMessage that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void SendMessageAsync(const SendMessageRequestT& request, const SendMessageResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ConnectParticipantClient::SendMessage, request, handler, context);
}
/**
* Provides a pre-signed Amazon S3 URL in response for uploading the file
* directly to S3.
ConnectionToken
is used for invoking
* this API instead of ParticipantToken
.
The Amazon
* Connect Participant Service APIs do not use Signature
* Version 4 authentication.
See Also:
AWS
* API Reference
*/
virtual Model::StartAttachmentUploadOutcome StartAttachmentUpload(const Model::StartAttachmentUploadRequest& request) const;
/**
* A Callable wrapper for StartAttachmentUpload that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::StartAttachmentUploadOutcomeCallable StartAttachmentUploadCallable(const StartAttachmentUploadRequestT& request) const
{
return SubmitCallable(&ConnectParticipantClient::StartAttachmentUpload, request);
}
/**
* An Async wrapper for StartAttachmentUpload that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void StartAttachmentUploadAsync(const StartAttachmentUploadRequestT& request, const StartAttachmentUploadResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ConnectParticipantClient::StartAttachmentUpload, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const ConnectParticipantClientConfiguration& clientConfiguration);
ConnectParticipantClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace ConnectParticipant
} // namespace Aws