olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
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 <string>
23#include <utility>
24
25#include <olp/dataservice/write/DataServiceWriteApi.h>
26
27namespace olp {
28namespace dataservice {
29namespace write {
30namespace model {
31
33class DATASERVICE_WRITE_API VersionDependency {
34 public:
35 VersionDependency() = default;
36 VersionDependency(const VersionDependency&) = default;
38 VersionDependency& operator=(const VersionDependency&) = default;
39 VersionDependency& operator=(VersionDependency&&) = default;
40 virtual ~VersionDependency() = default;
41
49 VersionDependency(bool direct, std::string hrn, int64_t version)
50 : direct_(direct), hrn_(std::move(hrn)), version_(version) {}
51
52 private:
53 bool direct_{false};
54 std::string hrn_;
55 int64_t version_{0};
56
57 public:
63 const bool& GetDirect() const { return direct_; }
64
70 bool& GetMutableDirect() { return direct_; }
71
77 void SetDirect(const bool& value) { this->direct_ = value; }
78
84 const std::string& GetHrn() const { return hrn_; }
85
91 std::string& GetMutableHrn() { return hrn_; }
92
98 void SetHrn(const std::string& value) { this->hrn_ = value; }
99
105 const int64_t& GetVersion() const { return version_; }
106
112 int64_t& GetMutableVersion() { return version_; }
113
119 void SetVersion(const int64_t& value) { this->version_ = value; }
120};
121
122} // namespace model
123} // namespace write
124} // namespace dataservice
125} // namespace olp
Represents catalog and version dependencies.
Definition VersionDependency.h:33
const bool & GetDirect() const
Gets the direct dependency status.
Definition VersionDependency.h:63
std::string & GetMutableHrn()
Gets a mutable reference to the catalog HRN.
Definition VersionDependency.h:91
void SetHrn(const std::string &value)
Sets the catalog HRN.
Definition VersionDependency.h:98
void SetDirect(const bool &value)
Sets the direct dependency status.
Definition VersionDependency.h:77
void SetVersion(const int64_t &value)
Sets the catalog version.
Definition VersionDependency.h:119
const std::string & GetHrn() const
Gets the catalog HRN.
Definition VersionDependency.h:84
bool & GetMutableDirect()
Gets a mutable reference to the direct dependency status.
Definition VersionDependency.h:70
const int64_t & GetVersion() const
Gets the catalog version.
Definition VersionDependency.h:105
int64_t & GetMutableVersion()
Gets a mutable reference to the catalog version.
Definition VersionDependency.h:112
VersionDependency(bool direct, std::string hrn, int64_t version)
Creates the VersionDependency instance.
Definition VersionDependency.h:49
Rules all the other namespaces.
Definition AppleSignInProperties.h:24