olp-cpp-sdk  1.22.0
VersionDependency.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 <cstdint>
23 #include <string>
24 #include <utility>
25 
26 #include <olp/dataservice/read/DataServiceReadApi.h>
27 
28 namespace olp {
29 namespace dataservice {
30 namespace read {
31 namespace model {
32 
36 class DATASERVICE_READ_API VersionDependency final {
37  public:
43  bool GetDirect() const { return direct_; }
44 
50  void SetDirect(bool direct) { direct_ = direct; }
51 
57  const std::string& GetHrn() const { return hrn_; }
58 
64  void SetHrn(std::string hrn) { hrn_ = std::move(hrn); }
65 
71  std::int64_t GetVersion() const { return version_; }
72 
78  void SetVersion(std::int64_t version) { version_ = version; }
79 
80  private:
81  bool direct_{false};
82  std::string hrn_;
83  std::int64_t version_{0};
84 };
85 
86 } // namespace model
87 } // namespace read
88 } // namespace dataservice
89 } // namespace olp
Represents a catalog version dependency.
Definition: VersionDependency.h:36
const std::string & GetHrn() const
Gets the HRN.
Definition: VersionDependency.h:57
void SetHrn(std::string hrn)
Sets the HRN.
Definition: VersionDependency.h:64
std::int64_t GetVersion() const
Gets the catalog version.
Definition: VersionDependency.h:71
void SetDirect(bool direct)
Sets the direct dependency status.
Definition: VersionDependency.h:50
bool GetDirect() const
Gets the direct dependency status.
Definition: VersionDependency.h:43
void SetVersion(std::int64_t version)
Sets the catalog version.
Definition: VersionDependency.h:78
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24