olp-cpp-sdk  1.22.0
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 <boost/optional.hpp>
26 
27 #include <olp/dataservice/write/DataServiceWriteApi.h>
28 #include <olp/dataservice/write/generated/model/Details.h>
29 #include <olp/dataservice/write/generated/model/VersionDependency.h>
30 
31 namespace olp {
32 namespace dataservice {
33 namespace write {
34 namespace model {
35 
37 class DATASERVICE_WRITE_API Publication {
38  public:
39  Publication() = default;
40  Publication(const Publication&) = default;
41  Publication(Publication&&) = default;
42  Publication& operator=(const Publication&) = default;
43  Publication& operator=(Publication&&) = default;
44  virtual ~Publication() = default;
45 
46  private:
47  boost::optional<std::string> id_;
48  boost::optional<Details> details_;
49  boost::optional<std::vector<std::string>> layer_ids_;
50  boost::optional<int64_t> catalog_version_;
51  boost::optional<std::vector<VersionDependency>> version_dependencies_;
52 
53  public:
59  const boost::optional<std::string>& GetId() const { return id_; }
60 
66  boost::optional<std::string>& GetMutableId() { return id_; }
67 
73  void SetId(const std::string& value) { this->id_ = value; }
74 
80  const boost::optional<Details>& GetDetails() const { return details_; }
81 
87  boost::optional<Details>& GetMutableDetails() { return details_; }
88 
94  void SetDetails(const Details& value) { this->details_ = value; }
95 
101  const boost::optional<std::vector<std::string>>& GetLayerIds() const {
102  return layer_ids_;
103  }
104 
111  boost::optional<std::vector<std::string>>& GetMutableLayerIds() {
112  return layer_ids_;
113  }
114 
120  void SetLayerIds(const std::vector<std::string>& value) {
121  this->layer_ids_ = value;
122  }
123 
129  const boost::optional<int64_t>& GetCatalogVersion() const {
130  return catalog_version_;
131  }
132 
140  boost::optional<int64_t>& GetMutableCatalogVersion() {
141  return catalog_version_;
142  }
143 
149  void SetCatalogVersion(const int64_t& value) {
150  this->catalog_version_ = value;
151  }
152 
158  const boost::optional<std::vector<VersionDependency>>&
160  return version_dependencies_;
161  }
162 
168  boost::optional<std::vector<VersionDependency>>&
170  return version_dependencies_;
171  }
172 
178  void SetVersionDependencies(const std::vector<VersionDependency>& value) {
179  this->version_dependencies_ = value;
180  }
181 };
182 
183 } // namespace model
184 } // namespace write
185 } // namespace dataservice
186 } // namespace olp
Details of the publication.
Definition: Details.h:32
Contains information on a publication.
Definition: Publication.h:37
void SetCatalogVersion(const int64_t &value)
Sets the catalog version.
Definition: Publication.h:149
const boost::optional< Details > & GetDetails() const
Gets the details of the publication.
Definition: Publication.h:80
const boost::optional< std::vector< VersionDependency > > & GetVersionDependencies() const
Gets the version dependencies.
Definition: Publication.h:159
void SetVersionDependencies(const std::vector< VersionDependency > &value)
Sets the version dependencies.
Definition: Publication.h:178
boost::optional< std::vector< VersionDependency > > & GetMutableVersionDependencies()
Gets a mutable reference to the version dependencies.
Definition: Publication.h:169
const boost::optional< int64_t > & GetCatalogVersion() const
Gets the version of the catalog to be published.
Definition: Publication.h:129
void SetDetails(const Details &value)
Sets the details of the publication.
Definition: Publication.h:94
boost::optional< std::string > & GetMutableId()
Gets a mutable reference to the publication ID.
Definition: Publication.h:66
boost::optional< Details > & GetMutableDetails()
Gets a mutable reference to the details of the publication.
Definition: Publication.h:87
void SetId(const std::string &value)
Sets the publication ID.
Definition: Publication.h:73
void SetLayerIds(const std::vector< std::string > &value)
Sets the layer ID.
Definition: Publication.h:120
boost::optional< int64_t > & GetMutableCatalogVersion()
Gets a mutable reference to the version of the catalog to be published.
Definition: Publication.h:140
boost::optional< std::vector< std::string > > & GetMutableLayerIds()
Gets a mutable reference to the ID of the layer that should be published.
Definition: Publication.h:111
const boost::optional< std::vector< std::string > > & GetLayerIds() const
Gets the ID of the layer that should be published.
Definition: Publication.h:101
const boost::optional< std::string > & GetId() const
Gets the publication ID.
Definition: Publication.h:59
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24