tgbotxx  1.1.6.9
Telegram Bot C++ Library
BotShortDescription.hpp
Go to the documentation of this file.
1 #pragma once
3 
4 namespace tgbotxx {
8  BotShortDescription() = default;
9  explicit BotShortDescription(const nl::json& json) {
10  fromJson(json);
11  }
12 
14  std::string shortDescription;
15 
18  nl::json toJson() const {
19  nl::json json = nl::json::object();
20  OBJECT_SERIALIZE_FIELD(json, "short_description", shortDescription);
21  return json;
22  }
23 
25  void fromJson(const nl::json& json) {
26  OBJECT_DESERIALIZE_FIELD(json, "short_description", shortDescription, "", 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
Definition: Api.hpp:14
This object represents the bot's short description. https://core.telegram.org/bots/api#botshortdescri...
nl::json toJson() const
Serializes this object to JSON.
void fromJson(const nl::json &json)
Deserializes this object from JSON.
BotShortDescription(const nl::json &json)
std::string shortDescription
The bot's short description.