olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
Publication.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/core/porting/optional.h>
26#include <olp/dataservice/write/DataServiceWriteApi.h>
27#include <olp/dataservice/write/generated/model/Details.h>
28#include <olp/dataservice/write/generated/model/VersionDependency.h>
29
30namespace olp {
31namespace dataservice {
32namespace write {
33namespace model {
34
36class DATASERVICE_WRITE_API Publication {
37 public:
38 Publication() = default;
39 Publication(const Publication&) = default;
40 Publication(Publication&&) = default;
41 Publication& operator=(const Publication&) = default;
42 Publication& operator=(Publication&&) = default;
43 virtual ~Publication() = default;
44
45 private:
46 porting::optional<std::string> id_;
47 porting::optional<Details> details_;
48 porting::optional<std::vector<std::string>> layer_ids_;
49 porting::optional<int64_t> catalog_version_;
50 porting::optional<std::vector<VersionDependency>> version_dependencies_;
51
52 public:
58 const porting::optional<std::string>& GetId() const { return id_; }
59
65 porting::optional<std::string>& GetMutableId() { return id_; }
66
72 void SetId(const std::string& value) { this->id_ = value; }
73
79 const porting::optional<Details>& GetDetails() const { return details_; }
80
86 porting::optional<Details>& GetMutableDetails() { return details_; }
87
93 void SetDetails(const Details& value) { this->details_ = value; }
94
100 const porting::optional<std::vector<std::string>>& GetLayerIds() const {
101 return layer_ids_;
102 }
103
110 porting::optional<std::vector<std::string>>& GetMutableLayerIds() {
111 return layer_ids_;
112 }
113
119 void SetLayerIds(const std::vector<std::string>& value) {
120 this->layer_ids_ = value;
121 }
122
128 const porting::optional<int64_t>& GetCatalogVersion() const {
129 return catalog_version_;
130 }
131
139 porting::optional<int64_t>& GetMutableCatalogVersion() {
140 return catalog_version_;
141 }
142
148 void SetCatalogVersion(const int64_t& value) {
149 this->catalog_version_ = value;
150 }
151
157 const porting::optional<std::vector<VersionDependency>>&
159 return version_dependencies_;
160 }
161
167 porting::optional<std::vector<VersionDependency>>&
169 return version_dependencies_;
170 }
171
177 void SetVersionDependencies(const std::vector<VersionDependency>& value) {
178 this->version_dependencies_ = value;
179 }
180};
181
182} // namespace model
183} // namespace write
184} // namespace dataservice
185} // namespace olp
Details of the publication.
Definition Details.h:32
Contains information on a publication.
Definition Publication.h:36
const porting::optional< std::vector< VersionDependency > > & GetVersionDependencies() const
Gets the version dependencies.
Definition Publication.h:158
void SetCatalogVersion(const int64_t &value)
Sets the catalog version.
Definition Publication.h:148
const porting::optional< std::string > & GetId() const
Gets the publication ID.
Definition Publication.h:58
porting::optional< std::vector< std::string > > & GetMutableLayerIds()
Gets a mutable reference to the ID of the layer that should be published.
Definition Publication.h:110
void SetVersionDependencies(const std::vector< VersionDependency > &value)
Sets the version dependencies.
Definition Publication.h:177
const porting::optional< int64_t > & GetCatalogVersion() const
Gets the version of the catalog to be published.
Definition Publication.h:128
porting::optional< std::string > & GetMutableId()
Gets a mutable reference to the publication ID.
Definition Publication.h:65
const porting::optional< std::vector< std::string > > & GetLayerIds() const
Gets the ID of the layer that should be published.
Definition Publication.h:100
void SetDetails(const Details &value)
Sets the details of the publication.
Definition Publication.h:93
porting::optional< Details > & GetMutableDetails()
Gets a mutable reference to the details of the publication.
Definition Publication.h:86
void SetId(const std::string &value)
Sets the publication ID.
Definition Publication.h:72
porting::optional< int64_t > & GetMutableCatalogVersion()
Gets a mutable reference to the version of the catalog to be published.
Definition Publication.h:139
void SetLayerIds(const std::vector< std::string > &value)
Sets the layer ID.
Definition Publication.h:119
const porting::optional< Details > & GetDetails() const
Gets the details of the publication.
Definition Publication.h:79
porting::optional< std::vector< VersionDependency > > & GetMutableVersionDependencies()
Gets a mutable reference to the version dependencies.
Definition Publication.h:168
Rules all the other namespaces.
Definition AppleSignInProperties.h:24