tgbotxx 1.2.9.5
Telegram Bot C++ Library
Loading...
Searching...
No Matches
UserProfileAudios.hpp
Go to the documentation of this file.
1#pragma once
4
5namespace tgbotxx {
9 UserProfileAudios() = default;
10 explicit UserProfileAudios(const nl::json& json) {
12 }
13
15 std::int32_t totalCount;
16
18 std::vector<Ptr<Audio>> audios;
19
20
23 nl::json toJson() const {
24 nl::json json = nl::json::object();
25 OBJECT_SERIALIZE_FIELD(json, "total_count", totalCount);
27 return json;
28 }
29
31 void fromJson(const nl::json& json) {
32 OBJECT_DESERIALIZE_FIELD(json, "total_count", totalCount, 0, false);
34 }
35 };
36}
#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 represents the audios displayed on a user's profile. https://core.telegram....
nl::json toJson() const
Serializes this object to JSON.
std::vector< Ptr< Audio > > audios
Requested profile audios.
UserProfileAudios(const nl::json &json)
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::int32_t totalCount
Total number of profile audios for the target user.