olp-cpp-sdk  1.22.0
VersionsResponseEntry.h
1 /*
2  * Copyright (C) 2022 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 <utility>
23 #include <vector>
24 
25 #include <olp/dataservice/read/DataServiceReadApi.h>
26 #include <olp/dataservice/read/model/CatalogVersion.h>
27 
28 namespace olp {
29 namespace dataservice {
30 namespace read {
31 namespace model {
32 
34 class DATASERVICE_READ_API VersionsResponseEntry {
35  public:
36  using CatalogVersions = std::vector<CatalogVersion>;
37 
43  void SetCatalogVersions(CatalogVersions catalog_versions) {
44  catalog_versions_ = std::move(catalog_versions);
45  }
46 
52  const CatalogVersions& GetCatalogVersions() const {
53  return catalog_versions_;
54  }
55 
61  int64_t GetVersion() const { return version_; }
62 
68  void SetVersion(int64_t version) { version_ = version; }
69 
70  private:
71  int64_t version_{0};
72  CatalogVersions catalog_versions_;
73 };
74 
75 } // namespace model
76 } // namespace read
77 } // namespace dataservice
78 } // namespace olp
Represents dependencies for the given catalog version.
Definition: VersionsResponseEntry.h:34
void SetVersion(int64_t version)
Sets the version of the catalog.
Definition: VersionsResponseEntry.h:68
int64_t GetVersion() const
Gets the version of the catalog.
Definition: VersionsResponseEntry.h:61
const CatalogVersions & GetCatalogVersions() const
Gets the information on the compatible versions.
Definition: VersionsResponseEntry.h:52
void SetCatalogVersions(CatalogVersions catalog_versions)
Sets the information on the dependencies.
Definition: VersionsResponseEntry.h:43
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24