tgbotxx 1.2.9.5
Telegram Bot C++ Library
Loading...
Searching...
No Matches
KeyboardButtonPollType.hpp
Go to the documentation of this file.
1#pragma once
3
4namespace tgbotxx {
9 explicit KeyboardButtonPollType(const nl::json& json) {
11 }
12
17 std::string type;
18
19
22 nl::json toJson() const {
23 nl::json json = nl::json::object();
25 return json;
26 }
27
29 void fromJson(const nl::json& json) {
30 OBJECT_DESERIALIZE_FIELD(json, "type", type, "", true);
31 }
32 };
33}
#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 type of a poll, which is allowed to be created and sent when the corresponding...
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::string type
Optional. “quiz“ or “regular“. If “quiz“ is passed, the user will be allowed to create only polls in ...
nl::json toJson() const
Serializes this object to JSON.