26#include <olp/core/client/ApiError.h>
27#include <olp/core/client/ApiResponse.h>
28#include <olp/core/client/OlpClientSettings.h>
29#include <olp/core/porting/deprecated.h>
30#include <olp/dataservice/write/DataServiceWriteApi.h>
31#include <olp/dataservice/write/StreamLayerClientSettings.h>
32#include <olp/dataservice/write/generated/model/ResponseOk.h>
33#include <olp/dataservice/write/generated/model/ResponseOkSingle.h>
34#include <olp/dataservice/write/model/FlushRequest.h>
35#include <olp/dataservice/write/model/PublishDataRequest.h>
36#include <olp/dataservice/write/model/PublishSdiiRequest.h>
44namespace dataservice {
46class StreamLayerClientImpl;
49using PublishDataResponse =
50 client::ApiResponse<PublishDataResult, client::ApiError>;
51using PublishDataCallback = std::function<void(PublishDataResponse response)>;
54using PublishSdiiResponse =
55 client::ApiResponse<PublishSdiiResult, client::ApiError>;
56using PublishSdiiCallback = std::function<void(PublishSdiiResponse response)>;
120 PublishDataCallback callback);
186 PublishSdiiCallback callback);
189 std::shared_ptr<StreamLayerClientImpl> impl_;
A wrapper template that you can use to cancel a request or wait for it to finalize.
Definition ApiResponse.h:281
Cancels service requests.
Definition CancellationToken.h:33
Allows a Here Resource Name (HRN) to be passed to the operations that require it.
Definition HRN.h:34
Publishes data to a stream layer.
Definition StreamLayerClient.h:59
olp::client::CancellationToken PublishSdii(model::PublishSdiiRequest request, PublishSdiiCallback callback)
Sends a list of SDII messages to a stream layer.
olp::client::CancellableFuture< PublishSdiiResponse > PublishSdii(model::PublishSdiiRequest request)
Sends a list of SDII messages to a stream layer.
void CancelPendingRequests()
Cancels all the ongoing publish operations that this client started.
olp::client::CancellableFuture< PublishDataResponse > PublishData(model::PublishDataRequest request)
Publishes data to the stream layer.
std::vector< PublishDataResponse > FlushResponse
An alias for the flush response.
Definition StreamLayerClient.h:62
olp::client::CancellationToken Flush(model::FlushRequest request, FlushCallback callback)
Flushes PublishDataRequests that are queued via the Queue API.
olp::client::CancellableFuture< FlushResponse > Flush(model::FlushRequest request)
Flushes PublishDataRequests that are queued via the Queue API.
std::function< void(FlushResponse response)> FlushCallback
An alias for the flush callback.
Definition StreamLayerClient.h:65
porting::optional< std::string > Queue(model::PublishDataRequest request)
Enqueues PublishDataRequest that is sent over the wire.
olp::client::CancellationToken PublishData(model::PublishDataRequest request, PublishDataCallback callback)
Publishes data to the stream layer.
StreamLayerClient(client::HRN catalog, StreamLayerClientSettings client_settings, client::OlpClientSettings settings)
Creates the StreamLayerClient insatnce.
Flushes requests in a stream layer.
Definition FlushRequest.h:29
Publishes data to a stream layer.
Definition PublishDataRequest.h:35
Sends a list of SDII messages to a stream layer.
Definition PublishSdiiRequest.h:44
Represents a response to a successful data upload operation to a catalog layer.
Definition ResponseOkSingle.h:34
Contians a response to a successful ingestSDII call.
Definition ResponseOk.h:113
Rules all the other namespaces.
Definition AppleSignInProperties.h:24
Configures the behavior of the OlpClient class.
Definition OlpClientSettings.h:178
Configures the behavior of the StreamLayerClient specific logic.
Definition StreamLayerClientSettings.h:32