/**
* 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
#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 IoTEventsData
{
namespace Model
{
class BatchPutMessageRequest;
class BatchUpdateDetectorRequest;
class DescribeDetectorRequest;
class ListDetectorsRequest;
typedef Aws::Utils::Outcome BatchPutMessageOutcome;
typedef Aws::Utils::Outcome BatchUpdateDetectorOutcome;
typedef Aws::Utils::Outcome DescribeDetectorOutcome;
typedef Aws::Utils::Outcome ListDetectorsOutcome;
typedef std::future BatchPutMessageOutcomeCallable;
typedef std::future BatchUpdateDetectorOutcomeCallable;
typedef std::future DescribeDetectorOutcomeCallable;
typedef std::future ListDetectorsOutcomeCallable;
} // namespace Model
class IoTEventsDataClient;
typedef std::function&) > BatchPutMessageResponseReceivedHandler;
typedef std::function&) > BatchUpdateDetectorResponseReceivedHandler;
typedef std::function&) > DescribeDetectorResponseReceivedHandler;
typedef std::function&) > ListDetectorsResponseReceivedHandler;
/**
* AWS IoT Events monitors your equipment or device fleets for failures or
* changes in operation, and triggers actions when such events occur. AWS IoT
* Events Data API commands enable you to send inputs to detectors, list detectors,
* and view or update a detector's status.
*/
class AWS_IOTEVENTSDATA_API IoTEventsDataClient : 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.
*/
IoTEventsDataClient(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.
*/
IoTEventsDataClient(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
*/
IoTEventsDataClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~IoTEventsDataClient();
/**
* Sends a set of messages to the AWS IoT Events system. Each message payload is
* transformed into the input you specify ("inputName") and ingested
* into any detectors that monitor that input. If multiple messages are sent, the
* order in which the messages are processed isn't guaranteed. To guarantee
* ordering, you must send messages one at a time and wait for a successful
* response.
See Also:
AWS
* API Reference
*/
virtual Model::BatchPutMessageOutcome BatchPutMessage(const Model::BatchPutMessageRequest& request) const;
/**
* Sends a set of messages to the AWS IoT Events system. Each message payload is
* transformed into the input you specify ("inputName") and ingested
* into any detectors that monitor that input. If multiple messages are sent, the
* order in which the messages are processed isn't guaranteed. To guarantee
* ordering, you must send messages one at a time and wait for a successful
* response.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::BatchPutMessageOutcomeCallable BatchPutMessageCallable(const Model::BatchPutMessageRequest& request) const;
/**
* Sends a set of messages to the AWS IoT Events system. Each message payload is
* transformed into the input you specify ("inputName") and ingested
* into any detectors that monitor that input. If multiple messages are sent, the
* order in which the messages are processed isn't guaranteed. To guarantee
* ordering, you must send messages one at a time and wait for a successful
* response.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void BatchPutMessageAsync(const Model::BatchPutMessageRequest& request, const BatchPutMessageResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Updates the state, variable values, and timer settings of one or more
* detectors (instances) of a specified detector model.
See Also:
* AWS
* API Reference
*/
virtual Model::BatchUpdateDetectorOutcome BatchUpdateDetector(const Model::BatchUpdateDetectorRequest& request) const;
/**
* Updates the state, variable values, and timer settings of one or more
* detectors (instances) of a specified detector model.
See Also:
* AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::BatchUpdateDetectorOutcomeCallable BatchUpdateDetectorCallable(const Model::BatchUpdateDetectorRequest& request) const;
/**
* Updates the state, variable values, and timer settings of one or more
* detectors (instances) of a specified detector model.
See Also:
* AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void BatchUpdateDetectorAsync(const Model::BatchUpdateDetectorRequest& request, const BatchUpdateDetectorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns information about the specified detector (instance).
See
* Also:
AWS
* API Reference
*/
virtual Model::DescribeDetectorOutcome DescribeDetector(const Model::DescribeDetectorRequest& request) const;
/**
* Returns information about the specified detector (instance).
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeDetectorOutcomeCallable DescribeDetectorCallable(const Model::DescribeDetectorRequest& request) const;
/**
* Returns information about the specified detector (instance).
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeDetectorAsync(const Model::DescribeDetectorRequest& request, const DescribeDetectorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Lists detectors (the instances of a detector model).
See Also:
* AWS
* API Reference
*/
virtual Model::ListDetectorsOutcome ListDetectors(const Model::ListDetectorsRequest& request) const;
/**
* Lists detectors (the instances of a detector model).
See Also:
* AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListDetectorsOutcomeCallable ListDetectorsCallable(const Model::ListDetectorsRequest& request) const;
/**
* Lists detectors (the instances of a detector model).
See Also:
* AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListDetectorsAsync(const Model::ListDetectorsRequest& request, const ListDetectorsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void BatchPutMessageAsyncHelper(const Model::BatchPutMessageRequest& request, const BatchPutMessageResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void BatchUpdateDetectorAsyncHelper(const Model::BatchUpdateDetectorRequest& request, const BatchUpdateDetectorResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeDetectorAsyncHelper(const Model::DescribeDetectorRequest& request, const DescribeDetectorResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListDetectorsAsyncHelper(const Model::ListDetectorsRequest& request, const ListDetectorsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace IoTEventsData
} // namespace Aws