tgbotxx 1.2.9.5
Telegram Bot C++ Library
Loading...
Searching...
No Matches
MessageAutoDeleteTimerChanged.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace tgbotxx {
9 explicit MessageAutoDeleteTimerChanged(const nl::json& json) {
11 }
13 std::time_t messageAutoDeleteTime{};
14
17 nl::json toJson() const {
18 nl::json json = nl::json::object();
19 OBJECT_SERIALIZE_FIELD(json, "message_auto_delete_time", messageAutoDeleteTime);
20 return json;
21 }
22
24 void fromJson(const nl::json& json) {
25 OBJECT_DESERIALIZE_FIELD(json, "message_auto_delete_time", messageAutoDeleteTime, 0, false);
26 }
27 };
28}
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Serialize.
Definition Object.hpp:27
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
Definition Object.hpp:64
std::shared_ptr< T > Ptr
Definition Ptr.hpp:6
This object represents a service message about a change in auto-delete timer settings....
nl::json toJson() const
Serializes this object to JSON.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::time_t messageAutoDeleteTime
New auto-delete time for messages in the chat; in seconds.