/**
* 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 PersonalizeEvents
{
/**
* 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 Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef PersonalizeEventsClientConfiguration ClientConfigurationType;
typedef PersonalizeEventsEndpointProvider 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.
*/
PersonalizeEventsClient(const Aws::PersonalizeEvents::PersonalizeEventsClientConfiguration& clientConfiguration = Aws::PersonalizeEvents::PersonalizeEventsClientConfiguration(),
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.
*/
PersonalizeEventsClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::PersonalizeEvents::PersonalizeEventsClientConfiguration& clientConfiguration = Aws::PersonalizeEvents::PersonalizeEventsClientConfiguration());
/**
* 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,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::PersonalizeEvents::PersonalizeEventsClientConfiguration& clientConfiguration = Aws::PersonalizeEvents::PersonalizeEventsClientConfiguration());
/* 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.
*/
PersonalizeEventsClient(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.
*/
PersonalizeEventsClient(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
*/
PersonalizeEventsClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~PersonalizeEventsClient();
/**
* Records user interaction event data. For more information see Recording
* Events.
See Also:
AWS
* API Reference
*/
virtual Model::PutEventsOutcome PutEvents(const Model::PutEventsRequest& request) const;
/**
* A Callable wrapper for PutEvents that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::PutEventsOutcomeCallable PutEventsCallable(const PutEventsRequestT& request) const
{
return SubmitCallable(&PersonalizeEventsClient::PutEvents, request);
}
/**
* An Async wrapper for PutEvents that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void PutEventsAsync(const PutEventsRequestT& request, const PutEventsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&PersonalizeEventsClient::PutEvents, request, handler, context);
}
/**
* Adds one or more items to an Items dataset. For more information see Importing
* Items Incrementally.
See Also:
AWS
* API Reference
*/
virtual Model::PutItemsOutcome PutItems(const Model::PutItemsRequest& request) const;
/**
* A Callable wrapper for PutItems that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::PutItemsOutcomeCallable PutItemsCallable(const PutItemsRequestT& request) const
{
return SubmitCallable(&PersonalizeEventsClient::PutItems, request);
}
/**
* An Async wrapper for PutItems that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void PutItemsAsync(const PutItemsRequestT& request, const PutItemsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&PersonalizeEventsClient::PutItems, request, handler, context);
}
/**
* Adds one or more users to a Users dataset. For more information see Importing
* Users Incrementally.
See Also:
AWS
* API Reference
*/
virtual Model::PutUsersOutcome PutUsers(const Model::PutUsersRequest& request) const;
/**
* A Callable wrapper for PutUsers that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::PutUsersOutcomeCallable PutUsersCallable(const PutUsersRequestT& request) const
{
return SubmitCallable(&PersonalizeEventsClient::PutUsers, request);
}
/**
* An Async wrapper for PutUsers that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void PutUsersAsync(const PutUsersRequestT& request, const PutUsersResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&PersonalizeEventsClient::PutUsers, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const PersonalizeEventsClientConfiguration& clientConfiguration);
PersonalizeEventsClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace PersonalizeEvents
} // namespace Aws