24 #include <olp/core/client/ApiError.h>
25 #include <olp/core/client/ApiNoResult.h>
26 #include <olp/core/client/ApiResponse.h>
27 #include <olp/core/client/HRN.h>
28 #include <olp/core/client/OlpClientSettings.h>
29 #include <olp/core/porting/deprecated.h>
31 #include <olp/dataservice/write/DataServiceWriteApi.h>
32 #include <olp/dataservice/write/generated/model/Publication.h>
33 #include <olp/dataservice/write/generated/model/ResponseOk.h>
34 #include <olp/dataservice/write/generated/model/ResponseOkSingle.h>
35 #include <olp/dataservice/write/model/CheckDataExistsRequest.h>
36 #include <olp/dataservice/write/model/PublishPartitionDataRequest.h>
37 #include <olp/dataservice/write/model/StartBatchRequest.h>
38 #include <olp/dataservice/write/model/VersionResponse.h>
41 namespace dataservice {
44 using StartBatchResult = model::Publication;
45 using StartBatchResponse =
46 client::ApiResponse<StartBatchResult, client::ApiError>;
47 using StartBatchCallback = std::function<void(StartBatchResponse)>;
49 using GetBaseVersionResult = model::VersionResponse;
50 using GetBaseVersionResponse =
51 client::ApiResponse<GetBaseVersionResult, client::ApiError>;
52 using GetBaseVersionCallback = std::function<void(GetBaseVersionResponse)>;
54 using GetBatchResult = model::Publication;
55 using GetBatchResponse = client::ApiResponse<GetBatchResult, client::ApiError>;
56 using GetBatchCallback = std::function<void(GetBatchResponse)>;
58 using CompleteBatchResult = client::ApiNoResult;
59 using CompleteBatchResponse =
60 client::ApiResponse<CompleteBatchResult, client::ApiError>;
61 using CompleteBatchCallback =
62 std::function<void(CompleteBatchResponse response)>;
64 using CancelBatchResult = client::ApiNoResult;
65 using CancelBatchResponse =
66 client::ApiResponse<CancelBatchResult, client::ApiError>;
67 using CancelBatchCallback = std::function<void(CancelBatchResponse response)>;
69 using PublishPartitionDataResponse =
70 client::ApiResponse<model::ResponseOkSingle, client::ApiError>;
71 using PublishPartitionDataCallback =
72 std::function<void(PublishPartitionDataResponse response)>;
74 using CheckDataExistsStatusCode = int;
75 using CheckDataExistsResponse =
76 client::ApiResponse<CheckDataExistsStatusCode, client::ApiError>;
77 using CheckDataExistsCallback =
78 std::function<void(CheckDataExistsResponse response)>;
80 class VersionedLayerClientImpl;
115 StartBatchCallback callback);
135 GetBaseVersionCallback callback);
159 GetBatchCallback callback);
182 CompleteBatchCallback callback);
205 CancelBatchCallback callback);
247 PublishPartitionDataCallback callback);
273 std::shared_ptr<VersionedLayerClientImpl> 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 versioned layers.
Definition: VersionedLayerClient.h:83
olp::client::CancellableFuture< CancelBatchResponse > CancelBatch(const model::Publication &pub)
Cancels the batch operation.
olp::client::CancellableFuture< PublishPartitionDataResponse > PublishToBatch(const model::Publication &pub, model::PublishPartitionDataRequest request)
Publishes data to the versioned layer.
olp::client::CancellableFuture< CompleteBatchResponse > CompleteBatch(const model::Publication &pub)
Completes the batch operation and commits it to the HERE platform.
olp::client::CancellableFuture< GetBaseVersionResponse > GetBaseVersion()
Gets the latest version number of the catalog.
olp::client::CancellationToken GetBatch(const model::Publication &pub, GetBatchCallback callback)
Gets the details of the batch publication.
olp::client::CancellableFuture< GetBatchResponse > GetBatch(const model::Publication &pub)
Gets the details of the batch publication.
olp::client::CancellationToken CancelBatch(const model::Publication &pub, CancelBatchCallback callback)
Cancels the batch operation.
VersionedLayerClient(client::HRN catalog, client::OlpClientSettings settings)
Creates the VersionedLayerClient instance.
olp::client::CancellationToken PublishToBatch(const model::Publication &pub, model::PublishPartitionDataRequest request, PublishPartitionDataCallback callback)
Publishes data to the versioned layer.
olp::client::CancellationToken GetBaseVersion(GetBaseVersionCallback callback)
Gets the latest version number of the catalog.
olp::client::CancellationToken StartBatch(model::StartBatchRequest request, StartBatchCallback callback)
Starts the batch operation.
olp::client::CancellableFuture< CheckDataExistsResponse > CheckDataExists(model::CheckDataExistsRequest request)
Checks whether the data handle exits.
void CancelPendingRequests()
Cancels all the ongoing operations that this client started.
olp::client::CancellableFuture< StartBatchResponse > StartBatch(model::StartBatchRequest request)
Starts the batch operation.
olp::client::CancellationToken CheckDataExists(model::CheckDataExistsRequest request, CheckDataExistsCallback callback)
Checks whether the data handle exits.
olp::client::CancellationToken CompleteBatch(const model::Publication &pub, CompleteBatchCallback callback)
Completes the batch operation and commits it to the HERE platform.
Checks whether data is present in a layer.
Definition: CheckDataExistsRequest.h:34
Contains information on a publication.
Definition: Publication.h:37
Publishes data to a versioned and volatile layer.
Definition: PublishPartitionDataRequest.h:36
Starts a versioned batch operation.
Definition: StartBatchRequest.h:37
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24
Configures the behavior of the OlpClient class.
Definition: OlpClientSettings.h:180