Gazebo Fuel_tools

API Reference

10.0.0~pre2
ServerConfig.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 Open Source Robotics Foundation
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*/
17
18#ifndef GZ_FUEL_TOOLS_SERVERCONFIG_HH_
19#define GZ_FUEL_TOOLS_SERVERCONFIG_HH_
20
21#include <memory>
22#include <string>
23
24#include <gz/common/URI.hh>
25
26#include "gz/fuel_tools/Export.hh"
27
28#ifdef _WIN32
29// Disable warning C4251 which is triggered by
30// std::unique_ptr
31#pragma warning(push)
32#pragma warning(disable: 4251)
33#endif
34
35namespace gz::fuel_tools
36{
38 class ServerConfigPrivate;
39
41 class GZ_FUEL_TOOLS_VISIBLE ServerConfig
42 {
44 public: ServerConfig();
45
48 public: ServerConfig(const ServerConfig &_orig);
49
52 public: ServerConfig &operator=(const ServerConfig &_orig);
53
55 public: ~ServerConfig();
56
60 public: void Clear();
61
64 public: common::URI Url() const;
65
68 public: void SetUrl(const common::URI &_url);
69
72 public: std::string ApiKey() const;
73
76 public: void SetApiKey(const std::string &_key);
77
80 public: std::string Version() const;
81
84 public: void SetVersion(const std::string &_version);
85
89 public: std::string AsString(const std::string &_prefix = "") const;
90
95 public: std::string AsPrettyString(const std::string &_prefix = "") const;
96
99 };
100} // namespace gz::fuel_tools
101
102#ifdef _MSC_VER
103#pragma warning(pop)
104#endif
105
106#endif // GZ_FUEL_TOOLS_SERVERCONFIG_HH_