olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
VersionInfo.h
1/*
2 * Copyright (C) 2020-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 <map>
24#include <memory>
25#include <string>
26#include <utility>
27#include <vector>
28
29#include <olp/dataservice/read/DataServiceReadApi.h>
30#include <olp/dataservice/read/model/VersionDependency.h>
31
32namespace olp {
33namespace dataservice {
34namespace read {
35namespace model {
36
40class DATASERVICE_READ_API VersionInfo final {
41 public:
47 void SetDependencies(std::vector<VersionDependency> dependencies) {
48 dependencies_ = std::move(dependencies);
49 }
50
57 std::map<std::string, std::int64_t> partition_counts) {
58 partition_counts_ = std::move(partition_counts);
59 }
60
66 void SetVersion(std::int64_t version) { version_ = version; }
67
73 void SetTimestamp(std::int64_t timestamp) { timestamp_ = timestamp; }
74
80 const std::vector<VersionDependency>& GetDependencies() const {
81 return dependencies_;
82 }
83
89 const std::map<std::string, std::int64_t>& GetPartitionCounts() const {
90 return partition_counts_;
91 }
92
98 std::int64_t GetVersion() const { return version_; }
99
105 std::int64_t GetTimestamp() const { return timestamp_; }
106
107 private:
108 std::int64_t version_;
109 std::int64_t timestamp_;
110 std::vector<VersionDependency> dependencies_;
111 std::map<std::string, std::int64_t> partition_counts_;
112};
113
114} // namespace model
115} // namespace read
116} // namespace dataservice
117} // namespace olp
Represents a version info.
Definition VersionInfo.h:40
std::int64_t GetVersion() const
Gets the catalog version.
Definition VersionInfo.h:98
void SetDependencies(std::vector< VersionDependency > dependencies)
Sets the vector of version dependencies.
Definition VersionInfo.h:47
void SetVersion(std::int64_t version)
Sets the catalog version.
Definition VersionInfo.h:66
void SetPartitionCounts(std::map< std::string, std::int64_t > partition_counts)
Sets the map of partition counts.
Definition VersionInfo.h:56
const std::vector< VersionDependency > & GetDependencies() const
Gets the vector of version dependencies.
Definition VersionInfo.h:80
void SetTimestamp(std::int64_t timestamp)
Sets the timestamp of the catalog version.
Definition VersionInfo.h:73
std::int64_t GetTimestamp() const
Gets the timestamp of the catalog version.
Definition VersionInfo.h:105
const std::map< std::string, std::int64_t > & GetPartitionCounts() const
Gets the map of partition counts.
Definition VersionInfo.h:89
Rules all the other namespaces.
Definition AppleSignInProperties.h:24