tgbotxx 1.2.9.5
Telegram Bot C++ Library
Loading...
Searching...
No Matches
UsersShared.hpp
Go to the documentation of this file.
1#pragma once
4
5namespace tgbotxx {
8 struct UsersShared {
9 UsersShared() = default;
10 explicit UsersShared(const nl::json& json) {
12 }
13
15 std::int32_t requestId{};
16
18 std::vector<Ptr<SharedUser>> users;
19
25 std::int64_t userId{};
26
29 nl::json toJson() const {
30 nl::json json = nl::json::object();
33 return json;
34 }
35
37 void fromJson(const nl::json& json) {
38 OBJECT_DESERIALIZE_FIELD(json, "request_id", requestId, 0, false);
40 }
41 };
42}
#define OBJECT_SERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field)
Definition Object.hpp:39
#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
#define OBJECT_DESERIALIZE_FIELD_PTR_ARRAY(json, json_field, array_field, optional)
Definition Object.hpp:111
std::shared_ptr< T > Ptr
Definition Ptr.hpp:6
This object contains information about the users whose identifiers were shared with the bot using a K...
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::vector< Ptr< SharedUser > > users
Information about users shared with the bot.
std::int64_t userId
Identifier of the shared user. This number may have more than 32 significant bits and some programmin...
std::int32_t requestId
Identifier of the request.
nl::json toJson() const
Serializes this object to JSON.
UsersShared(const nl::json &json)