/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace PersonalizeEvents
{
namespace Model
{
class PutEventsRequest;
typedef Aws::Utils::Outcome PutEventsOutcome;
typedef std::future PutEventsOutcomeCallable;
} // namespace Model
class PersonalizeEventsClient;
typedef std::function&) > PutEventsResponseReceivedHandler;
/**
* Amazon Personalize can consume real-time user event data, such as
* stream or click data, and use it for model training either alone
* or combined with historical data. For more information see
* recording-events.
*/
class AWS_PERSONALIZEEVENTS_API PersonalizeEventsClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* 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.
*/
PersonalizeEventsClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::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.
*/
PersonalizeEventsClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::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
*/
PersonalizeEventsClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~PersonalizeEventsClient();
/**
* Records user interaction event data. For more information see
* event-record-api.
See Also:
AWS
* API Reference
*/
virtual Model::PutEventsOutcome PutEvents(const Model::PutEventsRequest& request) const;
/**
* Records user interaction event data. For more information see
* event-record-api.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::PutEventsOutcomeCallable PutEventsCallable(const Model::PutEventsRequest& request) const;
/**
* Records user interaction event data. For more information see
* event-record-api.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void PutEventsAsync(const Model::PutEventsRequest& request, const PutEventsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void PutEventsAsyncHelper(const Model::PutEventsRequest& request, const PutEventsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace PersonalizeEvents
} // namespace Aws