libkazv
homeserver.hpp
Go to the documentation of this file.
1 /******************************************************************************
2  * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
3  */
4 
5 #pragma once
6 
7 #include "types.hpp"
8 
9 
10 namespace Kazv::Api {
13 {
14 
16  std::string baseUrl;
17 };
18 
19 }
20 namespace nlohmann
21 {
22 using namespace Kazv;
23 using namespace Kazv::Api;
24 template<>
25 struct adl_serializer<HomeserverInformation> {
26  static void to_json(json& jo, const HomeserverInformation &pod)
27  {
28  if (! jo.is_object()) { jo = json::object(); }
29 
30 
31  jo["base_url"s] = pod.baseUrl;
32 
33  }
34  static void from_json(const json &jo, HomeserverInformation& result)
35  {
36 
37  if (jo.contains("base_url"s)) {
38  result.baseUrl = jo.at("base_url"s);
39  }
40 
41  }
42 };
43  }
44 
45  namespace Kazv::Api
46  {
47 } // namespace Kazv::Api
Definition: location.hpp:10
Definition: location.hpp:10
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:27
Used by clients to discover homeserver information.
Definition: homeserver.hpp:13
std::string baseUrl
The base URL for the homeserver for client-server connections.
Definition: homeserver.hpp:16
static void from_json(const json &jo, HomeserverInformation &result)
Definition: homeserver.hpp:34
static void to_json(json &jo, const HomeserverInformation &pod)
Definition: homeserver.hpp:26