olp-cpp-sdk  1.22.0
CheckDataExistsRequest.h
1 /*
2  * Copyright (C) 2019-2023 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 #pragma once
20 
21 #include <memory>
22 #include <string>
23 #include <utility>
24 #include <vector>
25 
26 #include <olp/dataservice/write/DataServiceWriteApi.h>
27 
28 namespace olp {
29 namespace dataservice {
30 namespace write {
31 namespace model {
32 
34 class DATASERVICE_WRITE_API CheckDataExistsRequest {
35  public:
36  CheckDataExistsRequest() = default;
39  CheckDataExistsRequest& operator=(const CheckDataExistsRequest&) = default;
40  CheckDataExistsRequest& operator=(CheckDataExistsRequest&&) = default;
41  virtual ~CheckDataExistsRequest() = default;
47  inline const std::string& GetLayerId() const { return layer_id_; }
48 
54  inline CheckDataExistsRequest& WithLayerId(const std::string& layer_id) {
55  layer_id_ = layer_id;
56  return *this;
57  }
58 
64  inline CheckDataExistsRequest& WithLayerId(std::string&& layer_id) {
65  layer_id_ = std::move(layer_id);
66  return *this;
67  }
68 
74  inline const std::string& GetDataHandle() const { return data_handle_; }
75 
85  const std::string& data_handle) {
86  data_handle_ = data_handle;
87  return *this;
88  }
89 
99  const std::string&& data_handle) {
100  data_handle_ = std::move(data_handle);
101  return *this;
102  }
103 
104  private:
105  std::string layer_id_;
106  std::string data_handle_;
107 };
108 } // namespace model
109 } // namespace write
110 } // namespace dataservice
111 } // namespace olp
Checks whether data is present in a layer.
Definition: CheckDataExistsRequest.h:34
CheckDataExistsRequest & WithLayerId(const std::string &layer_id)
Sets the layer ID to which the data blob belongs.
Definition: CheckDataExistsRequest.h:54
CheckDataExistsRequest & WithLayerId(std::string &&layer_id)
Sets the layer ID to which the data blob belongs.
Definition: CheckDataExistsRequest.h:64
const std::string & GetLayerId() const
Gets the layer ID to which the data blob belongs.
Definition: CheckDataExistsRequest.h:47
CheckDataExistsRequest & WithDataHandle(const std::string &&data_handle)
Sets the data handle that is associated with the data blob.
Definition: CheckDataExistsRequest.h:98
CheckDataExistsRequest & WithDataHandle(const std::string &data_handle)
Sets the data handle that is associated with the data blob.
Definition: CheckDataExistsRequest.h:84
const std::string & GetDataHandle() const
Gets the data handle that is associated with the data blob.
Definition: CheckDataExistsRequest.h:74
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24