tgbotxx 1.1.6.9
Telegram Bot C++ Library
Loading...
Searching...
No Matches
ForumTopicEdited.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace tgbotxx {
8 ForumTopicEdited() = default;
9 explicit ForumTopicEdited(const nl::json& json) {
10 fromJson(json);
11 }
12
14 std::string name;
15
17 std::string iconCustomEmojiId;
18
19
22 nl::json toJson() const {
23 nl::json json = nl::json::object();
24 OBJECT_SERIALIZE_FIELD(json, "name", name);
25 OBJECT_SERIALIZE_FIELD(json, "icon_custom_emoji_id", iconCustomEmojiId);
26 return json;
27 }
28
30 void fromJson(const nl::json& json) {
31 OBJECT_DESERIALIZE_FIELD(json, "name", name, "", false);
32 OBJECT_DESERIALIZE_FIELD(json, "icon_custom_emoji_id", iconCustomEmojiId, "", true);
33 }
34 };
35}
#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 an edited forum topic. https://core....
nl::json toJson() const
Serializes this object to JSON.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::string name
Optional. New name of the topic, if it was edited.
std::string iconCustomEmojiId
Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty stri...
ForumTopicEdited(const nl::json &json)