Skip to content

Commit 0078be8

Browse files
authored
Review the dataservice-write API docs (#1280)
The API documentation should be aligned and follow the Doxygen documentation rules. Relates-To: OLPEDGE-855 Signed-off-by: Halyna Dumych <[email protected]>
1 parent 899b1f4 commit 0078be8

17 files changed

+866
-584
lines changed

olp-cpp-sdk-dataservice-write/include/olp/dataservice/write/IndexLayerClient.h

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -56,95 +56,99 @@ using UpdateIndexResponse =
5656
client::ApiResponse<client::ApiNoResult, client::ApiError>;
5757
using UpdateIndexCallback = std::function<void(UpdateIndexResponse response)>;
5858

59-
/**
60-
* @brief Client that is responsible for writing data to
61-
* a HERE platform index layer.
62-
*
63-
*/
59+
/// Publishes data to an index layer.
6460
class DATASERVICE_WRITE_API IndexLayerClient {
6561
public:
6662
/**
6763
* @brief Creates the `IndexLayerClient` instance.
68-
* @param catalog The HRN that specifies the catalog to which this client
69-
* writes.
70-
* @param settings Client settings used to control the behavior of the client
71-
* instance.
64+
*
65+
* @param catalog The HRN of the catalog to which this client writes.
66+
* @param settings The client settings used to control the behavior
67+
* of the client instance.
7268
*/
7369
IndexLayerClient(client::HRN catalog, client::OlpClientSettings settings);
7470

7571
/**
7672
* @brief Cancels all the ongoing operations that this client started.
7773
*
78-
* Returns instantly and does not wait for the callbacks.
74+
* It returns instantly and does not wait for callbacks.
7975
* Use this operation to cancel all the pending requests without
8076
* destroying the actual client instance.
8177
*/
8278
void CancelPendingRequests();
8379

8480
/**
85-
* @brief Publishes an index to an index layer.
86-
* @note Content-Type for this request is set implicitly based on the
87-
* layer metadata for the target layer on the HERE platform.
88-
* @param request PublishIndexRequest object that represents the
89-
* parameters for this PublishIndex call.
90-
* @return CancellableFuture that contains the PublishIndexResponse.
81+
* @brief Publishes the index to the index layer.
82+
*
83+
* @note The content-type for this request is set implicitly based on
84+
* the layer metadata of the target layer.
85+
*
86+
* @param request The `PublishIndexRequest` object.
87+
*
88+
* @return `CancellableFuture` that contains `PublishIndexResponse`.
9189
*/
9290
olp::client::CancellableFuture<PublishIndexResponse> PublishIndex(
9391
model::PublishIndexRequest request);
9492

9593
/**
96-
* @brief Publishes an index to an index layer.
97-
* @note Content-Type for this request is set implicitly based on the
98-
* layer metadata for the target layer on the HERE platform.
99-
* @param request PublishIndexRequest object that represents the
100-
* parameters for this PublishIndex call.
101-
* @param callback PublishIndexCallback that is called with the
102-
* PublishIndexResponse when the operation completes.
103-
* @return CancellationToken that can be used to cancel the ongoing
94+
* @brief Publishes the index to the index layer.
95+
*
96+
* @note The content-type for this request is set implicitly based on
97+
* the layer metadata of the target layer.
98+
*
99+
* @param request The `PublishIndexRequest` object.
100+
* @param callback `PublishIndexCallback` that is called with
101+
* `PublishIndexResponse` when the operation completes.
102+
*
103+
* @return `CancellationToken` that can be used to cancel the ongoing
104104
* request.
105105
*/
106106
olp::client::CancellationToken PublishIndex(
107107
model::PublishIndexRequest request, PublishIndexCallback callback);
108108

109109
/**
110-
* @brief Deletes a data blob that is stored under an index
110+
* @brief Deletes the data blob that is stored under the index
111111
* layer.
112-
* @param request DeleteIndexDataRequest object that represents the parameters
113-
* for the DeleteIndexData call.
114-
* @param callback DeleteIndexDataCallback that is called with
115-
* DeleteIndexDataResponse when the operation completes.
116-
* @return CancellationToken that can be used to cancel the ongoing
112+
*
113+
* @param request The `DeleteIndexDataRequest` object.
114+
* @param callback `DeleteIndexDataCallback` that is called with
115+
* `DeleteIndexDataResponse` when the operation completes.
116+
*
117+
* @return `CancellationToken` that can be used to cancel the ongoing
117118
* request.
118119
*/
119120
olp::client::CancellationToken DeleteIndexData(
120121
model::DeleteIndexDataRequest request, DeleteIndexDataCallback callback);
121122

122123
/**
123-
* @brief Deletes a data blob that is stored under an index
124+
* @brief Deletes the data blob that is stored under the index
124125
* layer.
125-
* @param request DeleteIndexDataRequest object that represents the parameters
126-
* for DeleteIndexData call.
127-
* @return CancellableFuture that contains the DeleteIndexDataResponse.
126+
*
127+
* @param request The `DeleteIndexDataRequest` object.
128+
*
129+
* @return `CancellableFuture` that contains `DeleteIndexDataResponse`.
128130
*/
129131
olp::client::CancellableFuture<DeleteIndexDataResponse> DeleteIndexData(
130132
model::DeleteIndexDataRequest request);
131133

132134
/**
133-
* @brief Updates index information to an index layer.
134-
* @param request UpdateIndexRequest object that represents the
135-
* parameters for this UpdateIndex call.
136-
* @return CancellableFuture that contains the PublishIndexResponse.
135+
* @brief Updates index information in the index layer.
136+
*
137+
* @param request The `UpdateIndexRequest` object.
138+
*
139+
* @return `CancellableFuture` that contains `PublishIndexResponse`.
137140
*/
138141
olp::client::CancellableFuture<UpdateIndexResponse> UpdateIndex(
139142
model::UpdateIndexRequest request);
140143

141144
/**
142-
* @brief Updates index information to an index layer
143-
* @param request PublishIndexRequest object that represents the
144-
* parameters for this PublishIndex call.
145-
* @param callback PublishIndexCallback that is called with the
146-
* PublishIndexResponse when the operation completes.
147-
* @return CancellationToken that can be used to cancel the ongoing
145+
* @brief Updates index information in the index layer.
146+
*
147+
* @param request The `UpdateIndexRequest` object.
148+
* @param callback `PublishIndexCallback` that is called with
149+
* `PublishIndexResponse` when the operation completes.
150+
*
151+
* @return `CancellationToken` that can be used to cancel the ongoing
148152
* request.
149153
*/
150154
olp::client::CancellationToken UpdateIndex(model::UpdateIndexRequest request,

olp-cpp-sdk-dataservice-write/include/olp/dataservice/write/StreamLayerClient.h

Lines changed: 64 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ using PublishSdiiResponse =
5555
client::ApiResponse<PublishSdiiResult, client::ApiError>;
5656
using PublishSdiiCallback = std::function<void(PublishSdiiResponse response)>;
5757

58-
/// @brief Client responsible for writing data to a HERE platform stream layer.
58+
/// Publishes data to a stream layer.
5959
class DATASERVICE_WRITE_API StreamLayerClient {
6060
public:
6161
/// An alias for the flush response.
@@ -65,14 +65,14 @@ class DATASERVICE_WRITE_API StreamLayerClient {
6565
using FlushCallback = std::function<void(FlushResponse response)>;
6666

6767
/**
68-
* @brief StreamLayerClient Constructor.
69-
* @param catalog The HRN that specifies the catalog to which this client
70-
* writes.
71-
* @param client_settings \c StreamLayerClient settings used to control
72-
* the behaviour of flush mechanism and other StreamLayerClient specific
68+
* @brief Creates the `StreamLayerClient` insatnce.
69+
*
70+
* @param catalog The HRN of the catalog to which this client writes.
71+
* @param client_settings The `StreamLayerClient` settings used to control
72+
* the behavior of the flush mechanism and other `StreamLayerClient`
7373
* properties.
74-
* @param settings Client settings used to control behaviour of this
75-
* StreamLayerClient instance.
74+
* @param settings The client settings used to control the behavior
75+
* of the client instance.
7676
*/
7777
StreamLayerClient(client::HRN catalog,
7878
StreamLayerClientSettings client_settings,
@@ -81,93 +81,105 @@ class DATASERVICE_WRITE_API StreamLayerClient {
8181
/**
8282
* @brief Cancels all the ongoing publish operations that this client started.
8383
*
84-
* Returns instantly and does not wait for the callbacks.
84+
* Returns instantly and does not wait for callbacks.
8585
* Use this operation to cancel all the pending publish requests without
8686
* destroying the actual client instance.
87-
* @note This operation does not cancel publish requests queued by the \ref
88-
* Queue method.
87+
*
88+
* @note This operation does not cancel publish requests queued by the
89+
* `Queue` method.
8990
*/
9091
void CancelPendingRequests();
9192

9293
/**
93-
* @brief Publishes data to a stream layer.
94-
* @note Content-Type for this request is implicitly based on the
95-
* layer metadata for the target layer on the HERE platform.
96-
* @param request PublishDataRequest object that represents the parameters for
97-
* this PublishData call.
98-
* @return CancellableFuture that contains the PublishDataResponse.
94+
* @brief Publishes data to the stream layer.
95+
*
96+
* @note The content-type for this request is set implicitly based on
97+
* the layer metadata of the target layer.
98+
*
99+
* @param request The `PublishDataRequest` object.
100+
*
101+
* @return `CancellableFuture` that contains `PublishDataResponse`.
99102
*/
100103
olp::client::CancellableFuture<PublishDataResponse> PublishData(
101104
model::PublishDataRequest request);
102105

103106
/**
104-
* @brief Publishes data to a stream layer.
105-
* @note Content-Type for this request is set implicitly based on the
106-
* layer metadata for the target layer on the HERE platform.
107-
* @param request PublishDataRequest object that represents the parameters for
108-
* this PublishData call.
109-
* @param callback PublishDataCallback that is called with the
110-
* PublishDataResponse when the operation completes.
111-
* @return CancellationToken that can be used to cancel the ongoing
107+
* @brief Publishes data to the stream layer.
108+
*
109+
* @note The content-type for this request is set implicitly based on
110+
* the layer metadata of the target layer.
111+
*
112+
* @param request The `PublishDataRequest` object.
113+
* @param callback `PublishDataCallback` that is called with
114+
* `PublishDataResponse` when the operation completes.
115+
*
116+
* @return `CancellationToken` that can be used to cancel the ongoing
112117
* request.
113118
*/
114119
olp::client::CancellationToken PublishData(model::PublishDataRequest request,
115120
PublishDataCallback callback);
116121

117122
/**
118-
* @brief Enqueues a PublishDataRequest that is sent over the wire.
119-
* @param request PublishDataRequest object that represents the parameters for
120-
* the call.
121-
* @return Optional boost that is boost::none if the queue call is
123+
* @brief Enqueues `PublishDataRequest` that is sent over the wire.
124+
*
125+
* @param request The `PublishDataRequest` object.
126+
*
127+
* @return An optional boost that is `boost::none` if the queue call is
122128
* successful. Otherwise, it contains a string with error details.
123129
*/
124130
boost::optional<std::string> Queue(model::PublishDataRequest request);
125131

126132
/**
127-
* @brief Flush PublishDataRequests that were queued via the Queue
128-
* API.
129-
* @param request \c FlushRequest object thatr represents the parameters for
130-
* this \c Flush method call.
131-
* @return CancellableFuture that contains the FlushResponse.
133+
* @brief Flushes `PublishDataRequests` that are queued via the Queue API.
134+
*
135+
* @param request The `FlushRequest` object.
136+
*
137+
* @return `CancellableFuture` that contains `FlushResponse`.
132138
*/
133139
olp::client::CancellableFuture<FlushResponse> Flush(
134140
model::FlushRequest request);
135141

136142
/**
137-
* @brief Flush PublishDataRequests that were queued via the Queue
138-
* API.
139-
* @param request \c FlushRequest object that represents the parameters for
140-
* this \c Flush method call.
143+
* @brief Flushes `PublishDataRequests` that are queued via the Queue API.
144+
*
145+
* @param request The `FlushRequest` object.
141146
* @param callback The callback that is called when all the flush
142-
* results (see \c FlushResponse) are available.
143-
* @return CancellationToken that can be used to cancel the ongoing
147+
* results (see `FlushResponse`) are available.
148+
*
149+
* @return `CancellationToken` that can be used to cancel the ongoing
144150
* request.
145151
*/
146152
olp::client::CancellationToken Flush(model::FlushRequest request,
147153
FlushCallback callback);
148154

149155
/**
150156
* @brief Sends a list of SDII messages to a stream layer.
151-
* The SDII message data must be in the SDII MessageList protobuf format. For
152-
* more information, please see the HERE platform Sensor Data Ingestion Interface
157+
*
158+
* SDII message data must be in the SDII Message List protobuf format.
159+
* The maximum size is 20 MB.
160+
* For more information, see the HERE platform Sensor Data Ingestion Interface
153161
* documentation and schemas.
154-
* @param request PublishSdiiRequest object that represents the parameters for
155-
* this PublishSdii call.
156-
* @return CancellableFuture that contains the PublishSdiiResponse.
162+
*
163+
* @param request The `PublishSdiiRequest` object.
164+
*
165+
* @return `CancellableFuture` that contains `PublishSdiiResponse`.
157166
*/
158167
olp::client::CancellableFuture<PublishSdiiResponse> PublishSdii(
159168
model::PublishSdiiRequest request);
160169

161170
/**
162171
* @brief Sends a list of SDII messages to a stream layer.
163-
* The SDII message data must be in the SDII MessageList protobuf format. For
164-
* more information, please see the HERE platform Sensor Data Ingestion Interface
172+
*
173+
* SDII message data must be in the SDII Message List protobuf format.
174+
* The maximum size is 20 MB.
175+
* For more information, see the HERE platform Sensor Data Ingestion Interface
165176
* documentation and schemas.
166-
* @param request PublishSdiiRequest object that represents the parameters for
167-
* this PublishSdii call.
168-
* @param callback PublishSdiiCallback that is called with the
169-
* PublishSdiiResponse when the operation completes.
170-
* @return CancellationToken that can be used to cancel the ongoing
177+
*
178+
* @param request `PublishSdiiRequest` object.
179+
* @param callback `PublishSdiiCallback` that is called with
180+
* `PublishSdiiResponse` when the operation completes.
181+
*
182+
* @return `CancellationToken` that can be used to cancel the ongoing
171183
* request.
172184
*/
173185
olp::client::CancellationToken PublishSdii(model::PublishSdiiRequest request,

olp-cpp-sdk-dataservice-write/include/olp/dataservice/write/StreamLayerClientSettings.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,12 @@ namespace olp {
2828
namespace dataservice {
2929
namespace write {
3030

31-
/**
32-
* @brief StreamLayerClientSettings settings class for \c StreamLayerClient. Use
33-
* this class to configure the behaviour of \c StreamLayerClient specific logic.
34-
*/
31+
/// Configures the behavior of the `StreamLayerClient` specific logic.
3532
struct DATASERVICE_WRITE_API StreamLayerClientSettings {
3633
/**
37-
* @brief The maximum number of requests that can be stored. Must be positive.
34+
* @brief The maximum number of requests that can be stored.
35+
*
36+
* Make sure it is a positive number.
3837
*/
3938
size_t maximum_requests = std::numeric_limits<size_t>::max();
4039
};

0 commit comments

Comments
 (0)