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/OlpClientSettings.h>
28 #include <olp/core/porting/deprecated.h>
29 #include <olp/dataservice/write/DataServiceWriteApi.h>
30 #include <olp/dataservice/write/generated/model/ResponseOkSingle.h>
31 #include <olp/dataservice/write/model/DeleteIndexDataRequest.h>
32 #include <olp/dataservice/write/model/PublishIndexRequest.h>
33 #include <olp/dataservice/write/model/UpdateIndexRequest.h>
41 namespace dataservice {
43 class IndexLayerClientImpl;
46 using PublishIndexResponse =
47 client::ApiResponse<PublishIndexResult, client::ApiError>;
48 using PublishIndexCallback = std::function<void(PublishIndexResponse response)>;
50 using DeleteIndexDataResponse =
51 client::ApiResponse<client::ApiNoResult, client::ApiError>;
52 using DeleteIndexDataCallback =
53 std::function<void(DeleteIndexDataResponse response)>;
55 using UpdateIndexResponse =
56 client::ApiResponse<client::ApiNoResult, client::ApiError>;
57 using UpdateIndexCallback = std::function<void(UpdateIndexResponse response)>;
155 UpdateIndexCallback callback);
158 std::shared_ptr<IndexLayerClientImpl> 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 an index layer.
Definition: IndexLayerClient.h:60
IndexLayerClient(client::HRN catalog, client::OlpClientSettings settings)
Creates the IndexLayerClient instance.
olp::client::CancellableFuture< UpdateIndexResponse > UpdateIndex(model::UpdateIndexRequest request)
Updates index information in the index layer.
olp::client::CancellableFuture< PublishIndexResponse > PublishIndex(model::PublishIndexRequest request)
Publishes the index to the index layer.
olp::client::CancellationToken UpdateIndex(model::UpdateIndexRequest request, UpdateIndexCallback callback)
Updates index information in the index layer.
olp::client::CancellationToken DeleteIndexData(model::DeleteIndexDataRequest request, DeleteIndexDataCallback callback)
Deletes the data blob that is stored under the index layer.
olp::client::CancellationToken PublishIndex(model::PublishIndexRequest request, PublishIndexCallback callback)
Publishes the index to the index layer.
olp::client::CancellableFuture< DeleteIndexDataResponse > DeleteIndexData(model::DeleteIndexDataRequest request)
Deletes the data blob that is stored under the index layer.
void CancelPendingRequests()
Cancels all the ongoing operations that this client started.
Deletes index data from an index layer.
Definition: DeleteIndexDataRequest.h:34
Publishes data to an index layer.
Definition: PublishIndexRequest.h:37
Represents a response to a successful data upload operation to a catalog layer.
Definition: ResponseOkSingle.h:34
Updates an index in an index layer.
Definition: UpdateIndexRequest.h:37
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24
Configures the behavior of the OlpClient class.
Definition: OlpClientSettings.h:180