olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
IndexLayerClient.h
1/*
2 * Copyright (C) 2019-2021 HERE Europe B.V.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 * License-Filename: LICENSE
18 */
19
20#pragma once
21
22#include <memory>
23
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>
34
35namespace olp {
36namespace client {
37struct Error;
38class HRN;
39} // namespace client
40
41namespace dataservice {
42namespace write {
43class IndexLayerClientImpl;
44
46using PublishIndexResponse =
47 client::ApiResponse<PublishIndexResult, client::ApiError>;
48using PublishIndexCallback = std::function<void(PublishIndexResponse response)>;
49
50using DeleteIndexDataResponse =
51 client::ApiResponse<client::ApiNoResult, client::ApiError>;
52using DeleteIndexDataCallback =
53 std::function<void(DeleteIndexDataResponse response)>;
54
55using UpdateIndexResponse =
56 client::ApiResponse<client::ApiNoResult, client::ApiError>;
57using UpdateIndexCallback = std::function<void(UpdateIndexResponse response)>;
58
160
161} // namespace write
162} // namespace dataservice
163} // namespace olp
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< 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::CancellableFuture< DeleteIndexDataResponse > DeleteIndexData(model::DeleteIndexDataRequest request)
Deletes the data blob that is stored under 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< UpdateIndexResponse > UpdateIndex(model::UpdateIndexRequest request)
Updates index information in 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:36
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:36
Rules all the other namespaces.
Definition AppleSignInProperties.h:24
Configures the behavior of the OlpClient class.
Definition OlpClientSettings.h:178