tgbotxx 1.1.6.9
Telegram Bot C++ Library
Loading...
Searching...
No Matches
VideoChatEnded.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace tgbotxx {
8 VideoChatEnded() = default;
9 explicit VideoChatEnded(const nl::json& json) {
10 fromJson(json);
11 }
12
14 std::int32_t duration{};
15
18 nl::json toJson() const {
19 nl::json json = nl::json::object();
20 OBJECT_SERIALIZE_FIELD(json, "duration", duration);
21 return json;
22 }
23
25 void fromJson(const nl::json& json) {
26 OBJECT_DESERIALIZE_FIELD(json, "duration", duration, 0, false);
27 }
28 };
29}
#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 ended in the chat. https://core....
nl::json toJson() const
Serializes this object to JSON.
std::int32_t duration
Video chat duration in seconds.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
VideoChatEnded(const nl::json &json)