Page MenuHomePhorge

public_rooms_response.hpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

public_rooms_response.hpp

/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#pragma once
#include "types.hpp"
#include csapi/definitions/public_rooms_chunk
namespace Kazv::Api {
struct PublicRoomsChunk : PublicRoomsChunk
{
/// The room's join rule. When not present, the room is assumed to
/// be `public`. Note that rooms with `invite` join rules are not
/// expected here, but rooms with `knock` rules are given their
/// near-public nature.
std::optional<std::string> joinRule;
};
}
namespace nlohmann
{
using namespace Kazv;
using namespace Kazv::Api;
template<>
struct adl_serializer<PublicRoomsChunk> {
static void to_json(json& jo, const PublicRoomsChunk &pod)
{
if (! jo.is_object()) { jo = json::object(); }
jo = static_cast<const PublicRoomsChunk &>(pod);
addToJsonIfNeeded(jo, "join_rule"s, pod.joinRule);
}
static void from_json(const json &jo, PublicRoomsChunk& result)
{
static_cast<PublicRoomsChunk &>(result) = jo;
if (jo.contains("join_rule"s)) {
result.joinRule = jo.at("join_rule"s);
}
}
};
}
namespace Kazv::Api
{
} // namespace Kazv::Api

File Metadata

Mime Type
text/x-c++
Expires
Thu, Oct 2, 4:10 AM (13 m, 58 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
487220
Default Alt Text
public_rooms_response.hpp (1 KB)

Event Timeline