olp-cpp-sdk  1.19.0
Api.h
1 /*
2  * Copyright (C) 2020 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 <map>
23 #include <string>
24 #include <vector>
25 
26 namespace olp {
27 namespace client {
31 class Api {
32  public:
33  Api() = default;
34  virtual ~Api() = default;
35 
41  const std::string& GetApi() const { return api_; }
47  std::string& GetMutableApi() { return api_; }
53  void SetApi(const std::string& value) { this->api_ = value; }
59  const std::string& GetVersion() const { return version_; }
65  std::string& GetMutableVersion() { return version_; }
71  void SetVersion(const std::string& value) { this->version_ = value; }
77  const std::string& GetBaseUrl() const { return baseUrl_; }
83  std::string& GetMutableBaseUrl() { return baseUrl_; }
89  void SetBaseUrl(const std::string& value) { this->baseUrl_ = value; }
95  const std::map<std::string, std::string>& GetParameters() const {
96  return parameters_;
97  }
103  std::map<std::string, std::string>& GetMutableParameters() {
104  return parameters_;
105  }
111  void SetParameters(const std::map<std::string, std::string>& value) {
112  this->parameters_ = value;
113  }
114 
115  private:
116  std::string api_;
117  std::string version_;
118  std::string baseUrl_;
119  std::map<std::string, std::string> parameters_;
120 };
121 
123 using Apis = std::vector<Api>;
124 
125 } // namespace client
126 } // namespace olp
The API Services provided by the HERE platform.
Definition: Api.h:31
void SetApi(const std::string &value)
Sets the API name.
Definition: Api.h:53
const std::map< std::string, std::string > & GetParameters() const
Gets a map of parameters.
Definition: Api.h:95
std::string & GetMutableBaseUrl()
Gets a mutable reference to the URL of the API.
Definition: Api.h:83
const std::string & GetVersion() const
Gets a version of the API.
Definition: Api.h:59
const std::string & GetBaseUrl() const
Gets an URL of the API.
Definition: Api.h:77
std::string & GetMutableApi()
Gets a mutable reference to the API name.
Definition: Api.h:47
std::map< std::string, std::string > & GetMutableParameters()
Gets a mutable reference to the API parameters.
Definition: Api.h:103
std::string & GetMutableVersion()
Gets a mutable reference to the API version.
Definition: Api.h:65
void SetVersion(const std::string &value)
Sets the API version.
Definition: Api.h:71
void SetParameters(const std::map< std::string, std::string > &value)
Sets the API parameters.
Definition: Api.h:111
const std::string & GetApi() const
Gets an API name.
Definition: Api.h:41
void SetBaseUrl(const std::string &value)
Sets the URL of the API.
Definition: Api.h:89
std::vector< Api > Apis
An alias for the platform base URLs.
Definition: Api.h:123
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24