Page MenuHomePhorge

user.hpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

user.hpp

/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#pragma once
#include "types.hpp"
namespace Kazv {
struct ThirdPartyUser
{
/// A Matrix User ID represting a third party user.
std::string userid;
/// The protocol ID that the third party location is a part of.
std::string protocol;
/// Information used to identify this third party location.
JsonWrap fields;
};
}
namespace nlohmann
{
using namespace Kazv;
template<>
struct adl_serializer<ThirdPartyUser> {
static void to_json(json& jo, const ThirdPartyUser &pod)
{
if (! jo.is_object()) { jo = json::object(); }
jo["userid"s] = pod.userid;
jo["protocol"s] = pod.protocol;
jo["fields"s] = pod.fields;
}
static void from_json(const json &jo, ThirdPartyUser& result)
{
if (jo.contains("userid"s)) {
result.userid = jo.at("userid"s);
}
if (jo.contains("protocol"s)) {
result.protocol = jo.at("protocol"s);
}
if (jo.contains("fields"s)) {
result.fields = jo.at("fields"s);
}
}
};
}
namespace Kazv
{
} // namespace Kazv

File Metadata

Mime Type
text/x-c++
Expires
Fri, Jul 18, 12:23 PM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
261699
Default Alt Text
user.hpp (1 KB)

Event Timeline