Skip to content

Commit 020ed75

Browse files
Remove unused API from BlobAPI, ConfigAPI, IngestAPI and PublishAPI.
Remove non-used CancellableFuture APIs. Relates-To: OLPEDGE-1010 Signed-off-by: Diachenko Mykahilo <[email protected]>
1 parent 89d8216 commit 020ed75

File tree

8 files changed

+0
-330
lines changed

8 files changed

+0
-330
lines changed

olp-cpp-sdk-dataservice-write/src/generated/BlobApi.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,6 @@ namespace olp {
3434
namespace dataservice {
3535
namespace write {
3636

37-
CancellableFuture<PutBlobResponse> BlobApi::PutBlob(
38-
const OlpClient& client, const std::string& layer_id,
39-
const std::string& content_type, const std::string& data_handle,
40-
const std::shared_ptr<std::vector<unsigned char>>& data,
41-
const boost::optional<std::string>& billing_tag) {
42-
auto promise = std::make_shared<std::promise<PutBlobResponse>>();
43-
auto cancel_token = PutBlob(client, layer_id, content_type, data_handle, data,
44-
billing_tag, [promise](PutBlobResponse response) {
45-
promise->set_value(std::move(response));
46-
});
47-
return CancellableFuture<PutBlobResponse>(cancel_token, promise);
48-
}
49-
5037
CancellationToken BlobApi::PutBlob(
5138
const OlpClient& client, const std::string& layer_id,
5239
const std::string& content_type, const std::string& data_handle,

olp-cpp-sdk-dataservice-write/src/generated/BlobApi.h

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,33 +52,6 @@ using CheckBlobCallback = std::function<void(CheckBlobRespone)>;
5252
*/
5353
class BlobApi {
5454
public:
55-
/**
56-
* @brief Publishes a data blob
57-
* Persists the data blob in the underlying storage mechanism (volume). Use
58-
* this upload mechanism for blobs smaller than 50 MB. The size limit for
59-
* blobs uploaded this way is 5 GB but we do not recommend uploading blobs
60-
* this large with this method. When the operation completes successfully
61-
* there is no guarantee that the data blob will be immediately available
62-
* although in most cases it will be. To check if the data blob is available
63-
* use the HEAD method.
64-
* @param client Instance of OlpClient used to make REST request.
65-
* @param layer_id The ID of the layer that the data blob belongs to.
66-
* @param content_type The content type configured for the target layer.
67-
* @param data_handle The data handle (ID) represents an identifier for the
68-
* data blob.
69-
* @param data Content to be uploaded to OLP.
70-
* @param billing_tag Optional. An optional free-form tag which is used for
71-
* grouping billing records together. If supplied, it must be between 4 - 16
72-
* characters, contain only alpha/numeric ASCII characters [A-Za-z0-9].
73-
*
74-
* @return A CancellableFuture containing the PutBlobResponse.
75-
*/
76-
static client::CancellableFuture<PutBlobResponse> PutBlob(
77-
const client::OlpClient& client, const std::string& layer_id,
78-
const std::string& content_type, const std::string& data_handle,
79-
const std::shared_ptr<std::vector<unsigned char>>& data,
80-
const boost::optional<std::string>& billing_tag = boost::none);
81-
8255
/**
8356
* @brief Publishes a data blob
8457
* Persists the data blob in the underlying storage mechanism (volume). Use

olp-cpp-sdk-dataservice-write/src/generated/ConfigApi.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,6 @@ namespace dataservice {
3636
namespace write {
3737
using namespace olp::client;
3838

39-
CancellableFuture<CatalogResponse> ConfigApi::GetCatalog(
40-
std::shared_ptr<OlpClient> client, const std::string& catalog_hrn,
41-
boost::optional<std::string> billing_tag) {
42-
auto promise = std::make_shared<std::promise<CatalogResponse>>();
43-
44-
auto cancel_token =
45-
ConfigApi::GetCatalog(client, catalog_hrn, billing_tag,
46-
[promise](CatalogResponse catalog_response) {
47-
promise->set_value(std::move(catalog_response));
48-
});
49-
50-
return client::CancellableFuture<CatalogResponse>(cancel_token, promise);
51-
}
52-
5339
CancellationToken ConfigApi::GetCatalog(
5440
std::shared_ptr<OlpClient> client, const std::string& catalog_hrn,
5541
boost::optional<std::string> billing_tag,

olp-cpp-sdk-dataservice-write/src/generated/ConfigApi.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,6 @@ using CatalogCallback = std::function<void(CatalogResponse)>;
4343
*/
4444
class ConfigApi {
4545
public:
46-
/**
47-
* @brief Call to retrieve the configuration of a catalog.
48-
* @param client Instance of OlpClient used to make REST request.
49-
* @param catalog_hrn Full catalog name.
50-
* @param billing_tag An optional free-form tag which is used for grouping
51-
* billing records together. If supplied, it must be between 4 - 16
52-
* characters, contain only alpha/numeric ASCII characters [A-Za-z0-9].
53-
*
54-
* @return A CancellableFuture containing the CatalogResponse
55-
*/
56-
static client::CancellableFuture<CatalogResponse> GetCatalog(
57-
std::shared_ptr<client::OlpClient> client, const std::string& catalog_hrn,
58-
boost::optional<std::string> billing_tag);
59-
6046
/**
6147
* @brief Call to asynchronously retrieve the configuration of a catalog.
6248
* @param client Instance of OlpClient used to make REST request.

olp-cpp-sdk-dataservice-write/src/generated/IngestApi.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,6 @@ const std::string kQueryParamBillingTag = "billingTag";
4545
namespace olp {
4646
namespace dataservice {
4747
namespace write {
48-
olp::client::CancellableFuture<IngestDataResponse> IngestApi::IngestData(
49-
const OlpClient& client, const std::string& layer_id,
50-
const std::string& content_type,
51-
const std::shared_ptr<std::vector<unsigned char>>& data,
52-
const boost::optional<std::string>& trace_id,
53-
const boost::optional<std::string>& billing_tag,
54-
const boost::optional<std::string>& checksum) {
55-
auto promise = std::make_shared<std::promise<IngestDataResponse>>();
56-
auto cancel_token =
57-
IngestData(client, layer_id, content_type, data, trace_id, billing_tag,
58-
checksum, [promise](IngestDataResponse response) {
59-
promise->set_value(std::move(response));
60-
});
61-
return client::CancellableFuture<IngestDataResponse>(cancel_token, promise);
62-
}
63-
6448
client::CancellationToken IngestApi::IngestData(
6549
const client::OlpClient& client, const std::string& layer_id,
6650
const std::string& content_type,
@@ -103,21 +87,6 @@ client::CancellationToken IngestApi::IngestData(
10387
return cancel_token;
10488
}
10589

106-
olp::client::CancellableFuture<IngestSdiiResponse> IngestApi::IngestSDII(
107-
const OlpClient& client, const std::string& layer_id,
108-
const std::shared_ptr<std::vector<unsigned char>>& sdii_message_list,
109-
const boost::optional<std::string>& trace_id,
110-
const boost::optional<std::string>& billing_tag,
111-
const boost::optional<std::string>& checksum) {
112-
auto promise = std::make_shared<std::promise<IngestSdiiResponse>>();
113-
auto cancel_token =
114-
IngestSDII(client, layer_id, sdii_message_list, trace_id, billing_tag,
115-
checksum, [promise](IngestSdiiResponse response) {
116-
promise->set_value(std::move(response));
117-
});
118-
return client::CancellableFuture<IngestSdiiResponse>(cancel_token, promise);
119-
}
120-
12190
client::CancellationToken IngestApi::IngestSDII(
12291
const client::OlpClient& client, const std::string& layer_id,
12392
const std::shared_ptr<std::vector<unsigned char>>& sdii_message_list,

olp-cpp-sdk-dataservice-write/src/generated/IngestApi.h

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -51,37 +51,6 @@ using IngestSdiiCallback = std::function<void(IngestSdiiResponse)>;
5151
*/
5252
class IngestApi {
5353
public:
54-
/**
55-
* @brief Call to ingest data into an OLP Stream Layer.
56-
* @param client Instance of OlpClient used to make REST request.
57-
* @param layer_id Layer of the catalog where you want to store the data. The
58-
* layer type must be Stream.
59-
* @param content_type The content type configured for the target layer.
60-
* @param data Content to be uploaded to OLP.
61-
* @param trace_id Optional. A unique message ID, such as a UUID. This can be
62-
* included in the request if you want to use an ID that you define. If you do
63-
* not include an ID, one will be generated during ingestion and included in
64-
* the response. You can use this ID to track your request and identify the
65-
* message in the catalog.
66-
* @param billing_tag Optional. An optional free-form tag which is used for
67-
* grouping billing records together. If supplied, it must be between 4 - 16
68-
* characters, contain only alpha/numeric ASCII characters [A-Za-z0-9].
69-
* @param checksum A SHA-256 hash you can provide for
70-
* validation against the calculated value on the request body hash. This
71-
* verifies the integrity of your request and prevents modification by a third
72-
* party.It will be created by the service if not provided. A SHA-256 hash
73-
* consists of 256 bits or 64 chars.
74-
*
75-
* @return A CancellableFuture containing the IngestDataResponse.
76-
*/
77-
static olp::client::CancellableFuture<IngestDataResponse> IngestData(
78-
const client::OlpClient& client, const std::string& layer_id,
79-
const std::string& content_type,
80-
const std::shared_ptr<std::vector<unsigned char>>& data,
81-
const boost::optional<std::string>& trace_id = boost::none,
82-
const boost::optional<std::string>& billing_tag = boost::none,
83-
const boost::optional<std::string>& checksum = boost::none);
84-
8554
/**
8655
* @brief Call to ingest data into an OLP Stream Layer.
8756
* @param client Instance of OlpClient used to make REST request.
@@ -117,39 +86,6 @@ class IngestApi {
11786
const boost::optional<std::string>& checksum,
11887
IngestDataCallback callback);
11988

120-
/**
121-
* @brief Send list of SDII messages to a stream layer.
122-
* SDII message data must be in SDII MessageList protobuf format. For more
123-
* information please see the OLP Sensor Data Ingestion Interface
124-
* documentation and schemas.
125-
* @note the Content-Type for this request is always "application/x-protobuf".
126-
* @param client Instance of OlpClient used to make REST request.
127-
* @param layer_id Layer of the catalog where you want to store the data.
128-
* @param sdii_message_list SDII MessageList data encoded in protobuf format
129-
* according to the OLP SDII Message List schema. The maximum size is 20 MB.
130-
* @param trace_id Optional. A unique message ID, such as a UUID. This can be
131-
* included in the request if you want to use an ID that you define. If you do
132-
* not include an ID, one will be generated during ingestion and included in
133-
* the response. You can use this ID to track your request and identify the
134-
* message in the catalog.
135-
* @param billing_tag Optional. An optional free-form tag which is used for
136-
* grouping billing records together. If supplied, it must be between 4 - 16
137-
* characters, contain only alpha/numeric ASCII characters [A-Za-z0-9].
138-
* @param checksum A SHA-256 hash you can provide for
139-
* validation against the calculated value on the request body hash. This
140-
* verifies the integrity of your request and prevents modification by a third
141-
* party.It will be created by the service if not provided. A SHA-256 hash
142-
* consists of 256 bits or 64 chars.
143-
*
144-
* @return A CancellableFuture containing the IngestSdiiResponse.
145-
*/
146-
static olp::client::CancellableFuture<IngestSdiiResponse> IngestSDII(
147-
const client::OlpClient& client, const std::string& layer_id,
148-
const std::shared_ptr<std::vector<unsigned char>>& sdii_message_list,
149-
const boost::optional<std::string>& trace_id = boost::none,
150-
const boost::optional<std::string>& billing_tag = boost::none,
151-
const boost::optional<std::string>& checksum = boost::none);
152-
15389
/**
15490
* @brief Send list of SDII messages to a stream layer.
15591
* SDII message data must be in SDII MessageList protobuf format. For more

olp-cpp-sdk-dataservice-write/src/generated/PublishApi.cpp

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@ namespace olp {
4343
namespace dataservice {
4444
namespace write {
4545

46-
CancellableFuture<InitPublicationResponse> PublishApi::InitPublication(
47-
const OlpClient& client, const model::Publication& publication,
48-
const boost::optional<std::string>& billing_tag) {
49-
auto promise = std::make_shared<std::promise<InitPublicationResponse>>();
50-
auto cancel_token =
51-
InitPublication(client, publication, billing_tag,
52-
[promise](InitPublicationResponse response) {
53-
promise->set_value(std::move(response));
54-
});
55-
return CancellableFuture<InitPublicationResponse>(cancel_token, promise);
56-
}
57-
5846
CancellationToken PublishApi::InitPublication(
5947
const OlpClient& client, const model::Publication& publication,
6048
const boost::optional<std::string>& billing_tag,
@@ -92,19 +80,6 @@ CancellationToken PublishApi::InitPublication(
9280
return cancel_token;
9381
}
9482

95-
CancellableFuture<UploadPartitionsResponse> PublishApi::UploadPartitions(
96-
const OlpClient& client, const model::PublishPartitions& publish_partitions,
97-
const std::string& publication_id, const std::string& layer_id,
98-
const boost::optional<std::string>& billing_tag) {
99-
auto promise = std::make_shared<std::promise<UploadPartitionsResponse>>();
100-
auto cancel_token = UploadPartitions(
101-
client, publish_partitions, publication_id, layer_id, billing_tag,
102-
[promise](UploadPartitionsResponse response) {
103-
promise->set_value(std::move(response));
104-
});
105-
return CancellableFuture<UploadPartitionsResponse>(cancel_token, promise);
106-
}
107-
10883
CancellationToken PublishApi::UploadPartitions(
10984
const OlpClient& client, const model::PublishPartitions& publish_partitions,
11085
const std::string& publication_id, const std::string& layer_id,
@@ -145,18 +120,6 @@ CancellationToken PublishApi::UploadPartitions(
145120
return cancel_token;
146121
}
147122

148-
CancellableFuture<SubmitPublicationResponse> PublishApi::SubmitPublication(
149-
const OlpClient& client, const std::string& publication_id,
150-
const boost::optional<std::string>& billing_tag) {
151-
auto promise = std::make_shared<std::promise<SubmitPublicationResponse>>();
152-
auto cancel_token =
153-
SubmitPublication(client, publication_id, billing_tag,
154-
[promise](SubmitPublicationResponse response) {
155-
promise->set_value(std::move(response));
156-
});
157-
return CancellableFuture<SubmitPublicationResponse>(cancel_token, promise);
158-
}
159-
160123
CancellationToken PublishApi::SubmitPublication(
161124
const OlpClient& client, const std::string& publication_id,
162125
const boost::optional<std::string>& billing_tag,
@@ -190,18 +153,6 @@ CancellationToken PublishApi::SubmitPublication(
190153
return cancel_token;
191154
}
192155

193-
CancellableFuture<GetPublicationResponse> PublishApi::GetPublication(
194-
const OlpClient& client, const std::string& publication_id,
195-
const boost::optional<std::string>& billing_tag) {
196-
auto promise = std::make_shared<std::promise<GetPublicationResponse>>();
197-
auto cancel_token =
198-
GetPublication(client, publication_id, billing_tag,
199-
[promise](GetPublicationResponse response) {
200-
promise->set_value(std::move(response));
201-
});
202-
return CancellableFuture<GetPublicationResponse>(cancel_token, promise);
203-
}
204-
205156
CancellationToken PublishApi::GetPublication(
206157
const OlpClient& client, const std::string& publication_id,
207158
const boost::optional<std::string>& billing_tag,
@@ -236,18 +187,6 @@ CancellationToken PublishApi::GetPublication(
236187
return cancel_token;
237188
}
238189

239-
CancellableFuture<CancelPublicationResponse> PublishApi::CancelPublication(
240-
const client::OlpClient& client, const std::string& publication_id,
241-
const boost::optional<std::string>& billing_tag) {
242-
auto promise = std::make_shared<std::promise<CancelPublicationResponse>>();
243-
auto cancel_token =
244-
CancelPublication(client, publication_id, billing_tag,
245-
[promise](CancelPublicationResponse response) {
246-
promise->set_value(std::move(response));
247-
});
248-
return CancellableFuture<CancelPublicationResponse>(cancel_token, promise);
249-
}
250-
251190
CancellationToken PublishApi::CancelPublication(
252191
const client::OlpClient& client, const std::string& publication_id,
253192
const boost::optional<std::string>& billing_tag,

0 commit comments

Comments
 (0)