Page MenuHomePhorge

timeline_batch.hpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

timeline_batch.hpp

/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#pragma once
#include "types.hpp"
#include "csapi/definitions/room_event_batch.hpp"
namespace Kazv {
struct Timeline : RoomEventBatch
{
/// True if the number of events returned was limited by the ``limit`` on the filter.
std::optional<bool> limited;
/// A token that can be supplied to the ``from`` parameter of the rooms/{roomId}/messages endpoint.
std::optional<std::string> prevBatch;
};
}
namespace nlohmann
{
using namespace Kazv;
template<>
struct adl_serializer<Timeline> {
static void to_json(json& jo, const Timeline &pod)
{
jo = static_cast<const RoomEventBatch &>(pod);
addToJsonIfNeeded(jo, "limited"s, pod.limited);
addToJsonIfNeeded(jo, "prev_batch"s, pod.prevBatch);
}
static void from_json(const json &jo, Timeline& result)
{
static_cast<RoomEventBatch &>(result) = jo;
if (jo.contains("limited"s)) {
result.limited = jo.at("limited"s);
}
if (jo.contains("prev_batch"s)) {
result.prevBatch = jo.at("prev_batch"s);
}
}
};
}
namespace Kazv
{
} // namespace Kazv

File Metadata

Mime Type
text/x-c++
Expires
Tue, Jun 24, 8:49 PM (18 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
235014
Default Alt Text
timeline_batch.hpp (1 KB)

Event Timeline