olp-cpp-sdk  1.22.0
ResponseOk.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 
20 #pragma once
21 
22 #include <string>
23 #include <vector>
24 
25 #include <olp/dataservice/write/DataServiceWriteApi.h>
26 
27 namespace olp {
28 namespace dataservice {
29 namespace write {
30 namespace model {
35 class DATASERVICE_WRITE_API TraceID {
36  public:
37  TraceID() = default;
38  TraceID(const TraceID&) = default;
39  TraceID(TraceID&&) = default;
40  TraceID& operator=(const TraceID&) = default;
41  TraceID& operator=(TraceID&&) = default;
42  virtual ~TraceID() = default;
43 
44  private:
45  std::string parent_id_;
46  std::vector<std::string> generated_ids_;
47 
48  public:
57  const std::string& GetParentID() const { return parent_id_; }
58 
67  std::string& GetMutableParentID() { return parent_id_; }
68 
77  void SetParentID(const std::string& value) { this->parent_id_ = value; }
78 
87  const std::vector<std::string>& GetGeneratedIDs() const {
88  return generated_ids_;
89  }
90 
100  std::vector<std::string>& GetMutableGeneratedIDs() { return generated_ids_; }
101 
107  void SetGeneratedIDs(const std::vector<std::string>& value) {
108  this->generated_ids_ = value;
109  }
110 };
111 
113 class DATASERVICE_WRITE_API ResponseOk {
114  public:
115  ResponseOk() = default;
116  ResponseOk(const ResponseOk&) = default;
117  ResponseOk(ResponseOk&&) = default;
118  ResponseOk& operator=(const ResponseOk&) = default;
119  ResponseOk& operator=(ResponseOk&&) = default;
120  virtual ~ResponseOk() = default;
121 
122  private:
123  TraceID trace_id_;
124 
125  public:
135  const TraceID& GetTraceID() const { return trace_id_; }
136 
144  TraceID& GetMutableTraceID() { return trace_id_; }
145 
155  void SetTraceID(const TraceID& value) { this->trace_id_ = value; }
156 };
157 
158 } // namespace model
159 } // namespace write
160 } // namespace dataservice
161 } // namespace olp
Contians a response to a successful ingestSDII call.
Definition: ResponseOk.h:113
TraceID & GetMutableTraceID()
Gets a mutable reference to the trace ID of the request.
Definition: ResponseOk.h:144
const TraceID & GetTraceID() const
Gets the trace ID of the request.
Definition: ResponseOk.h:135
void SetTraceID(const TraceID &value)
Sets the trace ID of the request.
Definition: ResponseOk.h:155
Contains IDs that can be used to track your request and identify messages in a catalog.
Definition: ResponseOk.h:35
const std::vector< std::string > & GetGeneratedIDs() const
Gets the generated list of unique message IDs.
Definition: ResponseOk.h:87
std::vector< std::string > & GetMutableGeneratedIDs()
Gets a mutable reference to the generated list of unique message IDs.
Definition: ResponseOk.h:100
const std::string & GetParentID() const
Gets the unique ID of the list of messages.
Definition: ResponseOk.h:57
std::string & GetMutableParentID()
Gets a mutable reference to the unique ID of the list of messages.
Definition: ResponseOk.h:67
void SetParentID(const std::string &value)
Sets the unique ID for the list of messages.
Definition: ResponseOk.h:77
void SetGeneratedIDs(const std::vector< std::string > &value)
Sets the generated list of unique message IDs.
Definition: ResponseOk.h:107
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24