libkazv
user_identifier.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 {
12 struct UserIdentifier
13 {
14 
16  std::string type;
17 
20 };
21 
22 }
23 namespace nlohmann
24 {
25 using namespace Kazv;
26 using namespace Kazv::Api;
27 template<>
28 struct adl_serializer<UserIdentifier> {
29  static void to_json(json& jo, const UserIdentifier &pod)
30  {
31  if (! jo.is_object()) { jo = json::object(); }
32 
33  addPropertyMapToJson(jo, pod.additionalProperties);
34  jo["type"s] = pod.type;
35 
36  }
37  static void from_json(const json &jo, UserIdentifier& result)
38  {
39 
40  if (jo.contains("type"s)) {
41  result.type = jo.at("type"s);
42  }
43  result.additionalProperties = jo;
44  }
45 };
46  }
47 
48  namespace Kazv::Api
49  {
50 } // namespace Kazv::Api
types.hpp
nlohmann
Definition: location.hpp:26
Kazv::Api::UserIdentifier::type
std::string type
The type of identification. See Identifier types for supported values and additional property descrip...
Definition: user_identifier.hpp:20
Kazv
Definition: location.hpp:10
Kazv::addPropertyMapToJson
void addPropertyMapToJson(json &j, MapT &&arg)
Definition: types.hpp:91
Kazv::json
nlohmann::json json
Definition: jsonwrap.hpp:20
Kazv::Api
Definition: location.hpp:10
Kazv::JsonWrap
Definition: jsonwrap.hpp:22
Kazv::Api::UserIdentifier::additionalProperties
JsonWrap additionalProperties
Identification information for a user.
Definition: user_identifier.hpp:23
nlohmann::adl_serializer< UserIdentifier >::to_json
static void to_json(json &jo, const UserIdentifier &pod)
Definition: user_identifier.hpp:29
Kazv::Api::UserIdentifier
Identification information for a user.
Definition: user_identifier.hpp:14
nlohmann::adl_serializer< UserIdentifier >::from_json
static void from_json(const json &jo, UserIdentifier &result)
Definition: user_identifier.hpp:37