tgbotxx 1.1.6.9
Telegram Bot C++ Library
Loading...
Searching...
No Matches
VideoChatScheduled.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace tgbotxx {
8 VideoChatScheduled() = default;
9 explicit VideoChatScheduled(const nl::json& json) {
10 fromJson(json);
11 }
12
14 std::time_t startDate{};
15
16
19 nl::json toJson() const {
20 nl::json json = nl::json::object();
21 OBJECT_SERIALIZE_FIELD(json, "start_date", startDate);
22 return json;
23 }
24
26 void fromJson(const nl::json& json) {
27 OBJECT_DESERIALIZE_FIELD(json, "start_date", startDate, 0, false);
28 }
29 };
30}
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
Definition Object.hpp:19
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
Definition Object.hpp:44
This object represents a service message about a video chat scheduled in the chat....
VideoChatScheduled(const nl::json &json)
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::time_t startDate
Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator.
nl::json toJson() const
Serializes this object to JSON.